diff --git a/README.md b/README.md index 217074fd379..75a59504858 100644 --- a/README.md +++ b/README.md @@ -17,20 +17,21 @@ The .NET client for Elasticsearch provides strongly typed requests and responses ## Compatibility -Language clients are forward compatible; meaning that the clients support -communicating with greater or equal minor versions of Elasticsearch without -breaking. It does not mean that the clients automatically support new features -of newer Elasticsearch versions; it is only possible after a release of a new -client version. For example, a 8.12 client version won't automatically support -the new features of the 8.13 version of Elasticsearch, the 8.13 client version -is required for that. Elasticsearch language clients are only backwards -compatible with default distributions and without guarantees made. - -| Elasticsearch Version | Elasticsearch-NET Branch | Supported | -| --------------------- | ------------------------- | --------- | -| main | main | | -| 8.x | 8.x | 8.x | -| 7.x | 7.x | 7.17 | +Language clients are **forward compatible**: + +Given a constant major version of the client, each related minor version is compatible with its equivalent- and all later Elasticsearch minor versions of the **same or next higher** major version. + +For example: + +| Client Version | Compatible with Elasticsearch `7.x` | Compatible with Elasticsearch `8.x` | Compatible with Elasticsearch `9.x` | +| ---: | :-- | :-- | :-- | +| 8.x | ❌ no | ✅ yes | ✅ yes | +| 7.x | ✅ yes | ✅ yes | ❌ no | + +Language clients are also **backward compatible** across minor versions within the **same** major version (without strong guarantees), but **never** backward compatible with earlier Elasticsearch major versions. + +> [!NOTE] +> Compatibility does not imply feature parity. For example, an `8.12` client is compatible with `8.13`, but does not support any of the new features introduced in Elasticsearch `8.13`. ## Installation diff --git a/docs/client-concepts/client-concepts.asciidoc b/docs/client-concepts/client-concepts.asciidoc new file mode 100644 index 00000000000..6b333b44615 --- /dev/null +++ b/docs/client-concepts/client-concepts.asciidoc @@ -0,0 +1,26 @@ +[[client-concepts]] += Client concepts + +The .NET client for {es} maps closely to the original {es} API. All +requests and responses are exposed through types, making it ideal for getting up and running quickly. + +[[serialization]] +== Serialization + +By default, the .NET client for {es} uses the Microsoft System.Text.Json library for serialization. The client understands how to serialize and +deserialize the request and response types correctly. It also handles (de)serialization of user POCO types representing documents read or written to {es}. + +The client has two distinct serialization responsibilities - serialization of the types owned by the `Elastic.Clients.Elasticsearch` library and serialization of source documents, modeled in application code. The first responsibility is entirely internal; the second is configurable. + +[[source-serialization]] +=== Source serialization + +Source serialization refers to the process of (de)serializing POCO types in consumer applications as source documents indexed and retrieved from {es}. A source serializer implementation handles serialization, with the default implementation using the `System.Text.Json` library. As a result, you may use `System.Text.Json` attributes and converters to control the serialization behavior. + +* <> + +* <> + +include::serialization/modeling-documents-with-types.asciidoc[] + +include::serialization/custom-serialization.asciidoc[] diff --git a/docs/client-concepts/serialization/custom-serialization.asciidoc b/docs/client-concepts/serialization/custom-serialization.asciidoc new file mode 100644 index 00000000000..3ca00988e20 --- /dev/null +++ b/docs/client-concepts/serialization/custom-serialization.asciidoc @@ -0,0 +1,232 @@ +[[customizing-source-serialization]] +==== Customizing source serialization + +The built-in source serializer handles most POCO document models correctly. Sometimes, you may need further control over how your types are serialized. + +NOTE: The built-in source serializer uses the https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/overview[Microsoft `System.Text.Json` library] internally. You can apply `System.Text.Json` attributes and converters to control the serialization of your document types. + +[discrete] +[[system-text-json-attributes]] +===== Using `System.Text.Json` attributes + +`System.Text.Json` includes attributes that can be applied to types and properties to control their serialization. These can be applied to your POCO document types to perform actions such as controlling the name of a property or ignoring a property entirely. Visit the https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/overview[Microsoft documentation for further examples]. + +We can model a document to represent data about a person using a regular class (POCO), applying `System.Text.Json` attributes as necessary. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=usings-serialization] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=person-class-with-attributes] +---- +<1> The `JsonPropertyName` attribute ensures the `FirstName` property uses the JSON name `forename` when serialized. +<2> The `JsonIgnore` attribute prevents the `Age` property from appearing in the serialized JSON. + +We can then index an instance of the document into {es}. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=usings] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=index-person-with-attributes] +---- + +The index request is serialized, with the source serializer handling the `Person` type, serializing the POCO property named `FirstName` to the JSON object member named `forename`. The `Age` property is ignored and does not appear in the JSON. + +[source,javascript] +---- +{ + "forename": "Steve" +} +---- + +[discrete] +[[configuring-custom-jsonserializeroptions]] +===== Configuring custom `JsonSerializerOptions` + +The default source serializer applies a set of standard `JsonSerializerOptions` when serializing source document types. In some circumstances, you may need to override some of our defaults. This is achievable by creating an instance of `DefaultSourceSerializer` and passing an `Action`, which is applied after our defaults have been set. This mechanism allows you to apply additional settings or change the value of our defaults. + +The `DefaultSourceSerializer` includes a constructor that accepts the current `IElasticsearchClientSettings` and a `configureOptions` `Action`. + +[source,csharp] +---- +public DefaultSourceSerializer(IElasticsearchClientSettings settings, Action configureOptions); +---- + +Our application defines the following `Person` class, which models a document we will index to {es}. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=person-class] +---- + +We want to serialize our source document using Pascal Casing for the JSON properties. Since the options applied in the `DefaultSouceSerializer` set the `PropertyNamingPolicy` to `JsonNamingPolicy.CamelCase`, we must override this setting. After configuring the `ElasticsearchClientSettings`, we index our document to {es}. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=usings] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=custom-options-local-function] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=create-client] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=index-person] +---- +<1> A local function can be defined, accepting a `JsonSerializerOptions` parameter. Here, we set `PropertyNamingPolicy` to `null`. This returns to the default behavior for `System.Text.Json`, which uses Pascal Case. +<2> When creating the `ElasticsearchClientSettings`, we supply a `SourceSerializerFactory` using a lambda. The factory function creates a new instance of `DefaultSourceSerializer`, passing in the `settings` and our `ConfigureOptions` local function. We have now configured the settings with a custom instance of the source serializer. + +The `Person` instance is serialized, with the source serializer serializing the POCO property named `FirstName` using Pascal Case. + +[source,javascript] +---- +{ + "FirstName": "Steve" +} +---- + +As an alternative to using a local function, we could store an `Action` into a variable instead, which can be passed to the `DefaultSouceSerializer` constructor. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=custom-options-action] +---- + +[discrete] +[[registering-custom-converters]] +===== Registering custom `System.Text.Json` converters + +In certain more advanced situations, you may have types which require further customization during serialization than is possible using `System.Text.Json` property attributes. In these cases, the recommendation from Microsoft is to leverage a custom `JsonConverter`. Source document types serialized using the `DefaultSourceSerializer` can leverage the power of custom converters. + +For this example, our application has a document class that should use a legacy JSON structure to continue operating with existing indexed documents. Several options are available, but we'll apply a custom converter in this case. + +Our class is defined, and the `JsonConverter` attribute is applied to the class type, specifying the type of a custom converter. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=usings-serialization] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=customer-with-jsonconverter-attribute] +---- +<1> The `JsonConverter` attribute signals to `System.Text.Json` that it should use a converter of type `CustomerConverter` when serializing instances of this class. + +When serializing this class, rather than include a string value representing the value of the `CustomerType` property, we must send a boolean property named `isStandard`. This requirement can be achieved with a custom JsonConverter implementation. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=converter-usings] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=customer-converter] +---- +<1> When reading, this converter reads the `isStandard` boolean and translate this to the correct `CustomerType` enum value. +<2> When writing, this converter translates the `CustomerType` enum value to an `isStandard` boolean property. + +We can then index a customer document into {es}. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=usings] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=index-customer-with-converter] +---- + +The `Customer` instance is serialized using the custom converter, creating the following JSON document. + +[source,javascript] +---- +{ + "customerName": "Customer Ltd", + "isStandard": false +} +---- + +[discrete] +[[creating-custom-system-text-json-serializer]] +===== Creating a custom `SystemTextJsonSerializer` + +The built-in `DefaultSourceSerializer` includes the registration of `JsonConverter` instances which apply during source serialization. In most cases, these provide the proper behavior for serializing source documents, including those which use `Elastic.Clients.Elasticsearch` types on their properties. + +An example of a situation where you may require more control over the converter registration order is for serializing `enum` types. The `DefaultSourceSerializer` registers the `System.Text.Json.Serialization.JsonStringEnumConverter`, so enum values are serialized using their string representation. Generally, this is the preferred option for types used to index documents to {es}. + +In some scenarios, you may need to control the string value sent for an enumeration value. That is not directly supported in `System.Text.Json` but can be achieved by creating a custom `JsonConverter` for the `enum` type you wish to customize. In this situation, it is not sufficient to use the `JsonConverterAttribute` on the `enum` type to register the converter. `System.Text.Json` will prefer the converters added to the `Converters` collection on the `JsonSerializerOptions` over an attribute applied to an `enum` type. It is, therefore, necessary to either remove the `JsonStringEnumConverter` from the `Converters` collection or register a specialized converter for your `enum` type before the `JsonStringEnumConverter`. + +The latter is possible via several techniques. When using the {es} .NET library, we can achieve this by deriving from the abstract `SystemTextJsonSerializer` class. + +Here we have a POCO which uses the `CustomerType` enum as the type for a property. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=usings-serialization] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=customer-without-jsonconverter-attribute] +---- + +To customize the strings used during serialization of the `CustomerType`, we define a custom `JsonConverter` specific to our `enum` type. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=usings-serialization] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=customer-type-converter] +---- +<1> When reading, this converter translates the string used in the JSON to the matching enum value. +<2> When writing, this converter translates the `CustomerType` enum value to a custom string value written to the JSON. + +We create a serializer derived from `SystemTextJsonSerializer` to give us complete control of converter registration order. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=derived-converter-usings] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=my-custom-serializer] +---- +<1> Inherit from `SystemTextJsonSerializer`. +<2> In the constructor, use the factory method `DefaultSourceSerializer.CreateDefaultJsonSerializerOptions` to create default options for serialization. No default converters are registered at this stage because we pass `false` as an argument. +<3> Register our `CustomerTypeConverter` as the first converter. +<4> To apply any default converters, call the `DefaultSourceSerializer.AddDefaultConverters` helper method, passing the options to modify. +<5> Implement the `CreateJsonSerializerOptions` method returning the stored `JsonSerializerOptions`. + +Because we have registered our `CustomerTypeConverter` before the default converters (which include the `JsonStringEnumConverter`), our converter takes precedence when serializing `CustomerType` instances on source documents. + +The base `SystemTextJsonSerializer` class handles the implementation details of binding, which is required to ensure that the built-in converters can access the `IElasticsearchClientSettings` where needed. + +We can then index a customer document into {es}. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=usings] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=index-customer-without-jsonconverter-attribute] +---- + +The `Customer` instance is serialized using the custom `enum` converter, creating the following JSON document. + +[source,javascript] +---- +{ + "customerName": "Customer Ltd", + "customerType": "premium" // <1> +} +---- +<1> The string value applied during serialization is provided by our custom converter. + +[discrete] +[[creating-custom-serializers]] +===== Creating a custom `Serializer` + +Suppose you prefer using an alternative JSON serialization library for your source types. In that case, you can inject an isolated serializer only to be called for the serialization of `_source`, `_fields`, or wherever a user-provided value is expected to be written and returned. + +Implementing `Elastic.Transport.Serializer` is technically enough to create a custom source serializer. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=vanilla-serializer-using-directives] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=vanilla-serializer] +---- + +Registering up the serializer is performed in the `ConnectionSettings` constructor. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=usings] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=register-vanilla-serializer] +---- +<1> If implementing `Serializer` is enough, why must we provide an instance wrapped in a factory `Func`? + +There are various cases where you might have a POCO type that contains an `Elastic.Clients.Elasticsearch` type as one of its properties. The `SourceSerializerFactory` delegate provides access to the default built-in serializer so you can access it when necessary. For example, consider if you want to use percolation; you need to store {es} queries as part of the `_source` of your document, which means you need to have a POCO that looks like this. + +[source,csharp] +---- +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=querydsl-using-directives] +include::{doc-tests-src}/ClientConcepts/Serialization/CustomSerializationTests.cs[tag=percolation-document] +---- + +A custom serializer would not know how to serialize `Query` or other `Elastic.Clients.Elasticsearch` types that could appear as part of +the `_source` of a document. Therefore, your custom `Serializer` would need to store a reference to our built-in serializer and delegate serialization of Elastic types back to it. \ No newline at end of file diff --git a/docs/client-concepts/serialization/modeling-documents-with-types.asciidoc b/docs/client-concepts/serialization/modeling-documents-with-types.asciidoc new file mode 100644 index 00000000000..d4e57b6d575 --- /dev/null +++ b/docs/client-concepts/serialization/modeling-documents-with-types.asciidoc @@ -0,0 +1,37 @@ +[[modeling-documents-with-types]] +==== Modeling documents with types + +{es} provides search and aggregation capabilities on the documents that it is sent and indexes. These documents are sent as +JSON objects within the request body of a HTTP request. It is natural to model documents within the {es} .NET client using +https://en.wikipedia.org/wiki/Plain_Old_CLR_Object[POCOs (__Plain Old CLR Objects__)]. + +This section provides an overview of how types and type hierarchies can be used to model documents. + +[[default-behaviour]] +===== Default behaviour + +The default behaviour is to serialize type property names as camelcase JSON object members. + +We can model documents using a regular class (POCO). + +[source,csharp] +---- +include-tagged::{doc-tests-src}/ClientConcepts/Serialization/ModellingDocumentsWithTypesTests.cs[my-document-poco] +---- + +We can then index the an instance of the document into {es}. + +[source,csharp] +---- +include-tagged::{doc-tests-src}/ClientConcepts/Serialization/ModellingDocumentsWithTypesTests.cs[usings] +include-tagged::{doc-tests-src}/ClientConcepts/Serialization/ModellingDocumentsWithTypesTests.cs[index-my-document] +---- + +The index request is serialized, with the source serializer handling the `MyDocument` type, serializing the POCO property named `StringProperty` to the JSON object member named `stringProperty`. + +[source,javascript] +---- +{ + "stringProperty": "value" +} +---- \ No newline at end of file diff --git a/docs/reference/troubleshoot/audit-trail.md b/docs/client-concepts/troubleshooting/audit-trail.asciidoc similarity index 71% rename from docs/reference/troubleshoot/audit-trail.md rename to docs/client-concepts/troubleshooting/audit-trail.asciidoc index 96d3008aaf2..7622c09e41c 100644 --- a/docs/reference/troubleshoot/audit-trail.md +++ b/docs/client-concepts/troubleshooting/audit-trail.asciidoc @@ -1,15 +1,22 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/audit-trail.html ---- -# Audit trail [audit-trail] -Elasticsearch.Net and NEST provide an audit trail for the events within the request pipeline that occur when a request is made. This audit trail is available on the response as demonstrated in the following example. +:github: https://github.com/elastic/elasticsearch-net -We’ll use a Sniffing connection pool here since it sniffs on startup and pings before first usage, so we can get an audit trail with a few events out +:nuget: https://www.nuget.org/packages -```csharp + +[[audit-trail]] +=== Audit trail + +Elasticsearch.Net and NEST provide an audit trail for the events within the request pipeline that +occur when a request is made. This audit trail is available on the response as demonstrated in the +following example. + +We'll use a Sniffing connection pool here since it sniffs on startup and pings before +first usage, so we can get an audit trail with a few events out + +[source,csharp] +---- var pool = new SniffingConnectionPool(new []{ TestConnectionSettings.CreateUri() }); var connectionSettings = new ConnectionSettings(pool) .DefaultMappingFor(i => i @@ -17,19 +24,21 @@ var connectionSettings = new ConnectionSettings(pool) ); var client = new ElasticClient(connectionSettings); -``` +---- After issuing the following request -```csharp +[source,csharp] +---- var response = client.Search(s => s .MatchAll() ); -``` +---- -The audit trail is provided in the [Debug information](debug-information.md) in a human readable fashion, similar to +The audit trail is provided in the <> in a human +readable fashion, similar to -``` +.... Valid NEST response built from a successful low level call on POST: /project/doc/_search # Audit trail of this API call: - [1] SniffOnStartup: Took: 00:00:00.0360264 @@ -40,27 +49,32 @@ Valid NEST response built from a successful low level call on POST: /project/doc # Response: -``` +.... + to help with troubleshootin -```csharp +[source,csharp] +---- var debug = response.DebugInformation; -``` +---- But can also be accessed manually: -```csharp +[source,csharp] +---- response.ApiCall.AuditTrail.Count.Should().Be(4, "{0}", debug); response.ApiCall.AuditTrail[0].Event.Should().Be(SniffOnStartup, "{0}", debug); response.ApiCall.AuditTrail[1].Event.Should().Be(SniffSuccess, "{0}", debug); response.ApiCall.AuditTrail[2].Event.Should().Be(PingSuccess, "{0}", debug); response.ApiCall.AuditTrail[3].Event.Should().Be(HealthyResponse, "{0}", debug); -``` +---- -Each audit has a started and ended `DateTime` on it that will provide some understanding of how long it took +Each audit has a started and ended `DateTime` on it that will provide +some understanding of how long it took -```csharp +[source,csharp] +---- response.ApiCall.AuditTrail .Should().OnlyContain(a => a.Ended - a.Started >= TimeSpan.Zero); -``` +---- diff --git a/docs/reference/images/elasticsearch-client-net-api-capture-requests-localhost.png b/docs/client-concepts/troubleshooting/capture-requests-localhost.png similarity index 100% rename from docs/reference/images/elasticsearch-client-net-api-capture-requests-localhost.png rename to docs/client-concepts/troubleshooting/capture-requests-localhost.png diff --git a/docs/reference/images/elasticsearch-client-net-api-capture-requests-remotehost.png b/docs/client-concepts/troubleshooting/capture-requests-remotehost.png similarity index 100% rename from docs/reference/images/elasticsearch-client-net-api-capture-requests-remotehost.png rename to docs/client-concepts/troubleshooting/capture-requests-remotehost.png diff --git a/docs/client-concepts/troubleshooting/debug-information.asciidoc b/docs/client-concepts/troubleshooting/debug-information.asciidoc new file mode 100644 index 00000000000..a7504312d2d --- /dev/null +++ b/docs/client-concepts/troubleshooting/debug-information.asciidoc @@ -0,0 +1,180 @@ + + +:github: https://github.com/elastic/elasticsearch-net + +:nuget: https://www.nuget.org/packages + +[[debug-information]] +=== Debug information + +Every response from Elasticsearch.Net and NEST contains a `DebugInformation` property +that provides a human readable description of what happened during the request for both successful and +failed requests + +[source,csharp] +---- +var response = client.Search(s => s + .Query(q => q + .MatchAll() + ) +); + +response.DebugInformation.Should().Contain("Valid NEST response"); +---- + +This can be useful in tracking down numerous problems and can also be useful when filing an +{github}/issues[issue] on the GitHub repository. + +==== Request and response bytes + +By default, the request and response bytes are not available within the debug information, but +can be enabled globally on Connection Settings by setting `DisableDirectStreaming`. This +disables direct streaming of + +. the serialized request type to the request stream + +. the response stream to a deserialized response type + +[source,csharp] +---- +var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); + +var settings = new ConnectionSettings(connectionPool) + .DisableDirectStreaming(); <1> + +var client = new ElasticClient(settings); +---- +<1> disable direct streaming for *all* requests + +or on a _per request_ basis + +[source,csharp] +---- +var response = client.Search(s => s + .RequestConfiguration(r => r + .DisableDirectStreaming() <1> + ) + .Query(q => q + .MatchAll() + ) +); +---- +<1> disable direct streaming for *this* request only + +Configuring `DisableDirectStreaming` on an individual request takes precedence over +any global configuration. + +There is typically a performance and allocation cost associated with disabling direct streaming +since both the request and response bytes must be buffered in memory, to allow them to be +exposed on the response call details. + +==== TCP statistics + +It can often be useful to see the statistics for active TCP connections, particularly when +trying to diagnose issues with the client. The client can collect the states of active TCP +connections just before making a request, and expose these on the response and in the debug +information. + +Similarly to `DisableDirectStreaming`, TCP statistics can be collected for every request +by configuring on `ConnectionSettings` + +[source,csharp] +---- +var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); + +var settings = new ConnectionSettings(connectionPool) + .EnableTcpStats(); <1> + +var client = new ElasticClient(settings); +---- +<1> collect TCP statistics for *all* requests + +or on a _per request_ basis + +[source,csharp] +---- +var response = client.Search(s => s + .RequestConfiguration(r => r + .EnableTcpStats() <1> + ) + .Query(q => q + .MatchAll() + ) +); + +var debugInformation = response.DebugInformation; +---- +<1> collect TCP statistics for *this* request only + +With `EnableTcpStats` set, the states of active TCP connections will now be included +on the response and in the debug information. + +The client includes a `TcpStats` +class to help with retrieving more detail about active TCP connections should it be +required + +[source,csharp] +---- +var tcpStatistics = TcpStats.GetActiveTcpConnections(); <1> +var ipv4Stats = TcpStats.GetTcpStatistics(NetworkInterfaceComponent.IPv4); <2> +var ipv6Stats = TcpStats.GetTcpStatistics(NetworkInterfaceComponent.IPv6); <3> + +var response = client.Search(s => s + .Query(q => q + .MatchAll() + ) +); +---- +<1> Retrieve details about active TCP connections, including local and remote addresses and ports +<2> Retrieve statistics about IPv4 +<3> Retrieve statistics about IPv6 + +[NOTE] +-- +Collecting TCP statistics may not be accessible in all environments, for example, Azure App Services. +When this is the case, `TcpStats.GetActiveTcpConnections()` returns `null`. + +-- + +==== ThreadPool statistics + +It can often be useful to see the statistics for thread pool threads, particularly when +trying to diagnose issues with the client. The client can collect statistics for both +worker threads and asynchronous I/O threads, and expose these on the response and +in debug information. + +Similar to collecting TCP statistics, ThreadPool statistics can be collected for all requests +by configuring `EnableThreadPoolStats` on `ConnectionSettings` + +[source,csharp] +---- +var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); + +var settings = new ConnectionSettings(connectionPool) + .EnableThreadPoolStats(); <1> + +var client = new ElasticClient(settings); +---- +<1> collect thread pool statistics for *all* requests + +or on a _per request_ basis + +[source,csharp] +---- +var response = client.Search(s => s + .RequestConfiguration(r => r + .EnableThreadPoolStats() <1> + ) + .Query(q => q + .MatchAll() + ) + ); + +var debugInformation = response.DebugInformation; <2> +---- +<1> collect thread pool statistics for *this* request only +<2> contains thread pool statistics + +With `EnableThreadPoolStats` set, the statistics of thread pool threads will now be included +on the response and in the debug information. + diff --git a/docs/client-concepts/troubleshooting/debug-mode.asciidoc b/docs/client-concepts/troubleshooting/debug-mode.asciidoc new file mode 100644 index 00000000000..05d84092f3e --- /dev/null +++ b/docs/client-concepts/troubleshooting/debug-mode.asciidoc @@ -0,0 +1,65 @@ + + +:github: https://github.com/elastic/elasticsearch-net + +:nuget: https://www.nuget.org/packages + +[[debug-mode]] +=== Debug mode + +The <> explains that every response from Elasticsearch.Net +and NEST contains a `DebugInformation` property, and properties on `ConnectionSettings` and +`RequestConfiguration` can control which additional information is included in debug information, +for all requests or on a per request basis, respectively. + +During development, it can be useful to enable the most verbose debug information, to help +identify and troubleshoot problems, or simply ensure that the client is behaving as expected. +The `EnableDebugMode` setting on `ConnectionSettings` is a convenient shorthand for enabling +verbose debug information, configuring a number of settings like + +* disabling direct streaming to capture request and response bytes + +* prettyfying JSON responses from Elasticsearch + +* collecting TCP statistics when a request is made + +* collecting thread pool statistics when a request is made + +* including the Elasticsearch stack trace in the response if there is a an error on the server side + +[source,csharp] +---- +IConnectionPool pool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); + +var settings = new ConnectionSettings(pool) + .EnableDebugMode(); <1> + +var client = new ElasticClient(settings); + +var response = client.Search(s => s + .Query(q => q + .MatchAll() + ) +); + +var debugInformation = response.DebugInformation; <2> +---- +<1> configure debug mode +<2> verbose debug information + +In addition to exposing debug information on the response, debug mode will also cause the debug +information to be written to the trace listeners in the `System.Diagnostics.Debug.Listeners` collection +by default, when the request has completed. A delegate can be passed when enabling debug mode to perform +a different action when a request has completed, using <> + +[source,csharp] +---- +var pool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); +var client = new ElasticClient(new ConnectionSettings(pool) + .EnableDebugMode(apiCallDetails => + { + // do something with the call details e.g. send with logging framework + }) +); +---- + diff --git a/docs/client-concepts/troubleshooting/deprecation-logging.asciidoc b/docs/client-concepts/troubleshooting/deprecation-logging.asciidoc new file mode 100644 index 00000000000..c69a0fc1ee1 --- /dev/null +++ b/docs/client-concepts/troubleshooting/deprecation-logging.asciidoc @@ -0,0 +1,40 @@ + + +:github: https://github.com/elastic/elasticsearch-net + +:nuget: https://www.nuget.org/packages + +[[deprecation-logging]] +=== Deprecation logging + +Elasticsearch will send back `Warn` HTTP Headers when you are using an API feature that is +deprecated and will be removed or rewritten in a future release. + +Elasticsearch.NET and NEST report these back to you so you can log and watch out for them. + +[source,csharp] +---- +var request = new SearchRequest +{ + Size = 0, + Aggregations = new CompositeAggregation("test") + { + Sources = new [] + { + new DateHistogramCompositeAggregationSource("date") + { + Field = Field(f => f.LastActivity), + Interval = new Time("7d"), + Format = "yyyy-MM-dd" + } + } + } +}; +var response = this.Client.Search(request); + +response.ApiCall.DeprecationWarnings.Should().NotBeNullOrEmpty(); +response.ApiCall.DeprecationWarnings.Should().HaveCountGreaterOrEqualTo(1); +response.DebugInformation.Should().Contain("deprecated"); <1> +---- +<1> `DebugInformation` also contains the deprecation warnings + diff --git a/docs/client-concepts/troubleshooting/diagnostic-source.asciidoc b/docs/client-concepts/troubleshooting/diagnostic-source.asciidoc new file mode 100644 index 00000000000..2f8e189cd60 --- /dev/null +++ b/docs/client-concepts/troubleshooting/diagnostic-source.asciidoc @@ -0,0 +1,121 @@ + + +:github: https://github.com/elastic/elasticsearch-net + +:nuget: https://www.nuget.org/packages + +[[diagnostic-source]] +=== Diagnostic Source + +Elasticsearch.Net and NEST support capturing diagnostics information using `DiagnosticSource` and `Activity` from the +`System.Diagnostics` namespace. + +To aid with the discoverability of the topics you can subscribe to and the event names they emit, +both topics and event names are exposed as strongly typed strings under `Elasticsearch.Net.Diagnostics.DiagnosticSources` + +Subscribing to DiagnosticSources means implementing `IObserver` +or using `.Subscribe(observer, filter)` to opt in to the correct topic. + +Here we choose the more verbose `IObserver<>` implementation + +[source,csharp] +---- +public class ListenerObserver : IObserver, IDisposable +{ + private long _messagesWrittenToConsole = 0; + public long MessagesWrittenToConsole => _messagesWrittenToConsole; + + public Exception SeenException { get; private set; } + + public void OnError(Exception error) => SeenException = error; + public bool Completed { get; private set; } + public void OnCompleted() => Completed = true; + + private void WriteToConsole(string eventName, T data) + { + var a = Activity.Current; + Interlocked.Increment(ref _messagesWrittenToConsole); + } + + private List Disposables { get; } = new List(); + + public void OnNext(DiagnosticListener value) + { + void TrySubscribe(string sourceName, Func>> listener) <1> + { + if (value.Name != sourceName) return; + + var subscription = value.Subscribe(listener()); + Disposables.Add(subscription); + } + + TrySubscribe(DiagnosticSources.AuditTrailEvents.SourceName, + () => new AuditDiagnosticObserver(v => WriteToConsole(v.Key, v.Value))); + + TrySubscribe(DiagnosticSources.Serializer.SourceName, + () => new SerializerDiagnosticObserver(v => WriteToConsole(v.Key, v.Value))); + + TrySubscribe(DiagnosticSources.RequestPipeline.SourceName, + () => new RequestPipelineDiagnosticObserver( + v => WriteToConsole(v.Key, v.Value), + v => WriteToConsole(v.Key, v.Value) + )); + + TrySubscribe(DiagnosticSources.HttpConnection.SourceName, + () => new HttpConnectionDiagnosticObserver( + v => WriteToConsole(v.Key, v.Value), + v => WriteToConsole(v.Key, v.Value) + )); + } + + public void Dispose() + { + foreach(var d in Disposables) d.Dispose(); + } +} +---- +<1> By inspecting the name, we can selectively subscribe only to the topics `Elasticsearch.Net` emit + +Thanks to `DiagnosticSources`, you do not have to guess the topics emitted. + +The `DiagnosticListener.Subscribe` method expects an `IObserver>` +which is a rather generic message contract. As a subscriber, it's useful to know what `object` is in each case. +To help with this, each topic within the client has a dedicated `Observer` implementation that +takes an `onNext` delegate typed to the context object actually emitted. + +The RequestPipeline diagnostic source emits a different context objects the start and end of the `Activity` +For this reason, `RequestPipelineDiagnosticObserver` accepts two `onNext` delegates, +one for the `.Start` events and one for the `.Stop` events. + +[[subscribing-to-topics]] +==== Subscribing to topics + +As a concrete example of subscribing to topics, let's hook into all diagnostic sources and use +`ListenerObserver` to only listen to the ones from `Elasticsearch.Net` + +[source,csharp] +---- +using(var listenerObserver = new ListenerObserver()) +using (var subscription = DiagnosticListener.AllListeners.Subscribe(listenerObserver)) +{ + var pool = new SniffingConnectionPool(new []{ TestConnectionSettings.CreateUri() }); <1> + var connectionSettings = new ConnectionSettings(pool) + .DefaultMappingFor(i => i + .IndexName("project") + ); + + var client = new ElasticClient(connectionSettings); + + var response = client.Search(s => s <2> + .MatchAll() + ); + + listenerObserver.SeenException.Should().BeNull(); <3> + listenerObserver.Completed.Should().BeFalse(); + listenerObserver.MessagesWrittenToConsole.Should().BeGreaterThan(0); +} +---- +<1> use a sniffing connection pool that sniffs on startup and pings before first usage, so our diagnostics will emit most topics. +<2> make a search API call +<3> verify that the listener is picking up events + diff --git a/docs/reference/images/elasticsearch-client-net-api-inspect-requests.png b/docs/client-concepts/troubleshooting/inspect-requests.png similarity index 100% rename from docs/reference/images/elasticsearch-client-net-api-inspect-requests.png rename to docs/client-concepts/troubleshooting/inspect-requests.png diff --git a/docs/client-concepts/troubleshooting/logging-with-fiddler.asciidoc b/docs/client-concepts/troubleshooting/logging-with-fiddler.asciidoc new file mode 100644 index 00000000000..527f4bc53db --- /dev/null +++ b/docs/client-concepts/troubleshooting/logging-with-fiddler.asciidoc @@ -0,0 +1,48 @@ + + +:github: https://github.com/elastic/elasticsearch-net + +:nuget: https://www.nuget.org/packages + +[[logging-with-fiddler]] +=== Logging with Fiddler + +A web debugging proxy such as http://www.telerik.com/fiddler[Fiddler] is a useful way to capture HTTP traffic +from a machine, particularly whilst developing against a local Elasticsearch cluster. + +==== Capturing traffic to a remote cluster + +To capture traffic against a remote cluster is as simple as launching Fiddler! You may want to also +filter traffic to only show requests to the remote cluster by using the filters tab + +image::capture-requests-remotehost.png[Capturing requests to a remote host] + +==== Capturing traffic to a local cluster + +The .NET Framework is hardcoded not to send requests for `localhost` through any proxies and as a proxy +Fiddler will not receive such traffic. + +This is easily circumvented by using `ipv4.fiddler` as the hostname instead of `localhost` + +[source,csharp] +---- +var isFiddlerRunning = Process.GetProcessesByName("fiddler").Any(); +var host = isFiddlerRunning ? "ipv4.fiddler" : "localhost"; + +var connectionSettings = new ConnectionSettings(new Uri($"http://{host}:9200")) + .PrettyJson(); <1> + +var client = new ElasticClient(connectionSettings); +---- +<1> prettify json requests and responses to make them easier to read in Fiddler + +With Fiddler running, the requests and responses will now be captured and can be inspected in the +Inspectors tab + +image::inspect-requests.png[Inspecting requests and responses] + +As before, you may also want to filter traffic to only show requests to `ipv4.fiddler` on the port +on which you are running Elasticsearch. + +image::capture-requests-localhost.png[Capturing requests to localhost] + diff --git a/docs/reference/troubleshoot/logging-with-onrequestcompleted.md b/docs/client-concepts/troubleshooting/logging-with-on-request-completed.asciidoc similarity index 65% rename from docs/reference/troubleshoot/logging-with-onrequestcompleted.md rename to docs/client-concepts/troubleshooting/logging-with-on-request-completed.asciidoc index f1c365ffaf6..a21c9ce67a0 100644 --- a/docs/reference/troubleshoot/logging-with-onrequestcompleted.md +++ b/docs/client-concepts/troubleshooting/logging-with-on-request-completed.asciidoc @@ -1,17 +1,24 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/logging-with-on-request-completed.html ---- -# Logging with OnRequestCompleted [logging-with-on-request-completed] -When constructing the connection settings to pass to the client, you can pass a callback of type `Action` to the `OnRequestCompleted` method that can eavesdrop every time a response(good or bad) is received. +:github: https://github.com/elastic/elasticsearch-net -If you have complex logging needs this is a good place to add that in since you have access to both the request and response details. +:nuget: https://www.nuget.org/packages -In this example, we’ll use `OnRequestCompleted` on connection settings to increment a counter each time it’s called. +[[logging-with-on-request-completed]] +=== Logging with OnRequestCompleted -```csharp +When constructing the connection settings to pass to the client, you can pass a callback of type +`Action` to the `OnRequestCompleted` method that can eavesdrop every time a +response(good or bad) is received. + +If you have complex logging needs this is a good place to add that in +since you have access to both the request and response details. + +In this example, we'll use `OnRequestCompleted` on connection settings to increment a counter each time +it's called. + +[source,csharp] +---- var counter = 0; var client = new ElasticClient(new AlwaysInMemoryConnectionSettings().OnRequestCompleted(r => counter++)); <1> @@ -20,16 +27,16 @@ counter.Should().Be(1); await client.RootNodeInfoAsync(); <3> counter.Should().Be(2); -``` - -1. Construct a client -2. Make a synchronous call and assert the counter is incremented -3. Make an asynchronous call and assert the counter is incremented +---- +<1> Construct a client +<2> Make a synchronous call and assert the counter is incremented +<3> Make an asynchronous call and assert the counter is incremented +`OnRequestCompleted` is called even when an exception is thrown, so it can be used even if the client is +configured to throw exceptions -`OnRequestCompleted` is called even when an exception is thrown, so it can be used even if the client is configured to throw exceptions - -```csharp +[source,csharp] +---- var counter = 0; var client = FixedResponseClient.Create( <1> new { }, @@ -44,24 +51,25 @@ counter.Should().Be(1); await Assert.ThrowsAsync(async () => await client.RootNodeInfoAsync()); counter.Should().Be(2); -``` - -1. Configure a client with a connection that **always returns a HTTP 500 response -2. Always throw exceptions when a call results in an exception -3. Assert an exception is thrown and the counter is incremented - - -Here’s an example using `OnRequestCompleted()` for more complex logging +---- +<1> Configure a client with a connection that **always returns a HTTP 500 response +<2> Always throw exceptions when a call results in an exception +<3> Assert an exception is thrown and the counter is incremented -::::{note} -By default, the client writes directly to the request stream and deserializes directly from the response stream. +Here's an example using `OnRequestCompleted()` for more complex logging -If you would also like to capture the request and/or response bytes, you also need to set `.DisableDirectStreaming()` to `true`. +[NOTE] +-- +By default, the client writes directly to the request stream and deserializes directly from the +response stream. -:::: +If you would also like to capture the request and/or response bytes, +you also need to set `.DisableDirectStreaming()` to `true`. +-- -```csharp +[source,csharp] +---- var list = new List(); var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); @@ -122,21 +130,25 @@ list.Should().BeEquivalentTo(new[] <6> @"POST http://localhost:9200/_all/_search?typed_keys=true&scroll=10m {""sort"":[{""_doc"":{""order"":""asc""}}]}", @"Status: 200" }); -``` - -1. Here we use `InMemoryConnection` but in a real application, you’d use an `IConnection` that *actually* sends the request, such as `HttpConnection` -2. Disable direct streaming so we can capture the request and response bytes -3. Perform some action when a request completes. Here, we’re just adding to a list, but in your application you may be logging to a file. -4. Make a synchronous call -5. Make an asynchronous call -6. Assert the list contains the contents written in the delegate passed to `OnRequestCompleted` - - -When running an application in production, you probably don’t want to disable direct streaming for *all* requests, since doing so will incur a performance overhead, due to buffering request and response bytes in memory. It can however be useful to capture requests and responses in an ad-hoc fashion, perhaps to troubleshoot an issue in production. - -`DisableDirectStreaming` can be enabled on a *per-request* basis for this purpose. In using this feature, it is possible to configure a general logging mechanism in `OnRequestCompleted` and log out request and responses only when necessary - -```csharp +---- +<1> Here we use `InMemoryConnection` but in a real application, you'd use an `IConnection` that _actually_ sends the request, such as `HttpConnection` +<2> Disable direct streaming so we can capture the request and response bytes +<3> Perform some action when a request completes. Here, we're just adding to a list, but in your application you may be logging to a file. +<4> Make a synchronous call +<5> Make an asynchronous call +<6> Assert the list contains the contents written in the delegate passed to `OnRequestCompleted` + +When running an application in production, you probably don't want to disable direct streaming for _all_ +requests, since doing so will incur a performance overhead, due to buffering request and +response bytes in memory. It can however be useful to capture requests and responses in an ad-hoc fashion, +perhaps to troubleshoot an issue in production. + +`DisableDirectStreaming` can be enabled on a _per-request_ basis for this purpose. In using this feature, +it is possible to configure a general logging mechanism in `OnRequestCompleted` and log out +request and responses only when necessary + +[source,csharp] +---- var list = new List(); var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); @@ -199,11 +211,9 @@ list.Should().BeEquivalentTo(new[] @"POST http://localhost:9200/_all/_search?typed_keys=true&scroll=10m {""sort"":[{""_doc"":{""order"":""asc""}}]}", <4> @"Status: 200" }); -``` - -1. Make a synchronous call where the request and response bytes will not be buffered -2. Make an asynchronous call where `DisableDirectStreaming()` is enabled -3. Only the method and url for the first request is captured -4. the body of the second request is captured - +---- +<1> Make a synchronous call where the request and response bytes will not be buffered +<2> Make an asynchronous call where `DisableDirectStreaming()` is enabled +<3> Only the method and url for the first request is captured +<4> the body of the second request is captured diff --git a/docs/configuration.asciidoc b/docs/configuration.asciidoc new file mode 100644 index 00000000000..a577b3e40b6 --- /dev/null +++ b/docs/configuration.asciidoc @@ -0,0 +1,247 @@ +[[configuration]] +== Configuration + +Connecting to {es} with the client is easy, but it's possible that you'd like to +change the default connection behaviour. There are a number of configuration +options available on `ElasticsearchClientSettings` that can be used to control how the +client interact with {es}. + +=== Options on ElasticsearchClientSettings + +The following is a list of available connection configuration options on +`ElasticsearchClientSettings`: + +`Authentication`:: + +An implementation of `IAuthenticationHeader` describing what http header to use +to authenticate with the product. ++ + `BasicAuthentication` for basic authentication ++ + `ApiKey` for simple secret token ++ + `Base64ApiKey` for Elastic Cloud style encoded api keys + +`ClientCertificate`:: + +Use the following certificates to authenticate all HTTP requests. You can also +set them on individual request using `ClientCertificates`. + +`ClientCertificates`:: + +Use the following certificates to authenticate all HTTP requests. You can also +set them on individual request using `ClientCertificates`. + +`ConnectionLimit`:: + +Limits the number of concurrent connections that can be opened to an endpoint. +Defaults to 80 (see `DefaultConnectionLimit`). ++ +For Desktop CLR, this setting applies to the `DefaultConnectionLimit` property +on the `ServicePointManager` object when creating `ServicePoint` objects, +affecting the default `IConnection` implementation. ++ +For Core CLR, this setting applies to the `MaxConnectionsPerServer` property on +the `HttpClientHandler` instances used by the `HttpClient` inside the default +`IConnection` implementation. + +`DeadTimeout`:: + +The time to put dead nodes out of rotation (this will be multiplied by the +number of times they've been dead). + +`DefaultDisableIdInference`:: + +Disables automatic Id inference for given CLR types. ++ +The client by default will use the value of a property named `Id` on a CLR type +as the `_id` to send to {es}. Adding a type will disable this behaviour for that +CLR type. If `Id` inference should be disabled for all CLR types, use +`DefaultDisableIdInference`. + +`DefaultFieldNameInferrer`:: + +Specifies how field names are inferred from CLR property names. ++ +By default, the client camel cases property names. For example, CLR property +`EmailAddress` will be inferred as "emailAddress" {es} document field name. + +`DefaultIndex`:: + +The default index to use for a request when no index has been explicitly +specified and no default indices are specified for the given CLR type specified +for the request. + +`DefaultMappingFor`:: + +Specify how the mapping is inferred for a given CLR type. The mapping can infer +the index, id and relation name for a given CLR type, as well as control +serialization behaviour for CLR properties. + +`DisableAutomaticProxyDetection`:: + +Disabled proxy detection on the webrequest, in some cases this may speed up the +first connection your appdomain makes, in other cases it will actually increase +the time for the first connection. No silver bullet! Use with care! + +`DisableDirectStreaming`:: + +When set to true will disable (de)serializing directly to the request and +response stream and return a byte[] copy of the raw request and response. +Defaults to false. + +`DisablePing`:: + +This signals that we do not want to send initial pings to unknown/previously +dead nodes and just send the call straightaway. + +`DnsRefreshTimeout`:: + +DnsRefreshTimeout for the connections. Defaults to 5 minutes. + +`EnableDebugMode`:: + +Turns on settings that aid in debugging like `DisableDirectStreaming()` and +`PrettyJson()` so that the original request and response JSON can be inspected. +It also always asks the server for the full stack trace on errors. + +`EnableHttpCompression`:: + +Enable gzip compressed requests and responses. + +`EnableHttpPipelining`:: + +Whether HTTP pipelining is enabled. The default is `true`. + +`EnableTcpKeepAlive`:: + +Sets the keep-alive option on a TCP connection. ++ +For Desktop CLR, sets `ServicePointManager`.`SetTcpKeepAlive`. + +`EnableTcpStats`:: + +Enable statistics about TCP connections to be collected when making a request. + +`GlobalHeaders`:: + +Try to send these headers for every request. + +`GlobalQueryStringParameters`:: + +Append these query string parameters automatically to every request. + +`MaxDeadTimeout`:: + +The maximum amount of time a node is allowed to marked dead. + +`MaximumRetries`:: + +When a retryable exception occurs or status code is returned this controls the +maximum amount of times we should retry the call to {es}. + +`MaxRetryTimeout`:: + +Limits the total runtime including retries separately from `RequestTimeout`. +When not specified defaults to `RequestTimeout` which itself defaults to 60 +seconds. + +`MemoryStreamFactory`:: + +Provides a memory stream factory. + +`NodePredicate`:: + +Register a predicate to select which nodes that you want to execute API calls +on. Note that sniffing requests omit this predicate and always execute on all +nodes. When using an `IConnectionPool` implementation that supports reseeding of +nodes, this will default to omitting master only node from regular API calls. +When using static or single node connection pooling it is assumed the list of +node you instantiate the client with should be taken verbatim. + +`OnRequestCompleted`:: + +Allows you to register a callback every time a an API call is returned. + +`OnRequestDataCreated`:: + +An action to run when the `RequestData` for a request has been created. + +`PingTimeout`:: + +The timeout in milliseconds to use for ping requests, which are issued to +determine whether a node is alive. + +`PrettyJson`:: + +Provide hints to serializer and products to produce pretty, non minified json. ++ +Note: this is not a guarantee you will always get prettified json. + +`Proxy`:: + +If your connection has to go through proxy, use this method to specify the +proxy url. + +`RequestTimeout`:: + +The timeout in milliseconds for each request to {es}. + +`ServerCertificateValidationCallback`:: + +Register a `ServerCertificateValidationCallback` per request. + +`SkipDeserializationForStatusCodes`:: + +Configure the client to skip deserialization of certain status codes, for +example, you run {es} behind a proxy that returns an unexpected json format. + +`SniffLifeSpan`:: + +Force a new sniff for the cluster when the cluster state information is older +than the specified timespan. + +`SniffOnConnectionFault`:: + +Force a new sniff for the cluster state every time a connection dies. + +`SniffOnStartup`:: + +Sniff the cluster state immediately on startup. + +`ThrowExceptions`:: + +Instead of following a c/go like error checking on response. `IsValid` do throw +an exception (except when `SuccessOrKnownError` is false) on the client when a +call resulted in an exception on either the client or the {es} server. ++ +Reasons for such exceptions could be search parser errors, index missing +exceptions, and so on. + +`TransferEncodingChunked`:: + +Whether the request should be sent with chunked Transfer-Encoding. + +`UserAgent`:: + +The user agent string to send with requests. Useful for debugging purposes to +understand client and framework versions that initiate requests to {es}. + + +==== ElasticsearchClientSettings with ElasticsearchClient + +Here's an example to demonstrate setting configuration options using the client. + +[source,csharp] +---- +var settings= new ElasticsearchClientSettings() + .DefaultMappingFor(i => i + .IndexName("my-projects") + .IdProperty(p => p.Name) + ) + .EnableDebugMode() + .PrettyJson() + .RequestTimeout(TimeSpan.FromMinutes(2)); + +var client = new ElasticsearchClient(settings); +---- diff --git a/docs/connecting.asciidoc b/docs/connecting.asciidoc new file mode 100644 index 00000000000..13d706ba04d --- /dev/null +++ b/docs/connecting.asciidoc @@ -0,0 +1,173 @@ +[[connecting]] +== Connecting + +This page contains the information you need to create an instance of the .NET +Client for {es} that connects to your {es} cluster. + +It's possible to connect to your {es} cluster via a single node, or by +specifying multiple nodes using a node pool. Using a node pool has a few +advantages over a single node, such as load balancing and cluster failover +support. The client provides convenient configuration options to connect to an +Elastic Cloud deployment. + +IMPORTANT: Client applications should create a single instance of +`ElasticsearchClient` that is used throughout your application for its entire +lifetime. Internally the client manages and maintains HTTP connections to nodes, +reusing them to optimize performance. If you use a dependency injection +container for your application, the client instance should be registered with a +singleton lifetime. + +[discrete] +[[cloud-deployment]] +=== Connecting to a cloud deployment + +https://www.elastic.co/guide/en/cloud/current/ec-getting-started.html[Elastic Cloud] +is the easiest way to get started with {es}. When connecting to Elastic Cloud +with the .NET {es} client you should always use the Cloud ID. You can find this +value within the "Manage Deployment" page after you've created a cluster +(look in the top-left if you're in Kibana). + +We recommend using a Cloud ID whenever possible because your client will be +automatically configured for optimal use with Elastic Cloud, including HTTPS and +HTTP compression. + +Connecting to an Elasticsearch Service deployment is achieved by providing the +unique Cloud ID for your deployment when configuring the `ElasticsearchClient` +instance. You also require suitable credentials, either a username and password or +an API key that your application uses to authenticate with your deployment. + +As a security best practice, it is recommended to create a dedicated API key per +application, with permissions limited to only those required for any API calls +the application is authorized to make. + +The following snippet demonstrates how to create a client instance that connects to +an {es} deployment in the cloud. + +[source,csharp] +---- +using Elastic.Clients.Elasticsearch; +using Elastic.Transport; + +var client = new ElasticsearchClient("", new ApiKey("")); <1> +---- +<1> Replace the placeholder string values above with your cloud ID and the API key +configured for your application to access your deployment. + + +[discrete] +[[single-node]] +=== Connecting to a single node + +Single node configuration is best suited to connections to a multi-node cluster +running behind a load balancer or reverse proxy, which is exposed via a single +URL. It may also be convenient to use a single node during local application +development. If the URL represents a single {es} node, be aware that this offers +no resiliency should the server be unreachable or unresponsive. + +By default, security features such as authentication and TLS are enabled on {es} +clusters. When you start {es} for the first time, TLS is configured +automatically for the HTTP layer. A CA certificate is generated and stored on +disk which is used to sign the certificates for the HTTP layer of the {es} +cluster. + +In order for the client to establish a connection with the cluster over HTTPS, +the CA certificate must be trusted by the client application. The simplest +choice is to use the hex-encoded SHA-256 fingerprint of the CA certificate. The +CA fingerprint is output to the terminal when you start {es} for the first time. +You'll see a distinct block like the one below in the output from {es} (you may +have to scroll up if it's been a while): + +```sh +---------------------------------------------------------------- +-> Elasticsearch security features have been automatically configured! +-> Authentication is enabled and cluster connections are encrypted. + +-> Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`): + lhQpLELkjkrawaBoaz0Q + +-> HTTP CA certificate SHA-256 fingerprint: + a52dd93511e8c6045e21f16654b77c9ee0f34aea26d9f40320b531c474676228 +... +---------------------------------------------------------------- +``` + +Note down the `elastic` user password and HTTP CA fingerprint for the next +sections. + +The CA fingerprint can also be retrieved at any time from a running cluster using +the following command: + +[source,shell] +---- +openssl x509 -fingerprint -sha256 -in config/certs/http_ca.crt +---- + +The command returns the security certificate, including the fingerprint. The +`issuer` should be `Elasticsearch security auto-configuration HTTP CA`. + +[source,shell] +---- +issuer= /CN=Elasticsearch security auto-configuration HTTP CA +SHA256 Fingerprint= +---- + +Visit the +{ref}/configuring-stack-security.html[Start the Elastic Stack with security enabled automatically] +documentation for more information. + +The following snippet shows you how to create a client instance that connects to +your {es} cluster via a single node, using the CA fingerprint: + +[source,csharp] +---- +using Elastic.Clients.Elasticsearch; +using Elastic.Transport; + +var settings = new ElasticsearchClientSettings(new Uri("https://localhost:9200")) + .CertificateFingerprint("") + .Authentication(new BasicAuthentication("", "")); + +var client = new ElasticsearchClient(settings); +---- + +The preceding snippet demonstrates configuring the client to authenticate by +providing a username and password with basic authentication. If preferred, you +may also use `ApiKey` authentication as shown in the cloud connection example. + +[discrete] +[[multiple-nodes]] +=== Connecting to multiple nodes using a node pool + +To provide resiliency, you should configure multiple nodes for your cluster to +which the client attempts to communicate. By default, the client cycles through +nodes for each request in a round robin fashion. The client also tracks +unhealthy nodes and avoids sending requests to them until they become healthy. + +This configuration is best suited to connect to a known small sized cluster, +where you do not require sniffing to detect the cluster topology. + +The following snippet shows you how to connect to multiple nodes by using a +static node pool: + +[source,csharp] +---- +using Elastic.Clients.Elasticsearch; +using Elastic.Transport; + +var nodes = new Uri[] +{ + new Uri("https://myserver1:9200"), + new Uri("https://myserver2:9200"), + new Uri("https://myserver3:9200") +}; + +var pool = new StaticNodePool(nodes); + +var settings = new ElasticsearchClientSettings(pool) + .CertificateFingerprint("") + .Authentication(new ApiKey("")); + +var client = new ElasticsearchClient(settings); +---- + + diff --git a/docs/docset.yml b/docs/docset.yml deleted file mode 100644 index ba5567217f7..00000000000 --- a/docs/docset.yml +++ /dev/null @@ -1,12 +0,0 @@ -project: '.NET client' -products: - - id: elasticsearch-client -cross_links: - - apm-agent-dotnet - - docs-content - - elasticsearch -toc: - - toc: reference - - toc: release-notes -subs: - es: "Elasticsearch" diff --git a/docs/getting-started.asciidoc b/docs/getting-started.asciidoc new file mode 100644 index 00000000000..21d320236c0 --- /dev/null +++ b/docs/getting-started.asciidoc @@ -0,0 +1,160 @@ +[[getting-started-net]] +== Getting started + +This page guides you through the installation process of the .NET client, shows +you how to instantiate the client, and how to perform basic Elasticsearch +operations with it. + +[discrete] +=== Requirements + +* .NET Core, .NET 5+ or .NET Framework (4.6.1 and higher). + +[discrete] +=== Installation + +To install the latest version of the client for SDK style projects, run the following command: + +[source,shell] +-------------------------- +dotnet add package Elastic.Clients.Elasticsearch +-------------------------- + +Refer to the <> page to learn more. + + +[discrete] +=== Connecting + +You can connect to the Elastic Cloud using an API key and your Elasticsearch +Cloud ID. + +[source,net] +---- +var client = new ElasticsearchClient("", new ApiKey("")); +---- + +You can find your Elasticsearch Cloud ID on the deployment page: + +image::images/es-cloudid.jpg[alt="Cloud ID on the deployment page",align="center"] + +To generate an API key, use the +https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html[Elasticsearch Create API key API] +or https://www.elastic.co/guide/en/kibana/current/api-keys.html#create-api-key[Kibana Stack Management]. + +For other connection options, refer to the <> section. + + +[discrete] +=== Operations + +Time to use Elasticsearch! This section walks you through the basic, and most +important, operations of Elasticsearch. For more operations and more advanced +examples, refer to the <> page. + + +[discrete] +==== Creating an index + +This is how you create the `my_index` index: + +[source,net] +---- +var response = await client.Indices.CreateAsync("my_index"); +---- + + +[discrete] +==== Indexing documents + +This is a simple way of indexing a document: + +[source,net] +---- +var doc = new MyDoc +{ + Id = 1, + User = "flobernd", + Message = "Trying out the client, so far so good?" +}; + +var response = await client.IndexAsync(doc, "my_index"); +---- + + +[discrete] +==== Getting documents + +You can get documents by using the following code: + +[source,net] +---- +var response = await client.GetAsync(id, idx => idx.Index("my_index")); + +if (response.IsValidResponse) +{ + var doc = response.Source; +} +---- + + +[discrete] +==== Searching documents + +This is how you can create a single match query with the .NET client: + +[source,net] +---- +var response = await client.SearchAsync(s => s + .Index("my_index") + .From(0) + .Size(10) + .Query(q => q + .Term(t => t.User, "flobernd") + ) +); + +if (response.IsValidResponse) +{ + var doc = response.Documents.FirstOrDefault(); +} +---- + + +[discrete] +==== Updating documents + +This is how you can update a document, for example to add a new field: + +[source,net] +---- +doc.Message = "This is a new message"; + +var response = await client.UpdateAsync("my_index", 1, u => u + .Doc(doc)); +---- + + +[discrete] +==== Deleting documents + +[source,net] +---- +var response = await client.DeleteAsync("my_index", 1); +---- + + +[discrete] +==== Deleting an index + +[source,net] +---- +var response = await client.Indices.DeleteAsync("my_index"); +---- + + +[discrete] +== Further reading + +* Refer to the <> page to learn more about how to use the +client the most efficiently. diff --git a/docs/reference/images/create-api-key.png b/docs/images/create-api-key.png similarity index 100% rename from docs/reference/images/create-api-key.png rename to docs/images/create-api-key.png diff --git a/docs/images/es-cloudid.jpg b/docs/images/es-cloudid.jpg new file mode 100644 index 00000000000..face79aa148 Binary files /dev/null and b/docs/images/es-cloudid.jpg differ diff --git a/docs/reference/images/es-endpoint.jpg b/docs/images/es-endpoint.jpg similarity index 100% rename from docs/reference/images/es-endpoint.jpg rename to docs/images/es-endpoint.jpg diff --git a/docs/index.asciidoc b/docs/index.asciidoc new file mode 100644 index 00000000000..b1202f34de2 --- /dev/null +++ b/docs/index.asciidoc @@ -0,0 +1,33 @@ +[[elasticsearch-net-reference]] += Elasticsearch .NET Client + +include::{asciidoc-dir}/../../shared/versions/stack/{source_branch}.asciidoc[] +include::{asciidoc-dir}/../../shared/attributes.asciidoc[] + +:doc-tests-src: {docdir}/../tests/Tests/Documentation +:net-client: Elasticsearch .NET Client +:latest-version: 8.15.8 + +:es-docs: https://www.elastic.co/guide/en/elasticsearch/reference/{branch} + +include::intro.asciidoc[] + +include::getting-started.asciidoc[] + +include::install.asciidoc[] + +include::connecting.asciidoc[] + +include::configuration.asciidoc[] + +include::client-concepts/client-concepts.asciidoc[] + +include::usage/index.asciidoc[] + +include::migration-guide.asciidoc[] + +include::troubleshooting.asciidoc[] + +include::redirects.asciidoc[] + +include::release-notes/release-notes.asciidoc[] \ No newline at end of file diff --git a/docs/install.asciidoc b/docs/install.asciidoc new file mode 100644 index 00000000000..09a383cda5a --- /dev/null +++ b/docs/install.asciidoc @@ -0,0 +1,95 @@ +[[installation]] +== Installation + +This page shows you how to install the .NET client for {es}. + +IMPORTANT: The v8 client for .NET does not have complete feature parity with +the v7 `NEST` client. It may not be suitable for for all applications until +additional endpoints and features are supported. We therefore recommend you thoroughly +review our <> before attempting to migrate +existing applications to the `Elastic.Clients.Elasticsearch` library. +Until the new client supports all endpoints and features your application requires, +you may continue to use the 7.17.x https://www.nuget.org/packages/NEST[NEST] client +to communicate with v8 Elasticsearch servers using compatibility mode. Refer to the +https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17/connecting-to-elasticsearch-v8.html[Connecting to Elasticsearch v8.x using the v7.17.x client documentation] +for guidance on configuring the 7.17.x client. + +[discrete] +[[dot-net-client]] +=== Installing the .NET client + +For SDK style projects, you can install the {es} client by running the following +.NET CLI command in your terminal: + +[source,text] +---- +dotnet add package Elastic.Clients.Elasticsearch +---- + +This command adds a package reference to your project (csproj) file for the +latest stable version of the client. + +If you prefer, you may also manually add a package reference inside your project +file: + +[source,shell] +---- + +---- +_NOTE: The version number should reflect the latest published version from +https://www.nuget.org/packages/Elastic.Clients.Elasticsearch[NuGet.org]. To install +a different version, modify the version as necessary._ + +For Visual Studio users, the .NET client can also be installed from the Package +Manager Console inside Visual Studio using the following command: + +[source,shell] +---- +Install-Package Elastic.Clients.Elasticsearch +---- + +Alternatively, search for `Elastic.Clients.Elasticsearch` in the NuGet Package +Manager UI. + +To learn how to connect the {es} client, refer to the <> section. + +[discrete] +[[compatibility]] +=== Compatibility + +The {es} client is compatible with currently maintained .NET runtime versions. +Compatibility with End of Life (EOL) .NET runtimes is not guaranteed or +supported. + +Language clients are forward compatible; meaning that the clients support +communicating with greater or equal minor versions of {es} without breaking. It +does not mean that the clients automatically support new features of newer +{es} versions; it is only possible after a release of a new client version. For +example, a 8.12 client version won't automatically support the new features of +the 8.13 version of {es}, the 8.13 client version is required for that. {es} +language clients are only backwards compatible with default distributions and +without guarantees made. + +|=== +| Elasticsearch Version | Elasticsearch-NET Branch | Supported + +| main | main | +| 8.x | 8.x | 8.x +| 7.x | 7.x | 7.17 +|=== + +Refer to the https://www.elastic.co/support/eol[end-of-life policy] for more +information. + +[discrete] +[[ci-feed]] +=== CI feed + +We publish CI builds of our client packages, including the latest +unreleased features. If you want to experiment with the latest bits, you +can add the CI feed to your list of NuGet package sources. + +Feed URL: https://f.feedz.io/elastic/all/nuget/index.json + +We do not recommend using CI builds for production applications as they are not +formally supported until they are released. \ No newline at end of file diff --git a/docs/intro.asciidoc b/docs/intro.asciidoc new file mode 100644 index 00000000000..d638ad6acac --- /dev/null +++ b/docs/intro.asciidoc @@ -0,0 +1,54 @@ +:github: https://github.com/elastic/elasticsearch-net + +[[introduction]] +== Introduction + +*Rapidly develop applications with the .NET client for {es}.* + +Designed for .NET application developers, the .NET language client +library provides a strongly typed API and query DSL for interacting with {es}. +The .NET client includes higher-level abstractions, such as +helpers for coordinating bulk indexing and update operations. It also comes with +built-in, configurable cluster failover retry mechanisms. + +The {es} .NET client is available as a https://www.nuget.org/packages/Elastic.Clients.Elasticsearch[NuGet] +package for use with .NET Core, .NET 5+, and .NET Framework (4.6.1 and later) +applications. + +_NOTE: This documentation covers the v8 .NET client for {es}, for use +with {es} 8.x versions. To develop applications targeting {es} v7, use the +https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17[v7 (NEST) client]._ + +[discrete] +[[features]] +=== Features + +* One-to-one mapping with the REST API. +* Strongly typed requests and responses for {es} APIs. +* Fluent API for building requests. +* Query DSL to assist with constructing search queries. +* Helpers for common tasks such as bulk indexing of documents. +* Pluggable serialization of requests and responses based on `System.Text.Json`. +* Diagnostics, auditing, and .NET activity integration. + +The .NET {es} client is built on the Elastic Transport library, which provides: + +* Connection management and load balancing across all available nodes. +* Request retries and dead connections handling. + +[discrete] +=== {es} version compatibility + +Language clients are forward compatible: clients support communicating +with current and later minor versions of {es}. {es} language clients are +backward compatible with default distributions only and without guarantees. + +[discrete] +=== Questions, bugs, comments, feature requests + +To submit a bug report or feature request, use +{github}/issues[GitHub issues]. + +For more general questions and comments, try the community forum +on https://discuss.elastic.co/c/elasticsearch[discuss.elastic.co]. +Mention `.NET` in the title to indicate the discussion topic. \ No newline at end of file diff --git a/docs/migration-guide.asciidoc b/docs/migration-guide.asciidoc new file mode 100644 index 00000000000..1d3ae76032c --- /dev/null +++ b/docs/migration-guide.asciidoc @@ -0,0 +1,334 @@ +[[migration-guide]] +== Migration guide: From NEST v7 to .NET Client v8 + +The following migration guide explains the current state of the client, missing +features, breaking changes and our rationale for some of the design choices we have introduced. + +[discrete] +=== Version 8 is a refresh + +[IMPORTANT] +-- +It is important to highlight that v8 of the {net-client} represents +a new start for the client design. It is important to review how this may affect +your code and usage. +-- + +Mature code becomes increasingly hard to maintain over time. +Major releases allow us to simplify and better align our language clients with +each other in terms of design. It is crucial to find the right balance +between uniformity across programming languages and the idiomatic concerns of +each language. For .NET, we typically compare and contrast with https://github.com/elastic/elasticsearch-java[Java] and https://github.com/elastic/go-elasticsearch[Go] +to make sure that our approach is equivalent for each of these. We also take +heavy inspiration from Microsoft framework design guidelines and the conventions +of the wider .NET community. + +[discrete] +==== New Elastic.Clients.Elasticsearch NuGet package + +We have shipped the new code-generated client as a +https://www.nuget.org/packages/Elastic.Clients.Elasticsearch/[NuGet package] +with a new root namespace, `Elastic.Clients.Elasticsearch`. +The v8 client is built upon the foundations of the v7 `NEST` client, but there +are changes. By shipping as a new package, the expectation is that migration can +be managed with a phased approach. + +While this is a new package, we have aligned the major version (v8.x.x) with the +supported {es} server version to clearly indicate the client/server compatibility. +The v8 client is designed to work with version 8 of {es}. + +The v7 `NEST` client continues to be supported but will not gain new features or +support for new {es} endpoints. It should be considered deprecated in favour of +the new client. + +[discrete] +==== Limited feature set + +[CAUTION] +-- +The version 8 {net-client} does not have feature parity with the previous v7 `NEST` +high-level client. +-- + +If a feature you depend on is missing (and not explicitly documented below as a +feature that we do not plan to reintroduce), open https://github.com/elastic/elasticsearch-net/issues/new/choose[an issue] +or comment on a relevant existing issue to highlight your need to us. This will +help us prioritise our roadmap. + +[discrete] +=== Code generation + +Given the size of the {es} API surface today, it is no longer practical +to maintain thousands of types (requests, responses, queries, aggregations, etc.) +by hand. To ensure consistent, accurate, and timely alignment between language +clients and {es}, the 8.x clients, and many of the associated types are now +automatically code-generated from a https://github.com/elastic/elasticsearch-specification[shared specification]. This is a common solution to maintaining alignment between +client and server among SDKs and libraries, such as those for Azure, AWS and the +Google Cloud Platform. + +Code-generation from a specification has inevitably led to some differences +between the existing v7 `NEST` types and those available in the new v7 {net-client}. +For version 8, we generate strictly from the specification, special +casing a few areas to improve usability or to align with language idioms. + +The base type hierarchy for concepts such as `Properties`, `Aggregations` and +`Queries` is no longer present in generated code, as these arbitrary groupings do +not align with concrete concepts of the public server API. These considerations +do not preclude adding syntactic sugar and usability enhancements to types in future +releases on a case-by-case basis. + +[discrete] +=== Elastic.Transport + +The .NET client includes a transport layer responsible for abstracting HTTP +concepts and to provide functionality such as our request pipeline. This +supports round-robin load-balancing of requests to nodes, pinging failed +nodes and sniffing the cluster for node roles. + +In v7, this layer shipped as `Elasticsearch.Net` and was considered our low-level +client which could be used to send and receive raw JSON bytes between the client +and server. + +As part of the work for 8.0.0, we have moved the transport layer out into +a https://www.nuget.org/packages/Elastic.Transport[new dedicated package] and +https://github.com/elastic/elastic-transport-net[repository], named +`Elastic.Transport`. This supports reuse across future clients and allows +consumers with extremely high-performance requirements to build upon this foundation. + +[discrete] +=== System.Text.Json for serialization + +The v7 `NEST` high-level client used an internalized and modified version of +https://github.com/neuecc/Utf8Json[Utf8Json] for request and response +serialization. This was introduced for its performance improvements +over https://www.newtonsoft.com/json[Json.NET], the more common JSON framework at +the time. + +While Utf8Json provides good value, we have identified minor bugs and +performance issues that have required maintenance over time. Some of these +are hard to change without more significant effort. This library is no longer +maintained, and any such changes cannot easily be contributed back to the +original project. + +With .NET Core 3.0, Microsoft shipped new https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-apis[System.Text.Json APIs] +that are included in-the-box with current versions of .NET. We have adopted +`System.Text.Json` for all serialization. Consumers can still define and register +their own `Serializer` implementation for their document types should they prefer +to use a different serialization library. + +By adopting `System.Text.Json`, we now depend on a well-maintained and supported +library from Microsoft. `System.Text.Json` is designed from the ground up to support +the latest performance optimizations in .NET and, as a result, provides both fast and low-allocation serialization. + +[discrete] +=== Mockability of ElasticsearchClient + +Testing code is an important part of software development. We recommend +that consumers prefer introducing an abstraction for their use of the {net-client} +as the prefered way to decouple consuming code from client types and support unit +testing. + +To support user testing scenarios, we have unsealed the `ElasticsearchClient` +type and made its methods virtual. This supports mocking the type directly for unit +testing. This is an improvement over the original `IElasticClient` interface from +`NEST` (v7) which only supported mocking of top-level client methods. + +We have also introduced a `TestableResponseFactory` in `Elastic.Transport` to +make it easier to create response instances with specific status codes and validity +that can be used during unit testing. + +These changes are in addition to our existing support for testing with an +`InMemoryConnection`, virtualized clusters and with our +https://github.com/elastic/elasticsearch-net-abstractions/blob/master/src/Elastic.Elasticsearch.Managed[`Elastic.Elasticsearch.Managed`] library for integration +testing against real {es} instances. + +[discrete] +=== Migrating to Elastic.Clients.Elasticsearch + +[WARNING] +-- +The version 8 client does not currently have full-feature parity with `NEST`. The +client primary use case is for application developers communicating with {es}. +-- + +The version 8 client focuses on core endpoints, more specifically for common CRUD +scenarios. The intention is to reduce the feature gap in subsequent versions. Review this documentation carefully to learn about the missing features and reduced API surface details before migrating from the v7 `NEST` client! + +The choice to code-generate a new evolution of the {net-client} introduces some +significant breaking changes. + +The v8 client is shipped as a new https://www.nuget.org/packages/Elastic.Clients.Elasticsearch/[NuGet package] +which can be installed alongside v7 `NEST`. Some consumers may prefer a phased migration with both +packages side-by-side for a short period of time to manage complex migrations. In addition, `NEST` 7.17.x can continue to be used in +https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17/connecting-to-elasticsearch-v8.html[compatibility mode] +with {es} 8.x servers until the v8 {net-client} features +align with application requirements. + +[discrete] +=== Breaking Changes + +[WARNING] +-- +As a result of code-generating a majority of the client types, version 8 of +the client includes multiple breaking changes. +-- + +We have strived to keep the core foundation reasonably similar, but types emitted +through code-generation are subject to change between `NEST` (v7) and the new +`Elastic.Clients.Elasticsearch` (v8) package. + +[discrete] +==== Namespaces + +The package and top-level namespace for the v8 client have been renamed to +`Elastic.Clients.Elasticsearch`. All types belong to this namespace. When +necessary, to avoid potential conflicts, types are generated into suitable +sub-namespaces based on the https://github.com/elastic/elasticsearch-specification[{es} specification]. Additional `using` directives may be required to access such types +when using the {net-client}. + +Transport layer concepts have moved to the new `Elastic.Transport` NuGet package +and related types are defined under its namespace. Some configuration and low-level transport functionality may require a `using` directive for the `Elastic.Transport` +namespace. + +[discrete] +==== Type names + +Type names may have changed from previous versions. These are not listed explicitly due to the potentially vast number of subtle differences. +Type names will now more closely align to those used in the JSON and as documented +in the {es} documentation. + +[discrete] +==== Class members + +Types may include renamed properties based on the {es} specification, +which differ from the original `NEST` property names. The types used for properties +may also have changed due to code-generation. If you identify missing or +incorrectly-typed properties, please open https://github.com/elastic/elasticsearch-net/issues/new/choose[an issue] to alert us. + +[discrete] +==== Sealing classes + +Opinions on "sealing by default" within the .NET ecosystem tend to be quite +polarized. Microsoft seal all internal types for potential performance gains +and we see a benefit in starting with that approach for the {net-client}, +even for our public API surface. + +While it prevents inheritance and, therefore, may inhibit a few consumer scenarios, +sealing by default is intended to avoid the unexpected or invalid +extension of types that could inadvertently be broken in the future. + +[discrete] +==== Removed features + +As part of the clean-slate redesign of the new client, +certain features are removed from the v8.0 client. These are listed below: + +[discrete] +===== Attribute mappings + +In previous versions of the `NEST` client, attributes could be used to configure +the mapping behaviour and inference for user types. It is recommended that +mapping be completed via the fluent API when configuring client instances. +`System.Text.Json` attributes may be used to rename +and ignore properties during source serialization. + +[discrete] +===== CAT APIs + +The https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html[CAT APIs] +of {es} are intended for human-readable usage and will no longer be supported +via the v8 {net-client}. + +[discrete] +===== Interface removal + +Several interfaces are removed to simplify the library and avoid interfaces where only a +single implementation of that interface is expected to exist, such as +`IElasticClient` in `NEST`. Abstract base classes are preferred +over interfaces across the library, as this makes it easier to add enhancements +without introducing breaking changes for derived types. + +[discrete] +==== Missing features + +The following are some of the main features which +have not been re-implemented for the v8 client. +These might be reviewed and prioritized for inclusion in +future releases. + +* Query DSL operators for combining queries. +* Scroll Helper. +* Fluent API for union types. +* `AutoMap` for field datatype inference. +* Visitor pattern support for types such as `Properties`. +* Support for `JoinField` which affects `ChildrenAggregation`. +* Conditionless queries. +* DiagnosticSources have been removed in `Elastic.Transport` to provide a clean-slate +for an improved diagnostics story. The {net-client} emits https://opentelemetry.io/[OpenTelemetry] compatible `Activity` spans which can be consumed by APM agents such as the https://www.elastic.co/guide/en/apm/agent/dotnet/current/index.html[Elastic APM Agent for .NET]. +* Documentation is a work in progress, and we will expand on the documented scenarios +in future releases. + +[discrete] +=== Reduced API surface + +In the current versions of the code-generated .NET client, supporting commonly used +endpoints is critical. Some specific queries and aggregations need further work to generate code correctly, +hence they are not included yet. +Ensure that the features you are using are currently supported before migrating. + +An up to date list of all supported and unsupported endpoints can be found on https://github.com/elastic/elasticsearch-net/issues/7890[GitHub]. + +[discrete] +=== Workarounds for missing features + +If you encounter a missing feature with the v8 client, there are several ways to temporarily work around this issue until we officially reintroduce the feature. + +`NEST` 7.17.x can continue to be used in +https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17/connecting-to-elasticsearch-v8.html[compatibility mode] +with {es} 8.x servers until the v8 {net-client} features +align with application requirements. + +As a last resort, the low-level client `Elastic.Transport` can be used to create any desired request by hand: + +[source,csharp] +---- +public class MyRequestParameters : RequestParameters +{ + public bool Pretty + { + get => Q("pretty"); + init => Q("pretty", value); + } +} + +// ... + +var body = """ + { + "name": "my-api-key", + "expiration": "1d", + "...": "..." + } + """; + +MyRequestParameters requestParameters = new() +{ + Pretty = true +}; + +var pathAndQuery = requestParameters.CreatePathWithQueryStrings("/_security/api_key", + client.ElasticsearchClientSettings); +var endpointPath = new EndpointPath(Elastic.Transport.HttpMethod.POST, pathAndQuery); + +// Or, if the path does not contain query parameters: +// new EndpointPath(Elastic.Transport.HttpMethod.POST, "my_path") + +var response = await client.Transport + .RequestAsync( + endpointPath, + PostData.String(body), + null, + null, + cancellationToken: default) + .ConfigureAwait(false); +---- \ No newline at end of file diff --git a/docs/redirects.asciidoc b/docs/redirects.asciidoc new file mode 100644 index 00000000000..cb97e146ff1 --- /dev/null +++ b/docs/redirects.asciidoc @@ -0,0 +1,24 @@ +["appendix",role="exclude",id="redirects"] += Deleted pages + +The following pages have moved or been deleted. + +[role="exclude",id="configuration-options"] +== Configuration options + +This page has moved. See <>. + +[role="exclude",id="nest"] +== NEST - High level client + +This page has been deleted. + +[role="exclude",id="indexing-documents"] +== Indexing documents + +This page has been deleted. + +[role="exclude",id="bulkall-observable"] +== Multiple documents with `BulkAllObservable` helper + +This page has been deleted. \ No newline at end of file diff --git a/docs/reference/_options_on_elasticsearchclientsettings.md b/docs/reference/_options_on_elasticsearchclientsettings.md deleted file mode 100644 index 49d5f904bd6..00000000000 --- a/docs/reference/_options_on_elasticsearchclientsettings.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/_options_on_elasticsearchclientsettings.html ---- - -# Options on ElasticsearchClientSettings [_options_on_elasticsearchclientsettings] - -The following is a list of available connection configuration options on `ElasticsearchClientSettings`: - -`Authentication` -: An implementation of `IAuthenticationHeader` describing what http header to use to authenticate with the product. - - ``` - `BasicAuthentication` for basic authentication - ``` - ``` - `ApiKey` for simple secret token - ``` - ``` - `Base64ApiKey` for Elastic Cloud style encoded api keys - ``` - - -`ClientCertificate` -: Use the following certificates to authenticate all HTTP requests. You can also set them on individual request using `ClientCertificates`. - -`ClientCertificates` -: Use the following certificates to authenticate all HTTP requests. You can also set them on individual request using `ClientCertificates`. - -`ConnectionLimit` -: Limits the number of concurrent connections that can be opened to an endpoint. Defaults to 80 (see `DefaultConnectionLimit`). - - For Desktop CLR, this setting applies to the `DefaultConnectionLimit` property on the `ServicePointManager` object when creating `ServicePoint` objects, affecting the default `IConnection` implementation. - - For Core CLR, this setting applies to the `MaxConnectionsPerServer` property on the `HttpClientHandler` instances used by the `HttpClient` inside the default `IConnection` implementation. - - -`DeadTimeout` -: The time to put dead nodes out of rotation (this will be multiplied by the number of times they’ve been dead). - -`DefaultDisableIdInference` -: Disables automatic Id inference for given CLR types. - - The client by default will use the value of a property named `Id` on a CLR type as the `_id` to send to {{es}}. Adding a type will disable this behaviour for that CLR type. If `Id` inference should be disabled for all CLR types, use `DefaultDisableIdInference`. - - -`DefaultFieldNameInferrer` -: Specifies how field names are inferred from CLR property names. - - By default, the client camel cases property names. For example, CLR property `EmailAddress` will be inferred as "emailAddress" {{es}} document field name. - - -`DefaultIndex` -: The default index to use for a request when no index has been explicitly specified and no default indices are specified for the given CLR type specified for the request. - -`DefaultMappingFor` -: Specify how the mapping is inferred for a given CLR type. The mapping can infer the index, id and relation name for a given CLR type, as well as control serialization behaviour for CLR properties. - -`DisableAutomaticProxyDetection` -: Disabled proxy detection on the webrequest, in some cases this may speed up the first connection your appdomain makes, in other cases it will actually increase the time for the first connection. No silver bullet! Use with care! - -`DisableDirectStreaming` -: When set to true will disable (de)serializing directly to the request and response stream and return a byte[] copy of the raw request and response. Defaults to false. - -`DisablePing` -: This signals that we do not want to send initial pings to unknown/previously dead nodes and just send the call straightaway. - -`DnsRefreshTimeout` -: DnsRefreshTimeout for the connections. Defaults to 5 minutes. - -`EnableDebugMode` -: Turns on settings that aid in debugging like `DisableDirectStreaming()` and `PrettyJson()` so that the original request and response JSON can be inspected. It also always asks the server for the full stack trace on errors. - -`EnableHttpCompression` -: Enable gzip compressed requests and responses. - -`EnableHttpPipelining` -: Whether HTTP pipelining is enabled. The default is `true`. - -`EnableTcpKeepAlive` -: Sets the keep-alive option on a TCP connection. - - For Desktop CLR, sets `ServicePointManager`.`SetTcpKeepAlive`. - - -`EnableTcpStats` -: Enable statistics about TCP connections to be collected when making a request. - -`GlobalHeaders` -: Try to send these headers for every request. - -`GlobalQueryStringParameters` -: Append these query string parameters automatically to every request. - -`MaxDeadTimeout` -: The maximum amount of time a node is allowed to marked dead. - -`MaximumRetries` -: When a retryable exception occurs or status code is returned this controls the maximum amount of times we should retry the call to {{es}}. - -`MaxRetryTimeout` -: Limits the total runtime including retries separately from `RequestTimeout`. When not specified defaults to `RequestTimeout` which itself defaults to 60 seconds. - -`MemoryStreamFactory` -: Provides a memory stream factory. - -`NodePredicate` -: Register a predicate to select which nodes that you want to execute API calls on. Note that sniffing requests omit this predicate and always execute on all nodes. When using an `IConnectionPool` implementation that supports reseeding of nodes, this will default to omitting master only node from regular API calls. When using static or single node connection pooling it is assumed the list of node you instantiate the client with should be taken verbatim. - -`OnRequestCompleted` -: Allows you to register a callback every time a an API call is returned. - -`OnRequestDataCreated` -: An action to run when the `RequestData` for a request has been created. - -`PingTimeout` -: The timeout in milliseconds to use for ping requests, which are issued to determine whether a node is alive. - -`PrettyJson` -: Provide hints to serializer and products to produce pretty, non minified json. - - Note: this is not a guarantee you will always get prettified json. - - -`Proxy` -: If your connection has to go through proxy, use this method to specify the proxy url. - -`RequestTimeout` -: The timeout in milliseconds for each request to {{es}}. - -`ServerCertificateValidationCallback` -: Register a `ServerCertificateValidationCallback` per request. - -`SkipDeserializationForStatusCodes` -: Configure the client to skip deserialization of certain status codes, for example, you run {{es}} behind a proxy that returns an unexpected json format. - -`SniffLifeSpan` -: Force a new sniff for the cluster when the cluster state information is older than the specified timespan. - -`SniffOnConnectionFault` -: Force a new sniff for the cluster state every time a connection dies. - -`SniffOnStartup` -: Sniff the cluster state immediately on startup. - -`ThrowExceptions` -: Instead of following a c/go like error checking on response. `IsValid` do throw an exception (except when `SuccessOrKnownError` is false) on the client when a call resulted in an exception on either the client or the {{es}} server. - - Reasons for such exceptions could be search parser errors, index missing exceptions, and so on. - - -`TransferEncodingChunked` -: Whether the request should be sent with chunked Transfer-Encoding. - -`UserAgent` -: The user agent string to send with requests. Useful for debugging purposes to understand client and framework versions that initiate requests to {{es}}. - -## ElasticsearchClientSettings with ElasticsearchClient [_elasticsearchclientsettings_with_elasticsearchclient] - -Here’s an example to demonstrate setting configuration options using the client. - -```csharp -var settings= new ElasticsearchClientSettings() - .DefaultMappingFor(i => i - .IndexName("my-projects") - .IdProperty(p => p.Name) - ) - .EnableDebugMode() - .PrettyJson() - .RequestTimeout(TimeSpan.FromMinutes(2)); - -var client = new ElasticsearchClient(settings); -``` - - diff --git a/docs/reference/aggregations.md b/docs/reference/aggregations.md deleted file mode 100644 index 8a3ca8e8327..00000000000 --- a/docs/reference/aggregations.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/aggregations.html ---- - -# Aggregation examples [aggregations] - -This page demonstrates how to use aggregations. - - -## Top-level aggreggation [_top_level_aggreggation] - - -### Fluent API [_fluent_api] - -```csharp -var response = await client - .SearchAsync(search => search - .Index("persons") - .Query(query => query - .MatchAll(_ => {}) - ) - .Aggregations(aggregations => aggregations - .Add("agg_name", aggregation => aggregation - .Max(max => max - .Field(x => x.Age) - ) - ) - ) - .Size(10) - ); -``` - - -### Object initializer API [_object_initializer_api] - -```csharp -var response = await client.SearchAsync(new SearchRequest("persons") -{ - Query = Query.MatchAll(new MatchAllQuery()), - Aggregations = new Dictionary - { - { "agg_name", Aggregation.Max(new MaxAggregation - { - Field = Infer.Field(x => x.Age) - })} - }, - Size = 10 -}); -``` - - -### Consume the response [_consume_the_response] - -```csharp -var max = response.Aggregations!.GetMax("agg_name")!; -Console.WriteLine(max.Value); -``` - - -## Sub-aggregation [_sub_aggregation] - - -### Fluent API [_fluent_api_2] - -```csharp -var response = await client - .SearchAsync(search => search - .Index("persons") - .Query(query => query - .MatchAll(_ => {}) - ) - .Aggregations(aggregations => aggregations - .Add("firstnames", aggregation => aggregation - .Terms(terms => terms - .Field(x => x.FirstName) - ) - .Aggregations(aggregations => aggregations - .Add("avg_age", aggregation => aggregation - .Max(avg => avg - .Field(x => x.Age) - ) - ) - ) - ) - ) - .Size(10) - ); -``` - - -### Object initializer API [_object_initializer_api_2] - -```csharp -var topLevelAggregation = Aggregation.Terms(new TermsAggregation -{ - Field = Infer.Field(x => x.FirstName) -}); - -topLevelAggregation.Aggregations = new Dictionary -{ - { "avg_age", new MaxAggregation - { - Field = Infer.Field(x => x.Age) - }} -}; - -var response = await client.SearchAsync(new SearchRequest("persons") -{ - Query = Query.MatchAll(new MatchAllQuery()), - Aggregations = new Dictionary - { - { "firstnames", topLevelAggregation} - }, - Size = 10 -}); -``` - - -### Consume the response [_consume_the_response_2] - -```csharp -var firstnames = response.Aggregations!.GetStringTerms("firstnames")!; -foreach (var bucket in firstnames.Buckets) -{ - var avg = bucket.Aggregations.GetAverage("avg_age")!; - Console.WriteLine($"The average age for persons named '{bucket.Key}' is {avg}"); -} -``` - diff --git a/docs/reference/client-concepts.md b/docs/reference/client-concepts.md deleted file mode 100644 index 73655604f4a..00000000000 --- a/docs/reference/client-concepts.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/client-concepts.html ---- - -# Client concepts [client-concepts] - -The .NET client for {{es}} maps closely to the original {{es}} API. All -requests and responses are exposed through types, making it ideal for getting up and running quickly. diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md deleted file mode 100644 index 0577876926e..00000000000 --- a/docs/reference/configuration.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/configuration.html ---- - -# Configuration [configuration] - -Connecting to {{es}} with the client is easy, but it’s possible that you’d like to change the default connection behaviour. There are a number of configuration options available on `ElasticsearchClientSettings` that can be used to control how the client interact with {{es}}. - - diff --git a/docs/reference/connecting.md b/docs/reference/connecting.md deleted file mode 100644 index 5c7fc326ca2..00000000000 --- a/docs/reference/connecting.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/connecting.html ---- - -# Connecting [connecting] - -This page contains the information you need to create an instance of the .NET Client for {{es}} that connects to your {{es}} cluster. - -It’s possible to connect to your {{es}} cluster via a single node, or by specifying multiple nodes using a node pool. Using a node pool has a few advantages over a single node, such as load balancing and cluster failover support. The client provides convenient configuration options to connect to an Elastic Cloud deployment. - -::::{important} -Client applications should create a single instance of `ElasticsearchClient` that is used throughout your application for its entire lifetime. Internally the client manages and maintains HTTP connections to nodes, reusing them to optimize performance. If you use a dependency injection container for your application, the client instance should be registered with a singleton lifetime. -:::: - - - -## Connecting to a cloud deployment [cloud-deployment] - -[Elastic Cloud](docs-content://deploy-manage/deploy/elastic-cloud/cloud-hosted.md) is the easiest way to get started with {{es}}. When connecting to Elastic Cloud with the .NET {{es}} client you should always use the Cloud ID. You can find this value within the "Manage Deployment" page after you’ve created a cluster (look in the top-left if you’re in Kibana). - -We recommend using a Cloud ID whenever possible because your client will be automatically configured for optimal use with Elastic Cloud, including HTTPS and HTTP compression. - -Connecting to an Elasticsearch Service deployment is achieved by providing the unique Cloud ID for your deployment when configuring the `ElasticsearchClient` instance. You also require suitable credentials, either a username and password or an API key that your application uses to authenticate with your deployment. - -As a security best practice, it is recommended to create a dedicated API key per application, with permissions limited to only those required for any API calls the application is authorized to make. - -The following snippet demonstrates how to create a client instance that connects to an {{es}} deployment in the cloud. - -```csharp -using Elastic.Clients.Elasticsearch; -using Elastic.Transport; - -var client = new ElasticsearchClient("", new ApiKey("")); <1> -``` - -1. Replace the placeholder string values above with your cloud ID and the API key configured for your application to access your deployment. - - - -## Connecting to a single node [single-node] - -Single node configuration is best suited to connections to a multi-node cluster running behind a load balancer or reverse proxy, which is exposed via a single URL. It may also be convenient to use a single node during local application development. If the URL represents a single {{es}} node, be aware that this offers no resiliency should the server be unreachable or unresponsive. - -By default, security features such as authentication and TLS are enabled on {{es}} clusters. When you start {{es}} for the first time, TLS is configured automatically for the HTTP layer. A CA certificate is generated and stored on disk which is used to sign the certificates for the HTTP layer of the {{es}} cluster. - -In order for the client to establish a connection with the cluster over HTTPS, the CA certificate must be trusted by the client application. The simplest choice is to use the hex-encoded SHA-256 fingerprint of the CA certificate. The CA fingerprint is output to the terminal when you start {{es}} for the first time. You’ll see a distinct block like the one below in the output from {{es}} (you may have to scroll up if it’s been a while): - -```sh ----------------------------------------------------------------- --> Elasticsearch security features have been automatically configured! --> Authentication is enabled and cluster connections are encrypted. - --> Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`): - lhQpLELkjkrawaBoaz0Q - --> HTTP CA certificate SHA-256 fingerprint: - a52dd93511e8c6045e21f16654b77c9ee0f34aea26d9f40320b531c474676228 -... ----------------------------------------------------------------- -``` - -Note down the `elastic` user password and HTTP CA fingerprint for the next sections. - -The CA fingerprint can also be retrieved at any time from a running cluster using the following command: - -```shell -openssl x509 -fingerprint -sha256 -in config/certs/http_ca.crt -``` - -The command returns the security certificate, including the fingerprint. The `issuer` should be `Elasticsearch security auto-configuration HTTP CA`. - -```shell -issuer= /CN=Elasticsearch security auto-configuration HTTP CA -SHA256 Fingerprint= -``` - -Visit the [Start the Elastic Stack with security enabled automatically](docs-content://deploy-manage/deploy/self-managed/installing-elasticsearch.md) documentation for more information. - -The following snippet shows you how to create a client instance that connects to your {{es}} cluster via a single node, using the CA fingerprint: - -```csharp -using Elastic.Clients.Elasticsearch; -using Elastic.Transport; - -var settings = new ElasticsearchClientSettings(new Uri("https://localhost:9200")) - .CertificateFingerprint("") - .Authentication(new BasicAuthentication("", "")); - -var client = new ElasticsearchClient(settings); -``` - -The preceding snippet demonstrates configuring the client to authenticate by providing a username and password with basic authentication. If preferred, you may also use `ApiKey` authentication as shown in the cloud connection example. - - -## Connecting to multiple nodes using a node pool [multiple-nodes] - -To provide resiliency, you should configure multiple nodes for your cluster to which the client attempts to communicate. By default, the client cycles through nodes for each request in a round robin fashion. The client also tracks unhealthy nodes and avoids sending requests to them until they become healthy. - -This configuration is best suited to connect to a known small sized cluster, where you do not require sniffing to detect the cluster topology. - -The following snippet shows you how to connect to multiple nodes by using a static node pool: - -```csharp -using Elastic.Clients.Elasticsearch; -using Elastic.Transport; - -var nodes = new Uri[] -{ - new Uri("https://myserver1:9200"), - new Uri("https://myserver2:9200"), - new Uri("https://myserver3:9200") -}; - -var pool = new StaticNodePool(nodes); - -var settings = new ElasticsearchClientSettings(pool) - .CertificateFingerprint("") - .Authentication(new ApiKey("")); - -var client = new ElasticsearchClient(settings); -``` - diff --git a/docs/reference/esql.md b/docs/reference/esql.md deleted file mode 100644 index f1db14c16cc..00000000000 --- a/docs/reference/esql.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -navigation_title: "Using ES|QL" -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/esql.html ---- - -# ES|QL in the .NET client [esql] - - -This page helps you understand and use [ES|QL](docs-content://explore-analyze/query-filter/languages/esql.md) in the .NET client. - -There are two ways to use ES|QL in the .NET client: - -* Use the Elasticsearch [ES|QL API](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-esql) directly: This is the most flexible approach, but it’s also the most complex because you must handle results in their raw form. You can choose the precise format of results, such as JSON, CSV, or text. -* Use ES|QL high-level helpers: These helpers take care of parsing the raw response into something readily usable by the application. Several helpers are available for different use cases, such as object mapping, cursor traversal of results (in development), and dataframes (in development). - - -## How to use the ES|QL API [esql-how-to] - -The [ES|QL query API](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-esql) allows you to specify how results should be returned. You can choose a [response format](docs-content://explore-analyze/query-filter/languages/esql-rest.md#esql-rest-format) such as CSV, text, or JSON, then fine-tune it with parameters like column separators and locale. - -The following example gets ES|QL results as CSV and parses them: - -```csharp -var response = await client.Esql.QueryAsync(r => r - .Query("FROM index") - .Format("csv") -); -var csvContents = Encoding.UTF8.GetString(response.Data); -``` - - -## Consume ES|QL results [esql-consume-results] - -The previous example showed that although the raw ES|QL API offers maximum flexibility, additional work is required in order to make use of the result data. - -To simplify things, try working with these three main representations of ES|QL results (each with its own mapping helper): - -* **Objects**, where each row in the results is mapped to an object from your application domain. This is similar to what ORMs (object relational mappers) commonly do. -* **Cursors**, where you scan the results row by row and access the data using column names. This is similar to database access libraries. -* **Dataframes**, where results are organized in a column-oriented structure that allows efficient processing of column data. - -```csharp -// ObjectAPI example -var response = await client.Esql.QueryAsObjectsAsync(x => x.Query("FROM index")); -foreach (var person in response) -{ - // ... -} -``` diff --git a/docs/reference/examples.md b/docs/reference/examples.md deleted file mode 100644 index 67cc8034ae0..00000000000 --- a/docs/reference/examples.md +++ /dev/null @@ -1,164 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/examples.html ---- - -# CRUD usage examples [examples] - -This page helps you to understand how to perform various basic {{es}} CRUD (create, read, update, delete) operations using the .NET client. It demonstrates how to create a document by indexing an object into {{es}}, read a document back, retrieving it by ID or performing a search, update one of the fields in a document and delete a specific document. - -These examples assume you have an instance of the `ElasticsearchClient` accessible via a local variable named `client` and several using directives in your C# file. - -```csharp -using System; -using Elastic.Clients.Elasticsearch; -using Elastic.Clients.Elasticsearch.QueryDsl; -var client = new ElasticsearchClient(); <1> -``` - -1. The default constructor, assumes an unsecured {{es}} server is running and exposed on *http://localhost:9200*. See [connecting](/reference/connecting.md) for examples of connecting to secured servers and [Elastic Cloud](https://www.elastic.co/cloud) deployments. - - -The examples operate on data representing tweets. Tweets are modelled in the client application using a C# class named *Tweet* containing several properties that map to the document structure being stored in {{es}}. - -```csharp -public class Tweet -{ - public int Id { get; set; } <1> - public string User { get; set; } - public DateTime PostDate { get; set; } - public string Message { get; set; } -} -``` - -1. By default, the .NET client will try to find a property called `Id` on the class. When such a property is present it will index the document into {{es}} using the ID specified by the value of this property. - - - -## Indexing a document [indexing-net] - -Documents can be indexed by creating an instance representing a tweet and indexing it via the client. In these examples, we will work with an index named *my-tweet-index*. - -```csharp -var tweet = new Tweet <1> -{ - Id = 1, - User = "stevejgordon", - PostDate = new DateTime(2009, 11, 15), - Message = "Trying out the client, so far so good?" -}; - -var response = await client.IndexAsync(tweet, "my-tweet-index"); <2> - -if (response.IsValidResponse) <3> -{ - Console.WriteLine($"Index document with ID {response.Id} succeeded."); <4> -} -``` - -1. Create an instance of the `Tweet` class with relevant properties set. -2. Prefer the async APIs, which require awaiting the response. -3. Check the `IsValid` property on the response to confirm that the request and operation succeeded. -4. Access the `IndexResponse` properties, such as the ID, if necessary. - - - -## Getting a document [getting-net] - -```csharp -var response = await client.GetAsync(1, idx => idx.Index("my-tweet-index")); <1> - -if (response.IsValidResponse) -{ - var tweet = response.Source; <2> -} -``` - -1. The `GetResponse` is mapped 1-to-1 with the Elasticsearch JSON response. -2. The original document is deserialized as an instance of the Tweet class, accessible on the response via the `Source` property. - - - -## Searching for documents [searching-net] - -The client exposes a fluent interface and a powerful query DSL for searching. - -```csharp -var response = await client.SearchAsync(s => s <1> - .Index("my-tweet-index") <2> - .From(0) - .Size(10) - .Query(q => q - .Term(t => t.User, "stevejgordon") <3> - ) -); - -if (response.IsValidResponse) -{ - var tweet = response.Documents.FirstOrDefault(); <4> -} -``` - -1. The generic type argument specifies the `Tweet` class, which is used when deserialising the hits from the response. -2. The index can be omitted if a `DefaultIndex` has been configured on `ElasticsearchClientSettings`, or a specific index was configured when mapping this type. -3. Execute a term query against the `user` field, searching for tweets authored by the user *stevejgordon*. -4. Documents matched by the query are accessible via the `Documents` collection property on the `SearchResponse`. - - -You may prefer using the object initializer syntax for requests if lambdas aren’t your thing. - -```csharp -var request = new SearchRequest("my-tweet-index") <1> -{ - From = 0, - Size = 10, - Query = new TermQuery("user") { Value = "stevejgordon" } -}; - -var response = await client.SearchAsync(request); <2> - -if (response.IsValidResponse) -{ - var tweet = response.Documents.FirstOrDefault(); -} -``` - -1. Create an instance of `SearchRequest`, setting properties to control the search operation. -2. Pass the request to the `SearchAsync` method on the client. - - - -## Updating documents [updating-net] - -Documents can be updated in several ways, including by providing a complete replacement for an existing document ID. - -```csharp -tweet.Message = "This is a new message"; <1> - -var response = await client.UpdateAsync("my-tweet-index", 1, u => u - .Doc(tweet)); <2> - -if (response.IsValidResponse) -{ - Console.WriteLine("Update document succeeded."); -} -``` - -1. Update a property on the existing tweet instance. -2. Send the updated tweet object in the update request. - - - -## Deleting documents [deleting-net] - -Documents can be deleted by providing the ID of the document to remove. - -```csharp -var response = await client.DeleteAsync("my-tweet-index", 1); - -if (response.IsValidResponse) -{ - Console.WriteLine("Delete document succeeded."); -} -``` - diff --git a/docs/reference/getting-started.md b/docs/reference/getting-started.md deleted file mode 100644 index 39f6b5f0484..00000000000 --- a/docs/reference/getting-started.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/getting-started-net.html - - https://www.elastic.co/guide/en/serverless/current/elasticsearch-dot-net-client-getting-started.html ---- - -# Getting started [getting-started-net] - -This page guides you through the installation process of the .NET client, shows you how to instantiate the client, and how to perform basic Elasticsearch operations with it. - - -### Requirements [_requirements] - -* .NET Core, .NET 5+ or .NET Framework (4.6.1 and higher). - - -### Installation [_installation] - -To install the latest version of the client for SDK style projects, run the following command: - -```shell -dotnet add package Elastic.Clients.Elasticsearch -``` - -Refer to the [*Installation*](/reference/installation.md) page to learn more. - - -### Connecting [_connecting] - -You can connect to the Elastic Cloud using an API key and the Elasticsearch endpoint. - -```csharp -var client = new ElasticsearchClient("", new ApiKey("")); -``` - -Your Elasticsearch endpoint can be found on the **My deployment** page of your deployment: - -![Finding Elasticsearch endpoint](images/es-endpoint.jpg) - -You can generate an API key on the **Management** page under Security. - -![Create API key](images/create-api-key.png) - -For other connection options, refer to the [*Connecting*](/reference/connecting.md) section. - - -### Operations [_operations] - -Time to use Elasticsearch! This section walks you through the basic, and most important, operations of Elasticsearch. For more operations and more advanced examples, refer to the [*CRUD usage examples*](/reference/examples.md) page. - - -#### Creating an index [_creating_an_index] - -This is how you create the `my_index` index: - -```csharp -var response = await client.Indices.CreateAsync("my_index"); -``` - - -#### Indexing documents [_indexing_documents] - -This is a simple way of indexing a document: - -```csharp -var doc = new MyDoc -{ - Id = 1, - User = "flobernd", - Message = "Trying out the client, so far so good?" -}; - -var response = await client.IndexAsync(doc, "my_index"); -``` - - -#### Getting documents [_getting_documents] - -You can get documents by using the following code: - -```csharp -var response = await client.GetAsync(id, idx => idx.Index("my_index")); - -if (response.IsValidResponse) -{ - var doc = response.Source; -} -``` - - -#### Searching documents [_searching_documents] - -This is how you can create a single match query with the .NET client: - -```csharp -var response = await client.SearchAsync(s => s - .Index("my_index") - .From(0) - .Size(10) - .Query(q => q - .Term(t => t.User, "flobernd") - ) -); - -if (response.IsValidResponse) -{ - var doc = response.Documents.FirstOrDefault(); -} -``` - - -#### Updating documents [_updating_documents] - -This is how you can update a document, for example to add a new field: - -```csharp -doc.Message = "This is a new message"; - -var response = await client.UpdateAsync("my_index", 1, u => u - .Doc(doc)); -``` - - -#### Deleting documents [_deleting_documents] - -```csharp -var response = await client.DeleteAsync("my_index", 1); -``` - - -#### Deleting an index [_deleting_an_index] - -```csharp -var response = await client.Indices.DeleteAsync("my_index"); -``` - - -## Further reading [_further_reading] - -* Refer to the [*Usage recommendations*](/reference/recommendations.md) page to learn more about how to use the client the most efficiently. diff --git a/docs/reference/index.md b/docs/reference/index.md deleted file mode 100644 index 90ef20d616f..00000000000 --- a/docs/reference/index.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/index.html - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/introduction.html ---- - -# .NET [introduction] - -**Rapidly develop applications with the .NET client for {{es}}.** - -Designed for .NET application developers, the .NET language client library provides a strongly typed API and query DSL for interacting with {{es}}. The .NET client includes higher-level abstractions, such as helpers for coordinating bulk indexing and update operations. It also comes with built-in, configurable cluster failover retry mechanisms. - -The {{es}} .NET client is available as a [NuGet](https://www.nuget.org/packages/Elastic.Clients.Elasticsearch) package for use with .NET Core, .NET 5+, and .NET Framework (4.6.1 and later) applications. - -*NOTE: This documentation covers the v8 .NET client for {{es}}, for use with {{es}} 8.x versions. To develop applications targeting {{es}} v7, use the [v7 (NEST) client](https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17).* - - -## Features [features] - -* One-to-one mapping with the REST API. -* Strongly typed requests and responses for {{es}} APIs. -* Fluent API for building requests. -* Query DSL to assist with constructing search queries. -* Helpers for common tasks such as bulk indexing of documents. -* Pluggable serialization of requests and responses based on `System.Text.Json`. -* Diagnostics, auditing, and .NET activity integration. - -The .NET {{es}} client is built on the Elastic Transport library, which provides: - -* Connection management and load balancing across all available nodes. -* Request retries and dead connections handling. - - -## {{es}} version compatibility [_es_version_compatibility] - -Language clients are forward compatible: clients support communicating with current and later minor versions of {{es}}. {{es}} language clients are backward compatible with default distributions only and without guarantees. - - -## Questions, bugs, comments, feature requests [_questions_bugs_comments_feature_requests] - -To submit a bug report or feature request, use [GitHub issues](https://github.com/elastic/elasticsearch-net/issues). - -For more general questions and comments, try the community forum on [discuss.elastic.co](https://discuss.elastic.co/c/elasticsearch). Mention `.NET` in the title to indicate the discussion topic. - diff --git a/docs/reference/installation.md b/docs/reference/installation.md deleted file mode 100644 index 8fbb2dcd2e9..00000000000 --- a/docs/reference/installation.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/installation.html ---- - -# Installation [installation] - -This page shows you how to install the .NET client for {{es}}. - -::::{important} -The v8 client for .NET does not have complete feature parity with the v7 `NEST` client. It may not be suitable for for all applications until additional endpoints and features are supported. We therefore recommend you thoroughly review our [release notes](/release-notes/index.md) before attempting to migrate existing applications to the `Elastic.Clients.Elasticsearch` library. Until the new client supports all endpoints and features your application requires, you may continue to use the 7.17.x [NEST](https://www.nuget.org/packages/NEST) client to communicate with v8 Elasticsearch servers using compatibility mode. Refer to the [Connecting to Elasticsearch v8.x using the v7.17.x client documentation](https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17/connecting-to-elasticsearch-v8.html) for guidance on configuring the 7.17.x client. -:::: - - - -## Installing the .NET client [dot-net-client] - -For SDK style projects, you can install the {{es}} client by running the following .NET CLI command in your terminal: - -```text -dotnet add package Elastic.Clients.Elasticsearch -``` - -This command adds a package reference to your project (csproj) file for the latest stable version of the client. - -If you prefer, you may also manually add a package reference inside your project file: - -```shell - -``` - -*NOTE: The version number should reflect the latest published version from [NuGet.org](https://www.nuget.org/packages/Elastic.Clients.Elasticsearch). To install a different version, modify the version as necessary.* - -For Visual Studio users, the .NET client can also be installed from the Package Manager Console inside Visual Studio using the following command: - -```shell -Install-Package Elastic.Clients.Elasticsearch -``` - -Alternatively, search for `Elastic.Clients.Elasticsearch` in the NuGet Package Manager UI. - -To learn how to connect the {{es}} client, refer to the [Connecting](/reference/connecting.md) section. - - -## Compatibility [compatibility] - -The {{es}} client is compatible with currently maintained .NET runtime versions. Compatibility with End of Life (EOL) .NET runtimes is not guaranteed or supported. - -Language clients are forward compatible; meaning that the clients support communicating with greater or equal minor versions of {{es}} without breaking. It does not mean that the clients automatically support new features of newer {{es}} versions; it is only possible after a release of a new client version. For example, a 8.12 client version won’t automatically support the new features of the 8.13 version of {{es}}, the 8.13 client version is required for that. {{es}} language clients are only backwards compatible with default distributions and without guarantees made. - -| Elasticsearch Version | Elasticsearch-NET Branch | Supported | -| --- | --- | --- | -| main | main | | -| 8.x | 8.x | 8.x | -| 7.x | 7.x | 7.17 | - -Refer to the [end-of-life policy](https://www.elastic.co/support/eol) for more information. - - -## CI feed [ci-feed] - -We publish CI builds of our client packages, including the latest unreleased features. If you want to experiment with the latest bits, you can add the CI feed to your list of NuGet package sources. - -Feed URL: [https://f.feedz.io/elastic/all/nuget/index.json](https://f.feedz.io/elastic/all/nuget/index.json) - -We do not recommend using CI builds for production applications as they are not formally supported until they are released. - diff --git a/docs/reference/mappings.md b/docs/reference/mappings.md deleted file mode 100644 index b28b8ba4a5e..00000000000 --- a/docs/reference/mappings.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/mappings.html ---- - -# Custom mapping examples [mappings] - -This page demonstrates how to configure custom mappings on an index. - - -## Configure mappings during index creation [_configure_mappings_during_index_creation] - -```csharp -await client.Indices.CreateAsync(index => index - .Index("index") - .Mappings(mappings => mappings - .Properties(properties => properties - .IntegerNumber(x => x.Age!) - .Keyword(x => x.FirstName!, keyword => keyword.Index(false)) - ) - ) -); -``` - - -## Configure mappings after index creation [_configure_mappings_after_index_creation] - -```csharp -await client.Indices.PutMappingAsync(mappings => mappings - .Indices("index") - .Properties(properties => properties - .IntegerNumber(x => x.Age!) - .Keyword(x => x.FirstName!, keyword => keyword.Index(false)) - ) -); -``` - diff --git a/docs/reference/migration-guide.md b/docs/reference/migration-guide.md deleted file mode 100644 index 43a4bcec67d..00000000000 --- a/docs/reference/migration-guide.md +++ /dev/null @@ -1,222 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/migration-guide.html ---- - -# Migration guide: From NEST v7 to .NET Client v8 [migration-guide] - -The following migration guide explains the current state of the client, missing features, breaking changes and our rationale for some of the design choices we have introduced. - - -## Version 8 is a refresh [_version_8_is_a_refresh] - -::::{important} -It is important to highlight that v8 of the Elasticsearch .NET Client represents a new start for the client design. It is important to review how this may affect your code and usage. - -:::: - - -Mature code becomes increasingly hard to maintain over time. Major releases allow us to simplify and better align our language clients with each other in terms of design. It is crucial to find the right balance between uniformity across programming languages and the idiomatic concerns of each language. For .NET, we typically compare and contrast with [Java](https://github.com/elastic/elasticsearch-java) and [Go](https://github.com/elastic/go-elasticsearch) to make sure that our approach is equivalent for each of these. We also take heavy inspiration from Microsoft framework design guidelines and the conventions of the wider .NET community. - - -### New Elastic.Clients.Elasticsearch NuGet package [_new_elastic_clients_elasticsearch_nuget_package] - -We have shipped the new code-generated client as a [NuGet package](https://www.nuget.org/packages/Elastic.Clients.Elasticsearch/) with a new root namespace, `Elastic.Clients.Elasticsearch`. The v8 client is built upon the foundations of the v7 `NEST` client, but there are changes. By shipping as a new package, the expectation is that migration can be managed with a phased approach. - -While this is a new package, we have aligned the major version (v8.x.x) with the supported {{es}} server version to clearly indicate the client/server compatibility. The v8 client is designed to work with version 8 of {{es}}. - -The v7 `NEST` client continues to be supported but will not gain new features or support for new {{es}} endpoints. It should be considered deprecated in favour of the new client. - - -### Limited feature set [_limited_feature_set] - -::::{warning} -The version 8 Elasticsearch .NET Client does not have feature parity with the previous v7 `NEST` high-level client. - -:::: - - -If a feature you depend on is missing (and not explicitly documented below as a feature that we do not plan to reintroduce), open [an issue](https://github.com/elastic/elasticsearch-net/issues/new/choose) or comment on a relevant existing issue to highlight your need to us. This will help us prioritise our roadmap. - - -## Code generation [_code_generation] - -Given the size of the {{es}} API surface today, it is no longer practical to maintain thousands of types (requests, responses, queries, aggregations, etc.) by hand. To ensure consistent, accurate, and timely alignment between language clients and {{es}}, the 8.x clients, and many of the associated types are now automatically code-generated from a [shared specification](https://github.com/elastic/elasticsearch-specification). This is a common solution to maintaining alignment between client and server among SDKs and libraries, such as those for Azure, AWS and the Google Cloud Platform. - -Code-generation from a specification has inevitably led to some differences between the existing v7 `NEST` types and those available in the new v7 Elasticsearch .NET Client. For version 8, we generate strictly from the specification, special casing a few areas to improve usability or to align with language idioms. - -The base type hierarchy for concepts such as `Properties`, `Aggregations` and `Queries` is no longer present in generated code, as these arbitrary groupings do not align with concrete concepts of the public server API. These considerations do not preclude adding syntactic sugar and usability enhancements to types in future releases on a case-by-case basis. - - -## Elastic.Transport [_elastic_transport] - -The .NET client includes a transport layer responsible for abstracting HTTP concepts and to provide functionality such as our request pipeline. This supports round-robin load-balancing of requests to nodes, pinging failed nodes and sniffing the cluster for node roles. - -In v7, this layer shipped as `Elasticsearch.Net` and was considered our low-level client which could be used to send and receive raw JSON bytes between the client and server. - -As part of the work for 8.0.0, we have moved the transport layer out into a [new dedicated package](https://www.nuget.org/packages/Elastic.Transport) and [repository](https://github.com/elastic/elastic-transport-net), named `Elastic.Transport`. This supports reuse across future clients and allows consumers with extremely high-performance requirements to build upon this foundation. - - -## System.Text.Json for serialization [_system_text_json_for_serialization] - -The v7 `NEST` high-level client used an internalized and modified version of [Utf8Json](https://github.com/neuecc/Utf8Json) for request and response serialization. This was introduced for its performance improvements over [Json.NET](https://www.newtonsoft.com/json), the more common JSON framework at the time. - -While Utf8Json provides good value, we have identified minor bugs and performance issues that have required maintenance over time. Some of these are hard to change without more significant effort. This library is no longer maintained, and any such changes cannot easily be contributed back to the original project. - -With .NET Core 3.0, Microsoft shipped new [System.Text.Json APIs](https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-apis) that are included in-the-box with current versions of .NET. We have adopted `System.Text.Json` for all serialization. Consumers can still define and register their own `Serializer` implementation for their document types should they prefer to use a different serialization library. - -By adopting `System.Text.Json`, we now depend on a well-maintained and supported library from Microsoft. `System.Text.Json` is designed from the ground up to support the latest performance optimizations in .NET and, as a result, provides both fast and low-allocation serialization. - - -## Mockability of ElasticsearchClient [_mockability_of_elasticsearchclient] - -Testing code is an important part of software development. We recommend that consumers prefer introducing an abstraction for their use of the Elasticsearch .NET Client as the prefered way to decouple consuming code from client types and support unit testing. - -To support user testing scenarios, we have unsealed the `ElasticsearchClient` type and made its methods virtual. This supports mocking the type directly for unit testing. This is an improvement over the original `IElasticClient` interface from `NEST` (v7) which only supported mocking of top-level client methods. - -We have also introduced a `TestableResponseFactory` in `Elastic.Transport` to make it easier to create response instances with specific status codes and validity that can be used during unit testing. - -These changes are in addition to our existing support for testing with an `InMemoryConnection`, virtualized clusters and with our [`Elastic.Elasticsearch.Managed`](https://github.com/elastic/elasticsearch-net-abstractions/blob/master/src/Elastic.Elasticsearch.Managed) library for integration testing against real {{es}} instances. - - -## Migrating to Elastic.Clients.Elasticsearch [_migrating_to_elastic_clients_elasticsearch] - -::::{warning} -The version 8 client does not currently have full-feature parity with `NEST`. The client primary use case is for application developers communicating with {{es}}. - -:::: - - -The version 8 client focuses on core endpoints, more specifically for common CRUD scenarios. The intention is to reduce the feature gap in subsequent versions. Review this documentation carefully to learn about the missing features and reduced API surface details before migrating from the v7 `NEST` client! - -The choice to code-generate a new evolution of the Elasticsearch .NET Client introduces some significant breaking changes. - -The v8 client is shipped as a new [NuGet package](https://www.nuget.org/packages/Elastic.Clients.Elasticsearch/) which can be installed alongside v7 `NEST`. Some consumers may prefer a phased migration with both packages side-by-side for a short period of time to manage complex migrations. In addition, `NEST` 7.17.x can continue to be used in [compatibility mode](https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17/connecting-to-elasticsearch-v8.html) with {{es}} 8.x servers until the v8 Elasticsearch .NET Client features align with application requirements. - - -## Breaking Changes [_breaking_changes] - -::::{warning} -As a result of code-generating a majority of the client types, version 8 of the client includes multiple breaking changes. - -:::: - - -We have strived to keep the core foundation reasonably similar, but types emitted through code-generation are subject to change between `NEST` (v7) and the new `Elastic.Clients.Elasticsearch` (v8) package. - - -### Namespaces [_namespaces] - -The package and top-level namespace for the v8 client have been renamed to `Elastic.Clients.Elasticsearch`. All types belong to this namespace. When necessary, to avoid potential conflicts, types are generated into suitable sub-namespaces based on the [{{es}} specification](https://github.com/elastic/elasticsearch-specification). Additional `using` directives may be required to access such types when using the Elasticsearch .NET Client. - -Transport layer concepts have moved to the new `Elastic.Transport` NuGet package and related types are defined under its namespace. Some configuration and low-level transport functionality may require a `using` directive for the `Elastic.Transport` namespace. - - -### Type names [_type_names] - -Type names may have changed from previous versions. These are not listed explicitly due to the potentially vast number of subtle differences. Type names will now more closely align to those used in the JSON and as documented in the {{es}} documentation. - - -### Class members [_class_members] - -Types may include renamed properties based on the {{es}} specification, which differ from the original `NEST` property names. The types used for properties may also have changed due to code-generation. If you identify missing or incorrectly-typed properties, please open [an issue](https://github.com/elastic/elasticsearch-net/issues/new/choose) to alert us. - - -### Sealing classes [_sealing_classes] - -Opinions on "sealing by default" within the .NET ecosystem tend to be quite polarized. Microsoft seal all internal types for potential performance gains and we see a benefit in starting with that approach for the Elasticsearch .NET Client, even for our public API surface. - -While it prevents inheritance and, therefore, may inhibit a few consumer scenarios, sealing by default is intended to avoid the unexpected or invalid extension of types that could inadvertently be broken in the future. - - -### Removed features [_removed_features] - -As part of the clean-slate redesign of the new client, certain features are removed from the v8.0 client. These are listed below: - - -#### Attribute mappings [_attribute_mappings] - -In previous versions of the `NEST` client, attributes could be used to configure the mapping behaviour and inference for user types. It is recommended that mapping be completed via the fluent API when configuring client instances. `System.Text.Json` attributes may be used to rename and ignore properties during source serialization. - - -#### CAT APIs [_cat_apis] - -The [CAT APIs](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cat) of {{es}} are intended for human-readable usage and will no longer be supported via the v8 Elasticsearch .NET Client. - - -#### Interface removal [_interface_removal] - -Several interfaces are removed to simplify the library and avoid interfaces where only a single implementation of that interface is expected to exist, such as `IElasticClient` in `NEST`. Abstract base classes are preferred over interfaces across the library, as this makes it easier to add enhancements without introducing breaking changes for derived types. - - -### Missing features [_missing_features] - -The following are some of the main features which have not been re-implemented for the v8 client. These might be reviewed and prioritized for inclusion in future releases. - -* Query DSL operators for combining queries. -* Scroll Helper. -* Fluent API for union types. -* `AutoMap` for field datatype inference. -* Visitor pattern support for types such as `Properties`. -* Support for `JoinField` which affects `ChildrenAggregation`. -* Conditionless queries. -* DiagnosticSources have been removed in `Elastic.Transport` to provide a clean-slate for an improved diagnostics story. The Elasticsearch .NET Client emits [OpenTelemetry](https://opentelemetry.io/) compatible `Activity` spans which can be consumed by APM agents such as the [Elastic APM Agent for .NET](apm-agent-dotnet://reference/index.md). -* Documentation is a work in progress, and we will expand on the documented scenarios in future releases. - - -## Reduced API surface [_reduced_api_surface] - -In the current versions of the code-generated .NET client, supporting commonly used endpoints is critical. Some specific queries and aggregations need further work to generate code correctly, hence they are not included yet. Ensure that the features you are using are currently supported before migrating. - -An up to date list of all supported and unsupported endpoints can be found on [GitHub](https://github.com/elastic/elasticsearch-net/issues/7890). - - -## Workarounds for missing features [_workarounds_for_missing_features] - -If you encounter a missing feature with the v8 client, there are several ways to temporarily work around this issue until we officially reintroduce the feature. - -`NEST` 7.17.x can continue to be used in [compatibility mode](https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17/connecting-to-elasticsearch-v8.html) with {{es}} 8.x servers until the v8 Elasticsearch .NET Client features align with application requirements. - -As a last resort, the low-level client `Elastic.Transport` can be used to create any desired request by hand: - -```csharp -public class MyRequestParameters : RequestParameters -{ - public bool Pretty - { - get => Q("pretty"); - init => Q("pretty", value); - } -} - -// ... - -var body = """ - { - "name": "my-api-key", - "expiration": "1d", - "...": "..." - } - """; - -MyRequestParameters requestParameters = new() -{ - Pretty = true -}; - -var pathAndQuery = requestParameters.CreatePathWithQueryStrings("/_security/api_key", - client.ElasticsearchClientSettings); -var endpointPath = new EndpointPath(Elastic.Transport.HttpMethod.POST, pathAndQuery); - -// Or, if the path does not contain query parameters: -// new EndpointPath(Elastic.Transport.HttpMethod.POST, "my_path") - -var response = await client.Transport - .RequestAsync( - endpointPath, - PostData.String(body), - null, - null, - cancellationToken: default) - .ConfigureAwait(false); -``` diff --git a/docs/reference/query.md b/docs/reference/query.md deleted file mode 100644 index 11f0e1d1452..00000000000 --- a/docs/reference/query.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/query.html ---- - -# Query examples [query] - -This page demonstrates how to perform a search request. - - -## Fluent API [_fluent_api_3] - -```csharp -var response = await client - .SearchAsync(search => search - .Index("persons") - .Query(query => query - .Term(term => term - .Field(x => x.FirstName) - .Value("Florian") - ) - ) - .Size(10) - ); -``` - - -## Object initializer API [_object_initializer_api_3] - -```csharp -var response = await client - .SearchAsync(new SearchRequest("persons") - { - Query = Query.Term(new TermQuery(Infer.Field(x => x.FirstName)) - { - Value = "Florian" - }), - Size = 10 - }); -``` - - -## Consume the response [_consume_the_response_3] - -```csharp -foreach (var person in response.Documents) -{ - Console.WriteLine(person.FirstName); -} -``` - diff --git a/docs/reference/recommendations.md b/docs/reference/recommendations.md deleted file mode 100644 index 91a26544621..00000000000 --- a/docs/reference/recommendations.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/recommendations.html ---- - -# Usage recommendations [recommendations] - -To achieve the most efficient use of the Elasticsearch .NET Client, we recommend following the guidance defined in this article. - - -## Reuse the same client instance [_reuse_the_same_client_instance] - -When working with the Elasticsearch .NET Client we recommend that consumers reuse a single instance of `ElasticsearchClient` for the entire lifetime of the application. When reusing the same instance: - -* initialization overhead is limited to the first usage. -* resources such as TCP connections can be pooled and reused to improve efficiency. -* serialization overhead is reduced, improving performance. - -The `ElasticsearchClient` type is thread-safe and can be shared and reused across multiple threads in consuming applications. Client reuse can be achieved by creating a singleton static instance or by registering the type with a singleton lifetime when using dependency injection containers. - - -## Prefer asynchronous methods [_prefer_asynchronous_methods] - -The Elasticsearch .NET Client exposes synchronous and asynchronous methods on the `ElasticsearchClient`. We recommend always preferring the asynchronous methods, which have the `Async` suffix. Using the Elasticsearch .NET Client requires sending HTTP requests to {{es}} servers. Access to {{es}} is sometimes slow or delayed, and some complex queries may take several seconds to return. If such operations are blocked by calling the synchronous methods, the thread must wait until the HTTP request is complete. In high-load scenarios, this can cause significant thread usage, potentially affecting the throughput and performance of consuming applications. By preferring the asynchronous methods, application threads can continue with other work that doesn’t depend on the web resource until the potentially blocking task completes. - diff --git a/docs/reference/serialization.md b/docs/reference/serialization.md deleted file mode 100644 index 70b9bef8866..00000000000 --- a/docs/reference/serialization.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/serialization.html ---- - -# Serialization [serialization] - -By default, the .NET client for {{es}} uses the Microsoft System.Text.Json library for serialization. The client understands how to serialize and deserialize the request and response types correctly. It also handles (de)serialization of user POCO types representing documents read or written to {{es}}. - -The client has two distinct serialization responsibilities - serialization of the types owned by the `Elastic.Clients.Elasticsearch` library and serialization of source documents, modeled in application code. The first responsibility is entirely internal; the second is configurable. - - diff --git a/docs/reference/source-serialization.md b/docs/reference/source-serialization.md deleted file mode 100644 index e6b110b039f..00000000000 --- a/docs/reference/source-serialization.md +++ /dev/null @@ -1,524 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/source-serialization.html ---- - -# Source serialization [source-serialization] - -Source serialization refers to the process of (de)serializing POCO types in consumer applications as source documents indexed and retrieved from {{es}}. A source serializer implementation handles serialization, with the default implementation using the `System.Text.Json` library. As a result, you may use `System.Text.Json` attributes and converters to control the serialization behavior. - -* [Modelling documents with types](#modeling-documents-with-types) -* [Customizing source serialization](#customizing-source-serialization) - -## Modeling documents with types [modeling-documents-with-types] - -{{es}} provides search and aggregation capabilities on the documents that it is sent and indexes. These documents are sent as JSON objects within the request body of a HTTP request. It is natural to model documents within the {{es}} .NET client using [POCOs (*Plain Old CLR Objects*)](https://en.wikipedia.org/wiki/Plain_Old_CLR_Object). - -This section provides an overview of how types and type hierarchies can be used to model documents. - -### Default behaviour [default-behaviour] - -The default behaviour is to serialize type property names as camelcase JSON object members. - -We can model documents using a regular class (POCO). - -```csharp -public class MyDocument -{ - public string StringProperty { get; set; } -} -``` - -We can then index the an instance of the document into {{es}}. - -```csharp -using System.Threading.Tasks; -using Elastic.Clients.Elasticsearch; - -var document = new MyDocument -{ - StringProperty = "value" -}; - -var indexResponse = await Client - .IndexAsync(document, "my-index-name"); -``` - -The index request is serialized, with the source serializer handling the `MyDocument` type, serializing the POCO property named `StringProperty` to the JSON object member named `stringProperty`. - -```javascript -{ - "stringProperty": "value" -} -``` - - - -## Customizing source serialization [customizing-source-serialization] - -The built-in source serializer handles most POCO document models correctly. Sometimes, you may need further control over how your types are serialized. - -::::{note} -The built-in source serializer uses the [Microsoft `System.Text.Json` library](https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/overview) internally. You can apply `System.Text.Json` attributes and converters to control the serialization of your document types. -:::: - - - -#### Using `System.Text.Json` attributes [system-text-json-attributes] - -`System.Text.Json` includes attributes that can be applied to types and properties to control their serialization. These can be applied to your POCO document types to perform actions such as controlling the name of a property or ignoring a property entirely. Visit the [Microsoft documentation for further examples](https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/overview). - -We can model a document to represent data about a person using a regular class (POCO), applying `System.Text.Json` attributes as necessary. - -```csharp -using System.Text.Json.Serialization; - -public class Person -{ - [JsonPropertyName("forename")] <1> - public string FirstName { get; set; } - - [JsonIgnore] <2> - public int Age { get; set; } -} -``` - -1. The `JsonPropertyName` attribute ensures the `FirstName` property uses the JSON name `forename` when serialized. -2. The `JsonIgnore` attribute prevents the `Age` property from appearing in the serialized JSON. - - -We can then index an instance of the document into {{es}}. - -```csharp -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading.Tasks; -using Elastic.Transport; -using Elastic.Clients.Elasticsearch; -using Elastic.Clients.Elasticsearch.Serialization; - -var person = new Person { FirstName = "Steve", Age = 35 }; -var indexResponse = await Client.IndexAsync(person, "my-index-name"); -``` - -The index request is serialized, with the source serializer handling the `Person` type, serializing the POCO property named `FirstName` to the JSON object member named `forename`. The `Age` property is ignored and does not appear in the JSON. - -```javascript -{ - "forename": "Steve" -} -``` - - -#### Configuring custom `JsonSerializerOptions` [configuring-custom-jsonserializeroptions] - -The default source serializer applies a set of standard `JsonSerializerOptions` when serializing source document types. In some circumstances, you may need to override some of our defaults. This is achievable by creating an instance of `DefaultSourceSerializer` and passing an `Action`, which is applied after our defaults have been set. This mechanism allows you to apply additional settings or change the value of our defaults. - -The `DefaultSourceSerializer` includes a constructor that accepts the current `IElasticsearchClientSettings` and a `configureOptions` `Action`. - -```csharp -public DefaultSourceSerializer(IElasticsearchClientSettings settings, Action configureOptions); -``` - -Our application defines the following `Person` class, which models a document we will index to {{es}}. - -```csharp -public class Person -{ - public string FirstName { get; set; } -} -``` - -We want to serialize our source document using Pascal Casing for the JSON properties. Since the options applied in the `DefaultSouceSerializer` set the `PropertyNamingPolicy` to `JsonNamingPolicy.CamelCase`, we must override this setting. After configuring the `ElasticsearchClientSettings`, we index our document to {{es}}. - -```csharp -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading.Tasks; -using Elastic.Transport; -using Elastic.Clients.Elasticsearch; -using Elastic.Clients.Elasticsearch.Serialization; - -static void ConfigureOptions(JsonSerializerOptions o) => <1> - o.PropertyNamingPolicy = null; - -var nodePool = new SingleNodePool(new Uri("http://localhost:9200")); -var settings = new ElasticsearchClientSettings( - nodePool, - sourceSerializer: (defaultSerializer, settings) => - new DefaultSourceSerializer(settings, ConfigureOptions)); <2> -var client = new ElasticsearchClient(settings); - -var person = new Person { FirstName = "Steve" }; -var indexResponse = await client.IndexAsync(person, "my-index-name"); -``` - -1. A local function can be defined, accepting a `JsonSerializerOptions` parameter. Here, we set `PropertyNamingPolicy` to `null`. This returns to the default behavior for `System.Text.Json`, which uses Pascal Case. -2. When creating the `ElasticsearchClientSettings`, we supply a `SourceSerializerFactory` using a lambda. The factory function creates a new instance of `DefaultSourceSerializer`, passing in the `settings` and our `ConfigureOptions` local function. We have now configured the settings with a custom instance of the source serializer. - - -The `Person` instance is serialized, with the source serializer serializing the POCO property named `FirstName` using Pascal Case. - -```javascript -{ - "FirstName": "Steve" -} -``` - -As an alternative to using a local function, we could store an `Action` into a variable instead, which can be passed to the `DefaultSouceSerializer` constructor. - -```csharp -Action configureOptions = o => o.PropertyNamingPolicy = null; -``` - - -#### Registering custom `System.Text.Json` converters [registering-custom-converters] - -In certain more advanced situations, you may have types which require further customization during serialization than is possible using `System.Text.Json` property attributes. In these cases, the recommendation from Microsoft is to leverage a custom `JsonConverter`. Source document types serialized using the `DefaultSourceSerializer` can leverage the power of custom converters. - -For this example, our application has a document class that should use a legacy JSON structure to continue operating with existing indexed documents. Several options are available, but we’ll apply a custom converter in this case. - -Our class is defined, and the `JsonConverter` attribute is applied to the class type, specifying the type of a custom converter. - -```csharp -using System.Text.Json.Serialization; - -[JsonConverter(typeof(CustomerConverter))] <1> -public class Customer -{ - public string CustomerName { get; set; } - public CustomerType CustomerType { get; set; } -} - -public enum CustomerType -{ - Standard, - Enhanced -} -``` - -1. The `JsonConverter` attribute signals to `System.Text.Json` that it should use a converter of type `CustomerConverter` when serializing instances of this class. - - -When serializing this class, rather than include a string value representing the value of the `CustomerType` property, we must send a boolean property named `isStandard`. This requirement can be achieved with a custom JsonConverter implementation. - -```csharp -using System; -using System.Text.Json; -using System.Text.Json.Serialization; - -public class CustomerConverter : JsonConverter -{ - public override Customer Read(ref Utf8JsonReader reader, - Type typeToConvert, JsonSerializerOptions options) - { - var customer = new Customer(); - - while (reader.Read() && reader.TokenType != JsonTokenType.EndObject) - { - if (reader.TokenType == JsonTokenType.PropertyName) - { - if (reader.ValueTextEquals("customerName")) - { - reader.Read(); - customer.CustomerName = reader.GetString(); - continue; - } - - if (reader.ValueTextEquals("isStandard")) <1> - { - reader.Read(); - var isStandard = reader.GetBoolean(); - - if (isStandard) - { - customer.CustomerType = CustomerType.Standard; - } - else - { - customer.CustomerType = CustomerType.Enhanced; - } - - continue; - } - } - } - - return customer; - } - - public override void Write(Utf8JsonWriter writer, - Customer value, JsonSerializerOptions options) - { - if (value is null) - { - writer.WriteNullValue(); - return; - } - - writer.WriteStartObject(); - - if (!string.IsNullOrEmpty(value.CustomerName)) - { - writer.WritePropertyName("customerName"); - writer.WriteStringValue(value.CustomerName); - } - - writer.WritePropertyName("isStandard"); - - if (value.CustomerType == CustomerType.Standard) <2> - { - writer.WriteBooleanValue(true); - } - else - { - writer.WriteBooleanValue(false); - } - - writer.WriteEndObject(); - } -} -``` - -1. When reading, this converter reads the `isStandard` boolean and translate this to the correct `CustomerType` enum value. -2. When writing, this converter translates the `CustomerType` enum value to an `isStandard` boolean property. - - -We can then index a customer document into {{es}}. - -```csharp -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading.Tasks; -using Elastic.Transport; -using Elastic.Clients.Elasticsearch; -using Elastic.Clients.Elasticsearch.Serialization; - -var customer = new Customer -{ - CustomerName = "Customer Ltd", - CustomerType = CustomerType.Enhanced -}; -var indexResponse = await Client.IndexAsync(customer, "my-index-name"); -``` - -The `Customer` instance is serialized using the custom converter, creating the following JSON document. - -```javascript -{ - "customerName": "Customer Ltd", - "isStandard": false -} -``` - - -#### Creating a custom `SystemTextJsonSerializer` [creating-custom-system-text-json-serializer] - -The built-in `DefaultSourceSerializer` includes the registration of `JsonConverter` instances which apply during source serialization. In most cases, these provide the proper behavior for serializing source documents, including those which use `Elastic.Clients.Elasticsearch` types on their properties. - -An example of a situation where you may require more control over the converter registration order is for serializing `enum` types. The `DefaultSourceSerializer` registers the `System.Text.Json.Serialization.JsonStringEnumConverter`, so enum values are serialized using their string representation. Generally, this is the preferred option for types used to index documents to {{es}}. - -In some scenarios, you may need to control the string value sent for an enumeration value. That is not directly supported in `System.Text.Json` but can be achieved by creating a custom `JsonConverter` for the `enum` type you wish to customize. In this situation, it is not sufficient to use the `JsonConverterAttribute` on the `enum` type to register the converter. `System.Text.Json` will prefer the converters added to the `Converters` collection on the `JsonSerializerOptions` over an attribute applied to an `enum` type. It is, therefore, necessary to either remove the `JsonStringEnumConverter` from the `Converters` collection or register a specialized converter for your `enum` type before the `JsonStringEnumConverter`. - -The latter is possible via several techniques. When using the {{es}} .NET library, we can achieve this by deriving from the abstract `SystemTextJsonSerializer` class. - -Here we have a POCO which uses the `CustomerType` enum as the type for a property. - -```csharp -using System.Text.Json.Serialization; - -public class Customer -{ - public string CustomerName { get; set; } - public CustomerType CustomerType { get; set; } -} - -public enum CustomerType -{ - Standard, - Enhanced -} -``` - -To customize the strings used during serialization of the `CustomerType`, we define a custom `JsonConverter` specific to our `enum` type. - -```csharp -using System.Text.Json.Serialization; - -public class CustomerTypeConverter : JsonConverter -{ - public override CustomerType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - return reader.GetString() switch <1> - { - "basic" => CustomerType.Standard, - "premium" => CustomerType.Enhanced, - _ => throw new JsonException( - $"Unknown value read when deserializing {nameof(CustomerType)}."), - }; - } - - public override void Write(Utf8JsonWriter writer, CustomerType value, JsonSerializerOptions options) - { - switch (value) <2> - { - case CustomerType.Standard: - writer.WriteStringValue("basic"); - return; - case CustomerType.Enhanced: - writer.WriteStringValue("premium"); - return; - } - - writer.WriteNullValue(); - } -} -``` - -1. When reading, this converter translates the string used in the JSON to the matching enum value. -2. When writing, this converter translates the `CustomerType` enum value to a custom string value written to the JSON. - - -We create a serializer derived from `SystemTextJsonSerializer` to give us complete control of converter registration order. - -```csharp -using System.Text.Json; -using Elastic.Clients.Elasticsearch.Serialization; - -public class MyCustomSerializer : SystemTextJsonSerializer <1> -{ - private readonly JsonSerializerOptions _options; - - public MyCustomSerializer(IElasticsearchClientSettings settings) : base(settings) - { - var options = DefaultSourceSerializer.CreateDefaultJsonSerializerOptions(false); <2> - - options.Converters.Add(new CustomerTypeConverter()); <3> - - _options = DefaultSourceSerializer.AddDefaultConverters(options); <4> - } - - protected override JsonSerializerOptions CreateJsonSerializerOptions() => _options; <5> -} -``` - -1. Inherit from `SystemTextJsonSerializer`. -2. In the constructor, use the factory method `DefaultSourceSerializer.CreateDefaultJsonSerializerOptions` to create default options for serialization. No default converters are registered at this stage because we pass `false` as an argument. -3. Register our `CustomerTypeConverter` as the first converter. -4. To apply any default converters, call the `DefaultSourceSerializer.AddDefaultConverters` helper method, passing the options to modify. -5. Implement the `CreateJsonSerializerOptions` method returning the stored `JsonSerializerOptions`. - - -Because we have registered our `CustomerTypeConverter` before the default converters (which include the `JsonStringEnumConverter`), our converter takes precedence when serializing `CustomerType` instances on source documents. - -The base `SystemTextJsonSerializer` class handles the implementation details of binding, which is required to ensure that the built-in converters can access the `IElasticsearchClientSettings` where needed. - -We can then index a customer document into {{es}}. - -```csharp -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading.Tasks; -using Elastic.Transport; -using Elastic.Clients.Elasticsearch; -using Elastic.Clients.Elasticsearch.Serialization; - -var customer = new Customer -{ - CustomerName = "Customer Ltd", - CustomerType = CustomerType.Enhanced -}; - -var indexResponse = await client.IndexAsync(customer, "my-index-name"); -``` - -The `Customer` instance is serialized using the custom `enum` converter, creating the following JSON document. - -```javascript -{ - "customerName": "Customer Ltd", - "customerType": "premium" <1> -} -``` - -1. The string value applied during serialization is provided by our custom converter. - - - -#### Creating a custom `Serializer` [creating-custom-serializers] - -Suppose you prefer using an alternative JSON serialization library for your source types. In that case, you can inject an isolated serializer only to be called for the serialization of `_source`, `_fields`, or wherever a user-provided value is expected to be written and returned. - -Implementing `Elastic.Transport.Serializer` is technically enough to create a custom source serializer. - -```csharp -using System; -using System.IO; -using System.Threading; -using System.Threading.Tasks; -using Elastic.Transport; - -public class VanillaSerializer : Serializer -{ - public override object Deserialize(Type type, Stream stream) => - throw new NotImplementedException(); - - public override T Deserialize(Stream stream) => - throw new NotImplementedException(); - - public override ValueTask DeserializeAsync(Type type, Stream stream, CancellationToken cancellationToken = default) => - throw new NotImplementedException(); - - public override ValueTask DeserializeAsync(Stream stream, CancellationToken cancellationToken = default) => - throw new NotImplementedException(); - - public override void Serialize(T data, Stream stream, SerializationFormatting formatting = SerializationFormatting.None) => - throw new NotImplementedException(); - - public override Task SerializeAsync(T data, Stream stream, - SerializationFormatting formatting = SerializationFormatting.None, CancellationToken cancellationToken = default) => - throw new NotImplementedException(); -} -``` - -Registering up the serializer is performed in the `ConnectionSettings` constructor. - -```csharp -using System; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading.Tasks; -using Elastic.Transport; -using Elastic.Clients.Elasticsearch; -using Elastic.Clients.Elasticsearch.Serialization; - -var nodePool = new SingleNodePool(new Uri("http://localhost:9200")); -var settings = new ElasticsearchClientSettings( - nodePool, - sourceSerializer: (defaultSerializer, settings) => - new VanillaSerializer()); <1> -var client = new ElasticsearchClient(settings); -``` - -1. If implementing `Serializer` is enough, why must we provide an instance wrapped in a factory `Func`? - - -There are various cases where you might have a POCO type that contains an `Elastic.Clients.Elasticsearch` type as one of its properties. The `SourceSerializerFactory` delegate provides access to the default built-in serializer so you can access it when necessary. For example, consider if you want to use percolation; you need to store {{es}} queries as part of the `_source` of your document, which means you need to have a POCO that looks like this. - -```csharp -using Elastic.Clients.Elasticsearch.QueryDsl; - -public class MyPercolationDocument -{ - public Query Query { get; set; } - public string Category { get; set; } -} -``` - -A custom serializer would not know how to serialize `Query` or other `Elastic.Clients.Elasticsearch` types that could appear as part of the `_source` of a document. Therefore, your custom `Serializer` would need to store a reference to our built-in serializer and delegate serialization of Elastic types back to it. - - diff --git a/docs/reference/toc.yml b/docs/reference/toc.yml deleted file mode 100644 index 828400800c0..00000000000 --- a/docs/reference/toc.yml +++ /dev/null @@ -1,34 +0,0 @@ -toc: - - file: index.md - - file: getting-started.md - - file: installation.md - - file: connecting.md - - file: configuration.md - children: - - file: _options_on_elasticsearchclientsettings.md - - file: client-concepts.md - children: - - file: serialization.md - children: - - file: source-serialization.md - - file: using-net-client.md - children: - - file: aggregations.md - - file: esql.md - - file: examples.md - - file: mappings.md - - file: query.md - - file: recommendations.md - - file: transport.md - - file: migration-guide.md - - file: troubleshoot/index.md - children: - - file: troubleshoot/logging.md - children: - - file: troubleshoot/logging-with-onrequestcompleted.md - - file: troubleshoot/logging-with-fiddler.md - - file: troubleshoot/debugging.md - children: - - file: troubleshoot/audit-trail.md - - file: troubleshoot/debug-information.md - - file: troubleshoot/debug-mode.md \ No newline at end of file diff --git a/docs/reference/troubleshoot/debug-information.md b/docs/reference/troubleshoot/debug-information.md deleted file mode 100644 index f682179a044..00000000000 --- a/docs/reference/troubleshoot/debug-information.md +++ /dev/null @@ -1,165 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/debug-information.html ---- - -# Debug information [debug-information] - -Every response from Elasticsearch.Net and NEST contains a `DebugInformation` property that provides a human readable description of what happened during the request for both successful and failed requests - -```csharp -var response = client.Search(s => s - .Query(q => q - .MatchAll() - ) -); - -response.DebugInformation.Should().Contain("Valid NEST response"); -``` - -This can be useful in tracking down numerous problems and can also be useful when filing an [issue](https://github.com/elastic/elasticsearch-net/issues) on the GitHub repository. - -## Request and response bytes [_request_and_response_bytes] - -By default, the request and response bytes are not available within the debug information, but can be enabled globally on Connection Settings by setting `DisableDirectStreaming`. This disables direct streaming of - -1. the serialized request type to the request stream -2. the response stream to a deserialized response type - -```csharp -var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); - -var settings = new ConnectionSettings(connectionPool) - .DisableDirectStreaming(); <1> - -var client = new ElasticClient(settings); -``` - -1. disable direct streaming for **all** requests - - -or on a *per request* basis - -```csharp -var response = client.Search(s => s - .RequestConfiguration(r => r - .DisableDirectStreaming() <1> - ) - .Query(q => q - .MatchAll() - ) -); -``` - -1. disable direct streaming for **this** request only - - -Configuring `DisableDirectStreaming` on an individual request takes precedence over any global configuration. - -There is typically a performance and allocation cost associated with disabling direct streaming since both the request and response bytes must be buffered in memory, to allow them to be exposed on the response call details. - - -## TCP statistics [_tcp_statistics] - -It can often be useful to see the statistics for active TCP connections, particularly when trying to diagnose issues with the client. The client can collect the states of active TCP connections just before making a request, and expose these on the response and in the debug information. - -Similarly to `DisableDirectStreaming`, TCP statistics can be collected for every request by configuring on `ConnectionSettings` - -```csharp -var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); - -var settings = new ConnectionSettings(connectionPool) - .EnableTcpStats(); <1> - -var client = new ElasticClient(settings); -``` - -1. collect TCP statistics for **all** requests - - -or on a *per request* basis - -```csharp -var response = client.Search(s => s - .RequestConfiguration(r => r - .EnableTcpStats() <1> - ) - .Query(q => q - .MatchAll() - ) -); - -var debugInformation = response.DebugInformation; -``` - -1. collect TCP statistics for **this** request only - - -With `EnableTcpStats` set, the states of active TCP connections will now be included on the response and in the debug information. - -The client includes a `TcpStats` class to help with retrieving more detail about active TCP connections should it be required - -```csharp -var tcpStatistics = TcpStats.GetActiveTcpConnections(); <1> -var ipv4Stats = TcpStats.GetTcpStatistics(NetworkInterfaceComponent.IPv4); <2> -var ipv6Stats = TcpStats.GetTcpStatistics(NetworkInterfaceComponent.IPv6); <3> - -var response = client.Search(s => s - .Query(q => q - .MatchAll() - ) -); -``` - -1. Retrieve details about active TCP connections, including local and remote addresses and ports -2. Retrieve statistics about IPv4 -3. Retrieve statistics about IPv6 - - -::::{note} -Collecting TCP statistics may not be accessible in all environments, for example, Azure App Services. When this is the case, `TcpStats.GetActiveTcpConnections()` returns `null`. - -:::: - - - -## ThreadPool statistics [_threadpool_statistics] - -It can often be useful to see the statistics for thread pool threads, particularly when trying to diagnose issues with the client. The client can collect statistics for both worker threads and asynchronous I/O threads, and expose these on the response and in debug information. - -Similar to collecting TCP statistics, ThreadPool statistics can be collected for all requests by configuring `EnableThreadPoolStats` on `ConnectionSettings` - -```csharp -var connectionPool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); - -var settings = new ConnectionSettings(connectionPool) - .EnableThreadPoolStats(); <1> - -var client = new ElasticClient(settings); -``` - -1. collect thread pool statistics for **all** requests - - -or on a *per request* basis - -```csharp -var response = client.Search(s => s - .RequestConfiguration(r => r - .EnableThreadPoolStats() <1> - ) - .Query(q => q - .MatchAll() - ) - ); - -var debugInformation = response.DebugInformation; <2> -``` - -1. collect thread pool statistics for **this** request only -2. contains thread pool statistics - - -With `EnableThreadPoolStats` set, the statistics of thread pool threads will now be included on the response and in the debug information. - - diff --git a/docs/reference/troubleshoot/debug-mode.md b/docs/reference/troubleshoot/debug-mode.md deleted file mode 100644 index fce96b34be4..00000000000 --- a/docs/reference/troubleshoot/debug-mode.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/debug-mode.html ---- - -# Debug mode [debug-mode] - -The [Debug information](debug-information.md) explains that every response from Elasticsearch.Net and NEST contains a `DebugInformation` property, and properties on `ConnectionSettings` and `RequestConfiguration` can control which additional information is included in debug information, for all requests or on a per request basis, respectively. - -During development, it can be useful to enable the most verbose debug information, to help identify and troubleshoot problems, or simply ensure that the client is behaving as expected. The `EnableDebugMode` setting on `ConnectionSettings` is a convenient shorthand for enabling verbose debug information, configuring a number of settings like - -* disabling direct streaming to capture request and response bytes -* prettyfying JSON responses from Elasticsearch -* collecting TCP statistics when a request is made -* collecting thread pool statistics when a request is made -* including the Elasticsearch stack trace in the response if there is a an error on the server side - -```csharp -IConnectionPool pool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); - -var settings = new ConnectionSettings(pool) - .EnableDebugMode(); <1> - -var client = new ElasticClient(settings); - -var response = client.Search(s => s - .Query(q => q - .MatchAll() - ) -); - -var debugInformation = response.DebugInformation; <2> -``` - -1. configure debug mode -2. verbose debug information - - -In addition to exposing debug information on the response, debug mode will also cause the debug information to be written to the trace listeners in the `System.Diagnostics.Debug.Listeners` collection by default, when the request has completed. A delegate can be passed when enabling debug mode to perform a different action when a request has completed, using [`OnRequestCompleted`](logging-with-onrequestcompleted.md) - -```csharp -var pool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); -var client = new ElasticClient(new ConnectionSettings(pool) - .EnableDebugMode(apiCallDetails => - { - // do something with the call details e.g. send with logging framework - }) -); -``` - diff --git a/docs/reference/troubleshoot/debugging.md b/docs/reference/troubleshoot/debugging.md deleted file mode 100644 index 2514e064b48..00000000000 --- a/docs/reference/troubleshoot/debugging.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/debugging.html ---- - -# Debugging [debugging] - -Elasticsearch.Net and NEST provide an audit trail and debug information to help you resolve issues: - -* [](audit-trail.md) -* [](debug-information.md) -* [](debug-mode.md) - - diff --git a/docs/reference/troubleshoot/index.md b/docs/reference/troubleshoot/index.md deleted file mode 100644 index b1163f89ecc..00000000000 --- a/docs/reference/troubleshoot/index.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -navigation_title: Troubleshoot -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/troubleshooting.html ---- - -# Troubleshoot: {{es}} .NET client [troubleshooting] - -The client can provide rich details about what occurred in the request pipeline during the process of making a request, and can also provide the raw request and response JSON. - -* [Logging](logging.md) -* [Debugging](debugging.md) - diff --git a/docs/reference/troubleshoot/logging-with-fiddler.md b/docs/reference/troubleshoot/logging-with-fiddler.md deleted file mode 100644 index 04e8c590501..00000000000 --- a/docs/reference/troubleshoot/logging-with-fiddler.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/logging-with-fiddler.html ---- - -# Logging with Fiddler [logging-with-fiddler] - -A web debugging proxy such as [Fiddler](http://www.telerik.com/fiddler) is a useful way to capture HTTP traffic from a machine, particularly whilst developing against a local Elasticsearch cluster. - -## Capturing traffic to a remote cluster [_capturing_traffic_to_a_remote_cluster] - -To capture traffic against a remote cluster is as simple as launching Fiddler! You may want to also filter traffic to only show requests to the remote cluster by using the filters tab - -![Capturing requests to a remote host](../images/elasticsearch-client-net-api-capture-requests-remotehost.png) - - -## Capturing traffic to a local cluster [_capturing_traffic_to_a_local_cluster] - -The .NET Framework is hardcoded not to send requests for `localhost` through any proxies and as a proxy Fiddler will not receive such traffic. - -This is easily circumvented by using `ipv4.fiddler` as the hostname instead of `localhost` - -```csharp -var isFiddlerRunning = Process.GetProcessesByName("fiddler").Any(); -var host = isFiddlerRunning ? "ipv4.fiddler" : "localhost"; - -var connectionSettings = new ConnectionSettings(new Uri($"http://{host}:9200")) - .PrettyJson(); <1> - -var client = new ElasticClient(connectionSettings); -``` - -1. prettify json requests and responses to make them easier to read in Fiddler - - -With Fiddler running, the requests and responses will now be captured and can be inspected in the Inspectors tab - -![Inspecting requests and responses](../images/elasticsearch-client-net-api-inspect-requests.png) - -As before, you may also want to filter traffic to only show requests to `ipv4.fiddler` on the port on which you are running Elasticsearch. - -![Capturing requests to localhost](../images/elasticsearch-client-net-api-capture-requests-localhost.png) - - diff --git a/docs/reference/troubleshoot/logging.md b/docs/reference/troubleshoot/logging.md deleted file mode 100644 index 8efdbc997d7..00000000000 --- a/docs/reference/troubleshoot/logging.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/logging.html ---- - -# Logging [logging] - -While developing with Elasticsearch using NEST, it can be extremely valuable to see the requests that NEST generates and sends to Elasticsearch, as well as the responses returned. - -* [](logging-with-onrequestcompleted.md) -* [](logging-with-fiddler.md) - - - diff --git a/docs/reference/using-net-client.md b/docs/reference/using-net-client.md deleted file mode 100644 index ace92b95d1a..00000000000 --- a/docs/reference/using-net-client.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/usage.html ---- - -# Using the .NET Client [usage] - -The sections below provide tutorials on the most frequently used and some less obvious features of {{es}}. - -For a full reference, see the [Elasticsearch documentation](docs-content://get-started/index.md) and in particular the [REST APIs](elasticsearch://reference/elasticsearch/rest-apis/index.md) section. The Elasticsearch .NET Client follows closely the JSON structures described there. - -A .NET API reference documentation for the Elasticsearch client package is available [here](https://elastic.github.io/elasticsearch-net). - -If you’re new to {{es}}, make sure also to read [Elasticsearch’s quick start](docs-content://solutions/search/get-started.md) that provides a good introduction. - -* [Usage recommendations](/reference/recommendations.md) -* [CRUD usage examples](/reference/examples.md) -* [Using ES|QL](/reference/esql.md) - -::::{note} -This is still a work in progress, more sections will be added in the near future. -:::: - - diff --git a/docs/release-notes/breaking-change-policy.asciidoc b/docs/release-notes/breaking-change-policy.asciidoc new file mode 100644 index 00000000000..74138bc005f --- /dev/null +++ b/docs/release-notes/breaking-change-policy.asciidoc @@ -0,0 +1,32 @@ +[[breaking-changes-policy]] +== Breaking changes policy + +The {net-client} source code is generated from a https://github.com/elastic/elasticsearch-specification[formal specification of the Elasticsearch API]. This API specification is large, and although it is tested against hundreds of Elasticsearch test files, it may have discrepancies with the actual API that result in issues in the {net-client}. + +Fixing these discrepancies in the API specification results in code changes in the {net-client}, and some of these changes can require code updates in your applications. + +This section explains how these breaking changes are considered for inclusion in {net-client} releases. + +[discrete] +==== Breaking changes in patch releases + +Some issues in the API specification are properties that have an incorrect type, such as a `long` that should be a `string`, or a required property that is actually optional. These issues can cause the {net-client} to not work properly or even throw exceptions. + +When a specification issue is discovered and resolved, it may require code updates in applications using the {net-client}. Such breaking changes are considered acceptable, _even in patch releases_ (e.g. 8.0.0 -> 8.0.1), as they introduce stability to APIs that may otherwise be unusable. + +We may also make breaking changes in patch releases to correct design flaws and code-generation issues that we deem beneficial to resolve at the earliest oppotunity. We will detail these in the relevant release notes and limit these as the client matures. + +[discrete] +==== Breaking changes in minor releases + +Along with these bug fixes, the API specification is constantly refined, more precise type definitions are introduced to improve developer comfort and remove ambiguities. The specification of often-used APIs is fairly mature, so these changes happen generally on less often used APIs. These changes can also cause breaking changes requiring code updates which are considered _acceptable in minor releases_ (e.g. 8.0 -> 8.1). + +[discrete] +==== Breaking changes in major releases + +Major releases (e.g. 7.x -> 8.x) can include larger refactorings of the API specification and the framework underlying the {net-client}. These refactorings are considered carefully and done only when they unlock new important features or new developments. + +[discrete] +==== Elasticsearch API stability guarantees + +All Elasticsearch APIs have stability indicators, which imply potential changes. If an API is `stable` only additional non-breaking changes are added. In case of `experimental` APIs, breaking changes can be introduced any time, which means that these changes, will also be reflected in the {net-client}. \ No newline at end of file diff --git a/docs/release-notes/breaking-changes.md b/docs/release-notes/breaking-changes.md deleted file mode 100644 index 3ff9b442359..00000000000 --- a/docs/release-notes/breaking-changes.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -navigation_title: "Breaking changes" -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/breaking-changes-policy.html ---- - -# Elasticsearch .NET Client breaking changes [elasticsearch-net-client-breaking-changes] - -Breaking changes can impact your Elastic applications, potentially disrupting normal operations. Before you upgrade, carefully review the Elasticsearch .NET Client breaking changes and take the necessary steps to mitigate any issues. To learn how to upgrade, check [Upgrade](docs-content://deploy-manage/upgrade.md). - -% ## Next version [elasticsearch-net-client-nextversion-breaking-changes] - -% ::::{dropdown} Title of breaking change -% -% **Impact**: High/Low. -% -% Description of the breaking change. -% For more information, check [PR #](PR link). -% -% :::: - -## 9.0.0 [elasticsearch-net-client-900-breaking-changes] - -### Overview - -- [1. Container types](#1-container-types) -- [2. Removal of certain generic request descriptors](#2-removal-of-certain-generic-request-descriptors) -- [3. Removal of certain descriptor constructors and related request APIs](#3-removal-of-certain-descriptor-constructors-and-related-request-apis) -- [4. Date / Time / Duration values](#4-date-time-duration-values) -- [5. `ExtendedBounds`](#5-extendedbounds) -- [6. `Field.Format`](#6-fieldformat) -- [7. `Field`/`Fields` semantics](#7-fieldfields-semantics) -- [8. `FieldValue`](#8-fieldvalue) -- [9. `FieldSort`](#9-fieldsort) -- [10. Descriptor types `class` -\> `struct`](#10-descriptor-types-class-struct) - -### Breaking changes - -#### 1. Container types [1-container-types] - -**Impact**: High. - -Container types now use regular properties for their variants instead of static factory methods ([read more](index.md#7-improved-container-design)). - -This change primarily affects the `Query` and `Aggregation` types. - -```csharp -// 8.x -new SearchRequest -{ - Query = Query.MatchAll( - new MatchAllQuery - { - } - ) -}; - -// 9.0 -new SearchRequest -{ - Query = new Query - { - MatchAll = new MatchAllQuery - { - } - } -}; -``` - -Previously required methods like e.g. `TryGet(out)` have been removed. - -The new recommended way of inspecting container types is to use simple pattern matching: - -```csharp -var query = new Query(); - -if (query.Nested is { } nested) -{ - // We have a nested query. -} -``` - -#### 2. Removal of certain generic request descriptors [2-removal-of-certain-generic-request-descriptors] - -**Impact**: High. - -Removed the generic version of some request descriptors for which the corresponding requests do not contain inferrable properties. - -These descriptors were generated unintentionally. - -When migrating, the generic type parameter must be removed from the type, e.g., `AsyncSearchStatusRequestDescriptor` should become just `AsyncSearchStatusRequestDescriptor`. - -List of affected descriptors: - -- `AsyncQueryDeleteRequestDescriptor` -- `AsyncQueryGetRequestDescriptor` -- `AsyncSearchStatusRequestDescriptor` -- `DatabaseConfigurationDescriptor` -- `DatabaseConfigurationFullDescriptor` -- `DeleteAsyncRequestDescriptor` -- `DeleteAsyncSearchRequestDescriptor` -- `DeleteDataFrameAnalyticsRequestDescriptor` -- `DeleteGeoipDatabaseRequestDescriptor` -- `DeleteIpLocationDatabaseRequestDescriptor` -- `DeleteJobRequestDescriptor` -- `DeletePipelineRequestDescriptor` -- `DeleteScriptRequestDescriptor` -- `DeleteSynonymRequestDescriptor` -- `EqlDeleteRequestDescriptor` -- `EqlGetRequestDescriptor` -- `GetAsyncRequestDescriptor` -- `GetAsyncSearchRequestDescriptor` -- `GetAsyncStatusRequestDescriptor` -- `GetDataFrameAnalyticsRequestDescriptor` -- `GetDataFrameAnalyticsStatsRequestDescriptor` -- `GetEqlStatusRequestDescriptor` -- `GetGeoipDatabaseRequestDescriptor` -- `GetIpLocationDatabaseRequestDescriptor` -- `GetJobsRequestDescriptor` -- `GetPipelineRequestDescriptor` -- `GetRollupCapsRequestDescriptor` -- `GetRollupIndexCapsRequestDescriptor` -- `GetScriptRequestDescriptor` -- `GetSynonymRequestDescriptor` -- `IndexModifyDataStreamActionDescriptor` -- `PreprocessorDescriptor` -- `PutGeoipDatabaseRequestDescriptor` -- `PutIpLocationDatabaseRequestDescriptor` -- `PutScriptRequestDescriptor` -- `PutSynonymRequestDescriptor` -- `QueryVectorBuilderDescriptor` -- `RankDescriptor` -- `RenderSearchTemplateRequestDescriptor` -- `SmoothingModelDescriptor` -- `StartDataFrameAnalyticsRequestDescriptor` -- `StartJobRequestDescriptor` -- `StopDataFrameAnalyticsRequestDescriptor` -- `StopJobRequestDescriptor` -- `TokenizationConfigDescriptor` -- `UpdateDataFrameAnalyticsRequestDescriptor` - -#### 3. Removal of certain descriptor constructors and related request APIs [3-removal-of-certain-descriptor-constructors-and-related-request-apis] - -**Impact**: High. - -Removed `(TDocument, IndexName)` descriptor constructors and related request APIs for all requests with `IndexName` and `Id` path parameters. - -For example: - -```csharp -// 8.x -public IndexRequestDescriptor(TDocument document, IndexName index, Id? id) { } -public IndexRequestDescriptor(TDocument document, IndexName index) { } -public IndexRequestDescriptor(TDocument document, Id? id) { } -public IndexRequestDescriptor(TDocument document) { } - -// 9.0 -public IndexRequestDescriptor(TDocument document, IndexName index, Id? id) { } -public IndexRequestDescriptor(TDocument document, Id? id) { } -public IndexRequestDescriptor(TDocument document) { } -``` - -These overloads caused invocation ambiguities since both, `IndexName` and `Id` implement implicit conversion operators from `string`. - -Alternative with same semantics: - -```csharp -// Descriptor constructor. -new IndexRequestDescriptor(document, "my_index", Id.From(document)); - -// Request API method. -await client.IndexAsync(document, "my_index", Id.From(document), ...); -``` - -#### 4. Date / Time / Duration values [4-date-time-duration-values] - -**Impact**: High. - -In places where previously `long` or `double` was used to represent a date/time/duration value, `DateTimeOffset` or `TimeSpan` is now used instead. - -#### 5. `ExtendedBounds` [5-extendedbounds] - -**Impact**: High. - -Removed `ExtendedBoundsDate`/`ExtendedBoundsDateDescriptor`, `ExtendedBoundsFloat`/`ExtendedBoundsFloatDescriptor`. - -Replaced by `ExtendedBounds`, `ExtendedBoundsOfFieldDateMathDescriptor`, and `ExtendedBoundsOfDoubleDescriptor`. - -#### 6. `Field.Format` [6-fieldformat] - -**Impact**: Low. - -Removed `Field.Format` property and corresponding constructor and inferrer overloads. - -This property has not been used for some time (replaced by the `FieldAndFormat` type). - -#### 7. `Field`/`Fields` semantics [7-fieldfields-semantics] - -**Impact**: Low. - -`Field`/`Fields` static factory methods and conversion operators no longer return nullable references but throw exceptions instead (`Field`) if the input `string`/`Expression`/`PropertyInfo` argument is `null`. - -This makes implicit conversions to `Field` more user-friendly without requiring the null-forgiveness operator (`!`) ([read more](index.md#5-field-name-inference)). - -#### 8. `FieldValue` [8-fieldvalue] - -**Impact**: Low. - -Removed `FieldValue.IsLazyDocument`, `FieldValue.IsComposite`, and the corresponding members in the `FieldValue.ValueKind` enum. - -These values have not been used for some time. - -#### 9. `FieldSort` [9-fieldsort] - -**Impact**: High. - -Removed `FieldSort` parameterless constructor. - -Please use the new constructor instead: - -```csharp -public FieldSort(Elastic.Clients.Elasticsearch.Field field) -``` - -**Impact**: Low. - -Removed static `FieldSort.Empty` member. - -Sorting got reworked which makes this member obsolete ([read more](index.md#8-sorting)). - -#### 10. Descriptor types `class` -> `struct` [10-descriptor-types-class-struct] - -**Impact**: Low. - -All descriptor types are now implemented as `struct` instead of `class`. diff --git a/docs/release-notes/deprecations.md b/docs/release-notes/deprecations.md deleted file mode 100644 index 664ef25cbe8..00000000000 --- a/docs/release-notes/deprecations.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -navigation_title: "Deprecations" ---- - -# Elasticsearch .NET Client deprecations [elasticsearch-net-client-deprecations] -Over time, certain Elastic functionality becomes outdated and is replaced or removed. To help with the transition, Elastic deprecates functionality for a period before removal, giving you time to update your applications. - -Review the deprecated functionality for Elasticsearch .NET Client. While deprecations have no immediate impact, we strongly encourage you update your implementation after you upgrade. To learn how to upgrade, check out [Upgrade](docs-content://deploy-manage/upgrade.md). - -% ## Next version [elasticsearch-net-client-versionnext-deprecations] - -% ::::{dropdown} Deprecation title -% Description of the deprecation. -% For more information, check [PR #](PR link). -% **Impact**
Impact of deprecation. -% **Action**
Steps for mitigating deprecation impact. -% :::: - -## 9.0.0 [elasticsearch-net-client-900-deprecations] - -_No deprecations_ \ No newline at end of file diff --git a/docs/release-notes/index.md b/docs/release-notes/index.md deleted file mode 100644 index 7bfcc1e88b0..00000000000 --- a/docs/release-notes/index.md +++ /dev/null @@ -1,406 +0,0 @@ ---- -navigation_title: "Elasticsearch .NET Client" -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/release-notes.html ---- - -# Elasticsearch .NET Client release notes [elasticsearch-net-client-release-notes] - -Review the changes, fixes, and more in each version of Elasticsearch .NET Client. - -To check for security updates, go to [Security announcements for the Elastic stack](https://discuss.elastic.co/c/announcements/security-announcements/31). - -% Release notes include only features, enhancements, and fixes. Add breaking changes, deprecations, and known issues to the applicable release notes sections. - -% ## version.next [felasticsearch-net-client-next-release-notes] - -% ### Features and enhancements [elasticsearch-net-client-next-features-enhancements] -% * - -% ### Fixes [elasticsearch-net-client-next-fixes] -% * - -## 9.0.0 [elasticsearch-net-client-900-release-notes] - -### Overview - -- [1. Request Method/API Changes](#1-request-methodapi-changes) - - [1.1. Synchronous Request APIs](#11-synchronous-request-apis) - - [1.2. Separate Type Arguments for Request/Response](#12-separate-type-arguments-for-requestresponse) -- [2. Improved Fluent API](#2-improved-fluent-api) - - [2.1. `ICollection`](#21-icollectione) - - [2.2. `IDictionary`](#22-idictionaryk-v) - - [2.3. `ICollection>`](#23-icollectionkeyvaluepairk-v) - - [2.4. Union Types](#24-union-types) -- [3. Improved Descriptor Design](#3-improved-descriptor-design) - - [3.1. Wrap](#31-wrap) - - [3.2. Unwrap / Inspect](#32-unwrap-inspect) - - [3.3. Removal of Side Effects](#33-removal-of-side-effects) -- [4. Request Path Parameter Properties](#4-request-path-parameter-properties) -- [5. Field Name Inference](#5-field-name-inference) -- [6. Uniform Date/Time/Duration Types](#6-uniform-datetimeduration-types) -- [7. Improved Container Design](#7-improved-container-design) -- [8. Sorting](#8-sorting) -- [9. Safer Object Creation](#9-safer-object-creation) -- [10. Serialization](#10-serialization) - -### Features and enhancements - -#### 1. Request Method/API Changes [1-request-methodapi-changes] - -##### 1.1. Synchronous Request APIs [11-synchronous-request-apis] - -Synchronous request APIs are no longer marked as `obsolete`. We received some feedback about this deprecation and decided to revert it. - -##### 1.2. Separate Type Arguments for Request/Response [12-separate-type-arguments-for-requestresponse] - -It is now possible to specify separate type arguments for requests/responses when executing request methods: - -```csharp -var response = await client.SearchAsync(x => x - .Query(x => x.Term(x => x.Field(x => x.FirstName).Value("Florian"))) -); - -var documents = response.Documents; <1> -``` - -1. `IReadOnlyCollection` - -The regular APIs with merged type arguments are still available. - -#### 2. Improved Fluent API [2-improved-fluent-api] - -The enhanced fluent API generation is likely the most notable change in the 9.0 client. - -This section describes the main syntax constructs generated based on the type of the property in the corresponding object. - -##### 2.1. `ICollection` [21-icollectione] - -Note: This syntax already existed in 8.x. - -```csharp -new SearchRequestDescriptor() - .Query(q => q - .Bool(b => b - .Must(new Query()) // Scalar: Single element. - .Must(new Query(), new Query()) // Scalar: Multiple elements (params). - .Must(m => m.MatchAll()) // Fluent: Single element. - .Must(m => m.MatchAll(), m => m.MatchNone()) // Fluent: Multiple elements (params). - ) - ); -``` - -##### 2.2. `IDictionary` [22-idictionaryk-v] - -The 9.0 client introduces full fluent API support for dictionary types. - -```csharp -new SearchRequestDescriptor() - .Aggregations(new Dictionary()) // Scalar. - .Aggregations(aggs => aggs // Fluent: Nested. - .Add("key", new MaxAggregation()) // Scalar: Key + Value. - .Add("key", x => x.Max()) // Fluent: Key + Value. - ) - .AddAggregation("key", new MaxAggregation()) // Scalar. - .AddAggregation("key", x => x.Max()); // Fluent. -``` - -:::{warning} - -The `Add{Element}` methods have different semantics compared to the standard setter methods. - -Standard fluent setters set or **replace** a value. - -In contrast, the new additive methods append new elements to the dictionary. - -::: - -For dictionaries where the value type does not contain required properties that must be initialized, another syntax is generated that allows easy addition of new entries by just specifying the key: - -```csharp -// Dictionary() - -new CreateIndexRequestDescriptor("index") - // ... all previous overloads ... - .Aliases(aliases => aliases // Fluent: Nested. - .Add("key") // Key only. - ) - .Aliases("key") // Key only: Single element. - .Aliases("first", "second") // Key only: Multiple elements (params). -``` - -If the value type in the dictionary is a collection, additional `params` overloads are generated: - -```csharp -// Dictionary> - -new CompletionSuggesterDescriptor() - // ... all previous overloads ... - .AddContext("key", - new CompletionContext{ Context = new Context("first") }, - new CompletionContext{ Context = new Context("second") } - ) - .AddContext("key", - x => x.Context(x => x.Category("first")), - x => x.Context(x => x.Category("second")) - ); -``` - -##### 2.3. `ICollection>` [23-icollectionkeyvaluepairk-v] - -Elasticsearch often uses `ICollection>` types for ordered dictionaries. - -The 9.0 client abstracts this implementation detail by providing a fluent API that can be used exactly like the one for `IDictionary` types: - -```csharp -new PutMappingRequestDescriptor("index") - .DynamicTemplates(new List>()) // Scalar. - .DynamicTemplates(x => x // Fluent: Nested. - .Add("key", new DynamicTemplate()) // Scalar: Key + Value. - .Add("key", x => x.Mapping(new TextProperty())) // Fluent: Key + Value. - ) - .AddDynamicTemplate("key", new DynamicTemplate()) // Scalar: Key + Value. - .AddDynamicTemplate("key", x => x.Runtime(x => x.Format("123"))); // Fluent: Key + Value. -``` - -##### 2.4. Union Types [24-union-types] - -Fluent syntax is now as well available for all auto-generated union- and variant-types. - -```csharp -// TermsQueryField : Union, TermsLookup> - -new TermsQueryDescriptor() - .Terms(x => x.Value("a", "b", "c")) <1> - .Terms(x => x.Lookup(x => x.Index("index").Id("id"))); <2> -``` - -1. `ICollection` -2. `TermsLookup` - -#### 3. Improved Descriptor Design [3-improved-descriptor-design] - -The 9.0 release features a completely overhauled descriptor design. - -Descriptors now wrap the object representation. This brings several internal quality-of-life improvements as well as noticeable benefits to end-users. - -##### 3.1. Wrap [31-wrap] - -Use the wrap constructor to create a new descriptor for an existing object: - -```csharp -var request = new SearchRequest(); - -// Wrap. -var descriptor = new SearchRequestDescriptor(request); -``` - -All fluent methods of the descriptor will mutate the existing `request` passed to the wrap constructor. - -:::{note} - -Descriptors are now implemented as `struct` instead of `class`, reducing allocation overhead as much as possible. - -::: - -##### 3.2. Unwrap / Inspect [32-unwrap-inspect] - -Descriptor values can now be inspected by unwrapping the object using an implicit conversion operator: - -```csharp -var descriptor = new SearchRequestDescriptor(); - -// Unwrap. -SearchRequest request = descriptor; -``` - -Unwrapping does not allocate or copy. - -##### 3.3. Removal of Side Effects [33-removal-of-side-effects] - -In 8.x, execution of (most but not all) lambda actions passed to descriptors was deferred until the actual request was made. It was never clear to the user when, and how often an action would be executed. - -In 9.0, descriptor actions are always executed immediately. This ensures no unforeseen side effects occur if the user-provided lambda action mutates external state (it is still recommended to exclusively use pure/invariant actions). Consequently, the effects of all changes performed by a descriptor method are immediately applied to the wrapped object. - -#### 4. Request Path Parameter Properties [4-request-path-parameter-properties] - -In 8.x, request path parameters like `Index`, `Id`, etc. could only be set by calling the corresponding constructor of the request. Afterwards, there was no way to read or change the current value. - -In the 9.0 client, all request path parameters are exposed as `get/set` properties, allowing for easy access: - -```csharp -// 8.x and 9.0 -var request = new SearchRequest(Indices.All); - -// 9.0 -var request = new SearchRequest { Indices = Indices.All }; -var indices = request.Indices; -request.Indices = "my_index"; -``` - -#### 5. Field Name Inference [5-field-name-inference] - -The `Field` type and especially its implicit conversion operations allowed for `null` return values. This led to a poor developer experience, as the null-forgiveness operator (`!`) had to be used frequently without good reason. - -This is no longer required in 9.0: - -```csharp -// 8.x -Field field = "field"!; - -// 9.0 -Field field = "field"; -``` - -#### 6. Uniform Date/Time/Duration Types [6-uniform-datetimeduration-types] - -The encoding of date, time and duration values in Elasticsearch often varies depending on the context. In addition to string representations in ISO 8601 and RFC 3339 format (always UTC), also Unix timestamps (in seconds, milliseconds, nanoseconds) or simply seconds, milliseconds, nanoseconds are frequently used. - -In 8.x, some date/time values are already mapped as `DateTimeOffset`, but the various non-ISO/RFC representations were not. - -9.0 now represents all date/time values uniformly as `DateTimeOffset` and also uses the native `TimeSpan` type for all durations. - -:::{note} - -There are some places where the Elasticsearch custom date/time/duration types are continued to be used. This is always the case when the type has special semantics and/or offers functionality that goes beyond that of the native date/time/duration types (e.g. `Duration`, `DateMath`). - -::: - -#### 7. Improved Container Design [7-improved-container-design] - -In 8.x, container types like `Query` or `Aggregation` had to be initialized using static factory methods. - -```csharp -// 8.x -var agg = Aggregation.Max(new MaxAggregation { Field = "my_field" }); -``` - -This made it mandatory to assign the created container to a temporary variable if additional properties of the container (not the contained variant) needed to be set: - -```csharp -// 8.x -var agg = Aggregation.Max(new MaxAggregation { Field = "my_field" }); -agg.Aggregations ??= new Dictionary(); -agg.Aggregations.Add("my_sub_agg", Aggregation.Terms(new TermsAggregation())); -``` - -Additionally, it was not possible to inspect the contained variant. - -In 9.0, each possible container variant is represented as a regular property of the container. This allows for determining and inspecting the contained variant and initializing container properties in one go when using an object initializer: - -```csharp -// 9.0 -var agg = new Aggregation -{ - Max = new MaxAggregation { Field = "my_field" }, - Aggregations = new Dictionary - { - { "my_sub_agg", new Aggregation{ Terms = new TermsAggregation() } } - } -}; -``` - -Previously required methods like e.g. `TryGet(out)` have been removed. - -The new recommended way of inspecting container types is to use simple pattern matching: - -```csharp -var query = new Query(); - -if (query.Nested is { } nested) -{ - // We have a nested query. -} -``` - -:::{warning} - -A container can still only contain a single variant. Setting multiple variants at once is invalid. - -Consecutive assignments of variant properties (e.g., first setting `Max`, then `Min`) will cause the previous variant to be replaced. - -::: - -#### 8. Sorting [8-sorting] - -Applying a sort order to a search request using the fluent API is now more convenient: - -```csharp -var search = new SearchRequestDescriptor() - .Sort( - x => x.Score(), - x => x.Score(x => x.Order(SortOrder.Desc)), - x => x.Field(x => x.FirstName), - x => x.Field(x => x.Age, x => x.Order(SortOrder.Desc)), - x => x.Field(x => x.Age, SortOrder.Desc) - // 7.x syntax - x => x.Field(x => x.Field(x => x.FirstName).Order(SortOrder.Desc)) - ); -``` - -The improvements are even more evident when specifying a sort order for aggregations: - -```csharp -new SearchRequestDescriptor() - .Aggregations(aggs => aggs - .Add("my_terms", agg => agg - .Terms(terms => terms - // 8.x syntax. - .Order(new List> - { - new KeyValuePair("_key", SortOrder.Desc) - }) - // 9.0 fluent syntax. - .Order(x => x - .Add(x => x.Age, SortOrder.Asc) - .Add("_key", SortOrder.Desc) - ) - // 9.0 fluent add syntax (valid for all dictionary-like values). - .AddOrder("_key", SortOrder.Desc) - ) - ) - ); -``` - -#### 9. Safer Object Creation [9-safer-object-creation] - -In version 9.0, users are better guided to correctly initialize objects and thus prevent invalid requests. - -For this purpose, at least one constructor is now created that enforces the initialization of all required properties. Existing parameterless constructors or constructor variants that allow the creation of incomplete objects are preserved for backwards compatibility reasons, but are marked as obsolete. - -For NET7+ TFMs, required properties are marked with the `required` keyword, and a non-deprecated parameterless constructor is unconditionally generated. - -:::{note} - -Please note that the use of descriptors still provides the chance to create incomplete objects/requests, as descriptors do not enforce the initialization of all required properties for usability reasons. - -::: - -#### 10. Serialization [10-serialization] - -Serialization in version 9.0 has been completely overhauled, with a primary focus on robustness and performance. Additionally, initial milestones have been set for future support of native AOT. - -In 9.0, round-trip serialization is now supported for all types (limited to all JSON serializable types). - -```csharp -var request = new SearchRequest{ /* ... */ }; - -var json = client.ElasticsearchClientSettings.RequestResponseSerializer.SerializeToString( - request, - SerializationFormatting.Indented -); - -var searchRequestBody = client.ElasticsearchClientSettings.RequestResponseSerializer.Deserialize(json)!; -``` - -:::{warning} - -Note that only the body is serialized for request types. Path- and query properties must be handled manually. - -::: - -:::{note} - -It is important to use the `RequestResponseSerializer` when (de-)serializing client internal types. Direct use of `JsonSerializer` will not work. - -::: diff --git a/docs/release-notes/known-issues.md b/docs/release-notes/known-issues.md deleted file mode 100644 index 004e370a72f..00000000000 --- a/docs/release-notes/known-issues.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -navigation_title: "Known issues" - ---- - -# Elasticsearch .NET Client known issues [elasticsearch-net-client-known-issues] - -Known issues are significant defects or limitations that may impact your implementation. These issues are actively being worked on and will be addressed in a future release. Review the Elasticsearch .NET Client known issues to help you make informed decisions, such as upgrading to a new version. - -% Use the following template to add entries to this page. - -% :::{dropdown} Title of known issue -% **Details** -% On [Month/Day/Year], a known issue was discovered that [description of known issue]. - -% **Workaround** -% Workaround description. - -% **Resolved** -% On [Month/Day/Year], this issue was resolved. - -::: - -Known issues are tracked on [GitHub](https://github.com/elastic/elasticsearch-net/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22Category%3A%20Bug%22). diff --git a/docs/release-notes/release-notes-8.0.0.asciidoc b/docs/release-notes/release-notes-8.0.0.asciidoc new file mode 100644 index 00000000000..5ab8ff266fc --- /dev/null +++ b/docs/release-notes/release-notes-8.0.0.asciidoc @@ -0,0 +1,511 @@ +[[release-notes-8.0.0]] +== Release notes v8.0.0 + +[TIP] +-- +Due to the extensive changes in the new {net-client}, we highly recommend +reviewing this documentation in full, before proceeding with migration to v8. +-- + +After many months of work, eleven alphas, six betas and two release candidates, +we are pleased to announce the GA release of the {net-client} v8.0.0. + +The overall themes of this release have been based around redesigning the client +for the future, standardizing serialization, performance improvements, codebase +simplification, and code-generation. + +The following release notes explain the current state of the client, missing +features, breaking changes and our rationale for some of the design choices we have introduced. + +[discrete] +=== Version 8 is a refresh + +[IMPORTANT] +-- +It is important to highlight that v8 of the {net-client} represents +a new start for the client design. It is important to review how this may affect +your code and usage. +-- + +Mature code becomes increasingly hard to maintain over time, and +our ability to make timely releases has diminished as code complexity has increased. +Major releases allow us to simplify and better align our language clients with +each other in terms of design. Here, it is crucial to find the right balance +between uniformity across programming languages and the idiomatic concerns of +each language. For .NET, we will typically compare and contrast with https://github.com/elastic/elasticsearch-java[Java] and https://github.com/elastic/go-elasticsearch[Go] +to make sure that our approach is equivalent for each of these. We also take +heavy inspiration from Microsoft framework design guidelines and the conventions +of the wider .NET community. + +[discrete] +==== New Elastic.Clients.Elasticsearch NuGet package + +We have shipped the new code-generated client as a +https://www.nuget.org/packages/Elastic.Clients.Elasticsearch/[new NuGet package] +with a new root namespace, `Elastic.Clients.Elasticsearch`. +The new v8 client is built upon the foundations of the v7 `NEST` client, but there +are changes. By shipping as a new package, the expectation is that migration can +be managed with a phased approach. + +While this is a new package, we have aligned the major version (v8.x.x) with the +supported {es} server version to clearly indicate the client/server compatibility. +The v8 client is designed to work with version 8 of {es}. + +The v7 `NEST` client continues to be supported but will not gain new features or +support for new {es} endpoints. It should be considered deprecated in favour of +the new client. + +[discrete] +==== Limited feature set + +[CAUTION] +-- +The 8.0.0 {net-client} does not have feature parity with the previous v7 `NEST` +high-level client. +-- + +For the initial 8.0.0 release we have limited the features we are shipping. +Over the course of the 8.x releases, we will reintroduce features. Therefore, +if something is missing, it may not be permanently omitted. We will endeavour to communicate our plans as and when they become available. + +If a feature you depend on is missing (and not explicitly documented below as a +feature that we do not plan to reintroduce), please open https://github.com/elastic/elasticsearch-net/issues/new/choose[an issue] +or comment on a relevant existing issue to highlight your need to us. This will +help us prioritise our roadmap. + +[discrete] +=== Code generation + +Given the size of the Elasticsearch API surface today, it is no longer practical +to maintain thousands of types (requests, responses, queries, aggregations, etc.) +by hand. To ensure consistent, accurate and timely alignment between language +clients and {es}, the 8.x clients, and many of the associated types are now +automatically code-generated from a https://github.com/elastic/elasticsearch-specification[shared specification]. This is a common solution to maintaining alignment between +client and server among SDKs and libraries, such as those for Azure, AWS and the +Google Cloud Platform. + +Code-generation from a specification has inevitably led to some differences +between the existing v7 `NEST` types and those available in the new v7 {net-client}. +For the 8.0.0 release, we generate strictly from the specification, special +casing a few areas to improve usability or to align with language idioms. + +The base type hierarchy for concepts such as `Properties`, `Aggregations` and +`Queries` is no longer present in generated code, as these arbitrary groupings do +not align with concrete concepts of the public server API. These considerations +do not preclude adding syntactic sugar and usability enhancements to types in future +releases on a case-by-case basis. + +[discrete] +=== Elastic.Transport + +The .NET client includes a transport layer responsible for abstracting HTTP +concepts and to provide functionality such as our request pipeline. This +supports round-robin load-balancing of requests to nodes, pinging failed +nodes and sniffing the cluster for node roles. + +In v7, this layer shipped as `Elasticsearch.Net` and was considered our low-level +client which could be used to send and receive raw JSON bytes between the client +and server. + +As part of the work for 8.0.0, we have moved the transport layer out into +a https://www.nuget.org/packages/Elastic.Transport[new dedicated package] and +https://github.com/elastic/elastic-transport-net[repository], named +`Elastic.Transport`. This supports reuse across future clients and allows +consumers with extremely high-performance requirements to build upon this foundation. + +[discrete] +=== System.Text.Json for serialization + +The v7 `NEST` high-level client used an internalized and modified version of +https://github.com/neuecc/Utf8Json[Utf8Json] for request and response +serialization. This was introduced for its performance improvements +over https://www.newtonsoft.com/json[Json.NET], the more common JSON framework at +the time. + +While Utf8Json provides good value, we have identified minor bugs and +performance issues that have required maintenance over time. Some of these +are hard to change without more significant effort. This library is no longer +maintained, and any such changes cannot easily be contributed back to the +original project. + +With .NET Core 3.0, Microsoft shipped new https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-apis[System.Text.Json APIs] +that are included in-the-box with current versions of .NET. We have adopted +`System.Text.Json` for all serialization. Consumers can still define and register +their own `Serializer` implementation for their document types should they prefer +to use a different serialization library. + +By adopting `System.Text.Json`, we now depend on a well-maintained and supported +library from Microsoft. `System.Text.Json` is designed from the ground up to support +the latest performance optimizations in .NET and, as a result, provides both fast and low-allocation serialization. + +[discrete] +=== Mockability of ElasticsearchClient + +Testing code is an important part of software development. We recommend +that consumers prefer introducing an abstraction for their use of the {net-client} +as the prefered way to decouple consuming code from client types and support unit +testing. + +In order to support user testing scenarios, we have unsealed the `ElasticsearchClient` +type and made its methods virtual. This supports mocking the type directly for unit +testing. This is an improvement over the original `IElasticClient` interface from +`NEST` (v7) which only supported mocking of top-level client methods. + +We have also introduced a `TestableResponseFactory` in `Elastic.Transport` to +make it easier to create response instances with specific status codes and validity +that can be used during unit testing. + +These changes are in addition to our existing support for testing with an +`InMemoryConnection`, virtualized clusters and with our +https://github.com/elastic/elasticsearch-net-abstractions/blob/master/src/Elastic.Elasticsearch.Managed[`Elastic.Elasticsearch.Managed`] library for integration +testing against real {es} instances. We will introduce more documentation on testing methodologies in the near future. + +[discrete] +=== Migrating to Elastic.Clients.Elasticsearch + +[WARNING] +-- +The 8.0.0 release does not currently have full-feature parity with `NEST`. The +client primary use case is for application developers communitating with {es}. +-- + +The 8.0.0 release focuses on core endpoints, more specifically for common CRUD +scenarios. We intend to reduce the feature gap in subsequent versions. We anticipate +that this initial release will best suit new applications and may not yet be migration-ready for all existing consumers. We recommend reviewing this documentation carefully to learn about the missing features and reduced API surface details before migrating from the v7 `NEST` client. + +The choice to code-generate a new evolution of the {net-client} introduces some +significant breaking changes. We consciously took the opportunity to refactor +and reconsider historic design choices as part of this major release, intending +to limit future breaking changes. + +The v8 client is shipped as a new https://www.nuget.org/packages/Elastic.Clients.Elasticsearch/[NuGet package] +which can be installed alongside v7 `NEST`. We +anticipate that some consumers may prefer a phased migration with both +packages side-by-side for a short period of time to manage complex migrations. In addition, `NEST` 7.17.x can continue to be used in +https://www.elastic.co/guide/en/elasticsearch/client/net-api/7.17/connecting-to-elasticsearch-v8.html[compatibility mode] +with {es} 8.x servers until the v8 {net-client} features +align with application requirements. + +We will continue to prioritize the feature roadmap and code-generation work +based on https://github.com/elastic/elasticsearch-net/issues[feedback] from consumers who may rely on features that are initially unavailable. + +[discrete] +=== Breaking Changes + +[WARNING] +-- +As a result of code-generating a majority of the client types, this version of +the client includes multiple breaking changes. +-- + +We have strived to keep the core foundation reasonably similar, but types emitted +through code-generation are subject to change between `NEST` (v7) and the new +`Elastic.Clients.Elasticsearch` (v8) package. + +[discrete] +==== Namespaces + +We have renamed the package and top-level namespace for the v8 client to +`Elastic.Clients.Elasticsearch`. All types belong to this namespace. When +necessary, to avoid potential conflicts, types are generated into suitable +sub-namespaces based on the https://github.com/elastic/elasticsearch-specification[{es} specification]. Additional `using` directives may be required to access such types +when using the {net-client}. + +Transport layer concepts have moved to the new `Elastic.Transport` NuGet package +and related types are defined under its namespace. Some configuration and low-level transport functionality may require a `using` directive for the `Elastic.Transport` +namespace. + +[discrete] +==== Type names + +Type names may have changed from previous versions. We are not listing these +explicitly due to the potentially vast number of subtle differences. +Type names will now more closely align to those used in the JSON and as documented +in the {es} documentation. + +[discrete] +==== Class members + +Types may include renamed properties based on the {es} specification, +which differ from the original `NEST` property names. The types used for properties +may also have changed due to code-generation. If you identify missing or +incorrectly-typed properties, please open https://github.com/elastic/elasticsearch-net/issues/new/choose[an issue] to alert us. + +[discrete] +==== Sealing classes + +Opinions on "sealing by default" within the .NET ecosystem tend to be quite +polarized. Microsoft seal all internal types for potential performance gains +and we see a benefit in starting with that approach for the {net-client}, +even for our public API surface. + +While it prevents inheritance and, therefore, may inhibit a few consumer scenarios, +sealing by default is intended to avoid the unexpected or invalid +extension of types that could inadvertently be broken in the future. That said, +sealing is not necessarily a final choice for all types; but it is clearly +easier for a future release to unseal a previously-sealed class than +vice versa. We can therefore choose to unseal as valid scenarios arise, +should we determine that doing so is the best solution for those scenarios, such +as with mockability of the `ElasticsearchClient`. This goes back to our clean-slate concept for this new client. + +[discrete] +==== Removed features + +As part of the clean-slate redesign of the new client, we have opted to remove +certain features from the v8.0 client. These are listed below: + +[discrete] +===== Attribute mappings + +In previous versions of the `NEST` client, attributes could be used to configure +the mapping behaviour and inference for user types. We have removed support for +these attributes and recommend that mapping be completed via the fluent API when +configuring client instances. `System.Text.Json` attributes may be used to rename +and ignore properties during source serialization. + +[discrete] +===== CAT APIs + +The https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html[CAT APIs] +of {es} are intended for human-readable usage and will no longer be supported +via the v8 {net-client}. + +[discrete] +===== Interface removal + +We have removed several interfaces that previously shipped as part of `NEST`. This +is a design decision to simplify the library and avoid interfaces where only a +single implementation of that interface is expected to exist, such as +`IElasticClient` in `NEST`. We have also switched to prefer abstract base classes +over interfaces across the library, as this allows us to add enhancements more +easily without introducing breaking changes for derived types. + +[discrete] +==== Missing features + +While not an exhaustive list, the following are some of the main features which +have not been re-implemented for this initial 8.0.0 GA release. +These remain on our roadmap and will be reviewed and prioritized for inclusion in +future releases. + +* Query DSL operators for combining queries. +* Scroll Helper. +* Fluent API for union types. +* `AutoMap` for field datatype inference. +* Visitor pattern support for types such as `Properties`. +* Support for `JoinField` which affects `ChildrenAggregation`. +* Conditionless queries. +* DiagnosticSources have been removed in `Elastic.Transport` to provide a clean-slate +for an improved diagnostics story. The {net-client} emits https://opentelemetry.io/[OpenTelemetry] compatible `Activity` spans which can be consumed by APM agents such as the https://www.elastic.co/guide/en/apm/agent/dotnet/current/index.html[Elastic APM Agent for .NET]. +* Documentation is a work in progress, and we will expand on the documented scenarios +in future releases. + +[discrete] +=== Reduced API surface + +In this first release of the code-generated .NET client, we have specifically +focused on supporting commonly used endpoints. We have also skipped specific +queries and aggregations which need further work to generate code correctly. +Before migrating, please refer to the lists below for the endpoints, +queries and aggregations currently generated and available +in the 8.0.0 GA release to ensure that the features you are using are currently +supported. + +[discrete] +==== Supported {es} endpoints + +The following are {es} endpoints currently generated and available +in the 8.0.0 {net-client}. + +* AsyncSearch.Delete +* AsyncSearch.Get +* AsyncSearch.Status +* AsyncSearch.Submit +* Bulk +* ClearScroll +* ClosePointInTime +* Cluster.Health +* Count +* Create +* Delete +* DeleteByQuery +* DeleteByQueryRethrottle +* DeleteScript +* EQL.Delete +* EQL.Get +* EQL.Search +* EQL.Status +* Exists +* ExistsSource +* Explain +* FieldCaps +* Get +* GetScript +* GetScriptContext +* GetScriptLanguages +* GetSource +* Index +* Indices.Clone +* Indices.Close +* Indices.Create +* Indices.CreateDataStream +* Indices.Delete +* Indices.DeleteAlias +* Indices.DeleteDataStream +* Indices.DeleteIndexTemplate +* Indices.DeleteTemplate +* Indices.Exists +* Indices.ExistsIndexTemplate +* Indices.ExistsTemplate +* Indices.Flush +* Indices.ForceMerge +* Indices.Get +* Indices.GetAlias +* Indices.GetDataStream +* Indices.GetFieldMapping +* Indices.GetIndexTemplate +* Indices.GetMapping +* Indices.GetTemplate +* Indices.Indices.SimulateTemplate +* Indices.MigrateToDataStream +* Indices.Open +* Indices.PutAlias +* Indices.PutIndexTemplate +* Indices.PutMapping +* Indices.PutTemplate +* Indices.Refresh +* Indices.Rollover +* Indices.Shrink +* Indices.SimulateIndexTemplate +* Indices.Split +* Indices.Unfreeze +* Info +* MGet +* MSearch +* MSearchTemplate +* OpenPointInTime +* Ping +* PutScript +* RankEval +* Reindex +* ReindexRethrottle +* Scroll +* Search +* SearchShards +* SQL.ClearCursor +* SQL.DeleteAsync +* SQL.GetAsync +* SQL.GetAsyncStatus +* SQL.Query +* TermsEnum +* Update +* UpdateByQuery +* UpdateByQueryRethrottle + +[discrete] +==== Supported queries + +The following are query types currently generated and available +in the 8.0.0 {net-client}. + +* Bool +* Boosting +* CombinedFields +* ConstantScore +* DisMax +* Exists +* FunctionScore +* Fuzzy +* HasChild +* HasParent +* Ids +* Intervals +* Match +* MatchAll +* MatchBool +* MatchNone +* MatchPhrase +* MatchPhrasePrefix +* MoreLikeThis +* MultiMatch +* Nested +* ParentId +* Percolate +* Prefix +* QueryString +* RankFeature +* Regexp +* Script +* ScriptScore +* Shape +* SimpleQueryString +* SpanContaining +* SpanFirst +* SpanMultiTerm +* SpanNear +* SpanNot +* SpanOr +* SpanTerm +* SpanWithin +* Term +* Terms +* TermsSet +* Wildcard +* Wrapper + +[discrete] +==== Supported aggregations + +The following are aggregation types currently generated and available +in the 8.0.0 {net-client}. + +* AdjacencyMatrix +* AutoDateHistogram +* Avg +* Boxplot +* Cardinality +* Children +* Composite +* CumulativeCardinality +* DateHistogram +* DateRange +* Derivative +* ExtendedStats +* Filters +* Global +* Histogram +* Inference +* IpRange +* MatrixStats +* Max +* MedianAbsoluteDeviation +* Min +* Missing +* MultiTerms +* Nested +* Parent +* PercentilesBucket +* Range +* Rate +* ReverseNested +* Sampler +* ScriptedMetric +* Stats +* StatsBucket +* StringStats +* Sum +* Terms +* TopHits +* TopMetrics +* TTest +* ValueCount +* VariableWidthHistogram +* WeightedAvg + +[discrete] +=== In closing + +Please give the new `Elastic.Clients.Elasticsearch` client a try in your .NET +applications. If you run into any problems, please open https://github.com/elastic/elasticsearch-net/issues/new/choose[an issue] to raise those +with us. Please let us know how you get on and if you have any questions, +reach out on the https://discuss.elastic.co[Discuss forums]. \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.0.1.asciidoc b/docs/release-notes/release-notes-8.0.1.asciidoc new file mode 100644 index 00000000000..93d2dd8d376 --- /dev/null +++ b/docs/release-notes/release-notes-8.0.1.asciidoc @@ -0,0 +1,71 @@ +[[release-notes-8.0.1]] +== Release notes v8.0.1 + +[discrete] +=== Bug fixes + +- Fix MultiSearchTemplateRequest body serialization (issue: +https://github.com/elastic/elasticsearch-net/issues/7006[#7006]) + +[discrete] +=== Enhancements + +- Seal union types for consistency + +[discrete] +=== Breaking changes + +This release includes the following breaking changes: + +[discrete] +==== MultiSearchTemplate type changes + +The `Core.MSearchTemplate.RequestItem` type has been renamed to +`Core.MSearchTemplate.SearchTemplateRequestItem`. It no longer derives from the +`Union` type. It has been manually designed to support serialization to +NDJSON, as required by the MSearchTemplate endpoint. + +The `MultiSearchTemplateRequest.SearchTemplates` property has been updated to +use this newly defined type. + +This breaking change has been included in this patch release due to the +original code-generated type functioning incorrectly, and therefore, we have +determined that this should ship ASAP. + +[discrete] +==== MultiSearch type changes + +The `Core.MSearch.SearchRequestItem` type has been sealed for consistency with +the design choices of the rest of the client. While technically breaking, we +have decided that this should be included in this release before any potentially +derived types may exist in consuming applications. + +[discrete] +==== Sealing union types + +Code-generated types derived from `Union` were incorrectly unsealed. +While technically breaking, we have decided that these should be sealed in this +patch release before any potential derived types may exist in consuming +applications. Sealing types by default aligns with our broader design choices +and this decision is described in the <>. + +Affected types: +- `Aggregations.Buckets` +- `Aggregations.FieldDateMatch` +- `Aggregations.Percentiles` +- `Analysis.CharFilter` +- `Analysis.TokenFilter` +- `Analysis.Tokenizer` +- `ByteSize` +- `Fuzziness` +- `GeoHashPrecision` +- `MultiGetResponseItem` +- `MultiSearchResponseItem` +- `QueryDsl.Like` +- `QueryDsl.TermsQueryField` +- `Script` +- `Slices` +- `SourceConfig` +- `SourceConfigParam` +- `Tasks.TaskInfos` +- `TrackHits` \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.0.10.asciidoc b/docs/release-notes/release-notes-8.0.10.asciidoc new file mode 100644 index 00000000000..8bd7bfd896e --- /dev/null +++ b/docs/release-notes/release-notes-8.0.10.asciidoc @@ -0,0 +1,11 @@ +[[release-notes-8.0.10]] +== Release notes v8.0.10 + +[discrete] +=== Bug fixes + +- https://github.com/elastic/elasticsearch-net/pull/7549[#7549] Update to latest +transport to ensure ActivitySource is static. (issue: https://github.com/elastic/elasticsearch-net/issues/7540[#7540]) + +This avoids undue and potentially high volume allocations of `ActivitySource` across +consuming applications and is therefore a recommended upgrade. \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.0.2.asciidoc b/docs/release-notes/release-notes-8.0.2.asciidoc new file mode 100644 index 00000000000..5b53dcf4773 --- /dev/null +++ b/docs/release-notes/release-notes-8.0.2.asciidoc @@ -0,0 +1,82 @@ +[[release-notes-8.0.2]] +== Release notes v8.0.2 + +[discrete] +=== Bug fixes + +- Add missing accessor properties for dictionary responses (issue: +https://github.com/elastic/elasticsearch-net/issues/7048[#7048]) +- Fix to ensure dynamic HTTP methods are used when available (issue: +https://github.com/elastic/elasticsearch-net/issues/7057[#7057]) +- Fix resolvable dictionary properties (issue: +https://github.com/elastic/elasticsearch-net/issues/7075[#7075]) + +[discrete] +=== Breaking changes + +Some low-impact changes were made to existing types to fix the resolvable +dictionary properties. We determined it worthwhile to retype the properties to +prefer the interfaces over concrete types. + +[discrete] +==== Changes to dictionary properties on generated types + +As part of fixing the resolvable dictionary properties some low-impact changes +were made to the generated types. We determined it worthwhile to retype the +properties to prefer the interfaces over concrete types. + +Types that are immutable and only apply to server responses now use +`IReadOnlyDictionary` for relevant properties. For mutable types, we prefer +`IDictionary`. + +`HealthResponse.Indices` has changed from a bespoke `ReadOnlyIndexNameDictionary` +property to prefer `IReadOnlyDictionary` to improve ease of use and familiarity. + +[discrete] +==== Internalise ReadOnlyIndexNameDictionary + +After changes for resolvable dictionaries, the `ReadOnlyIndexNameDictionary` type +was made internal and is no longer part of the public API. Properties that +previously used this type are now typed as `IReadOnlyDictionary`. This brings +advantages in being more familiar for developers. + +[discrete] +==== Remove IndexName.GetString(ITransportConfiguration settings) method + +This method is used internally by the client and should not be exposed to +consuming applications. Instead, we prefer explicit interface implementation for +`IUrlParameter.GetString`. + +[discrete] +==== Remove Metric.GetString(ITransportConfiguration settings) method + +This method is used internally by the client and should not be exposed to +consuming applications. Instead, we prefer explicit interface implementation for +`IUrlParameter.GetString`. + +[discrete] +==== Remove TimeStamp.GetString(ITransportConfiguration settings) method + +This method is used internally by the client and should not be exposed to +consuming applications. Instead, we prefer explicit interface implementation for +`IUrlParameter.GetString`. + +[discrete] +==== Remove IndexUuid.GetString(ITransportConfiguration settings) method + +This method is used internally by the client and should not be exposed to +consuming applications. Instead, we prefer explicit interface implementation for +`IUrlParameter.GetString`. + +[discrete] +==== Remove TaskId.GetString(ITransportConfiguration settings) method + +This method is used internally by the client and should not be exposed to +consuming applications. Instead, we prefer explicit interface implementation for +`IUrlParameter.GetString`. + +[discrete] +==== The Metric type is now sealed + +This type has been sealed to align with other types for consistency. We don’t +expect consumers to derive from this type. \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.0.3.asciidoc b/docs/release-notes/release-notes-8.0.3.asciidoc new file mode 100644 index 00000000000..64c8dccfedf --- /dev/null +++ b/docs/release-notes/release-notes-8.0.3.asciidoc @@ -0,0 +1,17 @@ +[[release-notes-8.0.3]] +== Release notes v8.0.3 + +[discrete] +=== Bug fixes + +- Fix field sort serialization (issue: +https://github.com/elastic/elasticsearch-net/issues/7074[#7074]) + +[discrete] +=== Enhancements + +[discrete] +==== Update to Elastic.Transport 0.4.5 + +Upgrades the client to depend on the 0.4.5 release of Elastic.Transport which +includes automatic sending of https://www.elastic.co/guide/en/elasticsearch/reference/current/rest-api-compatibility.html#rest-api-compatibility[REST API compatibility] headers for Elasticsearch requests. \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.0.4.asciidoc b/docs/release-notes/release-notes-8.0.4.asciidoc new file mode 100644 index 00000000000..ac61771ebde --- /dev/null +++ b/docs/release-notes/release-notes-8.0.4.asciidoc @@ -0,0 +1,138 @@ +[[release-notes-8.0.4]] +== Release notes v8.0.4 + +[discrete] +=== Bug fixes + +- Fix code-gen for IndexSettingsAnalysis (issue: +https://github.com/elastic/elasticsearch-net/issues/7118[#7118]) +- Complete implementation of Metrics type +- Update generated code with fixes from 8.6 specification (issue: +https://github.com/elastic/elasticsearch-net/issues/7119[#7119]). Adds `Missing` +property to `MultiTermLookup`. + +[discrete] +=== Breaking changes + +In the course of fixing the code-generation of types used on `IndexSettingsAnalysis`, +several breaking changes were introduced. Some of these were necessary to make the +types usable, while others fixed the consistency of the generated code. + +[discrete] +==== IndexSettingsAnalysis + +Code-generation has been updated to apply transforms to fix the specification +of the `IndexSettingsAnalysis` type. As a result, all properties have been renamed, +and some property types have been changed. + +* The `Analyzer` property is now pluralized and renamed to `Analyzers` to align with +NEST and make it clearer that this can contain more than one analyzer definition. +* The `CharFilter` property is now pluralized and renamed to `CharFilters` to align with +NEST and make it clearer that this can contain more than one char filter definition. +Its type has changes from a `IDictionary` +to `CharFilters`, a tagged union type deriving from IsADictionary`. +* The `Filter` property is now pluralized and renamed to `TokenFilters` to align with +NEST and make it clearer that this can contain more than one token filter definition. +Its type has changes from a `IDictionary` +to `TokenFilters`, a tagged union type deriving from IsADictionary`. +* The `Normalizer` property is now pluralized and renamed to `Normalizers` to align with +NEST and make it clearer that this can contain more than one normalizer definition. +* The `Tokenizer` property is now pluralized and renamed to `Tokenizers` to align with +NEST and make it clearer that this can contain more than one tokenizer definition. +Its type has changes from a `IDictionary` +to `TokenFilters`, a tagged union type deriving from IsADictionary`. + +*_Before_* + +[source,csharp] +---- +public sealed partial class IndexSettingsAnalysis +{ + public Elastic.Clients.Elasticsearch.Analysis.Analyzers? Analyzer { get; set; } + public IDictionary? CharFilter { get; set; } + public IDictionary? Filter { get; set; } + public Elastic.Clients.Elasticsearch.Analysis.Normalizers? Normalizer { get; set; } + public IDictionary? Tokenizer { get; set; } +} +---- + +*_After_* + +[source,csharp] +---- +public sealed partial class IndexSettingsAnalysis +{ + public Elastic.Clients.Elasticsearch.Analysis.Analyzers? Analyzers { get; set; } + public Elastic.Clients.Elasticsearch.Analysis.CharFilters? CharFilters { get; set; } + public Elastic.Clients.Elasticsearch.Analysis.TokenFilters? TokenFilters { get; set; } + public Elastic.Clients.Elasticsearch.Analysis.Normalizers? Normalizers { get; set; } + public Elastic.Clients.Elasticsearch.Analysis.Tokenizers? Tokenizers { get; set; } +} +---- + +The `IndexSettingsAnalysisDescriptor` type has been updated accordingly to apply +the above changes. It now supports a more convenient syntax to easily define +the filters, normalizers and tokenizers that apply to the settings for indices. + +[discrete] +===== Example usage of updated fluent syntax: + +[source,csharp] +---- +var descriptor = new CreateIndexRequestDescriptor("test") + .Settings(s => s + .Analysis(a => a + .Analyzers(a => a + .Stop("stop-name", stop => stop.StopwordsPath("analysis/path.txt")) + .Pattern("pattern-name", pattern => pattern.Version("version")) + .Custom("my-custom-analyzer", c => c + .Filter(new[] { "stop", "synonym" }) + .Tokenizer("standard"))) + .TokenFilters(f => f + .Synonym("synonym", synonym => synonym + .SynonymsPath("analysis/synonym.txt"))))); +---- + +[discrete] +==== Token Filters + +Token filter types now implement the `ITokenFilter` interface, rather than +`ITokenFilterDefinition`. + +The `TokenFilter` union type has been renamed to `CategorizationTokenFilter` to +clearly signify it's use only within ML categorization contexts. + +A `TokenFilters` type has been introduced, which derives from `IsADictionary` and +supports convenient addition of known token filters via the fluent API. + +[discrete] +==== Character Filters + +Character filter types now implement the `ICharFilter` interface, rather than +`ICharFilterDefinition`. + +The `CharFilter` union type has been renamed to `CategorizationCharFilter` to +clearly signify it's use only within ML categorization contexts. + +A `CharFilters` type has been introduced, which derives from `IsADictionary` and +supports convenient addition of known character filters via the fluent API. + +[discrete] +==== Tokenizers + +Tokenizer types now implement the `ITokenizer` interface, rather than +`ITokenizerDefinition`. + +The `Tokenizer` union type has been renamed to `CategorizationTokenizer` to +clearly signify it's use only within ML categorization contexts. + +A `Tokenizers` type has been introduced, which derives from `IsADictionary` and +supports convenient addition of known tokenizers via the fluent API. + +[discrete] +==== IndexManagement.StorageType + +The 8.6 specification fixed this type to mark is as a non-exhaustive enum, since +it supports additional values besides those coded into the specification. As a +result the code-generation for this type causes some breaking changes. The type +is no longer generated as an `enum` and is not a custom `readonly struct`. \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.0.5.asciidoc b/docs/release-notes/release-notes-8.0.5.asciidoc new file mode 100644 index 00000000000..15961356b15 --- /dev/null +++ b/docs/release-notes/release-notes-8.0.5.asciidoc @@ -0,0 +1,98 @@ +[[release-notes-8.0.5]] +== Release notes v8.0.5 + +[discrete] +=== Bug fixes + +- https://github.com/elastic/elasticsearch-net/pull/7171[#7171] Fix code-gen for IndexTemplate (issue: https://github.com/elastic/elasticsearch-net/issues/7161[#7161]) +- https://github.com/elastic/elasticsearch-net/pull/7181[#7181] Fix MultiGet response deserialization for non-matched IDs (issue: https://github.com/elastic/elasticsearch-net/issues/7169[#7169]) +- https://github.com/elastic/elasticsearch-net/pull/7182[#7182] Implement Write method on SourceConfigConverter (issue: https://github.com/elastic/elasticsearch-net/issues/7170[#7170]) +- https://github.com/elastic/elasticsearch-net/pull/7205[#7205] Update to Elastic.Transport to 0.4.6 which improves the version detection used by the REST API compatibility Accept header + +[discrete] +=== Breaking changes + +In the course of fixing the code-generation for index templates to avoid serialization failures, some breaking changes were introduced. + +[discrete] +==== IndexTemplate + +`IndexTemplate` forms part of the `IndexTemplateItem` included on `GetIndexTemplateResponse`. + +* The type for the `ComposedOf` property has changed from `IReadOnlyCollection` to `IReadOnlyCollection` +* The type for the `IndexPatterns` property has changed from `Elastic.Clients.Elasticsearch.Names` to `IReadOnlyCollection` + +*_Before_* + +[source,csharp] +---- +public sealed partial class IndexTemplate +{ + ... + public IReadOnlyCollection ComposedOf { get; init; } + public Elastic.Clients.Elasticsearch.Names IndexPatterns { get; init; } + ... +} +---- + +*_After_* + +[source,csharp] +---- +public sealed partial class IndexTemplate +{ + ... + public IReadOnlyCollection ComposedOf { get; init; } + public IReadOnlyCollection IndexPatterns { get; init; } + ... +} +---- + +[discrete] +==== SimulateIndexTemplateRequest + +* The type for the `ComposedOf` property has changed from `IReadOnlyCollection` to `IReadOnlyCollection` + +*_Before_* + +[source,csharp] +---- +public sealed partial class SimulateIndexTemplateRequest +{ + ... + public IReadOnlyCollection? ComposedOf { get; set; } + ... +} +---- + +*_After_* + +[source,csharp] +---- +public sealed partial class SimulateIndexTemplateRequest +{ + ... + public IReadOnlyCollection? ComposedOf { get; set; } + ... +} +---- + +[discrete] +==== SimulateIndexTemplateRequestDescriptor and SimulateIndexTemplateRequestDescriptor + +The `ComposedOf` method signature has changed to accept a parameter of `ICollection?` instead of +`ICollection?`. + +*_Before_* + +[source,csharp] +---- +public SimulateIndexTemplateRequestDescriptor ComposedOf(ICollection? composedOf) +---- + +*_After_* + +[source,csharp] +---- +public SimulateIndexTemplateRequestDescriptor ComposedOf(ICollection? composedOf) +---- \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.0.6.asciidoc b/docs/release-notes/release-notes-8.0.6.asciidoc new file mode 100644 index 00000000000..301f18470fd --- /dev/null +++ b/docs/release-notes/release-notes-8.0.6.asciidoc @@ -0,0 +1,110 @@ +[[release-notes-8.0.6]] +== Release notes v8.0.6 + +[discrete] +=== Bug fixes + +- https://github.com/elastic/elasticsearch-net/pull/7244[#7244] Fix code-gen for +single or many types. Includes support for deserializing numbers represented as +strings in the JSON payload. (issues: https://github.com/elastic/elasticsearch-net/issues/7221[#7221], +https://github.com/elastic/elasticsearch-net/issues/7234[#7234], +https://github.com/elastic/elasticsearch-net/issues/7240[#7240]). +- https://github.com/elastic/elasticsearch-net/pull/7253[#7253] Fix code-gen for +enums with aliases (issue: https://github.com/elastic/elasticsearch-net/issues/7236[#7236]) +- https://github.com/elastic/elasticsearch-net/pull/7262[#7262] Update to +`Elastic.Transport` 0.4.7 which includes fixes for helpers used during application +testing. + +[discrete] +=== Features + +- https://github.com/elastic/elasticsearch-net/pull/7272[#7272] Support custom JsonSerializerOptions. + +[discrete] +=== Breaking changes + +[discrete] +==== DynamicTemplate + +`DynamicTemplate` forms part of the `TypeMapping` object, included on `GetIndexRespone`. + +* The type for the `Mapping` property has changed from `Elastic.Clients.Elasticsearch.Properties` +to `Elastic.Clients.Elasticsearch.IProperty`. This breaking change fixes an error +introduced by the code-generator. Before introducing this fix, the type could +not correctly deserialize responses for GET index requests and prevented dynamic +templates from being configured for indices via PUT index. + +*_Before_* + +[source,csharp] +---- +public sealed partial class DynamicTemplate +{ + ... + public Elastic.Clients.Elasticsearch.Mapping.Properties? Mapping { get; set; } + ... +} +---- + +*_After_* + +[source,csharp] +---- +public sealed partial class DynamicTemplate +{ + ... + public Elastic.Clients.Elasticsearch.Mapping.IProperty? Mapping { get; set; } + ... +} +---- + +[discrete] +==== TypeMapping + +Among other uses, `TypeMapping` forms part of the `GetIndexRespone`. + +* The `DynamicTemplates` property has been simplified to make it easier to work +with and to fix deserialization failures on certain responses. Rather than use a +`Union` to describe the fact that this property may be a single dictionary of +dynamic templates, or an array of dictionaries, this is now code-generated as a +specialised single or many collection. The API exposes this as an `ICollection` +of dictionaries and the JSON converter is able to handle either an array or +individual dictionary in responses. + +*_Before_* + +[source,csharp] +---- +public sealed partial class TypeMapping +{ + ... + public Union?, ICollection>?>? DynamicTemplates { get; set; } + ... +} +---- + +*_After_* + +[source,csharp] +---- +public sealed partial class TypeMapping +{ + ... + public ICollection>? DynamicTemplates { get; set; } + ... +} +---- + +[discrete] +==== SystemTextJsonSerializer + +The `SystemTextJsonSerializer` is used as a base type for the built-in serializers. Two breaking changes have been made after adding better support for <>. + +The public `Options` property has been made internal. + +A new public abstract method `CreateJsonSerializerOptions` has been added, which derived types must implement. + +[source,csharp] +---- +protected abstract JsonSerializerOptions CreateJsonSerializerOptions(); +---- diff --git a/docs/release-notes/release-notes-8.0.7.asciidoc b/docs/release-notes/release-notes-8.0.7.asciidoc new file mode 100644 index 00000000000..fd5c2261708 --- /dev/null +++ b/docs/release-notes/release-notes-8.0.7.asciidoc @@ -0,0 +1,7 @@ +[[release-notes-8.0.7]] +== Release notes v8.0.7 + +[discrete] +=== Bug fixes + +- https://github.com/elastic/elasticsearch-net/pull/7337[#7337] Fix code-gen for dynamic_templates. (issue: https://github.com/elastic/elasticsearch-net/issues/7234[#7234]) \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.0.8.asciidoc b/docs/release-notes/release-notes-8.0.8.asciidoc new file mode 100644 index 00000000000..9952e1c6cee --- /dev/null +++ b/docs/release-notes/release-notes-8.0.8.asciidoc @@ -0,0 +1,7 @@ +[[release-notes-8.0.8]] +== Release notes v8.0.8 + +[discrete] +=== Bug fixes + +- https://github.com/elastic/elasticsearch-net/pull/7456[#7456] Fix CompletionSuggester based on spec fixes. (issue: https://github.com/elastic/elasticsearch-net/issues/7454[#7454]) diff --git a/docs/release-notes/release-notes-8.0.9.asciidoc b/docs/release-notes/release-notes-8.0.9.asciidoc new file mode 100644 index 00000000000..b9086a404b5 --- /dev/null +++ b/docs/release-notes/release-notes-8.0.9.asciidoc @@ -0,0 +1,34 @@ +[[release-notes-8.0.9]] +== Release notes v8.0.9 + +[discrete] +=== Bug fixes + +- https://github.com/elastic/elasticsearch-net/pull/7446[#7446] Fix byte properties +in index stats types. (issue: https://github.com/elastic/elasticsearch-net/issues/7445[#7445]) + +[discrete] +=== Enhancements + +- https://github.com/elastic/elasticsearch-net/pull/7467[#7467] Source serialization +always sends fractional format for double and floats. (issue: https://github.com/elastic/elasticsearch-net/issues/7051[#7051]) + +[discrete] +=== Breaking changes + +[discrete] +==== Source serialization of float and double properties + +By default, when serializing `double` and `float` properties, the `System.Text.Json` +serializer uses the "G17" format when serializing double types. This format omits +the decimal point and/or trailing zeros if they are not required for the data to +roundtrip. This is generally correct, as JSON doesn't specify a type for numbers. + +However, in the case of source serialization, mappings for numeric properties may +be incorrectly inferred if trailing zeros are omitted. In this release, we have +included a new custom converter for `float` and `double` types when serialized using +the default source serializer. These converters ensure that at least one precision +digit is included after a decimal point, even for round numbers. + +You may therefore observe changes to the serialized source document after +upgrading to this version. \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.1.0.asciidoc b/docs/release-notes/release-notes-8.1.0.asciidoc new file mode 100644 index 00000000000..3fdac1643ff --- /dev/null +++ b/docs/release-notes/release-notes-8.1.0.asciidoc @@ -0,0 +1,90 @@ +[[release-notes-8.1.0]] +== Release notes v8.1.0 + +A core theme of the 8.1.0 release is the reintroduction of many features which +were missing from the 8.0 releases. The 8.x client still does NOT have full +feature parity with NEST and we continue to work on closing these gaps. + +[discrete] +=== Enhancements + +[discrete] +==== Support for additional endpoints + +Adds support for the following endpoints: + +- Cluster.AllocationExplain +- Cluster.Stats +- Cluster.PendingTasks +- DanglingIndices.List +- Enrich.DeletePolicy +- Enrich.ExecutePolicy +- Enrich.PutPolicy +- Enrich.Stats +- Graph.Explore +- IndexManagement.UpdateAliases +- Ingest.GeoIpStats +- Ingest.GetPipeline +- Ingest.ProcessorGrok +- Ingest.PutPipeline +- Ingest.Simulate +- MultiTermVectors +- RenderSearchTemplate +- SearchTemplate +- Tasks.Cancel +- Tasks.Get +- Tasks.List +- TermVectors + +[discrete] +==== Support for additional queries + +Adds support for the following queries: + +- Geo distance +- Geo bounding box +- Geo polygon +- Pinned +- Range queries (date and numeric) +- Raw (can be used as a client specific fallback for missing queries by sending raw JSON) + +[discrete] +==== Support for additional aggregations + +Adds support for the following aggregations: + +- Boxplot +- Bucket sort +- Composite +- Cumulative sum +- Geo bounds +- Geo centroid +- Geo distance +- Geo line +- Geohash grid +- Geohex grid +- Geotile grid +- IP prefix +- Multi terms +- Rare terms +- Significant terms +- Weighted average + +[discrete] +==== Other enhancements + +- *Add support for geo distance sorting.* +Adds support for specifying a `GeoDistanceSort` on `SortOptions`. +- *Add support for weight score on FunctionScore.* +Adds support for specifying a weight score value on the `FunctionScore` type. +- *Code generate XML doc comments.* +The code generator now adds XML doc comments to types and members when present in +the Elasticsearch specification. This acts as an aid when exploring the API in an +IDE such as Visual Studio. +- *Add additional client overloads.* +Adds additional overloads to the `ElasticsearchClient` and namespaced sub-clients +that allow consumers to provide a descriptor instance used when building requests. +- *Add support for bool query operators in Query DSL for object initializer syntax* +Adds support for using operators `&&``, `||`, `!` and `+` to build up bool queries +using the object initializer syntax. NOTE: Operators are not yet supported for +combining queires defined using the fluent descriptor syntax. \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.1.1.asciidoc b/docs/release-notes/release-notes-8.1.1.asciidoc new file mode 100644 index 00000000000..100b6e99f12 --- /dev/null +++ b/docs/release-notes/release-notes-8.1.1.asciidoc @@ -0,0 +1,72 @@ +[[release-notes-8.1.1]] +== Release notes v8.1.1 + +[discrete] +=== Bug fixes + +- https://github.com/elastic/elasticsearch-net/pull/7667[#7667] Fix SQL missing +Rows on QueryResponse (issue: https://github.com/elastic/elasticsearch-net/issues/7663[#7663]) +- https://github.com/elastic/elasticsearch-net/pull/7676[#7676] Ensure async client +methods pass through cancellation token (issue: https://github.com/elastic/elasticsearch-net/issues/7665[#7665]) + +[discrete] +=== Enhancements + +- https://github.com/elastic/elasticsearch-net/pull/7684[#7684] Regenerated code +with latest spec fixes for 8.7 + +[discrete] +=== Breaking changes + +This release includes the following breaking changes as a result of specification fixes: + +[discrete] +==== AsyncSearch and MultisearchBody KnnQuery + +The type for the `SubmitAsyncSearchRequest.Knn` and `MultisearchBody.Knn` properties +has changed to an `ICollection` from a single `KnnQuery` since it is +possible to include more than one query in a request. + +*_Before_* + +[source,csharp] +---- +public sealed partial class SubmitAsyncSearchRequest +{ + ... + public Elastic.Clients.Elasticsearch.KnnQuery? Knn { get; set; } + ... +} +---- + +[source,csharp] +---- +public sealed partial class MultisearchBody +{ + ... + public Elastic.Clients.Elasticsearch.KnnQuery? Knn { get; set; } + ... +} +---- + +*_After_* + +[source,csharp] +---- +public sealed partial class SubmitAsyncSearchRequest +{ + ... + public ICollection? Knn { get; set; } + ... +} +---- + +[source,csharp] +---- +public sealed partial class MultisearchBody +{ + ... + public ICollection? Knn { get; set; } + ... +} +---- \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.1.2.asciidoc b/docs/release-notes/release-notes-8.1.2.asciidoc new file mode 100644 index 00000000000..71c34bca8b2 --- /dev/null +++ b/docs/release-notes/release-notes-8.1.2.asciidoc @@ -0,0 +1,17 @@ +[[release-notes-8.1.2]] +== Release notes v8.1.2 + +[discrete] +=== Bug fixes + +- https://github.com/elastic/elasticsearch-net/pull/7718[#7718] Regen index setting blocks based on fixed spec (issue: https://github.com/elastic/elasticsearch-net/issues/7714[#7714]) + +[discrete] +=== Enhancements + +- https://github.com/elastic/elasticsearch-net/pull/7781[#7781] Bump dependencies (issue: https://github.com/elastic/elasticsearch-net/issues/7752[#7752]) + +[discrete] +=== Docs + +- https://github.com/elastic/elasticsearch-net/pull/7772[#7772] [Backport 8.1] [Backport 8.7][DOCS] Adds getting started content based on the template (issue: https://github.com/elastic/elasticsearch-net/pull/7770[#7770]) \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.1.3.asciidoc b/docs/release-notes/release-notes-8.1.3.asciidoc new file mode 100644 index 00000000000..e436f226717 --- /dev/null +++ b/docs/release-notes/release-notes-8.1.3.asciidoc @@ -0,0 +1,19 @@ +[[release-notes-8.1.3]] +== Release notes v8.1.3 + +[discrete] +=== Bug fixes + +- https://github.com/elastic/elasticsearch-net/pull/7737[#7737] Boosted non-exhaustive enum deserialization (issue: https://github.com/elastic/elasticsearch-net/issues/7729[#7729]) +- https://github.com/elastic/elasticsearch-net/pull/7738[#7738] Complted buckets JSON converter (issue: https://github.com/elastic/elasticsearch-net/issues/7713[#7713]) +- https://github.com/elastic/elasticsearch-net/pull/7753[#7753] Number converters should not fall through and throw exceptions in non NETCore builds (issue: https://github.com/elastic/elasticsearch-net/issues/7757[#7757]) +- https://github.com/elastic/elasticsearch-net/pull/7811[#7811] Fix localization issue with floating-point deserialization from string + +[discrete] +=== Enhancements + +- https://github.com/elastic/elasticsearch-net/pull/7730[#7730] Refactoring and tiny behavior fix for Ids +- https://github.com/elastic/elasticsearch-net/pull/7731[#7731] No allocations in `ResponseItem.IsValid`` property +- https://github.com/elastic/elasticsearch-net/pull/7733[#7733] Fixed the equality contract on Metrics type +- https://github.com/elastic/elasticsearch-net/pull/7735[#7735] Removed unused `JsonIgnore` +- https://github.com/elastic/elasticsearch-net/pull/7736[#7736] Optimized `FieldConverter` \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.10.0.asciidoc b/docs/release-notes/release-notes-8.10.0.asciidoc new file mode 100644 index 00000000000..9b587de7bea --- /dev/null +++ b/docs/release-notes/release-notes-8.10.0.asciidoc @@ -0,0 +1,13 @@ +[[release-notes-8.10.0]] +== Release notes v8.10.0 + +[discrete] +=== Features & Enhancements + +- https://github.com/elastic/elasticsearch-net/pull/7931[#7931] Refactor OpenTelemetry implementation with updated Transport (issue: https://github.com/elastic/elasticsearch-net/issues/7885[#7885]) +- https://github.com/elastic/elasticsearch-net/pull/7953[#7953] Add `TDigestPercentilesAggregate` (issues: https://github.com/elastic/elasticsearch-net/issues/7923[#7923], https://github.com/elastic/elasticsearch-net/issues/7879[#7879]) + +[discrete] +=== Bug fixes + +- https://github.com/elastic/elasticsearch-net/pull/7956[#7956] Add `Similarity` to `KnnQuery` (issue: https://github.com/elastic/elasticsearch-net/issues/7952[#7952]) \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.11.0.asciidoc b/docs/release-notes/release-notes-8.11.0.asciidoc new file mode 100644 index 00000000000..1e002cb0b4e --- /dev/null +++ b/docs/release-notes/release-notes-8.11.0.asciidoc @@ -0,0 +1,13 @@ +[[release-notes-8.11.0]] +== Release notes v8.11.0 + +[discrete] +=== Features & Enhancements + +- https://github.com/elastic/elasticsearch-net/pull/7978[#7978] Regenerate client for 8.11 + +[discrete] +=== Bug fixes + +- https://github.com/elastic/elasticsearch-net/pull/7979[#7979] Add workaround for stringified properties which are not marked properly in specification +- https://github.com/elastic/elasticsearch-net/pull/7965[#7965] Fix `Stringified` converters \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.9.0.asciidoc b/docs/release-notes/release-notes-8.9.0.asciidoc new file mode 100644 index 00000000000..0a622988037 --- /dev/null +++ b/docs/release-notes/release-notes-8.9.0.asciidoc @@ -0,0 +1,15 @@ +[[release-notes-8.9.0]] +== Release notes v8.9.0 + +[discrete] +=== Bug fixes + +- https://github.com/elastic/elasticsearch-net/pull/7839[#7839] Use `Stringified` for `preserve_original` and `indexing_complete` (issue: https://github.com/elastic/elasticsearch-net/issues/7755[#7755]) +- https://github.com/elastic/elasticsearch-net/pull/7840[#7840] Update `Elastic.*` dependencies (issue: https://github.com/elastic/elasticsearch-net/issues/7823[#7823]) +- https://github.com/elastic/elasticsearch-net/pull/7841[#7841] Fix typing of `BulkUpdateOperation.RetryOnConflict` (issue: https://github.com/elastic/elasticsearch-net/issues/7838[#7838]) +- https://github.com/elastic/elasticsearch-net/pull/7854[#7854] Fix custom floating-point JSON converters (issue: https://github.com/elastic/elasticsearch-net/issues/7757[#7757]) + +[discrete] +=== Enhancements + +- https://github.com/elastic/elasticsearch-net/pull/7836[#7836] Regenerate client using 8.9 specification \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.9.1.asciidoc b/docs/release-notes/release-notes-8.9.1.asciidoc new file mode 100644 index 00000000000..ea5a4f19aeb --- /dev/null +++ b/docs/release-notes/release-notes-8.9.1.asciidoc @@ -0,0 +1,7 @@ +[[release-notes-8.9.1]] +== Release notes v8.9.1 + +[discrete] +=== Bug fixes + +- https://github.com/elastic/elasticsearch-net/pull/7864[#7864] Fix `TextExpansionQuery` definition diff --git a/docs/release-notes/release-notes-8.9.2.asciidoc b/docs/release-notes/release-notes-8.9.2.asciidoc new file mode 100644 index 00000000000..e148e5a1673 --- /dev/null +++ b/docs/release-notes/release-notes-8.9.2.asciidoc @@ -0,0 +1,14 @@ +[[release-notes-8.9.2]] +== Release notes v8.9.2 + +[discrete] +=== Bug fixes + + - https://github.com/elastic/elasticsearch-net/pull/7875[#7875] Fix `aggregations` property not being generated for `MultisearchBody` (issue https://github.com/elastic/elasticsearch-net/issues/7873[#7873]) + - https://github.com/elastic/elasticsearch-net/pull/7875[#7875] Remove invalid properties from `SlowlogTresholds` (issue https://github.com/elastic/elasticsearch-net/issues/7865[#7865]) + - https://github.com/elastic/elasticsearch-net/pull/7883[#7883] Remove leading `/` character from API urls (issue: https://github.com/elastic/elasticsearch-net/issues/7878[#7878]) + +[discrete] +=== Features & Enhancements + +- https://github.com/elastic/elasticsearch-net/pull/7869[#7869] Add support for `SimpleQueryStringQuery.flags property (issue: https://github.com/elastic/elasticsearch-net/issues/7863[#7863]) \ No newline at end of file diff --git a/docs/release-notes/release-notes-8.9.3.asciidoc b/docs/release-notes/release-notes-8.9.3.asciidoc new file mode 100644 index 00000000000..efffe9685d9 --- /dev/null +++ b/docs/release-notes/release-notes-8.9.3.asciidoc @@ -0,0 +1,10 @@ +[[release-notes-8.9.3]] +== Release notes v8.9.3 + +[discrete] +=== Features & Enhancements + +- https://github.com/elastic/elasticsearch-net/pull/7894[#7894] Reintroduce suggestion feature (issue: https://github.com/elastic/elasticsearch-net/issues/7390[#7390]) +- https://github.com/elastic/elasticsearch-net/pull/7923[#7923] Add `PercentilesAggregation` and `PercentileRanksAggregation` (issue: https://github.com/elastic/elasticsearch-net/issues/7879[#7879]) +- https://github.com/elastic/elasticsearch-net/pull/7914[#7914] Update `Elastic.Transport` dependency +- https://github.com/elastic/elasticsearch-net/pull/7920[#7920] Regenerate client using the latest specification \ No newline at end of file diff --git a/docs/release-notes/release-notes.asciidoc b/docs/release-notes/release-notes.asciidoc new file mode 100644 index 00000000000..71416f69ca9 --- /dev/null +++ b/docs/release-notes/release-notes.asciidoc @@ -0,0 +1,68 @@ +[[release-notes]] += Release notes + +* <> + +[discrete] +== Version 8.11 + +* <> + +[discrete] +== Version 8.10 + +* <> + +[discrete] +== Version 8.9 + +* <> +* <> +* <> +* <> + +[discrete] +== Version 8.1 + +* <> +* <> +* <> +* <> + +[discrete] +== Version 8.0 + +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> +* <> + +include::breaking-change-policy.asciidoc[] +include::release-notes-8.11.0.asciidoc[] +include::release-notes-8.10.0.asciidoc[] +include::release-notes-8.9.3.asciidoc[] +include::release-notes-8.9.2.asciidoc[] +include::release-notes-8.9.1.asciidoc[] +include::release-notes-8.9.0.asciidoc[] +include::release-notes-8.1.3.asciidoc[] +include::release-notes-8.1.2.asciidoc[] +include::release-notes-8.1.1.asciidoc[] +include::release-notes-8.1.0.asciidoc[] +include::release-notes-8.0.10.asciidoc[] +include::release-notes-8.0.9.asciidoc[] +include::release-notes-8.0.8.asciidoc[] +include::release-notes-8.0.7.asciidoc[] +include::release-notes-8.0.6.asciidoc[] +include::release-notes-8.0.5.asciidoc[] +include::release-notes-8.0.4.asciidoc[] +include::release-notes-8.0.3.asciidoc[] +include::release-notes-8.0.2.asciidoc[] +include::release-notes-8.0.1.asciidoc[] +include::release-notes-8.0.0.asciidoc[] \ No newline at end of file diff --git a/docs/release-notes/toc.yml b/docs/release-notes/toc.yml deleted file mode 100644 index a4100679473..00000000000 --- a/docs/release-notes/toc.yml +++ /dev/null @@ -1,5 +0,0 @@ -toc: - - file: index.md - - file: known-issues.md - - file: breaking-changes.md - - file: deprecations.md \ No newline at end of file diff --git a/docs/troubleshooting.asciidoc b/docs/troubleshooting.asciidoc new file mode 100644 index 00000000000..c30c6bac554 --- /dev/null +++ b/docs/troubleshooting.asciidoc @@ -0,0 +1,45 @@ +[[troubleshooting]] += Troubleshooting + +[partintro] +-- +The client can provide rich details about what occurred in the request pipeline during the process +of making a request, as well as be configured to provide the raw request and response JSON + +* <> + +* <> + +-- + +[[logging]] +== Logging + +Whilst developing with Elasticsearch using NEST, it can be extremely valuable to see the requests that +NEST generates and sends to Elasticsearch, as well as the responses returned. + +There are a couple of popular ways of capturing this information + +* <> + +* <> + +include::client-concepts/troubleshooting/logging-with-on-request-completed.asciidoc[] + +include::client-concepts/troubleshooting/logging-with-fiddler.asciidoc[] + +[[debugging]] +== Debugging + +When things are going awry, you want to be provided with as much information as possible, to resolve +the issue! + +Elasticsearch.Net and NEST provide an <> and <> to +help get you back on the happy path. + +include::client-concepts/troubleshooting/audit-trail.asciidoc[] + +include::client-concepts/troubleshooting/debug-information.asciidoc[] + +include::client-concepts/troubleshooting/debug-mode.asciidoc[] + diff --git a/docs/usage/esql.asciidoc b/docs/usage/esql.asciidoc new file mode 100644 index 00000000000..7b7c1a0fe42 --- /dev/null +++ b/docs/usage/esql.asciidoc @@ -0,0 +1,69 @@ +[[esql]] +== ES|QL in the .NET client +++++ +Using ES|QL +++++ + +This page helps you understand and use {ref}/esql.html[ES|QL] in the +.NET client. + +There are two ways to use ES|QL in the .NET client: + +* Use the Elasticsearch {es-docs}/esql-apis.html[ES|QL API] directly: This +is the most flexible approach, but it's also the most complex because you must handle +results in their raw form. You can choose the precise format of results, +such as JSON, CSV, or text. +* Use ES|QL high-level helpers: These helpers take care of parsing the raw +response into something readily usable by the application. Several helpers are +available for different use cases, such as object mapping, cursor +traversal of results (in development), and dataframes (in development). + +[discrete] +[[esql-how-to]] +=== How to use the ES|QL API + +The {es-docs}/esql-query-api.html[ES|QL query API] allows you to specify how +results should be returned. You can choose a +{es-docs}/esql-rest.html#esql-rest-format[response format] such as CSV, text, or +JSON, then fine-tune it with parameters like column separators +and locale. + +The following example gets ES|QL results as CSV and parses them: + +[source,charp] +---- +var response = await client.Esql.QueryAsync(r => r + .Query("FROM index") + .Format("csv") +); +var csvContents = Encoding.UTF8.GetString(response.Data); +---- + +[discrete] +[[esql-consume-results]] +=== Consume ES|QL results + +The previous example showed that although the raw ES|QL API offers maximum +flexibility, additional work is required in order to make use of the +result data. + +To simplify things, try working with these three main representations of ES|QL +results (each with its own mapping helper): + +* **Objects**, where each row in the results is mapped to an object from your +application domain. This is similar to what ORMs (object relational mappers) +commonly do. +* **Cursors**, where you scan the results row by row and access the data using +column names. This is similar to database access libraries. +* **Dataframes**, where results are organized in a column-oriented structure that +allows efficient processing of column data. + +[source,charp] +---- +// ObjectAPI example +var response = await client.Esql.QueryAsObjectsAsync(x => x.Query("FROM index")); +foreach (var person in response) +{ + // ... +} +---- diff --git a/docs/usage/examples.asciidoc b/docs/usage/examples.asciidoc new file mode 100644 index 00000000000..501c63b89e9 --- /dev/null +++ b/docs/usage/examples.asciidoc @@ -0,0 +1,122 @@ +[[examples]] +== CRUD usage examples + +This page helps you to understand how to perform various basic {es} CRUD +(create, read, update, delete) operations using the .NET client. It demonstrates +how to create a document by indexing an object into {es}, read a document back, +retrieving it by ID or performing a search, update one of the fields in a +document and delete a specific document. + +These examples assume you have an instance of the `ElasticsearchClient` +accessible via a local variable named `client` and several using directives in +your C# file. + +[source,csharp] +---- +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tags=using-directives;create-client] +---- +<1> The default constructor, assumes an unsecured {es} server is running and +exposed on 'http://localhost:9200'. See <> for examples +of connecting to secured servers and https://www.elastic.co/cloud[Elastic Cloud] +deployments. + +The examples operate on data representing tweets. Tweets are modelled in the +client application using a C# class named 'Tweet' containing several properties +that map to the document structure being stored in {es}. + +[source,csharp] +---- +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tag=tweet-class] +---- +<1> By default, the .NET client will try to find a property called `Id` on the +class. When such a property is present it will index the document into {es} +using the ID specified by the value of this property. + + +[discrete] +[[indexing-net]] +=== Indexing a document + +Documents can be indexed by creating an instance representing a tweet and +indexing it via the client. In these examples, we will work with an index named +'my-tweet-index'. + +[source,csharp] +---- +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tag=create-tweet] +---- +<1> Create an instance of the `Tweet` class with relevant properties set. +<2> Prefer the async APIs, which require awaiting the response. +<3> Check the `IsValid` property on the response to confirm that the request and +operation succeeded. +<4> Access the `IndexResponse` properties, such as the ID, if necessary. + +[discrete] +[[getting-net]] +=== Getting a document + +[source,csharp] +---- +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tag=get-tweet] +---- +<1> The `GetResponse` is mapped 1-to-1 with the Elasticsearch JSON response. +<2> The original document is deserialized as an instance of the Tweet class, +accessible on the response via the `Source` property. + + +[discrete] +[[searching-net]] +=== Searching for documents + +The client exposes a fluent interface and a powerful query DSL for searching. + +[source,csharp] +---- +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tag=search-tweet-fluent] +---- +<1> The generic type argument specifies the `Tweet` class, which is used when +deserialising the hits from the response. +<2> The index can be omitted if a `DefaultIndex` has been configured on +`ElasticsearchClientSettings`, or a specific index was configured when mapping +this type. +<3> Execute a term query against the `user` field, searching for tweets authored +by the user 'stevejgordon'. +<4> Documents matched by the query are accessible via the `Documents` collection +property on the `SearchResponse`. + +You may prefer using the object initializer syntax for requests if lambdas +aren't your thing. + +[source,csharp] +---- +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tag=search-tweet-object-initializer] +---- +<1> Create an instance of `SearchRequest`, setting properties to control the +search operation. +<2> Pass the request to the `SearchAsync` method on the client. + +[discrete] +[[updating-net]] +=== Updating documents + +Documents can be updated in several ways, including by providing a complete +replacement for an existing document ID. + +[source,csharp] +---- +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tag=update-tweet] +---- +<1> Update a property on the existing tweet instance. +<2> Send the updated tweet object in the update request. + + +[discrete] +[[deleting-net]] +=== Deleting documents + +Documents can be deleted by providing the ID of the document to remove. + +[source,csharp] +---- +include::{doc-tests-src}/Usage/CrudExamplesTests.cs[tag=delete-tweet] +---- diff --git a/docs/usage/index.asciidoc b/docs/usage/index.asciidoc new file mode 100644 index 00000000000..f4ae4474730 --- /dev/null +++ b/docs/usage/index.asciidoc @@ -0,0 +1,25 @@ +[[usage]] += Using the .NET Client + +[partintro] +The sections below provide tutorials on the most frequently used and some less obvious features of {es}. + +For a full reference, see the {ref}/[Elasticsearch documentation] and in particular the {ref}/rest-apis.html[REST APIs] section. The {net-client} follows closely the JSON structures described there. + +A .NET API reference documentation for the Elasticsearch client package is available https://elastic.github.io/elasticsearch-net[here]. + +If you're new to {es}, make sure also to read {ref}/getting-started.html[Elasticsearch's quick start] that provides a good introduction. + +* <> +* <> +* <> + +NOTE: This is still a work in progress, more sections will be added in the near future. + +include::aggregations.asciidoc[] +include::esql.asciidoc[] +include::examples.asciidoc[] +include::mappings.asciidoc[] +include::query.asciidoc[] +include::recommendations.asciidoc[] +include::transport.asciidoc[] diff --git a/docs/usage/recommendations.asciidoc b/docs/usage/recommendations.asciidoc new file mode 100644 index 00000000000..b7f02a3589c --- /dev/null +++ b/docs/usage/recommendations.asciidoc @@ -0,0 +1,37 @@ +[[recommendations]] +== Usage recommendations + +To achieve the most efficient use of the {net-client}, we recommend following +the guidance defined in this article. + +[discrete] +=== Reuse the same client instance + +When working with the {net-client} we recommend that consumers reuse a single +instance of `ElasticsearchClient` for the entire lifetime of the application. +When reusing the same instance: + +- initialization overhead is limited to the first usage. +- resources such as TCP connections can be pooled and reused to improve +efficiency. +- serialization overhead is reduced, improving performance. + +The `ElasticsearchClient` type is thread-safe and can be shared and reused +across multiple threads in consuming applications. Client reuse can be achieved +by creating a singleton static instance or by registering the type with a +singleton lifetime when using dependency injection containers. + +[discrete] +=== Prefer asynchronous methods + +The {net-client} exposes synchronous and asynchronous methods on the +`ElasticsearchClient`. We recommend always preferring the asynchronous methods, +which have the `Async` suffix. Using the {net-client} requires sending HTTP +requests to {es} servers. Access to {es} is sometimes slow or delayed, and some +complex queries may take several seconds to return. If such operations are +blocked by calling the synchronous methods, the thread must wait until the HTTP +request is complete. In high-load scenarios, this can cause significant thread +usage, potentially affecting the throughput and performance of consuming +applications. By preferring the asynchronous methods, application threads can +continue with other work that doesn't depend on the web resource until the +potentially blocking task completes. \ No newline at end of file diff --git a/docs/reference/transport.md b/docs/usage/transport.asciidoc similarity index 79% rename from docs/reference/transport.md rename to docs/usage/transport.asciidoc index 8af799958ab..3e15fbd0b90 100644 --- a/docs/reference/transport.md +++ b/docs/usage/transport.asciidoc @@ -1,13 +1,10 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/transport.html ---- - -# Transport example [transport] +[[transport]] +== Transport example This page demonstrates how to use the low level transport to send requests. -```csharp +[source,csharp] +---- public class MyRequestParameters : RequestParameters { public bool Pretty @@ -22,7 +19,7 @@ public class MyRequestParameters : RequestParameters var body = """ { "name": "my-api-key", - "expiration": "1d", + "expiration": "1d", "...": "..." } """; @@ -36,7 +33,7 @@ var pathAndQuery = requestParameters.CreatePathWithQueryStrings("/_security/api_ client.ElasticsearchClientSettings); var endpointPath = new EndpointPath(Elastic.Transport.HttpMethod.POST, pathAndQuery); -// Or, if the path does not contain query parameters: +// Or, if the path does not contain query parameters: // new EndpointPath(Elastic.Transport.HttpMethod.POST, "my_path") var response = await client.Transport @@ -47,5 +44,4 @@ var response = await client.Transport null, cancellationToken: default) .ConfigureAwait(false); -``` - +---- diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/DeleteInferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/DeleteInferenceRequest.g.cs new file mode 100644 index 00000000000..b2db5f61ffa --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/DeleteInferenceRequest.g.cs @@ -0,0 +1,133 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Requests; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport; +using Elastic.Transport.Extensions; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Inference; + +public sealed partial class DeleteInferenceRequestParameters : RequestParameters +{ + /// + /// + /// When true, the endpoint is not deleted, and a list of ingest processors which reference this endpoint is returned + /// + /// + public bool? DryRun { get => Q("dry_run"); set => Q("dry_run", value); } + + /// + /// + /// When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields + /// + /// + public bool? Force { get => Q("force"); set => Q("force", value); } +} + +/// +/// +/// Delete an inference endpoint +/// +/// +public sealed partial class DeleteInferenceRequest : PlainRequest +{ + public DeleteInferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Required("inference_id", inferenceId)) + { + } + + public DeleteInferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceDelete; + + protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; + + internal override bool SupportsBody => false; + + internal override string OperationName => "inference.delete"; + + /// + /// + /// When true, the endpoint is not deleted, and a list of ingest processors which reference this endpoint is returned + /// + /// + [JsonIgnore] + public bool? DryRun { get => Q("dry_run"); set => Q("dry_run", value); } + + /// + /// + /// When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields + /// + /// + [JsonIgnore] + public bool? Force { get => Q("force"); set => Q("force", value); } +} + +/// +/// +/// Delete an inference endpoint +/// +/// +public sealed partial class DeleteInferenceRequestDescriptor : RequestDescriptor +{ + internal DeleteInferenceRequestDescriptor(Action configure) => configure.Invoke(this); + + public DeleteInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) + { + } + + public DeleteInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Required("inference_id", inferenceId)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceDelete; + + protected override HttpMethod StaticHttpMethod => HttpMethod.DELETE; + + internal override bool SupportsBody => false; + + internal override string OperationName => "inference.delete"; + + public DeleteInferenceRequestDescriptor DryRun(bool? dryRun = true) => Qs("dry_run", dryRun); + public DeleteInferenceRequestDescriptor Force(bool? force = true) => Qs("force", force); + + public DeleteInferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) + { + RouteValues.Required("inference_id", inferenceId); + return Self; + } + + public DeleteInferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType) + { + RouteValues.Optional("task_type", taskType); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/GetInferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/GetInferenceRequest.g.cs new file mode 100644 index 00000000000..f18bb03711f --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/GetInferenceRequest.g.cs @@ -0,0 +1,105 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Requests; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport; +using Elastic.Transport.Extensions; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Inference; + +public sealed partial class GetInferenceRequestParameters : RequestParameters +{ +} + +/// +/// +/// Get an inference endpoint +/// +/// +public sealed partial class GetInferenceRequest : PlainRequest +{ + public GetInferenceRequest() + { + } + + public GetInferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Id? inferenceId) : base(r => r.Optional("inference_id", inferenceId)) + { + } + + public GetInferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id? inferenceId) : base(r => r.Optional("task_type", taskType).Optional("inference_id", inferenceId)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceGet; + + protected override HttpMethod StaticHttpMethod => HttpMethod.GET; + + internal override bool SupportsBody => false; + + internal override string OperationName => "inference.get"; +} + +/// +/// +/// Get an inference endpoint +/// +/// +public sealed partial class GetInferenceRequestDescriptor : RequestDescriptor +{ + internal GetInferenceRequestDescriptor(Action configure) => configure.Invoke(this); + + public GetInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id? inferenceId) : base(r => r.Optional("task_type", taskType).Optional("inference_id", inferenceId)) + { + } + + public GetInferenceRequestDescriptor() + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceGet; + + protected override HttpMethod StaticHttpMethod => HttpMethod.GET; + + internal override bool SupportsBody => false; + + internal override string OperationName => "inference.get"; + + public GetInferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Serverless.Id? inferenceId) + { + RouteValues.Optional("inference_id", inferenceId); + return Self; + } + + public GetInferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType) + { + RouteValues.Optional("task_type", taskType); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/GetInferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/GetInferenceResponse.g.cs new file mode 100644 index 00000000000..eadcef93ac5 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/GetInferenceResponse.g.cs @@ -0,0 +1,33 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport.Products.Elasticsearch; +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Inference; + +public sealed partial class GetInferenceResponse : ElasticsearchResponse +{ + [JsonInclude, JsonPropertyName("endpoints")] + public IReadOnlyCollection Endpoints { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/InferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/InferenceRequest.g.cs new file mode 100644 index 00000000000..6e94c6b33af --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/InferenceRequest.g.cs @@ -0,0 +1,199 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Requests; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport; +using Elastic.Transport.Extensions; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Inference; + +public sealed partial class InferenceRequestParameters : RequestParameters +{ + /// + /// + /// Specifies the amount of time to wait for the inference request to complete. + /// + /// + public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } +} + +/// +/// +/// Perform inference on the service +/// +/// +public sealed partial class InferenceRequest : PlainRequest +{ + public InferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Required("inference_id", inferenceId)) + { + } + + public InferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceInference; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "inference.inference"; + + /// + /// + /// Specifies the amount of time to wait for the inference request to complete. + /// + /// + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Serverless.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } + + /// + /// + /// Inference input. + /// Either a string or an array of strings. + /// + /// + [JsonInclude, JsonPropertyName("input")] + [SingleOrManyCollectionConverter(typeof(string))] + public ICollection Input { get; set; } + + /// + /// + /// Query input, required for rerank task. + /// Not required for other tasks. + /// + /// + [JsonInclude, JsonPropertyName("query")] + public string? Query { get; set; } + + /// + /// + /// Optional task settings + /// + /// + [JsonInclude, JsonPropertyName("task_settings")] + public object? TaskSettings { get; set; } +} + +/// +/// +/// Perform inference on the service +/// +/// +public sealed partial class InferenceRequestDescriptor : RequestDescriptor +{ + internal InferenceRequestDescriptor(Action configure) => configure.Invoke(this); + + public InferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) + { + } + + public InferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Required("inference_id", inferenceId)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.InferenceInference; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "inference.inference"; + + public InferenceRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Serverless.Duration? timeout) => Qs("timeout", timeout); + + public InferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) + { + RouteValues.Required("inference_id", inferenceId); + return Self; + } + + public InferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType) + { + RouteValues.Optional("task_type", taskType); + return Self; + } + + private ICollection InputValue { get; set; } + private string? QueryValue { get; set; } + private object? TaskSettingsValue { get; set; } + + /// + /// + /// Inference input. + /// Either a string or an array of strings. + /// + /// + public InferenceRequestDescriptor Input(ICollection input) + { + InputValue = input; + return Self; + } + + /// + /// + /// Query input, required for rerank task. + /// Not required for other tasks. + /// + /// + public InferenceRequestDescriptor Query(string? query) + { + QueryValue = query; + return Self; + } + + /// + /// + /// Optional task settings + /// + /// + public InferenceRequestDescriptor TaskSettings(object? taskSettings) + { + TaskSettingsValue = taskSettings; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("input"); + SingleOrManySerializationHelper.Serialize(InputValue, writer, options); + if (!string.IsNullOrEmpty(QueryValue)) + { + writer.WritePropertyName("query"); + writer.WriteStringValue(QueryValue); + } + + if (TaskSettingsValue is not null) + { + writer.WritePropertyName("task_settings"); + JsonSerializer.Serialize(writer, TaskSettingsValue, options); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/InferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/InferenceResponse.g.cs new file mode 100644 index 00000000000..0e2891aecf9 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/InferenceResponse.g.cs @@ -0,0 +1,31 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport.Products.Elasticsearch; +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Inference; + +public sealed partial class InferenceResponse : ElasticsearchResponse +{ +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/PutInferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/PutInferenceRequest.g.cs new file mode 100644 index 00000000000..25fcbef1078 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/PutInferenceRequest.g.cs @@ -0,0 +1,132 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Requests; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport; +using Elastic.Transport.Extensions; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Inference; + +public sealed partial class PutInferenceRequestParameters : RequestParameters +{ +} + +/// +/// +/// Create an inference endpoint +/// +/// +public sealed partial class PutInferenceRequest : PlainRequest, ISelfSerializable +{ + public PutInferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Required("inference_id", inferenceId)) + { + } + + public PutInferenceRequest(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.InferencePut; + + protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; + + internal override bool SupportsBody => true; + + internal override string OperationName => "inference.put"; + + [JsonIgnore] + public Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint InferenceConfig { get; set; } + + void ISelfSerializable.Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + JsonSerializer.Serialize(writer, InferenceConfig, options); + } +} + +/// +/// +/// Create an inference endpoint +/// +/// +public sealed partial class PutInferenceRequestDescriptor : RequestDescriptor +{ + internal PutInferenceRequestDescriptor(Action configure) => configure.Invoke(this); + public PutInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Optional("task_type", taskType).Required("inference_id", inferenceId)) => InferenceConfigValue = inferenceConfig; + public PutInferenceRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) : base(r => r.Required("inference_id", inferenceId)) => InferenceConfigValue = inferenceConfig; + + internal override ApiUrls ApiUrls => ApiUrlLookup.InferencePut; + + protected override HttpMethod StaticHttpMethod => HttpMethod.PUT; + + internal override bool SupportsBody => true; + + internal override string OperationName => "inference.put"; + + public PutInferenceRequestDescriptor InferenceId(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId) + { + RouteValues.Required("inference_id", inferenceId); + return Self; + } + + public PutInferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType) + { + RouteValues.Optional("task_type", taskType); + return Self; + } + + private Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint InferenceConfigValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpointDescriptor InferenceConfigDescriptor { get; set; } + private Action InferenceConfigDescriptorAction { get; set; } + + public PutInferenceRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint inferenceConfig) + { + InferenceConfigDescriptor = null; + InferenceConfigDescriptorAction = null; + InferenceConfigValue = inferenceConfig; + return Self; + } + + public PutInferenceRequestDescriptor InferenceConfig(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpointDescriptor descriptor) + { + InferenceConfigValue = null; + InferenceConfigDescriptorAction = null; + InferenceConfigDescriptor = descriptor; + return Self; + } + + public PutInferenceRequestDescriptor InferenceConfig(Action configure) + { + InferenceConfigValue = null; + InferenceConfigDescriptor = null; + InferenceConfigDescriptorAction = configure; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + JsonSerializer.Serialize(writer, InferenceConfigValue, options); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/PutInferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/PutInferenceResponse.g.cs new file mode 100644 index 00000000000..88c831242f4 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/Inference/PutInferenceResponse.g.cs @@ -0,0 +1,70 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport.Products.Elasticsearch; +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Inference; + +public sealed partial class PutInferenceResponse : ElasticsearchResponse +{ + /// + /// + /// The inference Id + /// + /// + [JsonInclude, JsonPropertyName("inference_id")] + public string InferenceId { get; init; } + + /// + /// + /// The service type + /// + /// + [JsonInclude, JsonPropertyName("service")] + public string Service { get; init; } + + /// + /// + /// Settings specific to the service + /// + /// + [JsonInclude, JsonPropertyName("service_settings")] + public object ServiceSettings { get; init; } + + /// + /// + /// Task settings specific to the service and task type + /// + /// + [JsonInclude, JsonPropertyName("task_settings")] + public object? TaskSettings { get; init; } + + /// + /// + /// The task type + /// + /// + [JsonInclude, JsonPropertyName("task_type")] + public Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType TaskType { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/TestRequest.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/TestRequest.g.cs new file mode 100644 index 00000000000..d29a8177928 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/TestRequest.g.cs @@ -0,0 +1,102 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Requests; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport; +using Elastic.Transport.Extensions; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; + +public sealed partial class TestRequestParameters : RequestParameters +{ +} + +/// +/// +/// Creates or updates a query ruleset. +/// +/// +public sealed partial class TestRequest : PlainRequest +{ + public TestRequest(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) : base(r => r.Required("ruleset_id", rulesetId)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesTest; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "query_rules.test"; + + [JsonInclude, JsonPropertyName("match_criteria")] + public IDictionary MatchCriteria { get; set; } +} + +/// +/// +/// Creates or updates a query ruleset. +/// +/// +public sealed partial class TestRequestDescriptor : RequestDescriptor +{ + internal TestRequestDescriptor(Action configure) => configure.Invoke(this); + + public TestRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) : base(r => r.Required("ruleset_id", rulesetId)) + { + } + + internal override ApiUrls ApiUrls => ApiUrlLookup.QueryRulesTest; + + protected override HttpMethod StaticHttpMethod => HttpMethod.POST; + + internal override bool SupportsBody => true; + + internal override string OperationName => "query_rules.test"; + + public TestRequestDescriptor RulesetId(Elastic.Clients.Elasticsearch.Serverless.Id rulesetId) + { + RouteValues.Required("ruleset_id", rulesetId); + return Self; + } + + private IDictionary MatchCriteriaValue { get; set; } + + public TestRequestDescriptor MatchCriteria(Func, FluentDictionary> selector) + { + MatchCriteriaValue = selector?.Invoke(new FluentDictionary()); + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("match_criteria"); + JsonSerializer.Serialize(writer, MatchCriteriaValue, options); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/TestResponse.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/TestResponse.g.cs new file mode 100644 index 00000000000..f2999d2d408 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/QueryRules/TestResponse.g.cs @@ -0,0 +1,35 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport.Products.Elasticsearch; +using System; +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.QueryRules; + +public sealed partial class TestResponse : ElasticsearchResponse +{ + [JsonInclude, JsonPropertyName("matched_rules")] + public IReadOnlyCollection MatchedRules { get; init; } + [JsonInclude, JsonPropertyName("total_matched_rules")] + public int TotalMatchedRules { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Inference.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Inference.g.cs new file mode 100644 index 00000000000..1ff6bc4c390 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Client/ElasticsearchClient.Inference.g.cs @@ -0,0 +1,353 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +namespace Elastic.Clients.Elasticsearch.Serverless.Inference; + +public partial class InferenceNamespacedClient : NamespacedClientProxy +{ + /// + /// + /// Initializes a new instance of the class for mocking. + /// + /// + protected InferenceNamespacedClient() : base() + { + } + + internal InferenceNamespacedClient(ElasticsearchClient client) : base(client) + { + } + + /// + /// + /// Delete an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(DeleteInferenceRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Delete an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(DeleteInferenceRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Delete an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteInferenceRequestDescriptor(taskType, inferenceId); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Delete an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteInferenceRequestDescriptor(taskType, inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Delete an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteInferenceRequestDescriptor(inferenceId); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Delete an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task DeleteAsync(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new DeleteInferenceRequestDescriptor(inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetAsync(GetInferenceRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Get an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetAsync(GetInferenceRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id? inferenceId, CancellationToken cancellationToken = default) + { + var descriptor = new GetInferenceRequestDescriptor(taskType, inferenceId); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id? inferenceId, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetInferenceRequestDescriptor(taskType, inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetAsync(CancellationToken cancellationToken = default) + { + var descriptor = new GetInferenceRequestDescriptor(); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Get an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task GetAsync(Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new GetInferenceRequestDescriptor(); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Perform inference on the service + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task InferenceAsync(InferenceRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Perform inference on the service + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task InferenceAsync(InferenceRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Perform inference on the service + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task InferenceAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, CancellationToken cancellationToken = default) + { + var descriptor = new InferenceRequestDescriptor(taskType, inferenceId); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Perform inference on the service + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task InferenceAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new InferenceRequestDescriptor(taskType, inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Perform inference on the service + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task InferenceAsync(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, CancellationToken cancellationToken = default) + { + var descriptor = new InferenceRequestDescriptor(inferenceId); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Perform inference on the service + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task InferenceAsync(Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new InferenceRequestDescriptor(inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutAsync(PutInferenceRequest request, CancellationToken cancellationToken = default) + { + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + /// + /// + /// Create an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutAsync(PutInferenceRequestDescriptor descriptor, CancellationToken cancellationToken = default) + { + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, CancellationToken cancellationToken = default) + { + var descriptor = new PutInferenceRequestDescriptor(inferenceConfig, taskType, inferenceId); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType? taskType, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new PutInferenceRequestDescriptor(inferenceConfig, taskType, inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, CancellationToken cancellationToken = default) + { + var descriptor = new PutInferenceRequestDescriptor(inferenceConfig, inferenceId); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } + + /// + /// + /// Create an inference endpoint + /// + /// Learn more about this API in the Elasticsearch documentation. + /// + public virtual Task PutAsync(Elastic.Clients.Elasticsearch.Serverless.Inference.InferenceEndpoint inferenceConfig, Elastic.Clients.Elasticsearch.Serverless.Id inferenceId, Action configureRequest, CancellationToken cancellationToken = default) + { + var descriptor = new PutInferenceRequestDescriptor(inferenceConfig, inferenceId); + configureRequest?.Invoke(descriptor); + descriptor.BeforeRequest(); + return DoRequestAsync(descriptor, cancellationToken); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ClassicTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ClassicTokenizer.g.cs new file mode 100644 index 00000000000..dd3cd63d201 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ClassicTokenizer.g.cs @@ -0,0 +1,90 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; + +public sealed partial class ClassicTokenizer : ITokenizer +{ + [JsonInclude, JsonPropertyName("max_token_length")] + public int? MaxTokenLength { get; set; } + + [JsonInclude, JsonPropertyName("type")] + public string Type => "classic"; + + [JsonInclude, JsonPropertyName("version")] + public string? Version { get; set; } +} + +public sealed partial class ClassicTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal ClassicTokenizerDescriptor(Action configure) => configure.Invoke(this); + + public ClassicTokenizerDescriptor() : base() + { + } + + private int? MaxTokenLengthValue { get; set; } + private string? VersionValue { get; set; } + + public ClassicTokenizerDescriptor MaxTokenLength(int? maxTokenLength) + { + MaxTokenLengthValue = maxTokenLength; + return Self; + } + + public ClassicTokenizerDescriptor Version(string? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (MaxTokenLengthValue.HasValue) + { + writer.WritePropertyName("max_token_length"); + writer.WriteNumberValue(MaxTokenLengthValue.Value); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("classic"); + if (!string.IsNullOrEmpty(VersionValue)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(VersionValue); + } + + writer.WriteEndObject(); + } + + ClassicTokenizer IBuildableDescriptor.Build() => new() + { + MaxTokenLength = MaxTokenLengthValue, + Version = VersionValue + }; +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs new file mode 100644 index 00000000000..7953d768925 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternSplitTokenizer.g.cs @@ -0,0 +1,90 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; + +public sealed partial class SimplePatternSplitTokenizer : ITokenizer +{ + [JsonInclude, JsonPropertyName("pattern")] + public string? Pattern { get; set; } + + [JsonInclude, JsonPropertyName("type")] + public string Type => "simple_pattern_split"; + + [JsonInclude, JsonPropertyName("version")] + public string? Version { get; set; } +} + +public sealed partial class SimplePatternSplitTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal SimplePatternSplitTokenizerDescriptor(Action configure) => configure.Invoke(this); + + public SimplePatternSplitTokenizerDescriptor() : base() + { + } + + private string? PatternValue { get; set; } + private string? VersionValue { get; set; } + + public SimplePatternSplitTokenizerDescriptor Pattern(string? pattern) + { + PatternValue = pattern; + return Self; + } + + public SimplePatternSplitTokenizerDescriptor Version(string? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (!string.IsNullOrEmpty(PatternValue)) + { + writer.WritePropertyName("pattern"); + writer.WriteStringValue(PatternValue); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("simple_pattern_split"); + if (!string.IsNullOrEmpty(VersionValue)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(VersionValue); + } + + writer.WriteEndObject(); + } + + SimplePatternSplitTokenizer IBuildableDescriptor.Build() => new() + { + Pattern = PatternValue, + Version = VersionValue + }; +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs new file mode 100644 index 00000000000..922ae85dd8e --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/SimplePatternTokenizer.g.cs @@ -0,0 +1,90 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; + +public sealed partial class SimplePatternTokenizer : ITokenizer +{ + [JsonInclude, JsonPropertyName("pattern")] + public string? Pattern { get; set; } + + [JsonInclude, JsonPropertyName("type")] + public string Type => "simple_pattern"; + + [JsonInclude, JsonPropertyName("version")] + public string? Version { get; set; } +} + +public sealed partial class SimplePatternTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal SimplePatternTokenizerDescriptor(Action configure) => configure.Invoke(this); + + public SimplePatternTokenizerDescriptor() : base() + { + } + + private string? PatternValue { get; set; } + private string? VersionValue { get; set; } + + public SimplePatternTokenizerDescriptor Pattern(string? pattern) + { + PatternValue = pattern; + return Self; + } + + public SimplePatternTokenizerDescriptor Version(string? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (!string.IsNullOrEmpty(PatternValue)) + { + writer.WritePropertyName("pattern"); + writer.WriteStringValue(PatternValue); + } + + writer.WritePropertyName("type"); + writer.WriteStringValue("simple_pattern"); + if (!string.IsNullOrEmpty(VersionValue)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(VersionValue); + } + + writer.WriteEndObject(); + } + + SimplePatternTokenizer IBuildableDescriptor.Build() => new() + { + Pattern = PatternValue, + Version = VersionValue + }; +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiTokenizer.g.cs new file mode 100644 index 00000000000..3d31fe4eadc --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Analysis/ThaiTokenizer.g.cs @@ -0,0 +1,73 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Analysis; + +public sealed partial class ThaiTokenizer : ITokenizer +{ + [JsonInclude, JsonPropertyName("type")] + public string Type => "thai"; + + [JsonInclude, JsonPropertyName("version")] + public string? Version { get; set; } +} + +public sealed partial class ThaiTokenizerDescriptor : SerializableDescriptor, IBuildableDescriptor +{ + internal ThaiTokenizerDescriptor(Action configure) => configure.Invoke(this); + + public ThaiTokenizerDescriptor() : base() + { + } + + private string? VersionValue { get; set; } + + public ThaiTokenizerDescriptor Version(string? version) + { + VersionValue = version; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"); + writer.WriteStringValue("thai"); + if (!string.IsNullOrEmpty(VersionValue)) + { + writer.WritePropertyName("version"); + writer.WriteStringValue(VersionValue); + } + + writer.WriteEndObject(); + } + + ThaiTokenizer IBuildableDescriptor.Build() => new() + { + Version = VersionValue + }; +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsKnnProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsKnnProfile.g.cs new file mode 100644 index 00000000000..e530248121d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsKnnProfile.g.cs @@ -0,0 +1,40 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; + +public sealed partial class DfsKnnProfile +{ + [JsonInclude, JsonPropertyName("collector")] + public IReadOnlyCollection Collector { get; init; } + [JsonInclude, JsonPropertyName("query")] + public IReadOnlyCollection Query { get; init; } + [JsonInclude, JsonPropertyName("rewrite_time")] + public long RewriteTime { get; init; } + [JsonInclude, JsonPropertyName("vector_operations_count")] + public long? VectorOperationsCount { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsProfile.g.cs new file mode 100644 index 00000000000..9382b2458b4 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsProfile.g.cs @@ -0,0 +1,36 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; + +public sealed partial class DfsProfile +{ + [JsonInclude, JsonPropertyName("knn")] + public IReadOnlyCollection? Knn { get; init; } + [JsonInclude, JsonPropertyName("statistics")] + public Elastic.Clients.Elasticsearch.Serverless.Core.Search.DfsStatisticsProfile? Statistics { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs new file mode 100644 index 00000000000..c1e450ddf09 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsBreakdown.g.cs @@ -0,0 +1,48 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; + +public sealed partial class DfsStatisticsBreakdown +{ + [JsonInclude, JsonPropertyName("collection_statistics")] + public long CollectionStatistics { get; init; } + [JsonInclude, JsonPropertyName("collection_statistics_count")] + public long CollectionStatisticsCount { get; init; } + [JsonInclude, JsonPropertyName("create_weight")] + public long CreateWeight { get; init; } + [JsonInclude, JsonPropertyName("create_weight_count")] + public long CreateWeightCount { get; init; } + [JsonInclude, JsonPropertyName("rewrite")] + public long Rewrite { get; init; } + [JsonInclude, JsonPropertyName("rewrite_count")] + public long RewriteCount { get; init; } + [JsonInclude, JsonPropertyName("term_statistics")] + public long TermStatistics { get; init; } + [JsonInclude, JsonPropertyName("term_statistics_count")] + public long TermStatisticsCount { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs new file mode 100644 index 00000000000..45ca7daa2a6 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/DfsStatisticsProfile.g.cs @@ -0,0 +1,46 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; + +public sealed partial class DfsStatisticsProfile +{ + [JsonInclude, JsonPropertyName("breakdown")] + public Elastic.Clients.Elasticsearch.Serverless.Core.Search.DfsStatisticsBreakdown Breakdown { get; init; } + [JsonInclude, JsonPropertyName("children")] + public IReadOnlyCollection? Children { get; init; } + [JsonInclude, JsonPropertyName("debug")] + public IReadOnlyDictionary? Debug { get; init; } + [JsonInclude, JsonPropertyName("description")] + public string Description { get; init; } + [JsonInclude, JsonPropertyName("time")] + public Elastic.Clients.Elasticsearch.Serverless.Duration? Time { get; init; } + [JsonInclude, JsonPropertyName("time_in_nanos")] + public long TimeInNanos { get; init; } + [JsonInclude, JsonPropertyName("type")] + public string Type { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnCollectorResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnCollectorResult.g.cs new file mode 100644 index 00000000000..d75e41dce07 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnCollectorResult.g.cs @@ -0,0 +1,42 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; + +public sealed partial class KnnCollectorResult +{ + [JsonInclude, JsonPropertyName("children")] + public IReadOnlyCollection? Children { get; init; } + [JsonInclude, JsonPropertyName("name")] + public string Name { get; init; } + [JsonInclude, JsonPropertyName("reason")] + public string Reason { get; init; } + [JsonInclude, JsonPropertyName("time")] + public Elastic.Clients.Elasticsearch.Serverless.Duration? Time { get; init; } + [JsonInclude, JsonPropertyName("time_in_nanos")] + public long TimeInNanos { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs new file mode 100644 index 00000000000..1cd52e5c480 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileBreakdown.g.cs @@ -0,0 +1,72 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; + +public sealed partial class KnnQueryProfileBreakdown +{ + [JsonInclude, JsonPropertyName("advance")] + public long Advance { get; init; } + [JsonInclude, JsonPropertyName("advance_count")] + public long AdvanceCount { get; init; } + [JsonInclude, JsonPropertyName("build_scorer")] + public long BuildScorer { get; init; } + [JsonInclude, JsonPropertyName("build_scorer_count")] + public long BuildScorerCount { get; init; } + [JsonInclude, JsonPropertyName("compute_max_score")] + public long ComputeMaxScore { get; init; } + [JsonInclude, JsonPropertyName("compute_max_score_count")] + public long ComputeMaxScoreCount { get; init; } + [JsonInclude, JsonPropertyName("count_weight")] + public long CountWeight { get; init; } + [JsonInclude, JsonPropertyName("count_weight_count")] + public long CountWeightCount { get; init; } + [JsonInclude, JsonPropertyName("create_weight")] + public long CreateWeight { get; init; } + [JsonInclude, JsonPropertyName("create_weight_count")] + public long CreateWeightCount { get; init; } + [JsonInclude, JsonPropertyName("match")] + public long Match { get; init; } + [JsonInclude, JsonPropertyName("match_count")] + public long MatchCount { get; init; } + [JsonInclude, JsonPropertyName("next_doc")] + public long NextDoc { get; init; } + [JsonInclude, JsonPropertyName("next_doc_count")] + public long NextDocCount { get; init; } + [JsonInclude, JsonPropertyName("score")] + public long Score { get; init; } + [JsonInclude, JsonPropertyName("score_count")] + public long ScoreCount { get; init; } + [JsonInclude, JsonPropertyName("set_min_competitive_score")] + public long SetMinCompetitiveScore { get; init; } + [JsonInclude, JsonPropertyName("set_min_competitive_score_count")] + public long SetMinCompetitiveScoreCount { get; init; } + [JsonInclude, JsonPropertyName("shallow_advance")] + public long ShallowAdvance { get; init; } + [JsonInclude, JsonPropertyName("shallow_advance_count")] + public long ShallowAdvanceCount { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs new file mode 100644 index 00000000000..cc0b60423d2 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Search/KnnQueryProfileResult.g.cs @@ -0,0 +1,46 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search; + +public sealed partial class KnnQueryProfileResult +{ + [JsonInclude, JsonPropertyName("breakdown")] + public Elastic.Clients.Elasticsearch.Serverless.Core.Search.KnnQueryProfileBreakdown Breakdown { get; init; } + [JsonInclude, JsonPropertyName("children")] + public IReadOnlyCollection? Children { get; init; } + [JsonInclude, JsonPropertyName("debug")] + public IReadOnlyDictionary? Debug { get; init; } + [JsonInclude, JsonPropertyName("description")] + public string Description { get; init; } + [JsonInclude, JsonPropertyName("time")] + public Elastic.Clients.Elasticsearch.Serverless.Duration? Time { get; init; } + [JsonInclude, JsonPropertyName("time_in_nanos")] + public long TimeInNanos { get; init; } + [JsonInclude, JsonPropertyName("type")] + public string Type { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Esql.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Esql.g.cs new file mode 100644 index 00000000000..9f3b55c714b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Esql.g.cs @@ -0,0 +1,113 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Core; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport; +using System; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Esql; + +[JsonConverter(typeof(EsqlFormatConverter))] +public enum EsqlFormat +{ + [EnumMember(Value = "yaml")] + Yaml, + [EnumMember(Value = "txt")] + Txt, + [EnumMember(Value = "tsv")] + Tsv, + [EnumMember(Value = "smile")] + Smile, + [EnumMember(Value = "json")] + Json, + [EnumMember(Value = "csv")] + Csv, + [EnumMember(Value = "cbor")] + Cbor, + [EnumMember(Value = "arrow")] + Arrow +} + +internal sealed class EsqlFormatConverter : JsonConverter +{ + public override EsqlFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "yaml": + return EsqlFormat.Yaml; + case "txt": + return EsqlFormat.Txt; + case "tsv": + return EsqlFormat.Tsv; + case "smile": + return EsqlFormat.Smile; + case "json": + return EsqlFormat.Json; + case "csv": + return EsqlFormat.Csv; + case "cbor": + return EsqlFormat.Cbor; + case "arrow": + return EsqlFormat.Arrow; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, EsqlFormat value, JsonSerializerOptions options) + { + switch (value) + { + case EsqlFormat.Yaml: + writer.WriteStringValue("yaml"); + return; + case EsqlFormat.Txt: + writer.WriteStringValue("txt"); + return; + case EsqlFormat.Tsv: + writer.WriteStringValue("tsv"); + return; + case EsqlFormat.Smile: + writer.WriteStringValue("smile"); + return; + case EsqlFormat.Json: + writer.WriteStringValue("json"); + return; + case EsqlFormat.Csv: + writer.WriteStringValue("csv"); + return; + case EsqlFormat.Cbor: + writer.WriteStringValue("cbor"); + return; + case EsqlFormat.Arrow: + writer.WriteStringValue("arrow"); + return; + } + + writer.WriteNullValue(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Inference.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Inference.g.cs new file mode 100644 index 00000000000..2a4deee6213 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Inference.g.cs @@ -0,0 +1,85 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Core; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport; +using System; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Inference; + +[JsonConverter(typeof(TaskTypeConverter))] +public enum TaskType +{ + [EnumMember(Value = "text_embedding")] + TextEmbedding, + [EnumMember(Value = "sparse_embedding")] + SparseEmbedding, + [EnumMember(Value = "rerank")] + Rerank, + [EnumMember(Value = "completion")] + Completion +} + +internal sealed class TaskTypeConverter : JsonConverter +{ + public override TaskType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "text_embedding": + return TaskType.TextEmbedding; + case "sparse_embedding": + return TaskType.SparseEmbedding; + case "rerank": + return TaskType.Rerank; + case "completion": + return TaskType.Completion; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, TaskType value, JsonSerializerOptions options) + { + switch (value) + { + case TaskType.TextEmbedding: + writer.WriteStringValue("text_embedding"); + return; + case TaskType.SparseEmbedding: + writer.WriteStringValue("sparse_embedding"); + return; + case TaskType.Rerank: + writer.WriteStringValue("rerank"); + return; + case TaskType.Completion: + writer.WriteStringValue("completion"); + return; + } + + writer.WriteNullValue(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Sql.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Sql.g.cs new file mode 100644 index 00000000000..4cdbebbc92a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Sql.g.cs @@ -0,0 +1,106 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Core; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport; +using System; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Sql; + +[JsonConverter(typeof(SqlFormatConverter))] +public enum SqlFormat +{ + [EnumMember(Value = "yaml")] + Yaml, + [EnumMember(Value = "txt")] + Txt, + [EnumMember(Value = "tsv")] + Tsv, + [EnumMember(Value = "smile")] + Smile, + [EnumMember(Value = "json")] + Json, + [EnumMember(Value = "csv")] + Csv, + [EnumMember(Value = "cbor")] + Cbor +} + +internal sealed class SqlFormatConverter : JsonConverter +{ + public override SqlFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "yaml": + return SqlFormat.Yaml; + case "txt": + return SqlFormat.Txt; + case "tsv": + return SqlFormat.Tsv; + case "smile": + return SqlFormat.Smile; + case "json": + return SqlFormat.Json; + case "csv": + return SqlFormat.Csv; + case "cbor": + return SqlFormat.Cbor; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, SqlFormat value, JsonSerializerOptions options) + { + switch (value) + { + case SqlFormat.Yaml: + writer.WriteStringValue("yaml"); + return; + case SqlFormat.Txt: + writer.WriteStringValue("txt"); + return; + case SqlFormat.Tsv: + writer.WriteStringValue("tsv"); + return; + case SqlFormat.Smile: + writer.WriteStringValue("smile"); + return; + case SqlFormat.Json: + writer.WriteStringValue("json"); + return; + case SqlFormat.Csv: + writer.WriteStringValue("csv"); + return; + case SqlFormat.Cbor: + writer.WriteStringValue("cbor"); + return; + } + + writer.WriteNullValue(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Xpack.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Xpack.g.cs new file mode 100644 index 00000000000..e217b5508b1 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Enums/Enums.Xpack.g.cs @@ -0,0 +1,78 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Core; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using Elastic.Transport; +using System; +using System.Runtime.Serialization; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Xpack; + +[JsonConverter(typeof(XPackCategoryConverter))] +public enum XPackCategory +{ + [EnumMember(Value = "license")] + License, + [EnumMember(Value = "features")] + Features, + [EnumMember(Value = "build")] + Build +} + +internal sealed class XPackCategoryConverter : JsonConverter +{ + public override XPackCategory Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + var enumString = reader.GetString(); + switch (enumString) + { + case "license": + return XPackCategory.License; + case "features": + return XPackCategory.Features; + case "build": + return XPackCategory.Build; + } + + ThrowHelper.ThrowJsonException(); + return default; + } + + public override void Write(Utf8JsonWriter writer, XPackCategory value, JsonSerializerOptions options) + { + switch (value) + { + case XPackCategory.License: + writer.WriteStringValue("license"); + return; + case XPackCategory.Features: + writer.WriteStringValue("features"); + return; + case XPackCategory.Build: + writer.WriteStringValue("build"); + return; + } + + writer.WriteNullValue(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Inference/InferenceEndpoint.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Inference/InferenceEndpoint.g.cs new file mode 100644 index 00000000000..3f8912a1069 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Inference/InferenceEndpoint.g.cs @@ -0,0 +1,127 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Inference; + +/// +/// +/// Configuration options when storing the inference endpoint +/// +/// +public sealed partial class InferenceEndpoint +{ + /// + /// + /// The service type + /// + /// + [JsonInclude, JsonPropertyName("service")] + public string Service { get; set; } + + /// + /// + /// Settings specific to the service + /// + /// + [JsonInclude, JsonPropertyName("service_settings")] + public object ServiceSettings { get; set; } + + /// + /// + /// Task settings specific to the service and task type + /// + /// + [JsonInclude, JsonPropertyName("task_settings")] + public object? TaskSettings { get; set; } +} + +/// +/// +/// Configuration options when storing the inference endpoint +/// +/// +public sealed partial class InferenceEndpointDescriptor : SerializableDescriptor +{ + internal InferenceEndpointDescriptor(Action configure) => configure.Invoke(this); + + public InferenceEndpointDescriptor() : base() + { + } + + private string ServiceValue { get; set; } + private object ServiceSettingsValue { get; set; } + private object? TaskSettingsValue { get; set; } + + /// + /// + /// The service type + /// + /// + public InferenceEndpointDescriptor Service(string service) + { + ServiceValue = service; + return Self; + } + + /// + /// + /// Settings specific to the service + /// + /// + public InferenceEndpointDescriptor ServiceSettings(object serviceSettings) + { + ServiceSettingsValue = serviceSettings; + return Self; + } + + /// + /// + /// Task settings specific to the service and task type + /// + /// + public InferenceEndpointDescriptor TaskSettings(object? taskSettings) + { + TaskSettingsValue = taskSettings; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("service"); + writer.WriteStringValue(ServiceValue); + writer.WritePropertyName("service_settings"); + JsonSerializer.Serialize(writer, ServiceSettingsValue, options); + if (TaskSettingsValue is not null) + { + writer.WritePropertyName("task_settings"); + JsonSerializer.Serialize(writer, TaskSettingsValue, options); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Inference/InferenceEndpointInfo.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Inference/InferenceEndpointInfo.g.cs new file mode 100644 index 00000000000..aee66bad661 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Inference/InferenceEndpointInfo.g.cs @@ -0,0 +1,76 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Inference; + +/// +/// +/// Represents an inference endpoint as returned by the GET API +/// +/// +public sealed partial class InferenceEndpointInfo +{ + /// + /// + /// The inference Id + /// + /// + [JsonInclude, JsonPropertyName("inference_id")] + public string InferenceId { get; init; } + + /// + /// + /// The service type + /// + /// + [JsonInclude, JsonPropertyName("service")] + public string Service { get; init; } + + /// + /// + /// Settings specific to the service + /// + /// + [JsonInclude, JsonPropertyName("service_settings")] + public object ServiceSettings { get; init; } + + /// + /// + /// Task settings specific to the service and task type + /// + /// + [JsonInclude, JsonPropertyName("task_settings")] + public object? TaskSettings { get; init; } + + /// + /// + /// The task type + /// + /// + [JsonInclude, JsonPropertyName("task_type")] + public Elastic.Clients.Elasticsearch.Serverless.Inference.TaskType TaskType { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestStats.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestStats.g.cs new file mode 100644 index 00000000000..14f02675ad2 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/IngestStats.g.cs @@ -0,0 +1,92 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; + +public sealed partial class IngestStats +{ + /// + /// + /// Total number of documents ingested during the lifetime of this node. + /// + /// + [JsonInclude, JsonPropertyName("count")] + public long Count { get; init; } + + /// + /// + /// Total number of documents currently being ingested. + /// + /// + [JsonInclude, JsonPropertyName("current")] + public long Current { get; init; } + + /// + /// + /// Total number of failed ingest operations during the lifetime of this node. + /// + /// + [JsonInclude, JsonPropertyName("failed")] + public long Failed { get; init; } + + /// + /// + /// Total number of bytes of all documents ingested by the pipeline. + /// This field is only present on pipelines which are the first to process a document. + /// Thus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors. + /// + /// + [JsonInclude, JsonPropertyName("ingested_as_first_pipeline_in_bytes")] + public long IngestedAsFirstPipelineInBytes { get; init; } + + /// + /// + /// Total number of ingest processors. + /// + /// + [JsonInclude, JsonPropertyName("processors")] + public IReadOnlyCollection> Processors { get; init; } + + /// + /// + /// Total number of bytes of all documents produced by the pipeline. + /// This field is only present on pipelines which are the first to process a document. + /// Thus, it is not present on pipelines which only serve as a final pipeline after a default pipeline, a pipeline run after a reroute processor, or pipelines in pipeline processors. + /// In situations where there are subsequent pipelines, the value represents the size of the document after all pipelines have run. + /// + /// + [JsonInclude, JsonPropertyName("produced_as_first_pipeline_in_bytes")] + public long ProducedAsFirstPipelineInBytes { get; init; } + + /// + /// + /// Total time, in milliseconds, spent preprocessing ingest documents during the lifetime of this node. + /// + /// + [JsonInclude, JsonPropertyName("time_in_millis")] + public long TimeInMillis { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs new file mode 100644 index 00000000000..0d47e32199a --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs @@ -0,0 +1,34 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Nodes; + +public sealed partial class NodeInfoXpackMl +{ + [JsonInclude, JsonPropertyName("use_auto_machine_memory_percent")] + public bool? UseAutoMachineMemoryPercent { get; init; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RuleRetriever.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RuleRetriever.g.cs new file mode 100644 index 00000000000..d4b7c4c0874 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/RuleRetriever.g.cs @@ -0,0 +1,486 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless; + +public sealed partial class RuleRetriever +{ + /// + /// + /// Query to filter the documents that can match. + /// + /// + [JsonInclude, JsonPropertyName("filter")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] + public ICollection? Filter { get; set; } + + /// + /// + /// The match criteria that will determine if a rule in the provided rulesets should be applied. + /// + /// + [JsonInclude, JsonPropertyName("match_criteria")] + public object MatchCriteria { get; set; } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + [JsonInclude, JsonPropertyName("min_score")] + public float? MinScore { get; set; } + + /// + /// + /// This value determines the size of the individual result set. + /// + /// + [JsonInclude, JsonPropertyName("rank_window_size")] + public int? RankWindowSize { get; set; } + + /// + /// + /// The retriever whose results rules should be applied to. + /// + /// + [JsonInclude, JsonPropertyName("retriever")] + public Elastic.Clients.Elasticsearch.Serverless.Retriever Retriever { get; set; } + + /// + /// + /// The ruleset IDs containing the rules this retriever is evaluating against. + /// + /// + [JsonInclude, JsonPropertyName("ruleset_ids")] + public ICollection RulesetIds { get; set; } + + public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Retriever(RuleRetriever ruleRetriever) => Elastic.Clients.Elasticsearch.Serverless.Retriever.Rule(ruleRetriever); +} + +public sealed partial class RuleRetrieverDescriptor : SerializableDescriptor> +{ + internal RuleRetrieverDescriptor(Action> configure) => configure.Invoke(this); + + public RuleRetrieverDescriptor() : base() + { + } + + private ICollection? FilterValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action> FilterDescriptorAction { get; set; } + private Action>[] FilterDescriptorActions { get; set; } + private object MatchCriteriaValue { get; set; } + private float? MinScoreValue { get; set; } + private int? RankWindowSizeValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Retriever RetrieverValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor RetrieverDescriptor { get; set; } + private Action> RetrieverDescriptorAction { get; set; } + private ICollection RulesetIdsValue { get; set; } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public RuleRetrieverDescriptor Filter(ICollection? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterValue = filter; + return Self; + } + + public RuleRetrieverDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterDescriptor = descriptor; + return Self; + } + + public RuleRetrieverDescriptor Filter(Action> configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorActions = null; + FilterDescriptorAction = configure; + return Self; + } + + public RuleRetrieverDescriptor Filter(params Action>[] configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = configure; + return Self; + } + + /// + /// + /// The match criteria that will determine if a rule in the provided rulesets should be applied. + /// + /// + public RuleRetrieverDescriptor MatchCriteria(object matchCriteria) + { + MatchCriteriaValue = matchCriteria; + return Self; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public RuleRetrieverDescriptor MinScore(float? minScore) + { + MinScoreValue = minScore; + return Self; + } + + /// + /// + /// This value determines the size of the individual result set. + /// + /// + public RuleRetrieverDescriptor RankWindowSize(int? rankWindowSize) + { + RankWindowSizeValue = rankWindowSize; + return Self; + } + + /// + /// + /// The retriever whose results rules should be applied to. + /// + /// + public RuleRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.Retriever retriever) + { + RetrieverDescriptor = null; + RetrieverDescriptorAction = null; + RetrieverValue = retriever; + return Self; + } + + public RuleRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor descriptor) + { + RetrieverValue = null; + RetrieverDescriptorAction = null; + RetrieverDescriptor = descriptor; + return Self; + } + + public RuleRetrieverDescriptor Retriever(Action> configure) + { + RetrieverValue = null; + RetrieverDescriptor = null; + RetrieverDescriptorAction = configure; + return Self; + } + + /// + /// + /// The ruleset IDs containing the rules this retriever is evaluating against. + /// + /// + public RuleRetrieverDescriptor RulesetIds(ICollection rulesetIds) + { + RulesetIdsValue = rulesetIds; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); + } + else if (FilterDescriptorActions is not null) + { + writer.WritePropertyName("filter"); + if (FilterDescriptorActions.Length != 1) + writer.WriteStartArray(); + foreach (var action in FilterDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); + } + + if (FilterDescriptorActions.Length != 1) + writer.WriteEndArray(); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); + } + + writer.WritePropertyName("match_criteria"); + JsonSerializer.Serialize(writer, MatchCriteriaValue, options); + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (RankWindowSizeValue.HasValue) + { + writer.WritePropertyName("rank_window_size"); + writer.WriteNumberValue(RankWindowSizeValue.Value); + } + + if (RetrieverDescriptor is not null) + { + writer.WritePropertyName("retriever"); + JsonSerializer.Serialize(writer, RetrieverDescriptor, options); + } + else if (RetrieverDescriptorAction is not null) + { + writer.WritePropertyName("retriever"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(RetrieverDescriptorAction), options); + } + else + { + writer.WritePropertyName("retriever"); + JsonSerializer.Serialize(writer, RetrieverValue, options); + } + + writer.WritePropertyName("ruleset_ids"); + JsonSerializer.Serialize(writer, RulesetIdsValue, options); + writer.WriteEndObject(); + } +} + +public sealed partial class RuleRetrieverDescriptor : SerializableDescriptor +{ + internal RuleRetrieverDescriptor(Action configure) => configure.Invoke(this); + + public RuleRetrieverDescriptor() : base() + { + } + + private ICollection? FilterValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } + private Action[] FilterDescriptorActions { get; set; } + private object MatchCriteriaValue { get; set; } + private float? MinScoreValue { get; set; } + private int? RankWindowSizeValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Retriever RetrieverValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor RetrieverDescriptor { get; set; } + private Action RetrieverDescriptorAction { get; set; } + private ICollection RulesetIdsValue { get; set; } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public RuleRetrieverDescriptor Filter(ICollection? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterValue = filter; + return Self; + } + + public RuleRetrieverDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterDescriptor = descriptor; + return Self; + } + + public RuleRetrieverDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorActions = null; + FilterDescriptorAction = configure; + return Self; + } + + public RuleRetrieverDescriptor Filter(params Action[] configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = configure; + return Self; + } + + /// + /// + /// The match criteria that will determine if a rule in the provided rulesets should be applied. + /// + /// + public RuleRetrieverDescriptor MatchCriteria(object matchCriteria) + { + MatchCriteriaValue = matchCriteria; + return Self; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public RuleRetrieverDescriptor MinScore(float? minScore) + { + MinScoreValue = minScore; + return Self; + } + + /// + /// + /// This value determines the size of the individual result set. + /// + /// + public RuleRetrieverDescriptor RankWindowSize(int? rankWindowSize) + { + RankWindowSizeValue = rankWindowSize; + return Self; + } + + /// + /// + /// The retriever whose results rules should be applied to. + /// + /// + public RuleRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.Retriever retriever) + { + RetrieverDescriptor = null; + RetrieverDescriptorAction = null; + RetrieverValue = retriever; + return Self; + } + + public RuleRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor descriptor) + { + RetrieverValue = null; + RetrieverDescriptorAction = null; + RetrieverDescriptor = descriptor; + return Self; + } + + public RuleRetrieverDescriptor Retriever(Action configure) + { + RetrieverValue = null; + RetrieverDescriptor = null; + RetrieverDescriptorAction = configure; + return Self; + } + + /// + /// + /// The ruleset IDs containing the rules this retriever is evaluating against. + /// + /// + public RuleRetrieverDescriptor RulesetIds(ICollection rulesetIds) + { + RulesetIdsValue = rulesetIds; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); + } + else if (FilterDescriptorActions is not null) + { + writer.WritePropertyName("filter"); + if (FilterDescriptorActions.Length != 1) + writer.WriteStartArray(); + foreach (var action in FilterDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); + } + + if (FilterDescriptorActions.Length != 1) + writer.WriteEndArray(); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); + } + + writer.WritePropertyName("match_criteria"); + JsonSerializer.Serialize(writer, MatchCriteriaValue, options); + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (RankWindowSizeValue.HasValue) + { + writer.WritePropertyName("rank_window_size"); + writer.WriteNumberValue(RankWindowSizeValue.Value); + } + + if (RetrieverDescriptor is not null) + { + writer.WritePropertyName("retriever"); + JsonSerializer.Serialize(writer, RetrieverDescriptor, options); + } + else if (RetrieverDescriptorAction is not null) + { + writer.WritePropertyName("retriever"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(RetrieverDescriptorAction), options); + } + else + { + writer.WritePropertyName("retriever"); + JsonSerializer.Serialize(writer, RetrieverValue, options); + } + + writer.WritePropertyName("ruleset_ids"); + JsonSerializer.Serialize(writer, RulesetIdsValue, options); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Restriction.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Restriction.g.cs new file mode 100644 index 00000000000..0058fc7d327 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Security/Restriction.g.cs @@ -0,0 +1,59 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless.Security; + +public sealed partial class Restriction +{ + [JsonInclude, JsonPropertyName("workflows")] + public ICollection Workflows { get; set; } +} + +public sealed partial class RestrictionDescriptor : SerializableDescriptor +{ + internal RestrictionDescriptor(Action configure) => configure.Invoke(this); + + public RestrictionDescriptor() : base() + { + } + + private ICollection WorkflowsValue { get; set; } + + public RestrictionDescriptor Workflows(ICollection workflows) + { + WorkflowsValue = workflows; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + writer.WritePropertyName("workflows"); + JsonSerializer.Serialize(writer, WorkflowsValue, options); + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextSimilarityReranker.g.cs b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextSimilarityReranker.g.cs new file mode 100644 index 00000000000..c3ac989c0e2 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/TextSimilarityReranker.g.cs @@ -0,0 +1,546 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using Elastic.Clients.Elasticsearch.Serverless.Fluent; +using Elastic.Clients.Elasticsearch.Serverless.Serialization; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Elastic.Clients.Elasticsearch.Serverless; + +public sealed partial class TextSimilarityReranker +{ + /// + /// + /// The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text + /// + /// + [JsonInclude, JsonPropertyName("field")] + public string? Field { get; set; } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + [JsonInclude, JsonPropertyName("filter")] + [SingleOrManyCollectionConverter(typeof(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.Query))] + public ICollection? Filter { get; set; } + + /// + /// + /// Unique identifier of the inference endpoint created using the inference API. + /// + /// + [JsonInclude, JsonPropertyName("inference_id")] + public string? InferenceId { get; set; } + + /// + /// + /// The text snippet used as the basis for similarity comparison + /// + /// + [JsonInclude, JsonPropertyName("inference_text")] + public string? InferenceText { get; set; } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + [JsonInclude, JsonPropertyName("min_score")] + public float? MinScore { get; set; } + + /// + /// + /// This value determines how many documents we will consider from the nested retriever. + /// + /// + [JsonInclude, JsonPropertyName("rank_window_size")] + public int? RankWindowSize { get; set; } + + /// + /// + /// The nested retriever which will produce the first-level results, that will later be used for reranking. + /// + /// + [JsonInclude, JsonPropertyName("retriever")] + public Elastic.Clients.Elasticsearch.Serverless.Retriever Retriever { get; set; } + + public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Retriever(TextSimilarityReranker textSimilarityReranker) => Elastic.Clients.Elasticsearch.Serverless.Retriever.TextSimilarityReranker(textSimilarityReranker); +} + +public sealed partial class TextSimilarityRerankerDescriptor : SerializableDescriptor> +{ + internal TextSimilarityRerankerDescriptor(Action> configure) => configure.Invoke(this); + + public TextSimilarityRerankerDescriptor() : base() + { + } + + private string? FieldValue { get; set; } + private ICollection? FilterValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action> FilterDescriptorAction { get; set; } + private Action>[] FilterDescriptorActions { get; set; } + private string? InferenceIdValue { get; set; } + private string? InferenceTextValue { get; set; } + private float? MinScoreValue { get; set; } + private int? RankWindowSizeValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Retriever RetrieverValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor RetrieverDescriptor { get; set; } + private Action> RetrieverDescriptorAction { get; set; } + + /// + /// + /// The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text + /// + /// + public TextSimilarityRerankerDescriptor Field(string? field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public TextSimilarityRerankerDescriptor Filter(ICollection? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterValue = filter; + return Self; + } + + public TextSimilarityRerankerDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterDescriptor = descriptor; + return Self; + } + + public TextSimilarityRerankerDescriptor Filter(Action> configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorActions = null; + FilterDescriptorAction = configure; + return Self; + } + + public TextSimilarityRerankerDescriptor Filter(params Action>[] configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = configure; + return Self; + } + + /// + /// + /// Unique identifier of the inference endpoint created using the inference API. + /// + /// + public TextSimilarityRerankerDescriptor InferenceId(string? inferenceId) + { + InferenceIdValue = inferenceId; + return Self; + } + + /// + /// + /// The text snippet used as the basis for similarity comparison + /// + /// + public TextSimilarityRerankerDescriptor InferenceText(string? inferenceText) + { + InferenceTextValue = inferenceText; + return Self; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public TextSimilarityRerankerDescriptor MinScore(float? minScore) + { + MinScoreValue = minScore; + return Self; + } + + /// + /// + /// This value determines how many documents we will consider from the nested retriever. + /// + /// + public TextSimilarityRerankerDescriptor RankWindowSize(int? rankWindowSize) + { + RankWindowSizeValue = rankWindowSize; + return Self; + } + + /// + /// + /// The nested retriever which will produce the first-level results, that will later be used for reranking. + /// + /// + public TextSimilarityRerankerDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.Retriever retriever) + { + RetrieverDescriptor = null; + RetrieverDescriptorAction = null; + RetrieverValue = retriever; + return Self; + } + + public TextSimilarityRerankerDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor descriptor) + { + RetrieverValue = null; + RetrieverDescriptorAction = null; + RetrieverDescriptor = descriptor; + return Self; + } + + public TextSimilarityRerankerDescriptor Retriever(Action> configure) + { + RetrieverValue = null; + RetrieverDescriptor = null; + RetrieverDescriptorAction = configure; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (!string.IsNullOrEmpty(FieldValue)) + { + writer.WritePropertyName("field"); + writer.WriteStringValue(FieldValue); + } + + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); + } + else if (FilterDescriptorActions is not null) + { + writer.WritePropertyName("filter"); + if (FilterDescriptorActions.Length != 1) + writer.WriteStartArray(); + foreach (var action in FilterDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); + } + + if (FilterDescriptorActions.Length != 1) + writer.WriteEndArray(); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); + } + + if (!string.IsNullOrEmpty(InferenceIdValue)) + { + writer.WritePropertyName("inference_id"); + writer.WriteStringValue(InferenceIdValue); + } + + if (!string.IsNullOrEmpty(InferenceTextValue)) + { + writer.WritePropertyName("inference_text"); + writer.WriteStringValue(InferenceTextValue); + } + + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (RankWindowSizeValue.HasValue) + { + writer.WritePropertyName("rank_window_size"); + writer.WriteNumberValue(RankWindowSizeValue.Value); + } + + if (RetrieverDescriptor is not null) + { + writer.WritePropertyName("retriever"); + JsonSerializer.Serialize(writer, RetrieverDescriptor, options); + } + else if (RetrieverDescriptorAction is not null) + { + writer.WritePropertyName("retriever"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(RetrieverDescriptorAction), options); + } + else + { + writer.WritePropertyName("retriever"); + JsonSerializer.Serialize(writer, RetrieverValue, options); + } + + writer.WriteEndObject(); + } +} + +public sealed partial class TextSimilarityRerankerDescriptor : SerializableDescriptor +{ + internal TextSimilarityRerankerDescriptor(Action configure) => configure.Invoke(this); + + public TextSimilarityRerankerDescriptor() : base() + { + } + + private string? FieldValue { get; set; } + private ICollection? FilterValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor FilterDescriptor { get; set; } + private Action FilterDescriptorAction { get; set; } + private Action[] FilterDescriptorActions { get; set; } + private string? InferenceIdValue { get; set; } + private string? InferenceTextValue { get; set; } + private float? MinScoreValue { get; set; } + private int? RankWindowSizeValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.Retriever RetrieverValue { get; set; } + private Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor RetrieverDescriptor { get; set; } + private Action RetrieverDescriptorAction { get; set; } + + /// + /// + /// The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text + /// + /// + public TextSimilarityRerankerDescriptor Field(string? field) + { + FieldValue = field; + return Self; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public TextSimilarityRerankerDescriptor Filter(ICollection? filter) + { + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterValue = filter; + return Self; + } + + public TextSimilarityRerankerDescriptor Filter(Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor descriptor) + { + FilterValue = null; + FilterDescriptorAction = null; + FilterDescriptorActions = null; + FilterDescriptor = descriptor; + return Self; + } + + public TextSimilarityRerankerDescriptor Filter(Action configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorActions = null; + FilterDescriptorAction = configure; + return Self; + } + + public TextSimilarityRerankerDescriptor Filter(params Action[] configure) + { + FilterValue = null; + FilterDescriptor = null; + FilterDescriptorAction = null; + FilterDescriptorActions = configure; + return Self; + } + + /// + /// + /// Unique identifier of the inference endpoint created using the inference API. + /// + /// + public TextSimilarityRerankerDescriptor InferenceId(string? inferenceId) + { + InferenceIdValue = inferenceId; + return Self; + } + + /// + /// + /// The text snippet used as the basis for similarity comparison + /// + /// + public TextSimilarityRerankerDescriptor InferenceText(string? inferenceText) + { + InferenceTextValue = inferenceText; + return Self; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public TextSimilarityRerankerDescriptor MinScore(float? minScore) + { + MinScoreValue = minScore; + return Self; + } + + /// + /// + /// This value determines how many documents we will consider from the nested retriever. + /// + /// + public TextSimilarityRerankerDescriptor RankWindowSize(int? rankWindowSize) + { + RankWindowSizeValue = rankWindowSize; + return Self; + } + + /// + /// + /// The nested retriever which will produce the first-level results, that will later be used for reranking. + /// + /// + public TextSimilarityRerankerDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.Retriever retriever) + { + RetrieverDescriptor = null; + RetrieverDescriptorAction = null; + RetrieverValue = retriever; + return Self; + } + + public TextSimilarityRerankerDescriptor Retriever(Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor descriptor) + { + RetrieverValue = null; + RetrieverDescriptorAction = null; + RetrieverDescriptor = descriptor; + return Self; + } + + public TextSimilarityRerankerDescriptor Retriever(Action configure) + { + RetrieverValue = null; + RetrieverDescriptor = null; + RetrieverDescriptorAction = configure; + return Self; + } + + protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) + { + writer.WriteStartObject(); + if (!string.IsNullOrEmpty(FieldValue)) + { + writer.WritePropertyName("field"); + writer.WriteStringValue(FieldValue); + } + + if (FilterDescriptor is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, FilterDescriptor, options); + } + else if (FilterDescriptorAction is not null) + { + writer.WritePropertyName("filter"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(FilterDescriptorAction), options); + } + else if (FilterDescriptorActions is not null) + { + writer.WritePropertyName("filter"); + if (FilterDescriptorActions.Length != 1) + writer.WriteStartArray(); + foreach (var action in FilterDescriptorActions) + { + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.QueryDsl.QueryDescriptor(action), options); + } + + if (FilterDescriptorActions.Length != 1) + writer.WriteEndArray(); + } + else if (FilterValue is not null) + { + writer.WritePropertyName("filter"); + SingleOrManySerializationHelper.Serialize(FilterValue, writer, options); + } + + if (!string.IsNullOrEmpty(InferenceIdValue)) + { + writer.WritePropertyName("inference_id"); + writer.WriteStringValue(InferenceIdValue); + } + + if (!string.IsNullOrEmpty(InferenceTextValue)) + { + writer.WritePropertyName("inference_text"); + writer.WriteStringValue(InferenceTextValue); + } + + if (MinScoreValue.HasValue) + { + writer.WritePropertyName("min_score"); + writer.WriteNumberValue(MinScoreValue.Value); + } + + if (RankWindowSizeValue.HasValue) + { + writer.WritePropertyName("rank_window_size"); + writer.WriteNumberValue(RankWindowSizeValue.Value); + } + + if (RetrieverDescriptor is not null) + { + writer.WritePropertyName("retriever"); + JsonSerializer.Serialize(writer, RetrieverDescriptor, options); + } + else if (RetrieverDescriptorAction is not null) + { + writer.WritePropertyName("retriever"); + JsonSerializer.Serialize(writer, new Elastic.Clients.Elasticsearch.Serverless.RetrieverDescriptor(RetrieverDescriptorAction), options); + } + else + { + writer.WritePropertyName("retriever"); + JsonSerializer.Serialize(writer, RetrieverValue, options); + } + + writer.WriteEndObject(); + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch.Shared/Api/Extensions/CreateIndexRequestDescriptorExtensions.cs b/src/Elastic.Clients.Elasticsearch.Shared/Api/Extensions/CreateIndexRequestDescriptorExtensions.cs new file mode 100644 index 00000000000..5b722d75ad6 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch.Shared/Api/Extensions/CreateIndexRequestDescriptorExtensions.cs @@ -0,0 +1,53 @@ +// 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; + +#if ELASTICSEARCH_SERVERLESS +namespace Elastic.Clients.Elasticsearch.Serverless.IndexManagement; +#else +namespace Elastic.Clients.Elasticsearch.IndexManagement; +#endif + +public static class CreateIndexRequestDescriptorExtensions +{ + /// + /// Add multiple aliases to the index at creation time. + /// + /// A descriptor for an index request. + /// The name of the alias. + /// The to allow fluent chaining of calls to configure the indexing request. + public static CreateIndexRequestDescriptor WithAlias(this CreateIndexRequestDescriptor descriptor, string aliasName) + { +#if NET8_0_OR_GREATER + ArgumentException.ThrowIfNullOrEmpty(aliasName); +#else + if (string.IsNullOrEmpty(aliasName)) + throw new ArgumentNullException(nameof(aliasName)); +#endif + + descriptor.Aliases(a => a.Add(aliasName, static _ => { })); + return descriptor; + } + + /// + /// Adds an alias to the index at creation time. + /// + /// The type representing documents stored in this index. + /// A fluent descriptor for an index request. + /// The name of the alias. + /// The to allow fluent chaining of calls to configure the indexing request. + public static CreateIndexRequestDescriptor WithAlias(this CreateIndexRequestDescriptor descriptor, string aliasName) + { +#if NET8_0_OR_GREATER + ArgumentException.ThrowIfNullOrEmpty(aliasName); +#else + if (string.IsNullOrEmpty(aliasName)) + throw new ArgumentNullException(nameof(aliasName)); +#endif + + descriptor.Aliases(a => a.Add(aliasName, static _ => { })); + return descriptor; + } +} 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 983f2108868..d06fa6147d7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs @@ -130,7 +130,8 @@ public sealed partial class SubmitAsyncSearchRequestParameters : Elastic.Transpo /// The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests /// /// - public int? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } + public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } + public string? MinCompatibleShardNode { get => Q("min_compatible_shard_node"); set => Q("min_compatible_shard_node", value); } /// /// @@ -708,7 +709,8 @@ internal SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serialization.Js /// The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests /// /// - public int? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } + public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } + public string? MinCompatibleShardNode { get => Q("min_compatible_shard_node"); set => Q("min_compatible_shard_node", value); } /// /// @@ -1218,12 +1220,18 @@ public Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRequestDescrip /// The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests /// /// - public Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRequestDescriptor MaxConcurrentShardRequests(int? value) + public Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRequestDescriptor MaxConcurrentShardRequests(long? value) { Instance.MaxConcurrentShardRequests = value; return this; } + public Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRequestDescriptor MinCompatibleShardNode(string? value) + { + Instance.MinCompatibleShardNode = value; + return this; + } + /// /// /// Specify the node or shard the operation should be performed on (default: random) @@ -2597,12 +2605,18 @@ public Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRequestDescrip /// The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests /// /// - public Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRequestDescriptor MaxConcurrentShardRequests(int? value) + public Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRequestDescriptor MaxConcurrentShardRequests(long? value) { Instance.MaxConcurrentShardRequests = value; return this; } + public Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRequestDescriptor MinCompatibleShardNode(string? value) + { + Instance.MinCompatibleShardNode = value; + return this; + } + /// /// /// Specify the node or shard the operation should be performed on (default: random) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs index d3b14129965..b72397bf0d4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/AsyncQueryRequest.g.cs @@ -25,6 +25,17 @@ namespace Elastic.Clients.Elasticsearch.Esql; public sealed partial class AsyncQueryRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// If true, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. + /// If false, the query will fail if there are any failures. + /// + /// + /// To override the default behavior, you can set the esql.query.allow_partial_results cluster setting to false. + /// + /// + public bool? AllowPartialResults { get => Q("allow_partial_results"); set => Q("allow_partial_results", value); } + /// /// /// The character to use between values within a CSV row. @@ -211,6 +222,17 @@ internal AsyncQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst internal override string OperationName => "esql.async_query"; + /// + /// + /// If true, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. + /// If false, the query will fail if there are any failures. + /// + /// + /// To override the default behavior, you can set the esql.query.allow_partial_results cluster setting to false. + /// + /// + public bool? AllowPartialResults { get => Q("allow_partial_results"); set => Q("allow_partial_results", value); } + /// /// /// The character to use between values within a CSV row. @@ -342,6 +364,21 @@ public AsyncQueryRequestDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor(Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest instance) => new Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest(Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor descriptor) => descriptor.Instance; + /// + /// + /// If true, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. + /// If false, the query will fail if there are any failures. + /// + /// + /// To override the default behavior, you can set the esql.query.allow_partial_results cluster setting to false. + /// + /// + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor AllowPartialResults(bool? value = true) + { + Instance.AllowPartialResults = value; + return this; + } + /// /// /// The character to use between values within a CSV row. @@ -605,6 +642,21 @@ public AsyncQueryRequestDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor(Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest instance) => new Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest(Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor descriptor) => descriptor.Instance; + /// + /// + /// If true, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. + /// If false, the query will fail if there are any failures. + /// + /// + /// To override the default behavior, you can set the esql.query.allow_partial_results cluster setting to false. + /// + /// + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor AllowPartialResults(bool? value = true) + { + Instance.AllowPartialResults = value; + return this; + } + /// /// /// The character to use between values within a CSV row. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs index 68a186e87bc..bc2fb1af2f4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Esql/EsqlQueryRequest.g.cs @@ -25,6 +25,17 @@ namespace Elastic.Clients.Elasticsearch.Esql; public sealed partial class EsqlQueryRequestParameters : Elastic.Transport.RequestParameters { + /// + /// + /// If true, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. + /// If false, the query will fail if there are any failures. + /// + /// + /// To override the default behavior, you can set the esql.query.allow_partial_results cluster setting to false. + /// + /// + public bool? AllowPartialResults { get => Q("allow_partial_results"); set => Q("allow_partial_results", value); } + /// /// /// The character to use between values within a CSV row. Only valid for the CSV format. @@ -180,6 +191,17 @@ internal EsqlQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstr internal override string OperationName => "esql.query"; + /// + /// + /// If true, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. + /// If false, the query will fail if there are any failures. + /// + /// + /// To override the default behavior, you can set the esql.query.allow_partial_results cluster setting to false. + /// + /// + public bool? AllowPartialResults { get => Q("allow_partial_results"); set => Q("allow_partial_results", value); } + /// /// /// The character to use between values within a CSV row. Only valid for the CSV format. @@ -279,6 +301,21 @@ public EsqlQueryRequestDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor(Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest instance) => new Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest(Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor descriptor) => descriptor.Instance; + /// + /// + /// If true, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. + /// If false, the query will fail if there are any failures. + /// + /// + /// To override the default behavior, you can set the esql.query.allow_partial_results cluster setting to false. + /// + /// + public Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor AllowPartialResults(bool? value = true) + { + Instance.AllowPartialResults = value; + return this; + } + /// /// /// The character to use between values within a CSV row. Only valid for the CSV format. @@ -498,6 +535,21 @@ public EsqlQueryRequestDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor(Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest instance) => new Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest(Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor descriptor) => descriptor.Instance; + /// + /// + /// If true, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. + /// If false, the query will fail if there are any failures. + /// + /// + /// To override the default behavior, you can set the esql.query.allow_partial_results cluster setting to false. + /// + /// + public Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequestDescriptor AllowPartialResults(bool? value = true) + { + Instance.AllowPartialResults = value; + return this; + } + /// /// /// The character to use between values within a CSV row. Only valid for the CSV format. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceResponse.g.cs index 1ab09ffae6b..2e56e2a2a4e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetSourceResponseConverter : System.Tex { public override Elastic.Clients.Elasticsearch.GetSourceResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.GetSourceResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Source = reader.ReadValue(options, static TDocument (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!) }; + return new Elastic.Clients.Elasticsearch.GetSourceResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Document = reader.ReadValue(options, static TDocument (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.GetSourceResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Source, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); + writer.WriteValue(options, value.Document, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); } } @@ -71,5 +71,5 @@ internal GetSourceResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConst #if NET7_0_OR_GREATER required #endif -TDocument Source { get; set; } +TDocument Document { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/GetLifecycleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/GetLifecycleResponse.g.cs index aad43ef2238..b688438f80d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/GetLifecycleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/GetLifecycleResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetLifecycleResponseConverter : System.Text.Json.S { public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.GetLifecycleResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.IndexLifecycleManagement.GetLifecycleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Lifecycles = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.IndexLifecycleManagement.GetLifecycleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexLifecycleManagement.GetLifecycleResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Lifecycles, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetLifecycleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCo #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Lifecycles { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/MigrateToDataTiersRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/MigrateToDataTiersRequest.g.cs index 15b79526383..71ed4429c68 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/MigrateToDataTiersRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexLifecycleManagement/MigrateToDataTiersRequest.g.cs @@ -32,15 +32,6 @@ public sealed partial class MigrateToDataTiersRequestParameters : Elastic.Transp /// /// public bool? DryRun { get => Q("dry_run"); set => Q("dry_run", value); } - - /// - /// - /// The 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. - /// It can also be set to -1 to indicate that the request should never timeout. - /// - /// - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } } internal sealed partial class MigrateToDataTiersRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -158,15 +149,6 @@ internal MigrateToDataTiersRequest(Elastic.Clients.Elasticsearch.Serialization.J /// /// public bool? DryRun { get => Q("dry_run"); set => Q("dry_run", value); } - - /// - /// - /// The 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. - /// It can also be set to -1 to indicate that the request should never timeout. - /// - /// - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } public string? LegacyTemplateToDelete { get; set; } public string? NodeAttribute { get; set; } } @@ -234,19 +216,6 @@ public Elastic.Clients.Elasticsearch.IndexLifecycleManagement.MigrateToDataTiers return this; } - /// - /// - /// The 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. - /// It can also be set to -1 to indicate that the request should never timeout. - /// - /// - public Elastic.Clients.Elasticsearch.IndexLifecycleManagement.MigrateToDataTiersRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) - { - Instance.MasterTimeout = value; - return this; - } - public Elastic.Clients.Elasticsearch.IndexLifecycleManagement.MigrateToDataTiersRequestDescriptor LegacyTemplateToDelete(string? value) { Instance.LegacyTemplateToDelete = value; 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 97b8b97663d..efb3c6b30c9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/CreateIndexRequest.g.cs @@ -176,45 +176,7 @@ internal CreateIndexRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// /// /// Name of the index you wish to create. - /// Index names must meet the following criteria: /// - /// - /// - /// - /// Lowercase only - /// - /// - /// - /// - /// Cannot include \, /, *, ?, ", <, >, |, (space character), ,, or # - /// - /// - /// - /// - /// Indices prior to 7.0 could contain a colon (:), but that has been deprecated and will not be supported in later versions - /// - /// - /// - /// - /// Cannot start with -, _, or + - /// - /// - /// - /// - /// Cannot be . or .. - /// - /// - /// - /// - /// Cannot be longer than 255 bytes (note thtat it is bytes, so multi-byte characters will reach the limit faster) - /// - /// - /// - /// - /// Names starting with . are deprecated, except for hidden indices and internal indices managed by plugins - /// - /// - /// /// public #if NET7_0_OR_GREATER @@ -352,45 +314,7 @@ public CreateIndexRequestDescriptor() /// /// /// Name of the index you wish to create. - /// Index names must meet the following criteria: - /// - /// - /// - /// - /// Lowercase only - /// - /// - /// - /// - /// Cannot include \, /, *, ?, ", <, >, |, (space character), ,, or # - /// - /// - /// - /// - /// Indices prior to 7.0 could contain a colon (:), but that has been deprecated and will not be supported in later versions - /// - /// - /// - /// - /// Cannot start with -, _, or + - /// - /// - /// - /// - /// Cannot be . or .. - /// - /// - /// - /// - /// Cannot be longer than 255 bytes (note thtat it is bytes, so multi-byte characters will reach the limit faster) /// - /// - /// - /// - /// Names starting with . are deprecated, except for hidden indices and internal indices managed by plugins - /// - /// - /// /// public Elastic.Clients.Elasticsearch.IndexManagement.CreateIndexRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName value) { @@ -807,45 +731,7 @@ public CreateIndexRequestDescriptor() /// /// /// Name of the index you wish to create. - /// Index names must meet the following criteria: - /// - /// - /// - /// - /// Lowercase only - /// - /// - /// - /// - /// Cannot include \, /, *, ?, ", <, >, |, (space character), ,, or # /// - /// - /// - /// - /// Indices prior to 7.0 could contain a colon (:), but that has been deprecated and will not be supported in later versions - /// - /// - /// - /// - /// Cannot start with -, _, or + - /// - /// - /// - /// - /// Cannot be . or .. - /// - /// - /// - /// - /// Cannot be longer than 255 bytes (note thtat it is bytes, so multi-byte characters will reach the limit faster) - /// - /// - /// - /// - /// Names starting with . are deprecated, except for hidden indices and internal indices managed by plugins - /// - /// - /// /// public Elastic.Clients.Elasticsearch.IndexManagement.CreateIndexRequestDescriptor Index(Elastic.Clients.Elasticsearch.IndexName value) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DiskUsageResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DiskUsageResponse.g.cs index 13d6ae3e918..bc875fa8a37 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DiskUsageResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DiskUsageResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class DiskUsageResponseConverter : System.Text.Json.Seri { public override Elastic.Clients.Elasticsearch.IndexManagement.DiskUsageResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.IndexManagement.DiskUsageResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { DiskUsage = reader.ReadValue(options, null) }; + return new Elastic.Clients.Elasticsearch.IndexManagement.DiskUsageResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Value = reader.ReadValue(options, null) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.DiskUsageResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.DiskUsage, null); + writer.WriteValue(options, value.Value, null); } } @@ -54,5 +54,5 @@ internal DiskUsageResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConst #if NET7_0_OR_GREATER required #endif -object DiskUsage { get; set; } +object Value { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DownsampleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DownsampleResponse.g.cs index b99be66c11f..dab4cc8d7cc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DownsampleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DownsampleResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class DownsampleResponseConverter : System.Text.Json.Ser { public override Elastic.Clients.Elasticsearch.IndexManagement.DownsampleResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.IndexManagement.DownsampleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Result = reader.ReadValue(options, null) }; + return new Elastic.Clients.Elasticsearch.IndexManagement.DownsampleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Value = reader.ReadValue(options, null) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.DownsampleResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Result, null); + writer.WriteValue(options, value.Value, null); } } @@ -54,5 +54,5 @@ internal DownsampleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCons #if NET7_0_OR_GREATER required #endif -object Result { get; set; } +object Value { get; set; } } \ No newline at end of file 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 36523580b09..8707a7ac094 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ExistsAliasRequest.g.cs @@ -52,11 +52,11 @@ public sealed partial class ExistsAliasRequestParameters : Elastic.Transport.Req /// /// - /// 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. + /// If true, the request retrieves information from the local node only. /// /// - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + [System.Obsolete("Deprecated in '8.12.0'.")] + public bool? Local { get => Q("local"); set => Q("local", value); } } internal sealed partial class ExistsAliasRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -173,11 +173,11 @@ internal ExistsAliasRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// /// - /// 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. + /// If true, the request retrieves information from the local node only. /// /// - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + [System.Obsolete("Deprecated in '8.12.0'.")] + public bool? Local { get => Q("local"); set => Q("local", value); } } /// @@ -291,15 +291,15 @@ public Elastic.Clients.Elasticsearch.IndexManagement.ExistsAliasRequestDescripto return this; } + [System.Obsolete("Deprecated in '8.12.0'.")] /// /// - /// 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. + /// If true, the request retrieves information from the local node only. /// /// - public Elastic.Clients.Elasticsearch.IndexManagement.ExistsAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) + public Elastic.Clients.Elasticsearch.IndexManagement.ExistsAliasRequestDescriptor Local(bool? value = true) { - Instance.MasterTimeout = value; + Instance.Local = value; return this; } @@ -465,15 +465,15 @@ public Elastic.Clients.Elasticsearch.IndexManagement.ExistsAliasRequestDescripto return this; } + [System.Obsolete("Deprecated in '8.12.0'.")] /// /// - /// 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. + /// If true, the request retrieves information from the local node only. /// /// - public Elastic.Clients.Elasticsearch.IndexManagement.ExistsAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) + public Elastic.Clients.Elasticsearch.IndexManagement.ExistsAliasRequestDescriptor Local(bool? value = true) { - Instance.MasterTimeout = value; + Instance.Local = value; return this; } 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 179d8a53f9d..b9eebad9495 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetAliasRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetAliasRequest.g.cs @@ -52,11 +52,11 @@ public sealed partial class GetAliasRequestParameters : Elastic.Transport.Reques /// /// - /// 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. + /// If true, the request retrieves information from the local node only. /// /// - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + [System.Obsolete("Deprecated in '8.12.0'.")] + public bool? Local { get => Q("local"); set => Q("local", value); } } internal sealed partial class GetAliasRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -177,11 +177,11 @@ internal GetAliasRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// /// - /// 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. + /// If true, the request retrieves information from the local node only. /// /// - public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } + [System.Obsolete("Deprecated in '8.12.0'.")] + public bool? Local { get => Q("local"); set => Q("local", value); } } /// @@ -300,15 +300,15 @@ public Elastic.Clients.Elasticsearch.IndexManagement.GetAliasRequestDescriptor I return this; } + [System.Obsolete("Deprecated in '8.12.0'.")] /// /// - /// 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. + /// If true, the request retrieves information from the local node only. /// /// - public Elastic.Clients.Elasticsearch.IndexManagement.GetAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) + public Elastic.Clients.Elasticsearch.IndexManagement.GetAliasRequestDescriptor Local(bool? value = true) { - Instance.MasterTimeout = value; + Instance.Local = value; return this; } @@ -484,15 +484,15 @@ public Elastic.Clients.Elasticsearch.IndexManagement.GetAliasRequestDescriptor /// - /// 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. + /// If true, the request retrieves information from the local node only. /// /// - public Elastic.Clients.Elasticsearch.IndexManagement.GetAliasRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) + public Elastic.Clients.Elasticsearch.IndexManagement.GetAliasRequestDescriptor Local(bool? value = true) { - Instance.MasterTimeout = value; + Instance.Local = value; return this; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetAliasResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetAliasResponse.g.cs index 0767eea0c1f..3a7a95f942e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetAliasResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetAliasResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetAliasResponseConverter : System.Text.Json.Seria { public override Elastic.Clients.Elasticsearch.IndexManagement.GetAliasResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.IndexManagement.GetAliasResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Aliases = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.IndexManagement.GetAliasResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.GetAliasResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Aliases, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetAliasResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstr #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Aliases { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetFieldMappingResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetFieldMappingResponse.g.cs index f29f9b60078..0c0d10ec0f0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetFieldMappingResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetFieldMappingResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetFieldMappingResponseConverter : System.Text.Jso { public override Elastic.Clients.Elasticsearch.IndexManagement.GetFieldMappingResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.IndexManagement.GetFieldMappingResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { FieldMappings = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.IndexManagement.GetFieldMappingResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.GetFieldMappingResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.FieldMappings, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetFieldMappingResponse(Elastic.Clients.Elasticsearch.Serialization.Jso #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary FieldMappings { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexResponse.g.cs index 48d5f69c5d5..3808d461051 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndexResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetIndexResponseConverter : System.Text.Json.Seria { public override Elastic.Clients.Elasticsearch.IndexManagement.GetIndexResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.IndexManagement.GetIndexResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Indices = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.IndexManagement.GetIndexResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.GetIndexResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Indices, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetIndexResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstr #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Indices { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndicesSettingsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndicesSettingsResponse.g.cs index a4a6b6ac40b..ca8c380f770 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndicesSettingsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetIndicesSettingsResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetIndicesSettingsResponseConverter : System.Text. { public override Elastic.Clients.Elasticsearch.IndexManagement.GetIndicesSettingsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.IndexManagement.GetIndicesSettingsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Settings = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.IndexManagement.GetIndicesSettingsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.GetIndicesSettingsResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Settings, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetIndicesSettingsResponse(Elastic.Clients.Elasticsearch.Serialization. #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Settings { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMappingResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMappingResponse.g.cs index b5f25c00ec3..a91c6ffc4fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMappingResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMappingResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetMappingResponseConverter : System.Text.Json.Ser { public override Elastic.Clients.Elasticsearch.IndexManagement.GetMappingResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.IndexManagement.GetMappingResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Mappings = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.IndexManagement.GetMappingResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.GetMappingResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Mappings, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetMappingResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCons #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Mappings { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateResponse.g.cs index 195c4a5d6e4..afa5b8f4d53 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetTemplateResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetTemplateResponseConverter : System.Text.Json.Se { public override Elastic.Clients.Elasticsearch.IndexManagement.GetTemplateResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.IndexManagement.GetTemplateResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Templates = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.IndexManagement.GetTemplateResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.GetTemplateResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Templates, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetTemplateResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCon #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Templates { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PromoteDataStreamResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PromoteDataStreamResponse.g.cs index cff35bbd6b8..acd28e0d731 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PromoteDataStreamResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PromoteDataStreamResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class PromoteDataStreamResponseConverter : System.Text.J { public override Elastic.Clients.Elasticsearch.IndexManagement.PromoteDataStreamResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.IndexManagement.PromoteDataStreamResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Result = reader.ReadValue(options, null) }; + return new Elastic.Clients.Elasticsearch.IndexManagement.PromoteDataStreamResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Value = reader.ReadValue(options, null) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.PromoteDataStreamResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Result, null); + writer.WriteValue(options, value.Value, null); } } @@ -54,5 +54,5 @@ internal PromoteDataStreamResponse(Elastic.Clients.Elasticsearch.Serialization.J #if NET7_0_OR_GREATER required #endif -object Result { get; set; } +object Value { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RecoveryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RecoveryResponse.g.cs index 04306e39437..6a2fba24435 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RecoveryResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RecoveryResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class RecoveryResponseConverter : System.Text.Json.Seria { public override Elastic.Clients.Elasticsearch.IndexManagement.RecoveryResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.IndexManagement.RecoveryResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Statuses = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.IndexManagement.RecoveryResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.RecoveryResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Statuses, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal RecoveryResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstr #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Statuses { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ResolveClusterResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ResolveClusterResponse.g.cs index 099c67650f9..7f511c12b02 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ResolveClusterResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/ResolveClusterResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class ResolveClusterResponseConverter : System.Text.Json { public override Elastic.Clients.Elasticsearch.IndexManagement.ResolveClusterResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.IndexManagement.ResolveClusterResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Infos = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.IndexManagement.ResolveClusterResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.ResolveClusterResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Infos, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal ResolveClusterResponse(Elastic.Clients.Elasticsearch.Serialization.Json #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Infos { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SegmentsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SegmentsRequest.g.cs index 0fdf45bdbab..b85f0c4bcb4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SegmentsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SegmentsRequest.g.cs @@ -49,6 +49,13 @@ public sealed partial class SegmentsRequestParameters : Elastic.Transport.Reques /// /// public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + /// + /// + /// If true, the request returns a verbose response. + /// + /// + public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } } internal sealed partial class SegmentsRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -150,6 +157,13 @@ internal SegmentsRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// /// public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } + + /// + /// + /// If true, the request returns a verbose response. + /// + /// + public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } } /// @@ -246,6 +260,17 @@ public Elastic.Clients.Elasticsearch.IndexManagement.SegmentsRequestDescriptor I return this; } + /// + /// + /// If true, the request returns a verbose response. + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.SegmentsRequestDescriptor Verbose(bool? value = true) + { + Instance.Verbose = value; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.IndexManagement.SegmentsRequest Build(System.Action? action) { @@ -396,6 +421,17 @@ public Elastic.Clients.Elasticsearch.IndexManagement.SegmentsRequestDescriptor + /// + /// If true, the request returns a verbose response. + /// + /// + public Elastic.Clients.Elasticsearch.IndexManagement.SegmentsRequestDescriptor Verbose(bool? value = true) + { + Instance.Verbose = value; + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.IndexManagement.SegmentsRequest Build(System.Action>? action) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/InferenceResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/InferenceResponse.g.cs index 7f0395c7216..dacaf290698 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/InferenceResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/InferenceResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class InferenceResponseConverter : System.Text.Json.Seri { public override Elastic.Clients.Elasticsearch.Inference.InferenceResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Inference.InferenceResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Result = reader.ReadValue(options, null) }; + return new Elastic.Clients.Elasticsearch.Inference.InferenceResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Value = reader.ReadValue(options, null) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.InferenceResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Result, null); + writer.WriteValue(options, value.Value, null); } } @@ -54,5 +54,5 @@ internal InferenceResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConst #if NET7_0_OR_GREATER required #endif -Elastic.Clients.Elasticsearch.Inference.InferenceResult Result { get; set; } +Elastic.Clients.Elasticsearch.Inference.InferenceResult Value { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/TextEmbeddingResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/TextEmbeddingResponse.g.cs index a659ad8e878..5cb7417d6c8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/TextEmbeddingResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/TextEmbeddingResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class TextEmbeddingResponseConverter : System.Text.Json. { public override Elastic.Clients.Elasticsearch.Inference.TextEmbeddingResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Inference.TextEmbeddingResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { InferenceResult = reader.ReadValue(options, null) }; + return new Elastic.Clients.Elasticsearch.Inference.TextEmbeddingResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Value = reader.ReadValue(options, null) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TextEmbeddingResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.InferenceResult, null); + writer.WriteValue(options, value.Value, null); } } @@ -54,5 +54,5 @@ internal TextEmbeddingResponse(Elastic.Clients.Elasticsearch.Serialization.JsonC #if NET7_0_OR_GREATER required #endif -Elastic.Clients.Elasticsearch.Inference.TextEmbeddingInferenceResult InferenceResult { get; set; } +Elastic.Clients.Elasticsearch.Inference.TextEmbeddingInferenceResult Value { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GetPipelineResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GetPipelineResponse.g.cs index 7e194ae0645..74b5e710add 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GetPipelineResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/GetPipelineResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetPipelineResponseConverter : System.Text.Json.Se { public override Elastic.Clients.Elasticsearch.Ingest.GetPipelineResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Ingest.GetPipelineResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Pipelines = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.Ingest.GetPipelineResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.GetPipelineResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Pipelines, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetPipelineResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCon #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Pipelines { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsRequest.g.cs index f1cb6cf3eb4..a5e17a0ad1f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsRequest.g.cs @@ -398,22 +398,7 @@ public Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAnalyticsRe /// be included in the analysis. /// /// - public Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAnalyticsRequestDescriptor AnalyzedFields() - { - Instance.AnalyzedFields = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(null); - return this; - } - - /// - /// - /// Specify includes and/or excludes patterns to select which fields will be - /// included in the analysis. The patterns specified in excludes are applied - /// last, therefore excludes takes precedence. In other words, if the same - /// field is specified in both includes and excludes, then the field will not - /// be included in the analysis. - /// - /// - public Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAnalyticsRequestDescriptor AnalyzedFields(System.Action? action) + public Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAnalyticsRequestDescriptor AnalyzedFields(System.Action action) { Instance.AnalyzedFields = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(action); return this; @@ -708,22 +693,7 @@ public Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAnalyticsRe /// be included in the analysis. /// /// - public Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAnalyticsRequestDescriptor AnalyzedFields() - { - Instance.AnalyzedFields = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(null); - return this; - } - - /// - /// - /// Specify includes and/or excludes patterns to select which fields will be - /// included in the analysis. The patterns specified in excludes are applied - /// last, therefore excludes takes precedence. In other words, if the same - /// field is specified in both includes and excludes, then the field will not - /// be included in the analysis. - /// - /// - public Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAnalyticsRequestDescriptor AnalyzedFields(System.Action? action) + public Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAnalyticsRequestDescriptor AnalyzedFields(System.Action action) { Instance.AnalyzedFields = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(action); return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetTrainedModelsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetTrainedModelsRequest.g.cs index 0e2b73612cb..a4eb15f388b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetTrainedModelsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetTrainedModelsRequest.g.cs @@ -85,6 +85,14 @@ public sealed partial class GetTrainedModelsRequestParameters : Elastic.Transpor /// public Elastic.Clients.Elasticsearch.MachineLearning.Include? Include { get => Q("include"); set => Q("include", value); } + /// + /// + /// parameter is deprecated! Use [include=definition] instead + /// + /// + [System.Obsolete("Deprecated in '7.10.0'.")] + public bool? IncludeModelDefinition { get => Q("include_model_definition"); set => Q("include_model_definition", value); } + /// /// /// Specifies the maximum number of models to obtain. @@ -238,6 +246,14 @@ internal GetTrainedModelsRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// public Elastic.Clients.Elasticsearch.MachineLearning.Include? Include { get => Q("include"); set => Q("include", value); } + /// + /// + /// parameter is deprecated! Use [include=definition] instead + /// + /// + [System.Obsolete("Deprecated in '7.10.0'.")] + public bool? IncludeModelDefinition { get => Q("include_model_definition"); set => Q("include_model_definition", value); } + /// /// /// Specifies the maximum number of models to obtain. @@ -379,6 +395,18 @@ public Elastic.Clients.Elasticsearch.MachineLearning.GetTrainedModelsRequestDesc return this; } + [System.Obsolete("Deprecated in '7.10.0'.")] + /// + /// + /// parameter is deprecated! Use [include=definition] instead + /// + /// + public Elastic.Clients.Elasticsearch.MachineLearning.GetTrainedModelsRequestDescriptor IncludeModelDefinition(bool? value = true) + { + Instance.IncludeModelDefinition = value; + return this; + } + /// /// /// Specifies the maximum number of models to obtain. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs index 9b2a1656266..ae691d5b03f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs @@ -513,45 +513,7 @@ public Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyticsReques /// model the values as 0-14 = 0, 15-24 = 1, 25-34 = 2, and so on. /// /// - public Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyticsRequestDescriptor AnalyzedFields() - { - Instance.AnalyzedFields = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(null); - return this; - } - - /// - /// - /// Specifies includes and/or excludes patterns to select which fields - /// will be included in the analysis. The patterns specified in excludes - /// are applied last, therefore excludes takes precedence. In other words, - /// if the same field is specified in both includes and excludes, then - /// the field will not be included in the analysis. If analyzed_fields is - /// not set, only the relevant fields will be included. For example, all the - /// numeric fields for outlier detection. - /// The supported fields vary for each type of analysis. Outlier detection - /// requires numeric or boolean data to analyze. The algorithms don’t - /// support missing values therefore fields that have data types other than - /// numeric or boolean are ignored. Documents where included fields contain - /// missing values, null values, or an array are also ignored. Therefore the - /// dest index may contain documents that don’t have an outlier score. - /// Regression supports fields that are numeric, boolean, text, - /// keyword, and ip data types. It is also tolerant of missing values. - /// Fields that are supported are included in the analysis, other fields are - /// ignored. Documents where included fields contain an array with two or - /// more values are also ignored. Documents in the dest index that don’t - /// contain a results field are not included in the regression analysis. - /// Classification supports fields that are numeric, boolean, text, - /// keyword, and ip data types. It is also tolerant of missing values. - /// Fields that are supported are included in the analysis, other fields are - /// ignored. Documents where included fields contain an array with two or - /// more values are also ignored. Documents in the dest index that don’t - /// contain a results field are not included in the classification analysis. - /// Classification analysis can be improved by mapping ordinal variable - /// values to a single number. For example, in case of age ranges, you can - /// model the values as 0-14 = 0, 15-24 = 1, 25-34 = 2, and so on. - /// - /// - public Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyticsRequestDescriptor AnalyzedFields(System.Action? action) + public Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyticsRequestDescriptor AnalyzedFields(System.Action action) { Instance.AnalyzedFields = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(action); return this; @@ -944,45 +906,7 @@ public Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyticsReques /// model the values as 0-14 = 0, 15-24 = 1, 25-34 = 2, and so on. /// /// - public Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyticsRequestDescriptor AnalyzedFields() - { - Instance.AnalyzedFields = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(null); - return this; - } - - /// - /// - /// Specifies includes and/or excludes patterns to select which fields - /// will be included in the analysis. The patterns specified in excludes - /// are applied last, therefore excludes takes precedence. In other words, - /// if the same field is specified in both includes and excludes, then - /// the field will not be included in the analysis. If analyzed_fields is - /// not set, only the relevant fields will be included. For example, all the - /// numeric fields for outlier detection. - /// The supported fields vary for each type of analysis. Outlier detection - /// requires numeric or boolean data to analyze. The algorithms don’t - /// support missing values therefore fields that have data types other than - /// numeric or boolean are ignored. Documents where included fields contain - /// missing values, null values, or an array are also ignored. Therefore the - /// dest index may contain documents that don’t have an outlier score. - /// Regression supports fields that are numeric, boolean, text, - /// keyword, and ip data types. It is also tolerant of missing values. - /// Fields that are supported are included in the analysis, other fields are - /// ignored. Documents where included fields contain an array with two or - /// more values are also ignored. Documents in the dest index that don’t - /// contain a results field are not included in the regression analysis. - /// Classification supports fields that are numeric, boolean, text, - /// keyword, and ip data types. It is also tolerant of missing values. - /// Fields that are supported are included in the analysis, other fields are - /// ignored. Documents where included fields contain an array with two or - /// more values are also ignored. Documents in the dest index that don’t - /// contain a results field are not included in the classification analysis. - /// Classification analysis can be improved by mapping ordinal variable - /// values to a single number. For example, in case of age ranges, you can - /// model the values as 0-14 = 0, 15-24 = 1, 25-34 = 2, and so on. - /// - /// - public Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyticsRequestDescriptor AnalyzedFields(System.Action? action) + public Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyticsRequestDescriptor AnalyzedFields(System.Action action) { Instance.AnalyzedFields = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(action); return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs index 806a161caaa..b4974e0cfc7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MultiSearchRequest.g.cs @@ -75,17 +75,16 @@ public sealed partial class MultiSearchRequestParameters : Elastic.Transport.Req /// /// /// Maximum number of concurrent searches the multi search API can execute. - /// Defaults to max(1, (# of data nodes * min(search thread pool size, 10))). /// /// - public int? MaxConcurrentSearches { get => Q("max_concurrent_searches"); set => Q("max_concurrent_searches", value); } + public long? MaxConcurrentSearches { get => Q("max_concurrent_searches"); set => Q("max_concurrent_searches", value); } /// /// /// Maximum number of concurrent shard requests that each sub-search request executes per node. /// /// - public int? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } + public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } /// /// @@ -261,17 +260,16 @@ internal MultiSearchRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// /// /// Maximum number of concurrent searches the multi search API can execute. - /// Defaults to max(1, (# of data nodes * min(search thread pool size, 10))). /// /// - public int? MaxConcurrentSearches { get => Q("max_concurrent_searches"); set => Q("max_concurrent_searches", value); } + public long? MaxConcurrentSearches { get => Q("max_concurrent_searches"); set => Q("max_concurrent_searches", value); } /// /// /// Maximum number of concurrent shard requests that each sub-search request executes per node. /// /// - public int? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } + public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } /// /// @@ -458,10 +456,9 @@ public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor IncludeNamedQu /// /// /// Maximum number of concurrent searches the multi search API can execute. - /// Defaults to max(1, (# of data nodes * min(search thread pool size, 10))). /// /// - public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor MaxConcurrentSearches(int? value) + public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor MaxConcurrentSearches(long? value) { Instance.MaxConcurrentSearches = value; return this; @@ -472,7 +469,7 @@ public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor MaxConcurrentS /// Maximum number of concurrent shard requests that each sub-search request executes per node. /// /// - public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor MaxConcurrentShardRequests(int? value) + public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor MaxConcurrentShardRequests(long? value) { Instance.MaxConcurrentShardRequests = value; return this; @@ -740,10 +737,9 @@ public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor Inc /// /// /// Maximum number of concurrent searches the multi search API can execute. - /// Defaults to max(1, (# of data nodes * min(search thread pool size, 10))). /// /// - public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor MaxConcurrentSearches(int? value) + public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor MaxConcurrentSearches(long? value) { Instance.MaxConcurrentSearches = value; return this; @@ -754,7 +750,7 @@ public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor Max /// Maximum number of concurrent shard requests that each sub-search request executes per node. /// /// - public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor MaxConcurrentShardRequests(int? value) + public Elastic.Clients.Elasticsearch.MultiSearchRequestDescriptor MaxConcurrentShardRequests(long? value) { Instance.MaxConcurrentShardRequests = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/GetRepositoriesMeteringInfoRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/GetRepositoriesMeteringInfoRequest.g.cs index d4ea3754aad..4aee0864f67 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/GetRepositoriesMeteringInfoRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Nodes/GetRepositoriesMeteringInfoRequest.g.cs @@ -93,6 +93,7 @@ internal GetRepositoriesMeteringInfoRequest(Elastic.Clients.Elasticsearch.Serial /// /// /// Comma-separated list of node IDs or names used to limit returned information. + /// All the nodes selective options are explained here. /// /// public @@ -137,6 +138,7 @@ public GetRepositoriesMeteringInfoRequestDescriptor() /// /// /// Comma-separated list of node IDs or names used to limit returned information. + /// All the nodes selective options are explained here. /// /// public Elastic.Clients.Elasticsearch.Nodes.GetRepositoriesMeteringInfoRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.NodeIds value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/GetRollupCapsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/GetRollupCapsResponse.g.cs index 5bae50396f4..446369da764 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/GetRollupCapsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/GetRollupCapsResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetRollupCapsResponseConverter : System.Text.Json. { public override Elastic.Clients.Elasticsearch.Rollup.GetRollupCapsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Rollup.GetRollupCapsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Capabilities = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.Rollup.GetRollupCapsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Rollup.GetRollupCapsResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Capabilities, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetRollupCapsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonC #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Capabilities { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/GetRollupIndexCapsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/GetRollupIndexCapsResponse.g.cs index 3f5336c51c8..ee373a57084 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/GetRollupIndexCapsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/GetRollupIndexCapsResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetRollupIndexCapsResponseConverter : System.Text. { public override Elastic.Clients.Elasticsearch.Rollup.GetRollupIndexCapsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Rollup.GetRollupIndexCapsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Capabilities = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.Rollup.GetRollupIndexCapsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Rollup.GetRollupIndexCapsResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Capabilities, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetRollupIndexCapsResponse(Elastic.Clients.Elasticsearch.Serialization. #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Capabilities { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetBehavioralAnalyticsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetBehavioralAnalyticsResponse.g.cs index 8915534a97e..aa475701643 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetBehavioralAnalyticsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/GetBehavioralAnalyticsResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetBehavioralAnalyticsResponseConverter : System.T { public override Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Analytics = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Analytics, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetBehavioralAnalyticsResponse(Elastic.Clients.Elasticsearch.Serializat #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Analytics { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs index 29c824eb9fe..449fc07e97a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs @@ -151,7 +151,15 @@ public sealed partial class SearchRequestParameters : Elastic.Transport.RequestP /// This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. /// /// - public int? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } + public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } + + /// + /// + /// The minimum version of the node that can handle the request + /// Any handling node with a lower version will fail the request. + /// + /// + public string? MinCompatibleShardNode { get => Q("min_compatible_shard_node"); set => Q("min_compatible_shard_node", value); } /// /// @@ -162,27 +170,27 @@ public sealed partial class SearchRequestParameters : Elastic.Transport.RequestP /// /// /// - /// _only_local to run the search only on shards on the local node. + /// _only_local to run the search only on shards on the local node; /// /// /// /// - /// _local to, if possible, run the search on shards on the local node, or if not, select shards using the default method. + /// _local to, if possible, run the search on shards on the local node, or if not, select shards using the default method; /// /// /// /// - /// _only_nodes:<node-id>,<node-id> to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method. + /// _only_nodes:<node-id>,<node-id> to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method; /// /// /// /// - /// _prefer_nodes:<node-id>,<node-id> to if possible, run the search on the specified nodes IDs. If not, select shards using the default method. + /// _prefer_nodes:<node-id>,<node-id> to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method; /// /// /// /// - /// _shards:<shard>,<shard> to run the search only on the specified shards. You can combine this value with other preference values. However, the _shards value must come first. For example: _shards:2,3|_local. + /// _shards:<shard>,<shard> to run the search only on the specified shards; /// /// /// @@ -860,7 +868,15 @@ internal SearchRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. /// /// - public int? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } + public long? MaxConcurrentShardRequests { get => Q("max_concurrent_shard_requests"); set => Q("max_concurrent_shard_requests", value); } + + /// + /// + /// The minimum version of the node that can handle the request + /// Any handling node with a lower version will fail the request. + /// + /// + public string? MinCompatibleShardNode { get => Q("min_compatible_shard_node"); set => Q("min_compatible_shard_node", value); } /// /// @@ -871,27 +887,27 @@ internal SearchRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// /// /// - /// _only_local to run the search only on shards on the local node. + /// _only_local to run the search only on shards on the local node; /// /// /// /// - /// _local to, if possible, run the search on shards on the local node, or if not, select shards using the default method. + /// _local to, if possible, run the search on shards on the local node, or if not, select shards using the default method; /// /// /// /// - /// _only_nodes:<node-id>,<node-id> to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method. + /// _only_nodes:<node-id>,<node-id> to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method; /// /// /// /// - /// _prefer_nodes:<node-id>,<node-id> to if possible, run the search on the specified nodes IDs. If not, select shards using the default method. + /// _prefer_nodes:<node-id>,<node-id> to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method; /// /// /// /// - /// _shards:<shard>,<shard> to run the search only on the specified shards. You can combine this value with other preference values. However, the _shards value must come first. For example: _shards:2,3|_local. + /// _shards:<shard>,<shard> to run the search only on the specified shards; /// /// /// @@ -1575,12 +1591,24 @@ public Elastic.Clients.Elasticsearch.SearchRequestDescriptor Lenient(bool? value /// This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. /// /// - public Elastic.Clients.Elasticsearch.SearchRequestDescriptor MaxConcurrentShardRequests(int? value) + public Elastic.Clients.Elasticsearch.SearchRequestDescriptor MaxConcurrentShardRequests(long? value) { Instance.MaxConcurrentShardRequests = value; return this; } + /// + /// + /// The minimum version of the node that can handle the request + /// Any handling node with a lower version will fail the request. + /// + /// + public Elastic.Clients.Elasticsearch.SearchRequestDescriptor MinCompatibleShardNode(string? value) + { + Instance.MinCompatibleShardNode = value; + return this; + } + /// /// /// The nodes and shards used for the search. @@ -1590,27 +1618,27 @@ public Elastic.Clients.Elasticsearch.SearchRequestDescriptor MaxConcurrentShardR /// /// /// - /// _only_local to run the search only on shards on the local node. + /// _only_local to run the search only on shards on the local node; /// /// /// /// - /// _local to, if possible, run the search on shards on the local node, or if not, select shards using the default method. + /// _local to, if possible, run the search on shards on the local node, or if not, select shards using the default method; /// /// /// /// - /// _only_nodes:<node-id>,<node-id> to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method. + /// _only_nodes:<node-id>,<node-id> to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method; /// /// /// /// - /// _prefer_nodes:<node-id>,<node-id> to if possible, run the search on the specified nodes IDs. If not, select shards using the default method. + /// _prefer_nodes:<node-id>,<node-id> to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method; /// /// /// /// - /// _shards:<shard>,<shard> to run the search only on the specified shards. You can combine this value with other preference values. However, the _shards value must come first. For example: _shards:2,3|_local. + /// _shards:<shard>,<shard> to run the search only on the specified shards; /// /// /// @@ -3319,12 +3347,24 @@ public Elastic.Clients.Elasticsearch.SearchRequestDescriptor Lenient( /// This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. /// /// - public Elastic.Clients.Elasticsearch.SearchRequestDescriptor MaxConcurrentShardRequests(int? value) + public Elastic.Clients.Elasticsearch.SearchRequestDescriptor MaxConcurrentShardRequests(long? value) { Instance.MaxConcurrentShardRequests = value; return this; } + /// + /// + /// The minimum version of the node that can handle the request + /// Any handling node with a lower version will fail the request. + /// + /// + public Elastic.Clients.Elasticsearch.SearchRequestDescriptor MinCompatibleShardNode(string? value) + { + Instance.MinCompatibleShardNode = value; + return this; + } + /// /// /// The nodes and shards used for the search. @@ -3334,27 +3374,27 @@ public Elastic.Clients.Elasticsearch.SearchRequestDescriptor MaxConcu /// /// /// - /// _only_local to run the search only on shards on the local node. + /// _only_local to run the search only on shards on the local node; /// /// /// /// - /// _local to, if possible, run the search on shards on the local node, or if not, select shards using the default method. + /// _local to, if possible, run the search on shards on the local node, or if not, select shards using the default method; /// /// /// /// - /// _only_nodes:<node-id>,<node-id> to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method. + /// _only_nodes:<node-id>,<node-id> to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method; /// /// /// /// - /// _prefer_nodes:<node-id>,<node-id> to if possible, run the search on the specified nodes IDs. If not, select shards using the default method. + /// _prefer_nodes:<node-id>,<node-id> to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method; /// /// /// /// - /// _shards:<shard>,<shard> to run the search only on the specified shards. You can combine this value with other preference values. However, the _shards value must come first. For example: _shards:2,3|_local. + /// _shards:<shard>,<shard> to run the search only on the specified shards; /// /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/ClearCacheResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/ClearCacheResponse.g.cs index dbfcc8a5d5f..32eeb83ee7c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/ClearCacheResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchableSnapshots/ClearCacheResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class ClearCacheResponseConverter : System.Text.Json.Ser { public override Elastic.Clients.Elasticsearch.SearchableSnapshots.ClearCacheResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.SearchableSnapshots.ClearCacheResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Result = reader.ReadValue(options, null) }; + return new Elastic.Clients.Elasticsearch.SearchableSnapshots.ClearCacheResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Value = reader.ReadValue(options, null) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.SearchableSnapshots.ClearCacheResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Result, null); + writer.WriteValue(options, value.Value, null); } } @@ -54,5 +54,5 @@ internal ClearCacheResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCons #if NET7_0_OR_GREATER required #endif -object Result { get; set; } +object Value { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeletePrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeletePrivilegesResponse.g.cs index 0f98e2e795b..b70ab7c8247 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeletePrivilegesResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/DeletePrivilegesResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class DeletePrivilegesResponseConverter : System.Text.Js { public override Elastic.Clients.Elasticsearch.Security.DeletePrivilegesResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Security.DeletePrivilegesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Result = reader.ReadValue>>(options, static System.Collections.Generic.IReadOnlyDictionary> (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue>(o, null, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)!) }; + return new Elastic.Clients.Elasticsearch.Security.DeletePrivilegesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>>(options, static System.Collections.Generic.IReadOnlyDictionary> (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue>(o, null, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.DeletePrivilegesResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Result, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary> v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null))); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary> v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null))); } } @@ -54,5 +54,5 @@ internal DeletePrivilegesResponse(Elastic.Clients.Elasticsearch.Serialization.Js #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary> Result { get; set; } +System.Collections.Generic.IReadOnlyDictionary> Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetPrivilegesResponse.g.cs index 8b9b60ed4d7..782c9654622 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetPrivilegesResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetPrivilegesResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetPrivilegesResponseConverter : System.Text.Json. { public override Elastic.Clients.Elasticsearch.Security.GetPrivilegesResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Security.GetPrivilegesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Privileges = reader.ReadValue>>(options, static System.Collections.Generic.IReadOnlyDictionary> (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue>(o, null, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)!) }; + return new Elastic.Clients.Elasticsearch.Security.GetPrivilegesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>>(options, static System.Collections.Generic.IReadOnlyDictionary> (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue>(o, null, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.GetPrivilegesResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Privileges, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary> v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null))); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary> v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null))); } } @@ -54,5 +54,5 @@ internal GetPrivilegesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonC #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary> Privileges { get; set; } +System.Collections.Generic.IReadOnlyDictionary> Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleMappingResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleMappingResponse.g.cs index 5535cb646a1..9f0c86ac2a7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleMappingResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleMappingResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetRoleMappingResponseConverter : System.Text.Json { public override Elastic.Clients.Elasticsearch.Security.GetRoleMappingResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Security.GetRoleMappingResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { RoleMappings = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.Security.GetRoleMappingResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.GetRoleMappingResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.RoleMappings, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetRoleMappingResponse(Elastic.Clients.Elasticsearch.Serialization.Json #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary RoleMappings { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleResponse.g.cs index 1ff6146ab3e..fb7bfa917e9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetRoleResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetRoleResponseConverter : System.Text.Json.Serial { public override Elastic.Clients.Elasticsearch.Security.GetRoleResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Security.GetRoleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Roles = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.Security.GetRoleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.GetRoleResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Roles, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetRoleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstru #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Roles { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceAccountsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceAccountsResponse.g.cs index e5215ea21fb..e0133f703cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceAccountsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetServiceAccountsResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetServiceAccountsResponseConverter : System.Text. { public override Elastic.Clients.Elasticsearch.Security.GetServiceAccountsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Security.GetServiceAccountsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { ServiceAccoutns = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.Security.GetServiceAccountsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.GetServiceAccountsResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.ServiceAccoutns, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetServiceAccountsResponse(Elastic.Clients.Elasticsearch.Serialization. #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary ServiceAccoutns { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserResponse.g.cs index 44737da4592..d2fba9a0e57 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetUserResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetUserResponseConverter : System.Text.Json.Serial { public override Elastic.Clients.Elasticsearch.Security.GetUserResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Security.GetUserResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Users = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.Security.GetUserResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.GetUserResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Users, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetUserResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstru #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Users { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutPrivilegesResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutPrivilegesResponse.g.cs index 7f74f2a6212..b3af86edc16 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutPrivilegesResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutPrivilegesResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class PutPrivilegesResponseConverter : System.Text.Json. { public override Elastic.Clients.Elasticsearch.Security.PutPrivilegesResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Security.PutPrivilegesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Result = reader.ReadValue>>(options, static System.Collections.Generic.IReadOnlyDictionary> (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue>(o, null, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)!) }; + return new Elastic.Clients.Elasticsearch.Security.PutPrivilegesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>>(options, static System.Collections.Generic.IReadOnlyDictionary> (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue>(o, null, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.PutPrivilegesResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Result, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary> v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null))); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary> v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null))); } } @@ -54,5 +54,5 @@ internal PutPrivilegesResponse(Elastic.Clients.Elasticsearch.Serialization.JsonC #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary> Result { get; set; } +System.Collections.Generic.IReadOnlyDictionary> Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingRequest.g.cs index b3742d58d37..e52a2c49b9d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingRequest.g.cs @@ -470,18 +470,6 @@ public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Ru return this; } - /// - /// - /// The rules that determine which users should be matched by the mapping. - /// A rule is a logical condition that is expressed by using a JSON DSL. - /// - /// - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Rules(System.Action> action) - { - Instance.Rules = Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor.Build(action); - return this; - } - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor RunAs(System.Collections.Generic.ICollection? value) { Instance.RunAs = value; @@ -543,296 +531,4 @@ public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Re Instance.RequestConfiguration = configurationSelector.Invoke(Instance.RequestConfiguration is null ? new Elastic.Transport.RequestConfigurationDescriptor() : new Elastic.Transport.RequestConfigurationDescriptor(Instance.RequestConfiguration)) ?? Instance.RequestConfiguration; return this; } -} - -/// -/// -/// Create or update role mappings. -/// -/// -/// Role mappings define which roles are assigned to each user. -/// Each mapping has rules that identify users and a list of roles that are granted to those users. -/// The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files. -/// -/// -/// NOTE: This API does not create roles. Rather, it maps users to existing roles. -/// Roles can be created by using the create or update roles API or roles files. -/// -/// -/// Role templates -/// -/// -/// The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name. -/// For example, all users in the cn=admin,dc=example,dc=com LDAP group should be given the superuser role in Elasticsearch. -/// The roles field is used for this purpose. -/// -/// -/// For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user. -/// The role_templates field is used for this purpose. -/// -/// -/// NOTE: To use role templates successfully, the relevant scripting feature must be enabled. -/// Otherwise, all attempts to create a role mapping with role templates fail. -/// -/// -/// All of the user fields that are available in the role mapping rules are also available in the role templates. -/// Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated. -/// -/// -/// By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user. -/// If the format of the template is set to "json" then the template is expected to produce a JSON string or an array of JSON strings for the role names. -/// -/// -public readonly partial struct PutRoleMappingRequestDescriptor -{ - internal Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequest Instance { get; init; } - - [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public PutRoleMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequest instance) - { - Instance = instance; - } - - public PutRoleMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Name name) - { - Instance = new Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequest(name); - } - - [System.Obsolete("The use of the parameterless constructor is not permitted for this type.")] - public PutRoleMappingRequestDescriptor() - { - throw new System.InvalidOperationException("The use of the parameterless constructor is not permitted for this type."); - } - - public static explicit operator Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor(Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequest instance) => new Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor(instance); - public static implicit operator Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequest(Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor descriptor) => descriptor.Instance; - - /// - /// - /// The distinct name that identifies the role mapping. - /// The name is used solely as an identifier to facilitate interaction via the API; it does not affect the behavior of the mapping in any way. - /// - /// - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name value) - { - Instance.Name = value; - return this; - } - - /// - /// - /// If true (the default) then refresh the affected shards to make this operation visible to search, if wait_for then wait for a refresh to make this operation visible to search, if false then do nothing with refreshes. - /// - /// - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Refresh(Elastic.Clients.Elasticsearch.Refresh? value) - { - Instance.Refresh = value; - return this; - } - - /// - /// - /// Mappings that have enabled set to false are ignored when role mapping is performed. - /// - /// - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Enabled(bool? value = true) - { - Instance.Enabled = value; - return this; - } - - /// - /// - /// Additional metadata that helps define which roles are assigned to each user. - /// Within the metadata object, keys beginning with _ are reserved for system usage. - /// - /// - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Metadata(System.Collections.Generic.IDictionary? value) - { - Instance.Metadata = value; - return this; - } - - /// - /// - /// Additional metadata that helps define which roles are assigned to each user. - /// Within the metadata object, keys beginning with _ are reserved for system usage. - /// - /// - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Metadata() - { - Instance.Metadata = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringObject.Build(null); - return this; - } - - /// - /// - /// Additional metadata that helps define which roles are assigned to each user. - /// Within the metadata object, keys beginning with _ are reserved for system usage. - /// - /// - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Metadata(System.Action? action) - { - Instance.Metadata = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringObject.Build(action); - return this; - } - - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor AddMetadatum(string key, object value) - { - Instance.Metadata ??= new System.Collections.Generic.Dictionary(); - Instance.Metadata.Add(key, value); - return this; - } - - /// - /// - /// A list of role names that are granted to the users that match the role mapping rules. - /// Exactly one of roles or role_templates must be specified. - /// - /// - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Roles(System.Collections.Generic.ICollection? value) - { - Instance.Roles = value; - return this; - } - - /// - /// - /// A list of role names that are granted to the users that match the role mapping rules. - /// Exactly one of roles or role_templates must be specified. - /// - /// - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Roles(params string[] values) - { - Instance.Roles = [.. values]; - return this; - } - - /// - /// - /// A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules. - /// Exactly one of roles or role_templates must be specified. - /// - /// - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor RoleTemplates(System.Collections.Generic.ICollection? value) - { - Instance.RoleTemplates = value; - return this; - } - - /// - /// - /// A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules. - /// Exactly one of roles or role_templates must be specified. - /// - /// - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor RoleTemplates(params Elastic.Clients.Elasticsearch.Security.RoleTemplate[] values) - { - Instance.RoleTemplates = [.. values]; - return this; - } - - /// - /// - /// A list of Mustache templates that will be evaluated to determine the roles names that should granted to the users that match the role mapping rules. - /// Exactly one of roles or role_templates must be specified. - /// - /// - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor RoleTemplates(params System.Action[] actions) - { - var items = new System.Collections.Generic.List(); - foreach (var action in actions) - { - items.Add(Elastic.Clients.Elasticsearch.Security.RoleTemplateDescriptor.Build(action)); - } - - Instance.RoleTemplates = items; - return this; - } - - /// - /// - /// The rules that determine which users should be matched by the mapping. - /// A rule is a logical condition that is expressed by using a JSON DSL. - /// - /// - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Rules(Elastic.Clients.Elasticsearch.Security.RoleMappingRule? value) - { - Instance.Rules = value; - return this; - } - - /// - /// - /// The rules that determine which users should be matched by the mapping. - /// A rule is a logical condition that is expressed by using a JSON DSL. - /// - /// - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Rules(System.Action> action) - { - Instance.Rules = Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor.Build(action); - return this; - } - - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor RunAs(System.Collections.Generic.ICollection? value) - { - Instance.RunAs = value; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor RunAs(params string[] values) - { - Instance.RunAs = [.. values]; - return this; - } - - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - internal static Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequest Build(System.Action> action) - { - var builder = new Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor(new Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); - action.Invoke(builder); - return builder.Instance; - } - - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor ErrorTrace(bool? value) - { - Instance.ErrorTrace = value; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor FilterPath(params string[]? value) - { - Instance.FilterPath = value; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Human(bool? value) - { - Instance.Human = value; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor Pretty(bool? value) - { - Instance.Pretty = value; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor SourceQueryString(string? value) - { - Instance.SourceQueryString = value; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor RequestConfiguration(Elastic.Transport.IRequestConfiguration? value) - { - Instance.RequestConfiguration = value; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor RequestConfiguration(System.Func? configurationSelector) - { - Instance.RequestConfiguration = configurationSelector.Invoke(Instance.RequestConfiguration is null ? new Elastic.Transport.RequestConfigurationDescriptor() : new Elastic.Transport.RequestConfigurationDescriptor(Instance.RequestConfiguration)) ?? Instance.RequestConfiguration; - return this; - } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleRequest.g.cs index 72cb89142ec..99305c55bf8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleRequest.g.cs @@ -191,7 +191,7 @@ internal PutRoleRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// /// - /// The name of the role that is being created or updated. On Elasticsearch Serverless, the role name must begin with a letter or digit and can only contain letters, digits and the characters '_', '-', and '.'. Each role must have a unique name, as this will serve as the identifier for that role. + /// The name of the role. /// /// public @@ -318,7 +318,7 @@ public PutRoleRequestDescriptor() /// /// - /// The name of the role that is being created or updated. On Elasticsearch Serverless, the role name must begin with a letter or digit and can only contain letters, digits and the characters '_', '-', and '.'. Each role must have a unique name, as this will serve as the identifier for that role. + /// The name of the role. /// /// public Elastic.Clients.Elasticsearch.Security.PutRoleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name value) @@ -806,7 +806,7 @@ public PutRoleRequestDescriptor() /// /// - /// The name of the role that is being created or updated. On Elasticsearch Serverless, the role name must begin with a letter or digit and can only contain letters, digits and the characters '_', '-', and '.'. Each role must have a unique name, as this will serve as the identifier for that role. + /// The name of the role. /// /// public Elastic.Clients.Elasticsearch.Security.PutRoleRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CleanupRepositoryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CleanupRepositoryRequest.g.cs index f0d61779324..fb4629fed07 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CleanupRepositoryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CleanupRepositoryRequest.g.cs @@ -27,18 +27,14 @@ public sealed partial class CleanupRepositoryRequestParameters : Elastic.Transpo { /// /// - /// The period to wait for a connection to the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1 + /// Period to wait for a connection to the master node. /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// - /// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. - /// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. - /// To indicate that the request should never timeout, set it to -1. + /// Period to wait for a response. /// /// public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } @@ -107,7 +103,7 @@ internal CleanupRepositoryRequest(Elastic.Clients.Elasticsearch.Serialization.Js /// /// - /// The name of the snapshot repository to clean up. + /// Snapshot repository to clean up. /// /// public @@ -118,18 +114,14 @@ internal CleanupRepositoryRequest(Elastic.Clients.Elasticsearch.Serialization.Js /// /// - /// The period to wait for a connection to the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1 + /// Period to wait for a connection to the master node. /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// - /// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. - /// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. - /// To indicate that the request should never timeout, set it to -1. + /// Period to wait for a response. /// /// public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } @@ -167,7 +159,7 @@ public CleanupRepositoryRequestDescriptor() /// /// - /// The name of the snapshot repository to clean up. + /// Snapshot repository to clean up. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CleanupRepositoryRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name value) @@ -178,9 +170,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CleanupRepositoryRequestDescriptor /// /// - /// The period to wait for a connection to the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1 + /// Period to wait for a connection to the master node. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CleanupRepositoryRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) @@ -191,9 +181,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CleanupRepositoryRequestDescriptor /// /// - /// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. - /// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. - /// To indicate that the request should never timeout, set it to -1. + /// Period to wait for a response. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CleanupRepositoryRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CloneSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CloneSnapshotRequest.g.cs index a233ae0251c..863d5da7241 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CloneSnapshotRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CloneSnapshotRequest.g.cs @@ -27,9 +27,7 @@ public sealed partial class CloneSnapshotRequestParameters : Elastic.Transport.R { /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } @@ -115,7 +113,7 @@ internal CloneSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// /// - /// The name of the snapshot repository that both source and target snapshot belong to. + /// A repository name /// /// public @@ -126,7 +124,7 @@ internal CloneSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// /// - /// The source snapshot name. + /// The name of the snapshot to clone from /// /// public @@ -137,7 +135,7 @@ internal CloneSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// /// - /// The target snapshot name. + /// The name of the cloned snapshot to create /// /// public @@ -148,19 +146,10 @@ internal CloneSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } - - /// - /// - /// A comma-separated list of indices to include in the snapshot. - /// Multi-target syntax is supported. - /// - /// public #if NET7_0_OR_GREATER required @@ -202,7 +191,7 @@ public CloneSnapshotRequestDescriptor() /// /// - /// The name of the snapshot repository that both source and target snapshot belong to. + /// A repository name /// /// public Elastic.Clients.Elasticsearch.Snapshot.CloneSnapshotRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Name value) @@ -213,7 +202,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CloneSnapshotRequestDescriptor Rep /// /// - /// The source snapshot name. + /// The name of the snapshot to clone from /// /// public Elastic.Clients.Elasticsearch.Snapshot.CloneSnapshotRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Name value) @@ -224,7 +213,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CloneSnapshotRequestDescriptor Sna /// /// - /// The target snapshot name. + /// The name of the cloned snapshot to create /// /// public Elastic.Clients.Elasticsearch.Snapshot.CloneSnapshotRequestDescriptor TargetSnapshot(Elastic.Clients.Elasticsearch.Name value) @@ -235,9 +224,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CloneSnapshotRequestDescriptor Tar /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Snapshot.CloneSnapshotRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) @@ -246,12 +233,6 @@ public Elastic.Clients.Elasticsearch.Snapshot.CloneSnapshotRequestDescriptor Mas return this; } - /// - /// - /// A comma-separated list of indices to include in the snapshot. - /// Multi-target syntax is supported. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.CloneSnapshotRequestDescriptor Indices(string value) { Instance.Indices = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateRepositoryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateRepositoryRequest.g.cs index d6c38ee0690..221c1f1b942 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateRepositoryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateRepositoryRequest.g.cs @@ -27,27 +27,21 @@ public sealed partial class CreateRepositoryRequestParameters : Elastic.Transpor { /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// - /// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. - /// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout /// /// public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } /// /// - /// If true, the request verifies the repository is functional on all master and data nodes in the cluster. - /// If false, this verification is skipped. - /// You can also perform this verification with the verify snapshot repository API. + /// Whether to verify the repository after creation /// /// public bool? Verify { get => Q("verify"); set => Q("verify", value); } @@ -73,10 +67,6 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// To register a snapshot repository, the cluster's global metadata must be writeable. /// Ensure there are no cluster blocks (for example, cluster.blocks.read_only and clsuter.blocks.read_only_allow_delete settings) that prevent write access. /// -/// -/// Several options for this API can be specified using a query parameter or a request body parameter. -/// If both parameters are specified, only the query parameter is used. -/// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Snapshot.CreateRepositoryRequestConverter))] public sealed partial class CreateRepositoryRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest @@ -113,7 +103,7 @@ internal CreateRepositoryRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// /// - /// The name of the snapshot repository to register or update. + /// A repository name /// /// public @@ -124,27 +114,21 @@ internal CreateRepositoryRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// - /// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. - /// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout /// /// public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } /// /// - /// If true, the request verifies the repository is functional on all master and data nodes in the cluster. - /// If false, this verification is skipped. - /// You can also perform this verification with the verify snapshot repository API. + /// Whether to verify the repository after creation /// /// public bool? Verify { get => Q("verify"); set => Q("verify", value); } @@ -162,10 +146,6 @@ internal CreateRepositoryRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// To register a snapshot repository, the cluster's global metadata must be writeable. /// Ensure there are no cluster blocks (for example, cluster.blocks.read_only and clsuter.blocks.read_only_allow_delete settings) that prevent write access. /// -/// -/// Several options for this API can be specified using a query parameter or a request body parameter. -/// If both parameters are specified, only the query parameter is used. -/// /// public readonly partial struct CreateRepositoryRequestDescriptor { @@ -195,7 +175,7 @@ public CreateRepositoryRequestDescriptor() /// /// - /// The name of the snapshot repository to register or update. + /// A repository name /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateRepositoryRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name value) @@ -206,9 +186,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateRepositoryRequestDescriptor /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateRepositoryRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) @@ -219,9 +197,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateRepositoryRequestDescriptor /// /// - /// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. - /// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateRepositoryRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) @@ -232,9 +208,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateRepositoryRequestDescriptor /// /// - /// If true, the request verifies the repository is functional on all master and data nodes in the cluster. - /// If false, this verification is skipped. - /// You can also perform this verification with the verify snapshot repository API. + /// Whether to verify the repository after creation /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateRepositoryRequestDescriptor Verify(bool? value = true) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotRequest.g.cs index ccd1c8aa349..6db739899bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotRequest.g.cs @@ -27,16 +27,14 @@ public sealed partial class CreateSnapshotRequestParameters : Elastic.Transport. { /// /// - /// The 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. + /// 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. /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// - /// If true, the request returns a response when the snapshot is complete. - /// If false, the request returns a response when the snapshot initializes. + /// If true, the request returns a response when the snapshot is complete. If false, the request returns a response when the snapshot initializes. /// /// public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } @@ -44,7 +42,6 @@ public sealed partial class CreateSnapshotRequestParameters : Elastic.Transport. internal sealed partial class CreateSnapshotRequestConverter : System.Text.Json.Serialization.JsonConverter { - private static readonly System.Text.Json.JsonEncodedText PropExpandWildcards = System.Text.Json.JsonEncodedText.Encode("expand_wildcards"); private static readonly System.Text.Json.JsonEncodedText PropFeatureStates = System.Text.Json.JsonEncodedText.Encode("feature_states"); private static readonly System.Text.Json.JsonEncodedText PropIgnoreUnavailable = System.Text.Json.JsonEncodedText.Encode("ignore_unavailable"); private static readonly System.Text.Json.JsonEncodedText PropIncludeGlobalState = System.Text.Json.JsonEncodedText.Encode("include_global_state"); @@ -55,7 +52,6 @@ internal sealed partial class CreateSnapshotRequestConverter : System.Text.Json. public override Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequest Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue?> propExpandWildcards = default; LocalJsonValue?> propFeatureStates = default; LocalJsonValue propIgnoreUnavailable = default; LocalJsonValue propIncludeGlobalState = default; @@ -64,11 +60,6 @@ public override Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequest Rea LocalJsonValue propPartial = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExpandWildcards.TryReadProperty(ref reader, options, PropExpandWildcards, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null))) - { - continue; - } - if (propFeatureStates.TryReadProperty(ref reader, options, PropFeatureStates, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) { continue; @@ -111,7 +102,6 @@ public override Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequest Rea reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { - ExpandWildcards = propExpandWildcards.Value, FeatureStates = propFeatureStates.Value, IgnoreUnavailable = propIgnoreUnavailable.Value, IncludeGlobalState = propIncludeGlobalState.Value, @@ -124,7 +114,6 @@ public override Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequest Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExpandWildcards, value.ExpandWildcards, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropFeatureStates, value.FeatureStates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, null); writer.WriteProperty(options, PropIncludeGlobalState, value.IncludeGlobalState, null, null); @@ -169,7 +158,7 @@ internal CreateSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// - /// The name of the repository for the snapshot. + /// Repository for the snapshot. /// /// public @@ -180,9 +169,7 @@ internal CreateSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// - /// The name of the snapshot. - /// It supportes date math. - /// It must be unique in the repository. + /// Name of the snapshot. Must be unique in the repository. /// /// public @@ -193,93 +180,56 @@ internal CreateSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// - /// The 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. + /// 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. /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// - /// If true, the request returns a response when the snapshot is complete. - /// If false, the request returns a response when the snapshot initializes. + /// If true, the request returns a response when the snapshot is complete. If false, the request returns a response when the snapshot initializes. /// /// public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } /// /// - /// Determines how wildcard patterns in the indices parameter match data streams and indices. - /// It supports comma-separated values such as open,hidden. - /// - /// - public System.Collections.Generic.ICollection? ExpandWildcards { get; set; } - - /// - /// - /// The feature states to include in the snapshot. - /// Each feature state includes one or more system indices containing related data. - /// You can view a list of eligible features using the get features API. - /// - /// - /// If include_global_state is true, all current feature states are included by default. - /// If include_global_state is false, no feature states are included by default. - /// - /// - /// Note that specifying an empty array will result in the default behavior. - /// To exclude all feature states, regardless of the include_global_state value, specify an array with only the value none (["none"]). + /// Feature states to include in the snapshot. Each feature state includes one or more system indices containing related data. You can view a list of eligible features using the get features API. If include_global_state is true, all current feature states are included by default. If include_global_state is false, no feature states are included by default. /// /// public System.Collections.Generic.ICollection? FeatureStates { get; set; } /// /// - /// If true, the request ignores data streams and indices in indices that are missing or closed. - /// If false, the request returns an error for any data stream or index that is missing or closed. + /// If true, the request ignores data streams and indices in indices that are missing or closed. If false, the request returns an error for any data stream or index that is missing or closed. /// /// public bool? IgnoreUnavailable { get; set; } /// /// - /// If true, the current cluster state is included in the snapshot. - /// The cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies. - /// It also includes data stored in system indices, such as Watches and task records (configurable via feature_states). + /// If true, the current cluster state is included in the snapshot. The cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies. It also includes data stored in system indices, such as Watches and task records (configurable via feature_states). /// /// public bool? IncludeGlobalState { get; set; } /// /// - /// A comma-separated list of data streams and indices to include in the snapshot. - /// It supports a multi-target syntax. - /// The default is an empty array ([]), which includes all regular data streams and regular indices. - /// To exclude all data streams and indices, use -*. - /// - /// - /// You can't use this parameter to include or exclude system indices or system data streams from a snapshot. - /// Use feature_states instead. + /// Data streams and indices to include in the snapshot. Supports multi-target syntax. Includes all data streams and indices by default. /// /// public Elastic.Clients.Elasticsearch.Indices? Indices { get; set; } /// /// - /// Arbitrary metadata to the snapshot, such as a record of who took the snapshot, why it was taken, or any other useful data. - /// It can have any contents but it must be less than 1024 bytes. - /// This information is not automatically generated by Elasticsearch. + /// Optional metadata for the snapshot. May have any contents. Must be less than 1024 bytes. This map is not automatically generated by Elasticsearch. /// /// public System.Collections.Generic.IDictionary? Metadata { get; set; } /// /// - /// If true, it enables you to restore a partial snapshot of indices with unavailable shards. - /// Only shards that were successfully included in the snapshot will be restored. - /// All missing shards will be recreated as empty. - /// - /// - /// If false, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available. + /// If true, allows restoring a partial snapshot of indices with unavailable shards. Only shards that were successfully included in the snapshot will be restored. All missing shards will be recreated as empty. If false, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available. /// /// public bool? Partial { get; set; } @@ -317,7 +267,7 @@ public CreateSnapshotRequestDescriptor() /// /// - /// The name of the repository for the snapshot. + /// Repository for the snapshot. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Name value) @@ -328,9 +278,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Re /// /// - /// The name of the snapshot. - /// It supportes date math. - /// It must be unique in the repository. + /// Name of the snapshot. Must be unique in the repository. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Name value) @@ -341,8 +289,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Sn /// /// - /// The 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. + /// 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. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) @@ -353,8 +300,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Ma /// /// - /// If true, the request returns a response when the snapshot is complete. - /// If false, the request returns a response when the snapshot initializes. + /// If true, the request returns a response when the snapshot is complete. If false, the request returns a response when the snapshot initializes. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor WaitForCompletion(bool? value = true) @@ -365,41 +311,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Wa /// /// - /// Determines how wildcard patterns in the indices parameter match data streams and indices. - /// It supports comma-separated values such as open,hidden. - /// - /// - public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor ExpandWildcards(System.Collections.Generic.ICollection? value) - { - Instance.ExpandWildcards = value; - return this; - } - - /// - /// - /// Determines how wildcard patterns in the indices parameter match data streams and indices. - /// It supports comma-separated values such as open,hidden. - /// - /// - public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor ExpandWildcards(params Elastic.Clients.Elasticsearch.ExpandWildcard[] values) - { - Instance.ExpandWildcards = [.. values]; - return this; - } - - /// - /// - /// The feature states to include in the snapshot. - /// Each feature state includes one or more system indices containing related data. - /// You can view a list of eligible features using the get features API. - /// - /// - /// If include_global_state is true, all current feature states are included by default. - /// If include_global_state is false, no feature states are included by default. - /// - /// - /// Note that specifying an empty array will result in the default behavior. - /// To exclude all feature states, regardless of the include_global_state value, specify an array with only the value none (["none"]). + /// Feature states to include in the snapshot. Each feature state includes one or more system indices containing related data. You can view a list of eligible features using the get features API. If include_global_state is true, all current feature states are included by default. If include_global_state is false, no feature states are included by default. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor FeatureStates(System.Collections.Generic.ICollection? value) @@ -410,17 +322,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Fe /// /// - /// The feature states to include in the snapshot. - /// Each feature state includes one or more system indices containing related data. - /// You can view a list of eligible features using the get features API. - /// - /// - /// If include_global_state is true, all current feature states are included by default. - /// If include_global_state is false, no feature states are included by default. - /// - /// - /// Note that specifying an empty array will result in the default behavior. - /// To exclude all feature states, regardless of the include_global_state value, specify an array with only the value none (["none"]). + /// Feature states to include in the snapshot. Each feature state includes one or more system indices containing related data. You can view a list of eligible features using the get features API. If include_global_state is true, all current feature states are included by default. If include_global_state is false, no feature states are included by default. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor FeatureStates(params string[] values) @@ -431,8 +333,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Fe /// /// - /// If true, the request ignores data streams and indices in indices that are missing or closed. - /// If false, the request returns an error for any data stream or index that is missing or closed. + /// If true, the request ignores data streams and indices in indices that are missing or closed. If false, the request returns an error for any data stream or index that is missing or closed. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor IgnoreUnavailable(bool? value = true) @@ -443,9 +344,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Ig /// /// - /// If true, the current cluster state is included in the snapshot. - /// The cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies. - /// It also includes data stored in system indices, such as Watches and task records (configurable via feature_states). + /// If true, the current cluster state is included in the snapshot. The cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies. It also includes data stored in system indices, such as Watches and task records (configurable via feature_states). /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor IncludeGlobalState(bool? value = true) @@ -456,14 +355,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor In /// /// - /// A comma-separated list of data streams and indices to include in the snapshot. - /// It supports a multi-target syntax. - /// The default is an empty array ([]), which includes all regular data streams and regular indices. - /// To exclude all data streams and indices, use -*. - /// - /// - /// You can't use this parameter to include or exclude system indices or system data streams from a snapshot. - /// Use feature_states instead. + /// Data streams and indices to include in the snapshot. Supports multi-target syntax. Includes all data streams and indices by default. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? value) @@ -474,9 +366,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor In /// /// - /// Arbitrary metadata to the snapshot, such as a record of who took the snapshot, why it was taken, or any other useful data. - /// It can have any contents but it must be less than 1024 bytes. - /// This information is not automatically generated by Elasticsearch. + /// Optional metadata for the snapshot. May have any contents. Must be less than 1024 bytes. This map is not automatically generated by Elasticsearch. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Metadata(System.Collections.Generic.IDictionary? value) @@ -487,9 +377,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Me /// /// - /// Arbitrary metadata to the snapshot, such as a record of who took the snapshot, why it was taken, or any other useful data. - /// It can have any contents but it must be less than 1024 bytes. - /// This information is not automatically generated by Elasticsearch. + /// Optional metadata for the snapshot. May have any contents. Must be less than 1024 bytes. This map is not automatically generated by Elasticsearch. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Metadata() @@ -500,9 +388,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Me /// /// - /// Arbitrary metadata to the snapshot, such as a record of who took the snapshot, why it was taken, or any other useful data. - /// It can have any contents but it must be less than 1024 bytes. - /// This information is not automatically generated by Elasticsearch. + /// Optional metadata for the snapshot. May have any contents. Must be less than 1024 bytes. This map is not automatically generated by Elasticsearch. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Metadata(System.Action? action) @@ -520,12 +406,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Ad /// /// - /// If true, it enables you to restore a partial snapshot of indices with unavailable shards. - /// Only shards that were successfully included in the snapshot will be restored. - /// All missing shards will be recreated as empty. - /// - /// - /// If false, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available. + /// If true, allows restoring a partial snapshot of indices with unavailable shards. Only shards that were successfully included in the snapshot will be restored. All missing shards will be recreated as empty. If false, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available. /// /// public Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequestDescriptor Partial(bool? value = true) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/DeleteRepositoryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/DeleteRepositoryRequest.g.cs index f08c12b81a6..a6a3c2c516b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/DeleteRepositoryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/DeleteRepositoryRequest.g.cs @@ -27,18 +27,14 @@ public sealed partial class DeleteRepositoryRequestParameters : Elastic.Transpor { /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// - /// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. - /// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout /// /// public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } @@ -108,8 +104,7 @@ internal DeleteRepositoryRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// /// - /// The ame of the snapshot repositories to unregister. - /// Wildcard (*) patterns are supported. + /// Name of the snapshot repository to unregister. Wildcard (*) patterns are supported. /// /// public @@ -120,18 +115,14 @@ internal DeleteRepositoryRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// - /// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. - /// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout /// /// public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } @@ -170,8 +161,7 @@ public DeleteRepositoryRequestDescriptor() /// /// - /// The ame of the snapshot repositories to unregister. - /// Wildcard (*) patterns are supported. + /// Name of the snapshot repository to unregister. Wildcard (*) patterns are supported. /// /// public Elastic.Clients.Elasticsearch.Snapshot.DeleteRepositoryRequestDescriptor Name(Elastic.Clients.Elasticsearch.Names value) @@ -182,9 +172,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.DeleteRepositoryRequestDescriptor /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Snapshot.DeleteRepositoryRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) @@ -195,9 +183,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.DeleteRepositoryRequestDescriptor /// /// - /// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. - /// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout /// /// public Elastic.Clients.Elasticsearch.Snapshot.DeleteRepositoryRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/DeleteSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/DeleteSnapshotRequest.g.cs index 17b6bbdb543..afec2b79baa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/DeleteSnapshotRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/DeleteSnapshotRequest.g.cs @@ -27,9 +27,7 @@ public sealed partial class DeleteSnapshotRequestParameters : Elastic.Transport. { /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } @@ -97,7 +95,7 @@ internal DeleteSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// - /// The name of the repository to delete a snapshot from. + /// A repository name /// /// public @@ -108,8 +106,7 @@ internal DeleteSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// - /// A comma-separated list of snapshot names to delete. - /// It also accepts wildcards (*). + /// A comma-separated list of snapshot names /// /// public @@ -120,9 +117,7 @@ internal DeleteSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } @@ -159,7 +154,7 @@ public DeleteSnapshotRequestDescriptor() /// /// - /// The name of the repository to delete a snapshot from. + /// A repository name /// /// public Elastic.Clients.Elasticsearch.Snapshot.DeleteSnapshotRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Name value) @@ -170,8 +165,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.DeleteSnapshotRequestDescriptor Re /// /// - /// A comma-separated list of snapshot names to delete. - /// It also accepts wildcards (*). + /// A comma-separated list of snapshot names /// /// public Elastic.Clients.Elasticsearch.Snapshot.DeleteSnapshotRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Name value) @@ -182,9 +176,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.DeleteSnapshotRequestDescriptor Sn /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Snapshot.DeleteSnapshotRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetRepositoryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetRepositoryRequest.g.cs index dd3a91c2b9f..18cf6dcaf63 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetRepositoryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetRepositoryRequest.g.cs @@ -27,17 +27,14 @@ public sealed partial class GetRepositoryRequestParameters : Elastic.Transport.R { /// /// - /// If true, the request gets information from the local node only. - /// If false, the request gets information from the master node. + /// Return local information, do not retrieve the state from master node (default: false) /// /// public bool? Local { get => Q("local"); set => Q("local", value); } /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } @@ -109,28 +106,21 @@ internal GetRepositoryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// /// - /// A comma-separated list of snapshot repository names used to limit the request. - /// Wildcard (*) expressions are supported including combining wildcards with exclude patterns starting with -. - /// - /// - /// To get information about all snapshot repositories registered in the cluster, omit this parameter or use * or _all. + /// A comma-separated list of repository names /// /// public Elastic.Clients.Elasticsearch.Names? Name { get => P("repository"); set => PO("repository", value); } /// /// - /// If true, the request gets information from the local node only. - /// If false, the request gets information from the master node. + /// Return local information, do not retrieve the state from master node (default: false) /// /// public bool? Local { get => Q("local"); set => Q("local", value); } /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } @@ -166,11 +156,7 @@ public GetRepositoryRequestDescriptor() /// /// - /// A comma-separated list of snapshot repository names used to limit the request. - /// Wildcard (*) expressions are supported including combining wildcards with exclude patterns starting with -. - /// - /// - /// To get information about all snapshot repositories registered in the cluster, omit this parameter or use * or _all. + /// A comma-separated list of repository names /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetRepositoryRequestDescriptor Name(Elastic.Clients.Elasticsearch.Names? value) @@ -181,8 +167,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetRepositoryRequestDescriptor Nam /// /// - /// If true, the request gets information from the local node only. - /// If false, the request gets information from the master node. + /// Return local information, do not retrieve the state from master node (default: false) /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetRepositoryRequestDescriptor Local(bool? value = true) @@ -193,9 +178,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetRepositoryRequestDescriptor Loc /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetRepositoryRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetRepositoryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetRepositoryResponse.g.cs index d905bdabc2c..75a100c62fb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetRepositoryResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetRepositoryResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetRepositoryResponseConverter : System.Text.Json. { public override Elastic.Clients.Elasticsearch.Snapshot.GetRepositoryResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Snapshot.GetRepositoryResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Repositories = reader.ReadValue(options, null) }; + return new Elastic.Clients.Elasticsearch.Snapshot.GetRepositoryResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue(options, null) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Snapshot.GetRepositoryResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Repositories, null); + writer.WriteValue(options, value.Values, null); } } @@ -54,5 +54,5 @@ internal GetRepositoryResponse(Elastic.Clients.Elasticsearch.Serialization.JsonC #if NET7_0_OR_GREATER required #endif -Elastic.Clients.Elasticsearch.Snapshot.Repositories Repositories { get; set; } +Elastic.Clients.Elasticsearch.Snapshot.Repositories Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetSnapshotRequest.g.cs index 798a4877fdd..d7b11edd633 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetSnapshotRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetSnapshotRequest.g.cs @@ -27,53 +27,49 @@ public sealed partial class GetSnapshotRequestParameters : Elastic.Transport.Req { /// /// - /// An offset identifier to start pagination from as returned by the next field in the response body. + /// Offset identifier to start pagination from as returned by the next field in the response body. /// /// public string? After { get => Q("after"); set => Q("after", value); } /// /// - /// The value of the current sort column at which to start retrieval. - /// It can be a string snapshot- or a repository name when sorting by snapshot or repository name. - /// It can be a millisecond time value or a number when sorting by index- or shard count. + /// Value of the current sort column at which to start retrieval. Can either be a string snapshot- or repository name when sorting by snapshot or repository name, a millisecond time value or a number when sorting by index- or shard count. /// /// public string? FromSortValue { get => Q("from_sort_value"); set => Q("from_sort_value", value); } /// /// - /// If false, the request returns an error for any snapshots that are unavailable. + /// If false, the request returns an error for any snapshots that are unavailable. /// /// public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } /// /// - /// If true, the response includes the repository name in each snapshot. + /// If true, returns the repository name in each snapshot. /// /// public bool? IncludeRepository { get => Q("include_repository"); set => Q("include_repository", value); } /// /// - /// If true, the response includes additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index. - /// The default is false, meaning that this information is omitted. + /// If true, returns additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index. Defaults to false, meaning that this information is omitted. /// /// public bool? IndexDetails { get => Q("index_details"); set => Q("index_details", value); } /// /// - /// If true, the response includes the name of each index in each snapshot. + /// If true, returns the name of each index in each snapshot. /// /// public bool? IndexNames { get => Q("index_names"); set => Q("index_names", value); } /// /// - /// The 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. + /// 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. /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } @@ -87,48 +83,35 @@ public sealed partial class GetSnapshotRequestParameters : Elastic.Transport.Req /// /// - /// The sort order. - /// Valid values are asc for ascending and desc for descending order. - /// The default behavior is ascending order. + /// Sort order. Valid values are asc for ascending and desc for descending order. Defaults to asc, meaning ascending order. /// /// public Elastic.Clients.Elasticsearch.SortOrder? Order { get => Q("order"); set => Q("order", value); } /// /// - /// The maximum number of snapshots to return. - /// The default is 0, which means to return all that match the request without limit. + /// Maximum number of snapshots to return. Defaults to 0 which means return all that match the request without limit. /// /// public int? Size { get => Q("size"); set => Q("size", value); } /// /// - /// Filter snapshots by a comma-separated list of snapshot lifecycle management (SLM) policy names that snapshots belong to. - /// - /// - /// You can use wildcards (*) and combinations of wildcards followed by exclude patterns starting with -. - /// For example, the pattern *,-policy-a-\* will return all snapshots except for those that were created by an SLM policy with a name starting with policy-a-. - /// Note that the wildcard pattern * matches all snapshots created by an SLM policy but not those snapshots that were not created by an SLM policy. - /// To include snapshots that were not created by an SLM policy, you can use the special pattern _none that will match all snapshots without an SLM policy. + /// Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Also accepts wildcards (*) and combinations of wildcards followed by exclude patterns starting with -. To include snapshots not created by an SLM policy you can use the special pattern _none that will match all snapshots without an SLM policy. /// /// public Elastic.Clients.Elasticsearch.Name? SlmPolicyFilter { get => Q("slm_policy_filter"); set => Q("slm_policy_filter", value); } /// /// - /// The sort order for the result. - /// The default behavior is sorting by snapshot start time stamp. + /// Allows setting a sort order for the result. Defaults to start_time, i.e. sorting by snapshot start time stamp. /// /// public Elastic.Clients.Elasticsearch.Snapshot.SnapshotSort? Sort { get => Q("sort"); set => Q("sort", value); } /// /// - /// If true, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted. - /// - /// - /// NOTE: The parameters size, order, after, from_sort_value, offset, slm_policy_filter, and sort are not supported when you set verbose=false and the sort order for requests with verbose=false is undefined. + /// If true, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted. /// /// public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } @@ -167,11 +150,6 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Get snapshot information. /// -/// -/// NOTE: The after parameter and next field enable you to iterate through snapshots with some consistency guarantees regarding concurrent creation or deletion of snapshots. -/// It is guaranteed that any snapshot that exists at the beginning of the iteration and is not concurrently deleted will be seen during the iteration. -/// Snapshots concurrently created may be seen during an iteration. -/// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestConverter))] public sealed partial class GetSnapshotRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest @@ -201,8 +179,7 @@ internal GetSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// /// - /// A comma-separated list of snapshot repository names used to limit the request. - /// Wildcard (*) expressions are supported. + /// Comma-separated list of snapshot repository names used to limit the request. Wildcard (*) expressions are supported. /// /// public @@ -213,18 +190,17 @@ internal GetSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// /// - /// A comma-separated list of snapshot names to retrieve - /// Wildcards (*) are supported. + /// Comma-separated list of snapshot names to retrieve. Also accepts wildcards (*). /// /// /// /// - /// To get information about all snapshots in a registered repository, use a wildcard (*) or _all. + /// To get information about all snapshots in a registered repository, use a wildcard (*) or _all. /// /// /// /// - /// To get information about any snapshots that are currently running, use _current. + /// To get information about any snapshots that are currently running, use _current. /// /// /// @@ -237,53 +213,49 @@ internal GetSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// /// - /// An offset identifier to start pagination from as returned by the next field in the response body. + /// Offset identifier to start pagination from as returned by the next field in the response body. /// /// public string? After { get => Q("after"); set => Q("after", value); } /// /// - /// The value of the current sort column at which to start retrieval. - /// It can be a string snapshot- or a repository name when sorting by snapshot or repository name. - /// It can be a millisecond time value or a number when sorting by index- or shard count. + /// Value of the current sort column at which to start retrieval. Can either be a string snapshot- or repository name when sorting by snapshot or repository name, a millisecond time value or a number when sorting by index- or shard count. /// /// public string? FromSortValue { get => Q("from_sort_value"); set => Q("from_sort_value", value); } /// /// - /// If false, the request returns an error for any snapshots that are unavailable. + /// If false, the request returns an error for any snapshots that are unavailable. /// /// public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } /// /// - /// If true, the response includes the repository name in each snapshot. + /// If true, returns the repository name in each snapshot. /// /// public bool? IncludeRepository { get => Q("include_repository"); set => Q("include_repository", value); } /// /// - /// If true, the response includes additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index. - /// The default is false, meaning that this information is omitted. + /// If true, returns additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index. Defaults to false, meaning that this information is omitted. /// /// public bool? IndexDetails { get => Q("index_details"); set => Q("index_details", value); } /// /// - /// If true, the response includes the name of each index in each snapshot. + /// If true, returns the name of each index in each snapshot. /// /// public bool? IndexNames { get => Q("index_names"); set => Q("index_names", value); } /// /// - /// The 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. + /// 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. /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } @@ -297,48 +269,35 @@ internal GetSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// /// - /// The sort order. - /// Valid values are asc for ascending and desc for descending order. - /// The default behavior is ascending order. + /// Sort order. Valid values are asc for ascending and desc for descending order. Defaults to asc, meaning ascending order. /// /// public Elastic.Clients.Elasticsearch.SortOrder? Order { get => Q("order"); set => Q("order", value); } /// /// - /// The maximum number of snapshots to return. - /// The default is 0, which means to return all that match the request without limit. + /// Maximum number of snapshots to return. Defaults to 0 which means return all that match the request without limit. /// /// public int? Size { get => Q("size"); set => Q("size", value); } /// /// - /// Filter snapshots by a comma-separated list of snapshot lifecycle management (SLM) policy names that snapshots belong to. - /// - /// - /// You can use wildcards (*) and combinations of wildcards followed by exclude patterns starting with -. - /// For example, the pattern *,-policy-a-\* will return all snapshots except for those that were created by an SLM policy with a name starting with policy-a-. - /// Note that the wildcard pattern * matches all snapshots created by an SLM policy but not those snapshots that were not created by an SLM policy. - /// To include snapshots that were not created by an SLM policy, you can use the special pattern _none that will match all snapshots without an SLM policy. + /// Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Also accepts wildcards (*) and combinations of wildcards followed by exclude patterns starting with -. To include snapshots not created by an SLM policy you can use the special pattern _none that will match all snapshots without an SLM policy. /// /// public Elastic.Clients.Elasticsearch.Name? SlmPolicyFilter { get => Q("slm_policy_filter"); set => Q("slm_policy_filter", value); } /// /// - /// The sort order for the result. - /// The default behavior is sorting by snapshot start time stamp. + /// Allows setting a sort order for the result. Defaults to start_time, i.e. sorting by snapshot start time stamp. /// /// public Elastic.Clients.Elasticsearch.Snapshot.SnapshotSort? Sort { get => Q("sort"); set => Q("sort", value); } /// /// - /// If true, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted. - /// - /// - /// NOTE: The parameters size, order, after, from_sort_value, offset, slm_policy_filter, and sort are not supported when you set verbose=false and the sort order for requests with verbose=false is undefined. + /// If true, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted. /// /// public bool? Verbose { get => Q("verbose"); set => Q("verbose", value); } @@ -348,11 +307,6 @@ internal GetSnapshotRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// /// Get snapshot information. /// -/// -/// NOTE: The after parameter and next field enable you to iterate through snapshots with some consistency guarantees regarding concurrent creation or deletion of snapshots. -/// It is guaranteed that any snapshot that exists at the beginning of the iteration and is not concurrently deleted will be seen during the iteration. -/// Snapshots concurrently created may be seen during an iteration. -/// /// public readonly partial struct GetSnapshotRequestDescriptor { @@ -380,8 +334,7 @@ public GetSnapshotRequestDescriptor() /// /// - /// A comma-separated list of snapshot repository names used to limit the request. - /// Wildcard (*) expressions are supported. + /// Comma-separated list of snapshot repository names used to limit the request. Wildcard (*) expressions are supported. /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Name value) @@ -392,18 +345,17 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Repos /// /// - /// A comma-separated list of snapshot names to retrieve - /// Wildcards (*) are supported. + /// Comma-separated list of snapshot names to retrieve. Also accepts wildcards (*). /// /// /// /// - /// To get information about all snapshots in a registered repository, use a wildcard (*) or _all. + /// To get information about all snapshots in a registered repository, use a wildcard (*) or _all. /// /// /// /// - /// To get information about any snapshots that are currently running, use _current. + /// To get information about any snapshots that are currently running, use _current. /// /// /// @@ -416,7 +368,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Snaps /// /// - /// An offset identifier to start pagination from as returned by the next field in the response body. + /// Offset identifier to start pagination from as returned by the next field in the response body. /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor After(string? value) @@ -427,9 +379,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor After /// /// - /// The value of the current sort column at which to start retrieval. - /// It can be a string snapshot- or a repository name when sorting by snapshot or repository name. - /// It can be a millisecond time value or a number when sorting by index- or shard count. + /// Value of the current sort column at which to start retrieval. Can either be a string snapshot- or repository name when sorting by snapshot or repository name, a millisecond time value or a number when sorting by index- or shard count. /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor FromSortValue(string? value) @@ -440,7 +390,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor FromS /// /// - /// If false, the request returns an error for any snapshots that are unavailable. + /// If false, the request returns an error for any snapshots that are unavailable. /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor IgnoreUnavailable(bool? value = true) @@ -451,7 +401,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Ignor /// /// - /// If true, the response includes the repository name in each snapshot. + /// If true, returns the repository name in each snapshot. /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor IncludeRepository(bool? value = true) @@ -462,8 +412,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Inclu /// /// - /// If true, the response includes additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index. - /// The default is false, meaning that this information is omitted. + /// If true, returns additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index. Defaults to false, meaning that this information is omitted. /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor IndexDetails(bool? value = true) @@ -474,7 +423,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Index /// /// - /// If true, the response includes the name of each index in each snapshot. + /// If true, returns the name of each index in each snapshot. /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor IndexNames(bool? value = true) @@ -485,8 +434,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Index /// /// - /// The 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. + /// 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. /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) @@ -508,9 +456,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Offse /// /// - /// The sort order. - /// Valid values are asc for ascending and desc for descending order. - /// The default behavior is ascending order. + /// Sort order. Valid values are asc for ascending and desc for descending order. Defaults to asc, meaning ascending order. /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Order(Elastic.Clients.Elasticsearch.SortOrder? value) @@ -521,8 +467,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Order /// /// - /// The maximum number of snapshots to return. - /// The default is 0, which means to return all that match the request without limit. + /// Maximum number of snapshots to return. Defaults to 0 which means return all that match the request without limit. /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Size(int? value) @@ -533,13 +478,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Size( /// /// - /// Filter snapshots by a comma-separated list of snapshot lifecycle management (SLM) policy names that snapshots belong to. - /// - /// - /// You can use wildcards (*) and combinations of wildcards followed by exclude patterns starting with -. - /// For example, the pattern *,-policy-a-\* will return all snapshots except for those that were created by an SLM policy with a name starting with policy-a-. - /// Note that the wildcard pattern * matches all snapshots created by an SLM policy but not those snapshots that were not created by an SLM policy. - /// To include snapshots that were not created by an SLM policy, you can use the special pattern _none that will match all snapshots without an SLM policy. + /// Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Also accepts wildcards (*) and combinations of wildcards followed by exclude patterns starting with -. To include snapshots not created by an SLM policy you can use the special pattern _none that will match all snapshots without an SLM policy. /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor SlmPolicyFilter(Elastic.Clients.Elasticsearch.Name? value) @@ -550,8 +489,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor SlmPo /// /// - /// The sort order for the result. - /// The default behavior is sorting by snapshot start time stamp. + /// Allows setting a sort order for the result. Defaults to start_time, i.e. sorting by snapshot start time stamp. /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Snapshot.SnapshotSort? value) @@ -562,10 +500,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Sort( /// /// - /// If true, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted. - /// - /// - /// NOTE: The parameters size, order, after, from_sort_value, offset, slm_policy_filter, and sort are not supported when you set verbose=false and the sort order for requests with verbose=false is undefined. + /// If true, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted. /// /// public Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotRequestDescriptor Verbose(bool? value = true) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetSnapshotResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetSnapshotResponse.g.cs index c9e57a752f0..1c39de2c3e1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetSnapshotResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/GetSnapshotResponse.g.cs @@ -25,7 +25,6 @@ namespace Elastic.Clients.Elasticsearch.Snapshot; internal sealed partial class GetSnapshotResponseConverter : System.Text.Json.Serialization.JsonConverter { - private static readonly System.Text.Json.JsonEncodedText PropNext = System.Text.Json.JsonEncodedText.Encode("next"); private static readonly System.Text.Json.JsonEncodedText PropRemaining = System.Text.Json.JsonEncodedText.Encode("remaining"); private static readonly System.Text.Json.JsonEncodedText PropResponses = System.Text.Json.JsonEncodedText.Encode("responses"); private static readonly System.Text.Json.JsonEncodedText PropSnapshots = System.Text.Json.JsonEncodedText.Encode("snapshots"); @@ -34,18 +33,12 @@ internal sealed partial class GetSnapshotResponseConverter : System.Text.Json.Se public override Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propNext = default; LocalJsonValue propRemaining = default; LocalJsonValue?> propResponses = default; LocalJsonValue?> propSnapshots = default; LocalJsonValue propTotal = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNext.TryReadProperty(ref reader, options, PropNext, null)) - { - continue; - } - if (propRemaining.TryReadProperty(ref reader, options, PropRemaining, null)) { continue; @@ -78,7 +71,6 @@ public override Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotResponse Read( reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { - Next = propNext.Value, Remaining = propRemaining.Value, Responses = propResponses.Value, Snapshots = propSnapshots.Value, @@ -89,7 +81,6 @@ public override Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotResponse Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Snapshot.GetSnapshotResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNext, value.Next, null, null); writer.WriteProperty(options, PropRemaining, value.Remaining, null, null); writer.WriteProperty(options, PropResponses, value.Responses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropSnapshots, value.Snapshots, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); @@ -114,15 +105,7 @@ internal GetSnapshotResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// /// - /// If the request contained a size limit and there might be more results, a next field will be added to the response. - /// It can be used as the after query parameter to fetch additional results. - /// - /// - public string? Next { get; set; } - - /// - /// - /// The number of remaining snapshots that were not returned due to size limits and that can be fetched by additional requests using the next field value. + /// The number of remaining snapshots that were not returned due to size limits and that can be fetched by additional requests using the next field value. /// /// public @@ -135,7 +118,7 @@ internal GetSnapshotResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// /// - /// The total number of snapshots that match the request when ignoring the size limit or after query parameter. + /// The total number of snapshots that match the request when ignoring size limit or after query parameter. /// /// public diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RepositoryVerifyIntegrityRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RepositoryVerifyIntegrityRequest.g.cs index c9ed0d9ba55..3e2ac73a102 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RepositoryVerifyIntegrityRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RepositoryVerifyIntegrityRequest.g.cs @@ -27,61 +27,56 @@ public sealed partial class RepositoryVerifyIntegrityRequestParameters : Elastic { /// /// - /// If verify_blob_contents is true, this parameter specifies how many blobs to verify at once. + /// Number of threads to use for reading blob contents /// /// public int? BlobThreadPoolConcurrency { get => Q("blob_thread_pool_concurrency"); set => Q("blob_thread_pool_concurrency", value); } /// /// - /// The maximum number of index snapshots to verify concurrently within each index verification. + /// Number of snapshots to verify concurrently within each index /// /// public int? IndexSnapshotVerificationConcurrency { get => Q("index_snapshot_verification_concurrency"); set => Q("index_snapshot_verification_concurrency", value); } /// /// - /// The number of indices to verify concurrently. - /// The default behavior is to use the entire snapshot_meta thread pool. + /// Number of indices to verify concurrently /// /// public int? IndexVerificationConcurrency { get => Q("index_verification_concurrency"); set => Q("index_verification_concurrency", value); } /// /// - /// If verify_blob_contents is true, this parameter specifies the maximum amount of data that Elasticsearch will read from the repository every second. + /// Rate limit for individual blob verification /// /// public string? MaxBytesPerSec { get => Q("max_bytes_per_sec"); set => Q("max_bytes_per_sec", value); } /// /// - /// The number of shard snapshot failures to track during integrity verification, in order to avoid excessive resource usage. - /// If your repository contains more than this number of shard snapshot failures, the verification will fail. + /// Maximum permitted number of failed shard snapshots /// /// public int? MaxFailedShardSnapshots { get => Q("max_failed_shard_snapshots"); set => Q("max_failed_shard_snapshots", value); } /// /// - /// The maximum number of snapshot metadata operations to run concurrently. - /// The default behavior is to use at most half of the snapshot_meta thread pool at once. + /// Number of threads to use for reading metadata /// /// public int? MetaThreadPoolConcurrency { get => Q("meta_thread_pool_concurrency"); set => Q("meta_thread_pool_concurrency", value); } /// /// - /// The number of snapshots to verify concurrently. - /// The default behavior is to use at most half of the snapshot_meta thread pool at once. + /// Number of snapshots to verify concurrently /// /// public int? SnapshotVerificationConcurrency { get => Q("snapshot_verification_concurrency"); set => Q("snapshot_verification_concurrency", value); } /// /// - /// Indicates whether to verify the checksum of every data blob in the repository. - /// If this feature is enabled, Elasticsearch will read the entire repository contents, which may be extremely slow and expensive. + /// Whether to verify the contents of individual blobs /// /// public bool? VerifyBlobContents { get => Q("verify_blob_contents"); set => Q("verify_blob_contents", value); } @@ -175,16 +170,6 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// NOTE: This API may not work correctly in a mixed-version cluster. /// -/// -/// The default values for the parameters of this API are designed to limit the impact of the integrity verification on other activities in your cluster. -/// For instance, by default it will only use at most half of the snapshot_meta threads to verify the integrity of each snapshot, allowing other snapshot operations to use the other half of this thread pool. -/// If you modify these parameters to speed up the verification process, you risk disrupting other snapshot-related operations in your cluster. -/// For large repositories, consider setting up a separate single-node Elasticsearch cluster just for running the integrity verification API. -/// -/// -/// The response exposes implementation details of the analysis which may change from version to version. -/// The response body format is therefore not considered stable and may be different in newer versions. -/// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestConverter))] public sealed partial class RepositoryVerifyIntegrityRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest @@ -214,7 +199,7 @@ internal RepositoryVerifyIntegrityRequest(Elastic.Clients.Elasticsearch.Serializ /// /// - /// The name of the snapshot repository. + /// A repository name /// /// public @@ -225,61 +210,56 @@ internal RepositoryVerifyIntegrityRequest(Elastic.Clients.Elasticsearch.Serializ /// /// - /// If verify_blob_contents is true, this parameter specifies how many blobs to verify at once. + /// Number of threads to use for reading blob contents /// /// public int? BlobThreadPoolConcurrency { get => Q("blob_thread_pool_concurrency"); set => Q("blob_thread_pool_concurrency", value); } /// /// - /// The maximum number of index snapshots to verify concurrently within each index verification. + /// Number of snapshots to verify concurrently within each index /// /// public int? IndexSnapshotVerificationConcurrency { get => Q("index_snapshot_verification_concurrency"); set => Q("index_snapshot_verification_concurrency", value); } /// /// - /// The number of indices to verify concurrently. - /// The default behavior is to use the entire snapshot_meta thread pool. + /// Number of indices to verify concurrently /// /// public int? IndexVerificationConcurrency { get => Q("index_verification_concurrency"); set => Q("index_verification_concurrency", value); } /// /// - /// If verify_blob_contents is true, this parameter specifies the maximum amount of data that Elasticsearch will read from the repository every second. + /// Rate limit for individual blob verification /// /// public string? MaxBytesPerSec { get => Q("max_bytes_per_sec"); set => Q("max_bytes_per_sec", value); } /// /// - /// The number of shard snapshot failures to track during integrity verification, in order to avoid excessive resource usage. - /// If your repository contains more than this number of shard snapshot failures, the verification will fail. + /// Maximum permitted number of failed shard snapshots /// /// public int? MaxFailedShardSnapshots { get => Q("max_failed_shard_snapshots"); set => Q("max_failed_shard_snapshots", value); } /// /// - /// The maximum number of snapshot metadata operations to run concurrently. - /// The default behavior is to use at most half of the snapshot_meta thread pool at once. + /// Number of threads to use for reading metadata /// /// public int? MetaThreadPoolConcurrency { get => Q("meta_thread_pool_concurrency"); set => Q("meta_thread_pool_concurrency", value); } /// /// - /// The number of snapshots to verify concurrently. - /// The default behavior is to use at most half of the snapshot_meta thread pool at once. + /// Number of snapshots to verify concurrently /// /// public int? SnapshotVerificationConcurrency { get => Q("snapshot_verification_concurrency"); set => Q("snapshot_verification_concurrency", value); } /// /// - /// Indicates whether to verify the checksum of every data blob in the repository. - /// If this feature is enabled, Elasticsearch will read the entire repository contents, which may be extremely slow and expensive. + /// Whether to verify the contents of individual blobs /// /// public bool? VerifyBlobContents { get => Q("verify_blob_contents"); set => Q("verify_blob_contents", value); } @@ -344,16 +324,6 @@ internal RepositoryVerifyIntegrityRequest(Elastic.Clients.Elasticsearch.Serializ /// /// NOTE: This API may not work correctly in a mixed-version cluster. /// -/// -/// The default values for the parameters of this API are designed to limit the impact of the integrity verification on other activities in your cluster. -/// For instance, by default it will only use at most half of the snapshot_meta threads to verify the integrity of each snapshot, allowing other snapshot operations to use the other half of this thread pool. -/// If you modify these parameters to speed up the verification process, you risk disrupting other snapshot-related operations in your cluster. -/// For large repositories, consider setting up a separate single-node Elasticsearch cluster just for running the integrity verification API. -/// -/// -/// The response exposes implementation details of the analysis which may change from version to version. -/// The response body format is therefore not considered stable and may be different in newer versions. -/// /// public readonly partial struct RepositoryVerifyIntegrityRequestDescriptor { @@ -381,7 +351,7 @@ public RepositoryVerifyIntegrityRequestDescriptor() /// /// - /// The name of the snapshot repository. + /// A repository name /// /// public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDescriptor Name(Elastic.Clients.Elasticsearch.Names value) @@ -392,7 +362,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDe /// /// - /// If verify_blob_contents is true, this parameter specifies how many blobs to verify at once. + /// Number of threads to use for reading blob contents /// /// public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDescriptor BlobThreadPoolConcurrency(int? value) @@ -403,7 +373,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDe /// /// - /// The maximum number of index snapshots to verify concurrently within each index verification. + /// Number of snapshots to verify concurrently within each index /// /// public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDescriptor IndexSnapshotVerificationConcurrency(int? value) @@ -414,8 +384,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDe /// /// - /// The number of indices to verify concurrently. - /// The default behavior is to use the entire snapshot_meta thread pool. + /// Number of indices to verify concurrently /// /// public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDescriptor IndexVerificationConcurrency(int? value) @@ -426,7 +395,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDe /// /// - /// If verify_blob_contents is true, this parameter specifies the maximum amount of data that Elasticsearch will read from the repository every second. + /// Rate limit for individual blob verification /// /// public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDescriptor MaxBytesPerSec(string? value) @@ -437,8 +406,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDe /// /// - /// The number of shard snapshot failures to track during integrity verification, in order to avoid excessive resource usage. - /// If your repository contains more than this number of shard snapshot failures, the verification will fail. + /// Maximum permitted number of failed shard snapshots /// /// public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDescriptor MaxFailedShardSnapshots(int? value) @@ -449,8 +417,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDe /// /// - /// The maximum number of snapshot metadata operations to run concurrently. - /// The default behavior is to use at most half of the snapshot_meta thread pool at once. + /// Number of threads to use for reading metadata /// /// public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDescriptor MetaThreadPoolConcurrency(int? value) @@ -461,8 +428,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDe /// /// - /// The number of snapshots to verify concurrently. - /// The default behavior is to use at most half of the snapshot_meta thread pool at once. + /// Number of snapshots to verify concurrently /// /// public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDescriptor SnapshotVerificationConcurrency(int? value) @@ -473,8 +439,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDe /// /// - /// Indicates whether to verify the checksum of every data blob in the repository. - /// If this feature is enabled, Elasticsearch will read the entire repository contents, which may be extremely slow and expensive. + /// Whether to verify the contents of individual blobs /// /// public Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityRequestDescriptor VerifyBlobContents(bool? value = true) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RepositoryVerifyIntegrityResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RepositoryVerifyIntegrityResponse.g.cs index abeb6c2c325..d1c9acd68f5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RepositoryVerifyIntegrityResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RepositoryVerifyIntegrityResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class RepositoryVerifyIntegrityResponseConverter : Syste { public override Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Result = reader.ReadValue(options, null) }; + return new Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Value = reader.ReadValue(options, null) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Snapshot.RepositoryVerifyIntegrityResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Result, null); + writer.WriteValue(options, value.Value, null); } } @@ -54,5 +54,5 @@ internal RepositoryVerifyIntegrityResponse(Elastic.Clients.Elasticsearch.Seriali #if NET7_0_OR_GREATER required #endif -object Result { get; set; } +object Value { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreRequest.g.cs index 41ff80d2630..9497f3cc8f4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreRequest.g.cs @@ -27,21 +27,14 @@ public sealed partial class RestoreRequestParameters : Elastic.Transport.Request { /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// - /// If true, the request returns a response when the restore operation completes. - /// The operation is complete when it finishes all attempts to recover primary shards for restored indices. - /// This applies even if one or more of the recovery attempts fail. - /// - /// - /// If false, the request returns a response when the restore operation initializes. + /// Should this request wait until the operation has completed before returning /// /// public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } @@ -221,7 +214,7 @@ internal RestoreRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// /// - /// The name of the repository to restore a snapshot from. + /// A repository name /// /// public @@ -232,7 +225,7 @@ internal RestoreRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// /// - /// The name of the snapshot to restore. + /// A snapshot name /// /// public @@ -243,171 +236,26 @@ internal RestoreRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// - /// If true, the request returns a response when the restore operation completes. - /// The operation is complete when it finishes all attempts to recover primary shards for restored indices. - /// This applies even if one or more of the recovery attempts fail. - /// - /// - /// If false, the request returns a response when the restore operation initializes. + /// Should this request wait until the operation has completed before returning /// /// public bool? WaitForCompletion { get => Q("wait_for_completion"); set => Q("wait_for_completion", value); } - - /// - /// - /// The feature states to restore. - /// If include_global_state is true, the request restores all feature states in the snapshot by default. - /// If include_global_state is false, the request restores no feature states by default. - /// Note that specifying an empty array will result in the default behavior. - /// To restore no feature states, regardless of the include_global_state value, specify an array containing only the value none (["none"]). - /// - /// public System.Collections.Generic.ICollection? FeatureStates { get; set; } - - /// - /// - /// The index settings to not restore from the snapshot. - /// You can't use this option to ignore index.number_of_shards. - /// - /// - /// For data streams, this option applies only to restored backing indices. - /// New backing indices are configured using the data stream's matching index template. - /// - /// public System.Collections.Generic.ICollection? IgnoreIndexSettings { get; set; } - - /// - /// - /// If true, the request ignores any index or data stream in indices that's missing from the snapshot. - /// If false, the request returns an error for any missing index or data stream. - /// - /// public bool? IgnoreUnavailable { get; set; } - - /// - /// - /// If true, the request restores aliases for any restored data streams and indices. - /// If false, the request doesn’t restore aliases. - /// - /// public bool? IncludeAliases { get; set; } - - /// - /// - /// If true, restore the cluster state. The cluster state includes: - /// - /// - /// - /// - /// Persistent cluster settings - /// - /// - /// - /// - /// Index templates - /// - /// - /// - /// - /// Legacy index templates - /// - /// - /// - /// - /// Ingest pipelines - /// - /// - /// - /// - /// Index lifecycle management (ILM) policies - /// - /// - /// - /// - /// Stored scripts - /// - /// - /// - /// - /// For snapshots taken after 7.12.0, feature states - /// - /// - /// - /// - /// If include_global_state is true, the restore operation merges the legacy index templates in your cluster with the templates contained in the snapshot, replacing any existing ones whose name matches one in the snapshot. - /// It completely removes all persistent settings, non-legacy index templates, ingest pipelines, and ILM lifecycle policies that exist in your cluster and replaces them with the corresponding items from the snapshot. - /// - /// - /// Use the feature_states parameter to configure how feature states are restored. - /// - /// - /// If include_global_state is true and a snapshot was created without a global state then the restore request will fail. - /// - /// public bool? IncludeGlobalState { get; set; } - - /// - /// - /// Index settings to add or change in restored indices, including backing indices. - /// You can't use this option to change index.number_of_shards. - /// - /// - /// For data streams, this option applies only to restored backing indices. - /// New backing indices are configured using the data stream's matching index template. - /// - /// public Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? IndexSettings { get; set; } - - /// - /// - /// A comma-separated list of indices and data streams to restore. - /// It supports a multi-target syntax. - /// The default behavior is all regular indices and regular data streams in the snapshot. - /// - /// - /// You can't use this parameter to restore system indices or system data streams. - /// Use feature_states instead. - /// - /// public Elastic.Clients.Elasticsearch.Indices? Indices { get; set; } - - /// - /// - /// If false, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available. - /// - /// - /// If true, it allows restoring a partial snapshot of indices with unavailable shards. - /// Only shards that were successfully included in the snapshot will be restored. - /// All missing shards will be recreated as empty. - /// - /// public bool? Partial { get; set; } - - /// - /// - /// A rename pattern to apply to restored data streams and indices. - /// Data streams and indices matching the rename pattern will be renamed according to rename_replacement. - /// - /// - /// The rename pattern is applied as defined by the regular expression that supports referencing the original text, according to the appendReplacement logic. - /// - /// public string? RenamePattern { get; set; } - - /// - /// - /// The rename replacement string that is used with the rename_pattern. - /// - /// public string? RenameReplacement { get; set; } } @@ -463,7 +311,7 @@ public RestoreRequestDescriptor() /// /// - /// The name of the repository to restore a snapshot from. + /// A repository name /// /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Name value) @@ -474,7 +322,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor Repositor /// /// - /// The name of the snapshot to restore. + /// A snapshot name /// /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Name value) @@ -485,9 +333,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor Snapshot( /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) @@ -498,12 +344,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor MasterTim /// /// - /// If true, the request returns a response when the restore operation completes. - /// The operation is complete when it finishes all attempts to recover primary shards for restored indices. - /// This applies even if one or more of the recovery attempts fail. - /// - /// - /// If false, the request returns a response when the restore operation initializes. + /// Should this request wait until the operation has completed before returning /// /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor WaitForCompletion(bool? value = true) @@ -512,267 +353,90 @@ public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor WaitForCo return this; } - /// - /// - /// The feature states to restore. - /// If include_global_state is true, the request restores all feature states in the snapshot by default. - /// If include_global_state is false, the request restores no feature states by default. - /// Note that specifying an empty array will result in the default behavior. - /// To restore no feature states, regardless of the include_global_state value, specify an array containing only the value none (["none"]). - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor FeatureStates(System.Collections.Generic.ICollection? value) { Instance.FeatureStates = value; return this; } - /// - /// - /// The feature states to restore. - /// If include_global_state is true, the request restores all feature states in the snapshot by default. - /// If include_global_state is false, the request restores no feature states by default. - /// Note that specifying an empty array will result in the default behavior. - /// To restore no feature states, regardless of the include_global_state value, specify an array containing only the value none (["none"]). - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor FeatureStates(params string[] values) { Instance.FeatureStates = [.. values]; return this; } - /// - /// - /// The index settings to not restore from the snapshot. - /// You can't use this option to ignore index.number_of_shards. - /// - /// - /// For data streams, this option applies only to restored backing indices. - /// New backing indices are configured using the data stream's matching index template. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IgnoreIndexSettings(System.Collections.Generic.ICollection? value) { Instance.IgnoreIndexSettings = value; return this; } - /// - /// - /// The index settings to not restore from the snapshot. - /// You can't use this option to ignore index.number_of_shards. - /// - /// - /// For data streams, this option applies only to restored backing indices. - /// New backing indices are configured using the data stream's matching index template. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IgnoreIndexSettings(params string[] values) { Instance.IgnoreIndexSettings = [.. values]; return this; } - /// - /// - /// If true, the request ignores any index or data stream in indices that's missing from the snapshot. - /// If false, the request returns an error for any missing index or data stream. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IgnoreUnavailable(bool? value = true) { Instance.IgnoreUnavailable = value; return this; } - /// - /// - /// If true, the request restores aliases for any restored data streams and indices. - /// If false, the request doesn’t restore aliases. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IncludeAliases(bool? value = true) { Instance.IncludeAliases = value; return this; } - /// - /// - /// If true, restore the cluster state. The cluster state includes: - /// - /// - /// - /// - /// Persistent cluster settings - /// - /// - /// - /// - /// Index templates - /// - /// - /// - /// - /// Legacy index templates - /// - /// - /// - /// - /// Ingest pipelines - /// - /// - /// - /// - /// Index lifecycle management (ILM) policies - /// - /// - /// - /// - /// Stored scripts - /// - /// - /// - /// - /// For snapshots taken after 7.12.0, feature states - /// - /// - /// - /// - /// If include_global_state is true, the restore operation merges the legacy index templates in your cluster with the templates contained in the snapshot, replacing any existing ones whose name matches one in the snapshot. - /// It completely removes all persistent settings, non-legacy index templates, ingest pipelines, and ILM lifecycle policies that exist in your cluster and replaces them with the corresponding items from the snapshot. - /// - /// - /// Use the feature_states parameter to configure how feature states are restored. - /// - /// - /// If include_global_state is true and a snapshot was created without a global state then the restore request will fail. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IncludeGlobalState(bool? value = true) { Instance.IncludeGlobalState = value; return this; } - /// - /// - /// Index settings to add or change in restored indices, including backing indices. - /// You can't use this option to change index.number_of_shards. - /// - /// - /// For data streams, this option applies only to restored backing indices. - /// New backing indices are configured using the data stream's matching index template. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IndexSettings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? value) { Instance.IndexSettings = value; return this; } - /// - /// - /// Index settings to add or change in restored indices, including backing indices. - /// You can't use this option to change index.number_of_shards. - /// - /// - /// For data streams, this option applies only to restored backing indices. - /// New backing indices are configured using the data stream's matching index template. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IndexSettings() { Instance.IndexSettings = Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor.Build(null); return this; } - /// - /// - /// Index settings to add or change in restored indices, including backing indices. - /// You can't use this option to change index.number_of_shards. - /// - /// - /// For data streams, this option applies only to restored backing indices. - /// New backing indices are configured using the data stream's matching index template. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IndexSettings(System.Action? action) { Instance.IndexSettings = Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor.Build(action); return this; } - /// - /// - /// Index settings to add or change in restored indices, including backing indices. - /// You can't use this option to change index.number_of_shards. - /// - /// - /// For data streams, this option applies only to restored backing indices. - /// New backing indices are configured using the data stream's matching index template. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IndexSettings(System.Action>? action) { Instance.IndexSettings = Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor.Build(action); return this; } - /// - /// - /// A comma-separated list of indices and data streams to restore. - /// It supports a multi-target syntax. - /// The default behavior is all regular indices and regular data streams in the snapshot. - /// - /// - /// You can't use this parameter to restore system indices or system data streams. - /// Use feature_states instead. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? value) { Instance.Indices = value; return this; } - /// - /// - /// If false, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available. - /// - /// - /// If true, it allows restoring a partial snapshot of indices with unavailable shards. - /// Only shards that were successfully included in the snapshot will be restored. - /// All missing shards will be recreated as empty. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor Partial(bool? value = true) { Instance.Partial = value; return this; } - /// - /// - /// A rename pattern to apply to restored data streams and indices. - /// Data streams and indices matching the rename pattern will be renamed according to rename_replacement. - /// - /// - /// The rename pattern is applied as defined by the regular expression that supports referencing the original text, according to the appendReplacement logic. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor RenamePattern(string? value) { Instance.RenamePattern = value; return this; } - /// - /// - /// The rename replacement string that is used with the rename_pattern. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor RenameReplacement(string? value) { Instance.RenameReplacement = value; @@ -882,7 +546,7 @@ public RestoreRequestDescriptor() /// /// - /// The name of the repository to restore a snapshot from. + /// A repository name /// /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Name value) @@ -893,7 +557,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor /// - /// The name of the snapshot to restore. + /// A snapshot name /// /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Name value) @@ -904,9 +568,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) @@ -917,12 +579,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor /// - /// If true, the request returns a response when the restore operation completes. - /// The operation is complete when it finishes all attempts to recover primary shards for restored indices. - /// This applies even if one or more of the recovery attempts fail. - /// - /// - /// If false, the request returns a response when the restore operation initializes. + /// Should this request wait until the operation has completed before returning /// /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor WaitForCompletion(bool? value = true) @@ -931,251 +588,84 @@ public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor - /// - /// The feature states to restore. - /// If include_global_state is true, the request restores all feature states in the snapshot by default. - /// If include_global_state is false, the request restores no feature states by default. - /// Note that specifying an empty array will result in the default behavior. - /// To restore no feature states, regardless of the include_global_state value, specify an array containing only the value none (["none"]). - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor FeatureStates(System.Collections.Generic.ICollection? value) { Instance.FeatureStates = value; return this; } - /// - /// - /// The feature states to restore. - /// If include_global_state is true, the request restores all feature states in the snapshot by default. - /// If include_global_state is false, the request restores no feature states by default. - /// Note that specifying an empty array will result in the default behavior. - /// To restore no feature states, regardless of the include_global_state value, specify an array containing only the value none (["none"]). - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor FeatureStates(params string[] values) { Instance.FeatureStates = [.. values]; return this; } - /// - /// - /// The index settings to not restore from the snapshot. - /// You can't use this option to ignore index.number_of_shards. - /// - /// - /// For data streams, this option applies only to restored backing indices. - /// New backing indices are configured using the data stream's matching index template. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IgnoreIndexSettings(System.Collections.Generic.ICollection? value) { Instance.IgnoreIndexSettings = value; return this; } - /// - /// - /// The index settings to not restore from the snapshot. - /// You can't use this option to ignore index.number_of_shards. - /// - /// - /// For data streams, this option applies only to restored backing indices. - /// New backing indices are configured using the data stream's matching index template. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IgnoreIndexSettings(params string[] values) { Instance.IgnoreIndexSettings = [.. values]; return this; } - /// - /// - /// If true, the request ignores any index or data stream in indices that's missing from the snapshot. - /// If false, the request returns an error for any missing index or data stream. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IgnoreUnavailable(bool? value = true) { Instance.IgnoreUnavailable = value; return this; } - /// - /// - /// If true, the request restores aliases for any restored data streams and indices. - /// If false, the request doesn’t restore aliases. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IncludeAliases(bool? value = true) { Instance.IncludeAliases = value; return this; } - /// - /// - /// If true, restore the cluster state. The cluster state includes: - /// - /// - /// - /// - /// Persistent cluster settings - /// - /// - /// - /// - /// Index templates - /// - /// - /// - /// - /// Legacy index templates - /// - /// - /// - /// - /// Ingest pipelines - /// - /// - /// - /// - /// Index lifecycle management (ILM) policies - /// - /// - /// - /// - /// Stored scripts - /// - /// - /// - /// - /// For snapshots taken after 7.12.0, feature states - /// - /// - /// - /// - /// If include_global_state is true, the restore operation merges the legacy index templates in your cluster with the templates contained in the snapshot, replacing any existing ones whose name matches one in the snapshot. - /// It completely removes all persistent settings, non-legacy index templates, ingest pipelines, and ILM lifecycle policies that exist in your cluster and replaces them with the corresponding items from the snapshot. - /// - /// - /// Use the feature_states parameter to configure how feature states are restored. - /// - /// - /// If include_global_state is true and a snapshot was created without a global state then the restore request will fail. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IncludeGlobalState(bool? value = true) { Instance.IncludeGlobalState = value; return this; } - /// - /// - /// Index settings to add or change in restored indices, including backing indices. - /// You can't use this option to change index.number_of_shards. - /// - /// - /// For data streams, this option applies only to restored backing indices. - /// New backing indices are configured using the data stream's matching index template. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IndexSettings(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings? value) { Instance.IndexSettings = value; return this; } - /// - /// - /// Index settings to add or change in restored indices, including backing indices. - /// You can't use this option to change index.number_of_shards. - /// - /// - /// For data streams, this option applies only to restored backing indices. - /// New backing indices are configured using the data stream's matching index template. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IndexSettings() { Instance.IndexSettings = Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor.Build(null); return this; } - /// - /// - /// Index settings to add or change in restored indices, including backing indices. - /// You can't use this option to change index.number_of_shards. - /// - /// - /// For data streams, this option applies only to restored backing indices. - /// New backing indices are configured using the data stream's matching index template. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor IndexSettings(System.Action>? action) { Instance.IndexSettings = Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsDescriptor.Build(action); return this; } - /// - /// - /// A comma-separated list of indices and data streams to restore. - /// It supports a multi-target syntax. - /// The default behavior is all regular indices and regular data streams in the snapshot. - /// - /// - /// You can't use this parameter to restore system indices or system data streams. - /// Use feature_states instead. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor Indices(Elastic.Clients.Elasticsearch.Indices? value) { Instance.Indices = value; return this; } - /// - /// - /// If false, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available. - /// - /// - /// If true, it allows restoring a partial snapshot of indices with unavailable shards. - /// Only shards that were successfully included in the snapshot will be restored. - /// All missing shards will be recreated as empty. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor Partial(bool? value = true) { Instance.Partial = value; return this; } - /// - /// - /// A rename pattern to apply to restored data streams and indices. - /// Data streams and indices matching the rename pattern will be renamed according to rename_replacement. - /// - /// - /// The rename pattern is applied as defined by the regular expression that supports referencing the original text, according to the appendReplacement logic. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor RenamePattern(string? value) { Instance.RenamePattern = value; return this; } - /// - /// - /// The rename replacement string that is used with the rename_pattern. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.RestoreRequestDescriptor RenameReplacement(string? value) { Instance.RenameReplacement = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/SnapshotStatusRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/SnapshotStatusRequest.g.cs index 392a7167536..c2bdcf2453c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/SnapshotStatusRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/SnapshotStatusRequest.g.cs @@ -27,17 +27,14 @@ public sealed partial class SnapshotStatusRequestParameters : Elastic.Transport. { /// /// - /// If false, the request returns an error for any snapshots that are unavailable. - /// If true, the request ignores snapshots that are unavailable, such as those that are corrupted or temporarily cannot be returned. + /// Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown /// /// public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } @@ -76,17 +73,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Get the snapshot status. /// Get a detailed description of the current state for each shard participating in the snapshot. -/// -/// /// Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots. /// If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API. /// /// -/// If you omit the <snapshot> request path parameter, the request retrieves information only for currently running snapshots. -/// This usage is preferred. -/// If needed, you can specify <repository> and <snapshot> to retrieve information for specific snapshots, even if they're not currently running. -/// -/// /// WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. /// The API requires a read from the repository for each shard in each snapshot. /// For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards). @@ -132,34 +122,28 @@ internal SnapshotStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// - /// The snapshot repository name used to limit the request. - /// It supports wildcards (*) if <snapshot> isn't specified. + /// A repository name /// /// public Elastic.Clients.Elasticsearch.Name? Repository { get => P("repository"); set => PO("repository", value); } /// /// - /// A comma-separated list of snapshots to retrieve status for. - /// The default is currently running snapshots. - /// Wildcards (*) are not supported. + /// A comma-separated list of snapshot names /// /// public Elastic.Clients.Elasticsearch.Names? Snapshot { get => P("snapshot"); set => PO("snapshot", value); } /// /// - /// If false, the request returns an error for any snapshots that are unavailable. - /// If true, the request ignores snapshots that are unavailable, such as those that are corrupted or temporarily cannot be returned. + /// Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown /// /// public bool? IgnoreUnavailable { get => Q("ignore_unavailable"); set => Q("ignore_unavailable", value); } /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } @@ -169,17 +153,10 @@ internal SnapshotStatusRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// Get the snapshot status. /// Get a detailed description of the current state for each shard participating in the snapshot. -/// -/// /// Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots. /// If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API. /// /// -/// If you omit the <snapshot> request path parameter, the request retrieves information only for currently running snapshots. -/// This usage is preferred. -/// If needed, you can specify <repository> and <snapshot> to retrieve information for specific snapshots, even if they're not currently running. -/// -/// /// WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. /// The API requires a read from the repository for each shard in each snapshot. /// For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards). @@ -219,8 +196,7 @@ public SnapshotStatusRequestDescriptor() /// /// - /// The snapshot repository name used to limit the request. - /// It supports wildcards (*) if <snapshot> isn't specified. + /// A repository name /// /// public Elastic.Clients.Elasticsearch.Snapshot.SnapshotStatusRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Name? value) @@ -231,9 +207,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.SnapshotStatusRequestDescriptor Re /// /// - /// A comma-separated list of snapshots to retrieve status for. - /// The default is currently running snapshots. - /// Wildcards (*) are not supported. + /// A comma-separated list of snapshot names /// /// public Elastic.Clients.Elasticsearch.Snapshot.SnapshotStatusRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Names? value) @@ -244,8 +218,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.SnapshotStatusRequestDescriptor Sn /// /// - /// If false, the request returns an error for any snapshots that are unavailable. - /// If true, the request ignores snapshots that are unavailable, such as those that are corrupted or temporarily cannot be returned. + /// Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown /// /// public Elastic.Clients.Elasticsearch.Snapshot.SnapshotStatusRequestDescriptor IgnoreUnavailable(bool? value = true) @@ -256,9 +229,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.SnapshotStatusRequestDescriptor Ig /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Snapshot.SnapshotStatusRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/VerifyRepositoryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/VerifyRepositoryRequest.g.cs index 5a7fdeede4c..dce453d3d27 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/VerifyRepositoryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/VerifyRepositoryRequest.g.cs @@ -27,18 +27,14 @@ public sealed partial class VerifyRepositoryRequestParameters : Elastic.Transpor { /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// - /// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. - /// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout /// /// public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } @@ -107,7 +103,7 @@ internal VerifyRepositoryRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// /// - /// The name of the snapshot repository to verify. + /// A repository name /// /// public @@ -118,18 +114,14 @@ internal VerifyRepositoryRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q("master_timeout"); set => Q("master_timeout", value); } /// /// - /// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. - /// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout /// /// public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q("timeout"); set => Q("timeout", value); } @@ -167,7 +159,7 @@ public VerifyRepositoryRequestDescriptor() /// /// - /// The name of the snapshot repository to verify. + /// A repository name /// /// public Elastic.Clients.Elasticsearch.Snapshot.VerifyRepositoryRequestDescriptor Name(Elastic.Clients.Elasticsearch.Name value) @@ -178,9 +170,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.VerifyRepositoryRequestDescriptor /// /// - /// The period to wait for the master node. - /// If the master node is not available before the timeout expires, the request fails and returns an error. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout for connection to master node /// /// public Elastic.Clients.Elasticsearch.Snapshot.VerifyRepositoryRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? value) @@ -191,9 +181,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.VerifyRepositoryRequestDescriptor /// /// - /// The period to wait for a response from all relevant nodes in the cluster after updating the cluster metadata. - /// If no response is received before the timeout expires, the cluster metadata update still applies but the response will indicate that it was not completely acknowledged. - /// To indicate that the request should never timeout, set it to -1. + /// Explicit operation timeout /// /// public Elastic.Clients.Elasticsearch.Snapshot.VerifyRepositoryRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/VerifyRepositoryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/VerifyRepositoryResponse.g.cs index 66540df4d6c..dcce46731de 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/VerifyRepositoryResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/VerifyRepositoryResponse.g.cs @@ -76,15 +76,9 @@ internal VerifyRepositoryResponse(Elastic.Clients.Elasticsearch.Serialization.Js _ = sentinel; } - /// - /// - /// Information about the nodes connected to the snapshot repository. - /// The key is the ID of the node. - /// - /// public #if NET7_0_OR_GREATER - required + required #endif - System.Collections.Generic.IReadOnlyDictionary Nodes { get; set; } + System.Collections.Generic.IReadOnlyDictionary Nodes { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleResponse.g.cs index 3144b29fc1a..1a4fedc1575 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetLifecycleResponse.g.cs @@ -27,12 +27,12 @@ internal sealed partial class GetLifecycleResponseConverter : System.Text.Json.S { public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.GetLifecycleResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - return new Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.GetLifecycleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Lifecycles = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; + return new Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.GetLifecycleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Values = reader.ReadValue>(options, static System.Collections.Generic.IReadOnlyDictionary (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null)!) }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.GetLifecycleResponse value, System.Text.Json.JsonSerializerOptions options) { - writer.WriteValue(options, value.Lifecycles, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); + writer.WriteValue(options, value.Values, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); } } @@ -54,5 +54,5 @@ internal GetLifecycleResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCo #if NET7_0_OR_GREATER required #endif -System.Collections.Generic.IReadOnlyDictionary Lifecycles { get; set; } +System.Collections.Generic.IReadOnlyDictionary Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymRuleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymRuleResponse.g.cs index de9e48a3108..705c6f224de 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymRuleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Synonyms/GetSynonymRuleResponse.g.cs @@ -98,7 +98,7 @@ internal GetSynonymRuleResponse(Elastic.Clients.Elasticsearch.Serialization.Json /// /// - /// Synonyms, in Solr format, that conform the synonym rule. + /// Synonyms, in Solr format, that conform the synonym rule. See https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-graph-tokenfilter.html#_solr_synonyms_2 /// /// public diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackUsageResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackUsageResponse.g.cs index 8d340e38601..d16223029f2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackUsageResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Xpack/XpackUsageResponse.g.cs @@ -36,6 +36,7 @@ internal sealed partial class XpackUsageResponseConverter : System.Text.Json.Ser private static readonly System.Text.Json.JsonEncodedText PropEnrich = System.Text.Json.JsonEncodedText.Encode("enrich"); private static readonly System.Text.Json.JsonEncodedText PropEql = System.Text.Json.JsonEncodedText.Encode("eql"); private static readonly System.Text.Json.JsonEncodedText PropFlattened = System.Text.Json.JsonEncodedText.Encode("flattened"); + private static readonly System.Text.Json.JsonEncodedText PropFrozenIndices = System.Text.Json.JsonEncodedText.Encode("frozen_indices"); private static readonly System.Text.Json.JsonEncodedText PropGraph = System.Text.Json.JsonEncodedText.Encode("graph"); private static readonly System.Text.Json.JsonEncodedText PropHealthApi = System.Text.Json.JsonEncodedText.Encode("health_api"); private static readonly System.Text.Json.JsonEncodedText PropIlm = System.Text.Json.JsonEncodedText.Encode("ilm"); @@ -68,6 +69,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.XpackUsageResponse Read(ref LocalJsonValue propEnrich = default; LocalJsonValue propEql = default; LocalJsonValue propFlattened = default; + LocalJsonValue propFrozenIndices = default; LocalJsonValue propGraph = default; LocalJsonValue propHealthApi = default; LocalJsonValue propIlm = default; @@ -142,6 +144,11 @@ public override Elastic.Clients.Elasticsearch.Xpack.XpackUsageResponse Read(ref continue; } + if (propFrozenIndices.TryReadProperty(ref reader, options, PropFrozenIndices, null)) + { + continue; + } + if (propGraph.TryReadProperty(ref reader, options, PropGraph, null)) { continue; @@ -250,6 +257,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.XpackUsageResponse Read(ref Enrich = propEnrich.Value, Eql = propEql.Value, Flattened = propFlattened.Value, + FrozenIndices = propFrozenIndices.Value, Graph = propGraph.Value, HealthApi = propHealthApi.Value, Ilm = propIlm.Value, @@ -284,6 +292,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropEnrich, value.Enrich, null, null); writer.WriteProperty(options, PropEql, value.Eql, null, null); writer.WriteProperty(options, PropFlattened, value.Flattened, null, null); + writer.WriteProperty(options, PropFrozenIndices, value.FrozenIndices, null, null); writer.WriteProperty(options, PropGraph, value.Graph, null, null); writer.WriteProperty(options, PropHealthApi, value.HealthApi, null, null); writer.WriteProperty(options, PropIlm, value.Ilm, null, null); @@ -357,6 +366,11 @@ internal XpackUsageResponse(Elastic.Clients.Elasticsearch.Serialization.JsonCons public #if NET7_0_OR_GREATER required +#endif + Elastic.Clients.Elasticsearch.Xpack.FrozenIndices FrozenIndices { get; set; } + public +#if NET7_0_OR_GREATER + required #endif Elastic.Clients.Elasticsearch.Xpack.Base Graph { get; set; } public Elastic.Clients.Elasticsearch.Xpack.HealthStatistics? HealthApi { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchApplication.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchApplication.g.cs index 8b67b7ef108..46343765197 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchApplication.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.SearchApplication.g.cs @@ -90,7 +90,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.DeleteBehavioralA return DoRequest(request); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual Elastic.Clients.Elasticsearch.SearchApplication.DeleteBehavioralAnalyticsResponse DeleteBehavioralAnalytics(Elastic.Clients.Elasticsearch.Name name) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.DeleteBehavioralAnalyticsRequestDescriptor(name); @@ -99,7 +98,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.DeleteBehavioralA return DoRequest(request); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual Elastic.Clients.Elasticsearch.SearchApplication.DeleteBehavioralAnalyticsResponse DeleteBehavioralAnalytics(Elastic.Clients.Elasticsearch.Name name, System.Action action) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.DeleteBehavioralAnalyticsRequestDescriptor(name); @@ -115,7 +113,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.DeleteBehavioralA return DoRequestAsync(request, cancellationToken); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual System.Threading.Tasks.Task DeleteBehavioralAnalyticsAsync(Elastic.Clients.Elasticsearch.Name name, System.Threading.CancellationToken cancellationToken = default) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.DeleteBehavioralAnalyticsRequestDescriptor(name); @@ -124,7 +121,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.DeleteBehavioralA return DoRequestAsync(request, cancellationToken); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual System.Threading.Tasks.Task DeleteBehavioralAnalyticsAsync(Elastic.Clients.Elasticsearch.Name name, System.Action action, System.Threading.CancellationToken cancellationToken = default) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.DeleteBehavioralAnalyticsRequestDescriptor(name); @@ -186,7 +182,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnal return DoRequest(request); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsResponse GetBehavioralAnalytics() { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsRequestDescriptor(); @@ -195,7 +190,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnal return DoRequest(request); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsResponse GetBehavioralAnalytics(System.Action action) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsRequestDescriptor(); @@ -205,7 +199,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnal return DoRequest(request); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsResponse GetBehavioralAnalytics(System.Collections.Generic.ICollection? name) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsRequestDescriptor(name); @@ -214,7 +207,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnal return DoRequest(request); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsResponse GetBehavioralAnalytics(System.Collections.Generic.ICollection? name, System.Action action) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsRequestDescriptor(name); @@ -230,7 +222,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnal return DoRequestAsync(request, cancellationToken); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual System.Threading.Tasks.Task GetBehavioralAnalyticsAsync(System.Threading.CancellationToken cancellationToken = default) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsRequestDescriptor(); @@ -239,7 +230,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnal return DoRequestAsync(request, cancellationToken); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual System.Threading.Tasks.Task GetBehavioralAnalyticsAsync(System.Action action, System.Threading.CancellationToken cancellationToken = default) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsRequestDescriptor(); @@ -249,7 +239,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnal return DoRequestAsync(request, cancellationToken); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual System.Threading.Tasks.Task GetBehavioralAnalyticsAsync(System.Collections.Generic.ICollection? name, System.Threading.CancellationToken cancellationToken = default) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsRequestDescriptor(name); @@ -258,7 +247,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnal return DoRequestAsync(request, cancellationToken); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual System.Threading.Tasks.Task GetBehavioralAnalyticsAsync(System.Collections.Generic.ICollection? name, System.Action action, System.Threading.CancellationToken cancellationToken = default) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.GetBehavioralAnalyticsRequestDescriptor(name); @@ -320,7 +308,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.PostBehavioralAna return DoRequest(request); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual Elastic.Clients.Elasticsearch.SearchApplication.PostBehavioralAnalyticsEventResponse PostBehavioralAnalyticsEvent(Elastic.Clients.Elasticsearch.Name collectionName, Elastic.Clients.Elasticsearch.SearchApplication.EventType eventType) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.PostBehavioralAnalyticsEventRequestDescriptor(collectionName, eventType); @@ -329,7 +316,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.PostBehavioralAna return DoRequest(request); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual Elastic.Clients.Elasticsearch.SearchApplication.PostBehavioralAnalyticsEventResponse PostBehavioralAnalyticsEvent(Elastic.Clients.Elasticsearch.Name collectionName, Elastic.Clients.Elasticsearch.SearchApplication.EventType eventType, System.Action action) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.PostBehavioralAnalyticsEventRequestDescriptor(collectionName, eventType); @@ -345,7 +331,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.PostBehavioralAna return DoRequestAsync(request, cancellationToken); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual System.Threading.Tasks.Task PostBehavioralAnalyticsEventAsync(Elastic.Clients.Elasticsearch.Name collectionName, Elastic.Clients.Elasticsearch.SearchApplication.EventType eventType, System.Threading.CancellationToken cancellationToken = default) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.PostBehavioralAnalyticsEventRequestDescriptor(collectionName, eventType); @@ -354,7 +339,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.PostBehavioralAna return DoRequestAsync(request, cancellationToken); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual System.Threading.Tasks.Task PostBehavioralAnalyticsEventAsync(Elastic.Clients.Elasticsearch.Name collectionName, Elastic.Clients.Elasticsearch.SearchApplication.EventType eventType, System.Action action, System.Threading.CancellationToken cancellationToken = default) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.PostBehavioralAnalyticsEventRequestDescriptor(collectionName, eventType); @@ -416,7 +400,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.PutBehavioralAnal return DoRequest(request); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual Elastic.Clients.Elasticsearch.SearchApplication.PutBehavioralAnalyticsResponse PutBehavioralAnalytics(Elastic.Clients.Elasticsearch.Name name) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.PutBehavioralAnalyticsRequestDescriptor(name); @@ -425,7 +408,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.PutBehavioralAnal return DoRequest(request); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual Elastic.Clients.Elasticsearch.SearchApplication.PutBehavioralAnalyticsResponse PutBehavioralAnalytics(Elastic.Clients.Elasticsearch.Name name, System.Action action) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.PutBehavioralAnalyticsRequestDescriptor(name); @@ -441,7 +423,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.PutBehavioralAnal return DoRequestAsync(request, cancellationToken); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual System.Threading.Tasks.Task PutBehavioralAnalyticsAsync(Elastic.Clients.Elasticsearch.Name name, System.Threading.CancellationToken cancellationToken = default) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.PutBehavioralAnalyticsRequestDescriptor(name); @@ -450,7 +431,6 @@ public virtual Elastic.Clients.Elasticsearch.SearchApplication.PutBehavioralAnal return DoRequestAsync(request, cancellationToken); } - [System.Obsolete("Deprecated in '9.0.0'.")] public virtual System.Threading.Tasks.Task PutBehavioralAnalyticsAsync(Elastic.Clients.Elasticsearch.Name name, System.Action action, System.Threading.CancellationToken cancellationToken = default) { var builder = new Elastic.Clients.Elasticsearch.SearchApplication.PutBehavioralAnalyticsRequestDescriptor(name); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Security.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Security.g.cs index 1b093b831a1..096a324cce7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Security.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Security.g.cs @@ -2557,15 +2557,6 @@ public virtual Elastic.Clients.Elasticsearch.Security.PutRoleMappingResponse Put return DoRequest(request); } - public virtual Elastic.Clients.Elasticsearch.Security.PutRoleMappingResponse PutRoleMapping(Elastic.Clients.Elasticsearch.Name name, System.Action> action) - { - var builder = new Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor(name); - action.Invoke(builder); - var request = builder.Instance; - request.BeforeRequest(); - return DoRequest(request); - } - public virtual System.Threading.Tasks.Task PutRoleMappingAsync(Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequest request, System.Threading.CancellationToken cancellationToken = default) { request.BeforeRequest(); @@ -2589,15 +2580,6 @@ public virtual Elastic.Clients.Elasticsearch.Security.PutRoleMappingResponse Put return DoRequestAsync(request, cancellationToken); } - public virtual System.Threading.Tasks.Task PutRoleMappingAsync(Elastic.Clients.Elasticsearch.Name name, System.Action> action, System.Threading.CancellationToken cancellationToken = default) - { - var builder = new Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequestDescriptor(name); - action.Invoke(builder); - var request = builder.Instance; - request.BeforeRequest(); - return DoRequestAsync(request, cancellationToken); - } - public virtual Elastic.Clients.Elasticsearch.Security.PutUserResponse PutUser(Elastic.Clients.Elasticsearch.Security.PutUserRequest request) { request.BeforeRequest(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs index 57f4e1db906..53270d68ce2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs @@ -179,8 +179,8 @@ internal CategorizeTextAggregation(Elastic.Clients.Elasticsearch.Serialization.J /// /// /// The categorization analyzer specifies how the text is analyzed and tokenized before being categorized. - /// The syntax is very similar to that used to define the analyzer in the analyze API. This property - /// cannot be used at the same time as categorization_filters. + /// The syntax is very similar to that used to define the analyzer in the Analyze endpoint. This property + /// cannot be used at the same time as categorization_filters. /// /// public Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAnalyzer? CategorizationAnalyzer { get; set; } @@ -294,8 +294,8 @@ public CategorizeTextAggregationDescriptor() /// /// /// The categorization analyzer specifies how the text is analyzed and tokenized before being categorized. - /// The syntax is very similar to that used to define the analyzer in the analyze API. This property - /// cannot be used at the same time as categorization_filters. + /// The syntax is very similar to that used to define the analyzer in the Analyze endpoint. This property + /// cannot be used at the same time as categorization_filters. /// /// public Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAggregationDescriptor CategorizationAnalyzer(Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAnalyzer? value) @@ -307,8 +307,8 @@ public Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAggregationDescr /// /// /// The categorization analyzer specifies how the text is analyzed and tokenized before being categorized. - /// The syntax is very similar to that used to define the analyzer in the analyze API. This property - /// cannot be used at the same time as categorization_filters. + /// The syntax is very similar to that used to define the analyzer in the Analyze endpoint. This property + /// cannot be used at the same time as categorization_filters. /// /// public Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAggregationDescriptor CategorizationAnalyzer(System.Func action) @@ -494,8 +494,8 @@ public CategorizeTextAggregationDescriptor() /// /// /// The categorization analyzer specifies how the text is analyzed and tokenized before being categorized. - /// The syntax is very similar to that used to define the analyzer in the analyze API. This property - /// cannot be used at the same time as categorization_filters. + /// The syntax is very similar to that used to define the analyzer in the Analyze endpoint. This property + /// cannot be used at the same time as categorization_filters. /// /// public Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAggregationDescriptor CategorizationAnalyzer(Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAnalyzer? value) @@ -507,8 +507,8 @@ public Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAggregationDescr /// /// /// The categorization analyzer specifies how the text is analyzed and tokenized before being categorized. - /// The syntax is very similar to that used to define the analyzer in the analyze API. This property - /// cannot be used at the same time as categorization_filters. + /// The syntax is very similar to that used to define the analyzer in the Analyze endpoint. This property + /// cannot be used at the same time as categorization_filters. /// /// public Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAggregationDescriptor CategorizationAnalyzer(System.Func action) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Analyzers.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Analyzers.g.cs index db904fdeee7..5c8760b4c06 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Analyzers.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/Analyzers.g.cs @@ -343,13 +343,7 @@ public Elastic.Clients.Elasticsearch.Analysis.AnalyzersDescriptor Fingerprint(st return this; } - public Elastic.Clients.Elasticsearch.Analysis.AnalyzersDescriptor Fingerprint(string key) - { - _items.Add(key, Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor.Build(null)); - return this; - } - - public Elastic.Clients.Elasticsearch.Analysis.AnalyzersDescriptor Fingerprint(string key, System.Action? action) + public Elastic.Clients.Elasticsearch.Analysis.AnalyzersDescriptor Fingerprint(string key, System.Action action) { _items.Add(key, Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor.Build(action)); return this; @@ -655,13 +649,7 @@ public Elastic.Clients.Elasticsearch.Analysis.AnalyzersDescriptor Pattern(string return this; } - public Elastic.Clients.Elasticsearch.Analysis.AnalyzersDescriptor Pattern(string key) - { - _items.Add(key, Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerDescriptor.Build(null)); - return this; - } - - public Elastic.Clients.Elasticsearch.Analysis.AnalyzersDescriptor Pattern(string key, System.Action? action) + public Elastic.Clients.Elasticsearch.Analysis.AnalyzersDescriptor Pattern(string key, System.Action action) { _items.Add(key, Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerDescriptor.Build(action)); return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs index 46b8c9ec3a9..84dca002529 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintAnalyzer.g.cs @@ -26,6 +26,7 @@ namespace Elastic.Clients.Elasticsearch.Analysis; internal sealed partial class FingerprintAnalyzerConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText PropMaxOutputSize = System.Text.Json.JsonEncodedText.Encode("max_output_size"); + private static readonly System.Text.Json.JsonEncodedText PropPreserveOriginal = System.Text.Json.JsonEncodedText.Encode("preserve_original"); private static readonly System.Text.Json.JsonEncodedText PropSeparator = System.Text.Json.JsonEncodedText.Encode("separator"); private static readonly System.Text.Json.JsonEncodedText PropStopwords = System.Text.Json.JsonEncodedText.Encode("stopwords"); private static readonly System.Text.Json.JsonEncodedText PropStopwordsPath = System.Text.Json.JsonEncodedText.Encode("stopwords_path"); @@ -35,8 +36,9 @@ internal sealed partial class FingerprintAnalyzerConverter : System.Text.Json.Se public override Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzer Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propMaxOutputSize = default; - LocalJsonValue propSeparator = default; + LocalJsonValue propMaxOutputSize = default; + LocalJsonValue propPreserveOriginal = default; + LocalJsonValue propSeparator = default; LocalJsonValue>?> propStopwords = default; LocalJsonValue propStopwordsPath = default; LocalJsonValue propVersion = default; @@ -47,6 +49,11 @@ public override Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzer Read( continue; } + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + { + continue; + } + if (propSeparator.TryReadProperty(ref reader, options, PropSeparator, null)) { continue; @@ -86,12 +93,11 @@ public override Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzer Read( return new Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { MaxOutputSize = propMaxOutputSize.Value, + PreserveOriginal = propPreserveOriginal.Value, Separator = propSeparator.Value, Stopwords = propStopwords.Value, StopwordsPath = propStopwordsPath.Value, -#pragma warning disable CS0618 Version = propVersion.Value -#pragma warning restore CS0618 }; } @@ -99,14 +105,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMaxOutputSize, value.MaxOutputSize, null, null); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, null); writer.WriteProperty(options, PropSeparator, value.Separator, null, null); writer.WriteProperty(options, PropStopwords, value.Stopwords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union>? v) => w.WriteUnionValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null))); writer.WriteProperty(options, PropStopwordsPath, value.StopwordsPath, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); -#pragma warning disable CS0618 - writer.WriteProperty(options, PropVersion, value.Version, null, null) -#pragma warning restore CS0618 - ; + writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } } @@ -114,12 +118,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerConverter))] public sealed partial class FingerprintAnalyzer : Elastic.Clients.Elasticsearch.Analysis.IAnalyzer { + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public FingerprintAnalyzer(int maxOutputSize, bool preserveOriginal, string separator) + { + MaxOutputSize = maxOutputSize; + PreserveOriginal = preserveOriginal; + Separator = separator; + } #if NET7_0_OR_GREATER public FingerprintAnalyzer() { } #endif #if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] public FingerprintAnalyzer() { } @@ -130,40 +142,26 @@ internal FingerprintAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonCon _ = sentinel; } - /// - /// - /// The maximum token size to emit. Tokens larger than this size will be discarded. - /// Defaults to 255 - /// - /// - public int? MaxOutputSize { get; set; } - - /// - /// - /// The character to use to concatenate the terms. - /// Defaults to a space. - /// - /// - public string? Separator { get; set; } - - /// - /// - /// A pre-defined stop words list like _english_ or an array containing a list of stop words. - /// Defaults to _none_. - /// - /// + public +#if NET7_0_OR_GREATER + required +#endif + int MaxOutputSize { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + bool PreserveOriginal { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + string Separator { get; set; } public Elastic.Clients.Elasticsearch.Union>? Stopwords { get; set; } - - /// - /// - /// The path to a file containing stop words. - /// - /// public string? StopwordsPath { get; set; } public string Type => "fingerprint"; - [System.Obsolete("Deprecated in '7.14.0'.")] public string? Version { get; set; } } @@ -186,54 +184,36 @@ public FingerprintAnalyzerDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor(Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzer instance) => new Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzer(Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor descriptor) => descriptor.Instance; - /// - /// - /// The maximum token size to emit. Tokens larger than this size will be discarded. - /// Defaults to 255 - /// - /// - public Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor MaxOutputSize(int? value) + public Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor MaxOutputSize(int value) { Instance.MaxOutputSize = value; return this; } - /// - /// - /// The character to use to concatenate the terms. - /// Defaults to a space. - /// - /// - public Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor Separator(string? value) + public Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor PreserveOriginal(bool value = true) + { + Instance.PreserveOriginal = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor Separator(string value) { Instance.Separator = value; return this; } - /// - /// - /// A pre-defined stop words list like _english_ or an array containing a list of stop words. - /// Defaults to _none_. - /// - /// public Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor Stopwords(Elastic.Clients.Elasticsearch.Union>? value) { Instance.Stopwords = value; return this; } - /// - /// - /// The path to a file containing stop words. - /// - /// public Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor StopwordsPath(string? value) { Instance.StopwordsPath = value; return this; } - [System.Obsolete("Deprecated in '7.14.0'.")] public Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor Version(string? value) { Instance.Version = value; @@ -241,13 +221,8 @@ public Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor Vers } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - internal static Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzer Build(System.Action? action) + internal static Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzer Build(System.Action action) { - if (action is null) - { - return new Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); - } - var builder = new Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzerDescriptor(new Elastic.Clients.Elasticsearch.Analysis.FingerprintAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); action.Invoke(builder); return builder.Instance; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordAnalyzer.g.cs index 24c4a82743c..73751bfe131 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordAnalyzer.g.cs @@ -57,9 +57,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeywordAnalyzer Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.Analysis.KeywordAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { -#pragma warning disable CS0618 Version = propVersion.Value -#pragma warning restore CS0618 }; } @@ -67,10 +65,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropType, value.Type, null, null); -#pragma warning disable CS0618 - writer.WriteProperty(options, PropVersion, value.Version, null, null) -#pragma warning restore CS0618 - ; + writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } } @@ -96,7 +91,6 @@ internal KeywordAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstru public string Type => "keyword"; - [System.Obsolete("Deprecated in '7.14.0'.")] public string? Version { get; set; } } @@ -119,7 +113,6 @@ public KeywordAnalyzerDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Analysis.KeywordAnalyzerDescriptor(Elastic.Clients.Elasticsearch.Analysis.KeywordAnalyzer instance) => new Elastic.Clients.Elasticsearch.Analysis.KeywordAnalyzerDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Analysis.KeywordAnalyzer(Elastic.Clients.Elasticsearch.Analysis.KeywordAnalyzerDescriptor descriptor) => descriptor.Instance; - [System.Obsolete("Deprecated in '7.14.0'.")] public Elastic.Clients.Elasticsearch.Analysis.KeywordAnalyzerDescriptor Version(string? value) { Instance.Version = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriAnalyzer.g.cs index 81c4aae682e..ffe8c1b6acf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriAnalyzer.g.cs @@ -81,9 +81,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.NoriAnalyzer Read(ref Sys DecompoundMode = propDecompoundMode.Value, Stoptags = propStoptags.Value, UserDictionary = propUserDictionary.Value, -#pragma warning disable CS0618 Version = propVersion.Value -#pragma warning restore CS0618 }; } @@ -94,10 +92,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropStoptags, value.Stoptags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropUserDictionary, value.UserDictionary, null, null); -#pragma warning disable CS0618 - writer.WriteProperty(options, PropVersion, value.Version, null, null) -#pragma warning restore CS0618 - ; + writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } } @@ -127,7 +122,6 @@ internal NoriAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo public string Type => "nori"; public string? UserDictionary { get; set; } - [System.Obsolete("Deprecated in '7.14.0'.")] public string? Version { get; set; } } @@ -174,7 +168,6 @@ public Elastic.Clients.Elasticsearch.Analysis.NoriAnalyzerDescriptor UserDiction return this; } - [System.Obsolete("Deprecated in '7.14.0'.")] public Elastic.Clients.Elasticsearch.Analysis.NoriAnalyzerDescriptor Version(string? value) { Instance.Version = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternAnalyzer.g.cs index 019ba4d03bd..a2fb9759109 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternAnalyzer.g.cs @@ -29,7 +29,6 @@ internal sealed partial class PatternAnalyzerConverter : System.Text.Json.Serial private static readonly System.Text.Json.JsonEncodedText PropLowercase = System.Text.Json.JsonEncodedText.Encode("lowercase"); private static readonly System.Text.Json.JsonEncodedText PropPattern = System.Text.Json.JsonEncodedText.Encode("pattern"); private static readonly System.Text.Json.JsonEncodedText PropStopwords = System.Text.Json.JsonEncodedText.Encode("stopwords"); - private static readonly System.Text.Json.JsonEncodedText PropStopwordsPath = System.Text.Json.JsonEncodedText.Encode("stopwords_path"); private static readonly System.Text.Json.JsonEncodedText PropType = System.Text.Json.JsonEncodedText.Encode("type"); private static readonly System.Text.Json.JsonEncodedText PropVersion = System.Text.Json.JsonEncodedText.Encode("version"); @@ -38,9 +37,8 @@ public override Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzer Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propFlags = default; LocalJsonValue propLowercase = default; - LocalJsonValue propPattern = default; + LocalJsonValue propPattern = default; LocalJsonValue>?> propStopwords = default; - LocalJsonValue propStopwordsPath = default; LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -64,11 +62,6 @@ public override Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzer Read(ref continue; } - if (propStopwordsPath.TryReadProperty(ref reader, options, PropStopwordsPath, null)) - { - continue; - } - if (reader.ValueTextEquals(PropType)) { reader.Skip(); @@ -96,10 +89,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzer Read(ref Lowercase = propLowercase.Value, Pattern = propPattern.Value, Stopwords = propStopwords.Value, - StopwordsPath = propStopwordsPath.Value, -#pragma warning disable CS0618 Version = propVersion.Value -#pragma warning restore CS0618 }; } @@ -110,12 +100,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropLowercase, value.Lowercase, null, null); writer.WriteProperty(options, PropPattern, value.Pattern, null, null); writer.WriteProperty(options, PropStopwords, value.Stopwords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union>? v) => w.WriteUnionValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null))); - writer.WriteProperty(options, PropStopwordsPath, value.StopwordsPath, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); -#pragma warning disable CS0618 - writer.WriteProperty(options, PropVersion, value.Version, null, null) -#pragma warning restore CS0618 - ; + writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } } @@ -123,12 +109,18 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerConverter))] public sealed partial class PatternAnalyzer : Elastic.Clients.Elasticsearch.Analysis.IAnalyzer { + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PatternAnalyzer(string pattern) + { + Pattern = pattern; + } #if NET7_0_OR_GREATER public PatternAnalyzer() { } #endif #if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] public PatternAnalyzer() { } @@ -139,47 +131,17 @@ internal PatternAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstru _ = sentinel; } - /// - /// - /// Java regular expression flags. Flags should be pipe-separated, eg "CASE_INSENSITIVE|COMMENTS". - /// - /// public string? Flags { get; set; } - - /// - /// - /// Should terms be lowercased or not. - /// Defaults to true. - /// - /// public bool? Lowercase { get; set; } - - /// - /// - /// A Java regular expression. - /// Defaults to \W+. - /// - /// - public string? Pattern { get; set; } - - /// - /// - /// A pre-defined stop words list like _english_ or an array containing a list of stop words. - /// Defaults to _none_. - /// - /// + public +#if NET7_0_OR_GREATER + required +#endif + string Pattern { get; set; } public Elastic.Clients.Elasticsearch.Union>? Stopwords { get; set; } - /// - /// - /// The path to a file containing stop words. - /// - /// - public string? StopwordsPath { get; set; } - public string Type => "pattern"; - [System.Obsolete("Deprecated in '7.14.0'.")] public string? Version { get; set; } } @@ -202,65 +164,30 @@ public PatternAnalyzerDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerDescriptor(Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzer instance) => new Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzer(Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerDescriptor descriptor) => descriptor.Instance; - /// - /// - /// Java regular expression flags. Flags should be pipe-separated, eg "CASE_INSENSITIVE|COMMENTS". - /// - /// public Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerDescriptor Flags(string? value) { Instance.Flags = value; return this; } - /// - /// - /// Should terms be lowercased or not. - /// Defaults to true. - /// - /// public Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerDescriptor Lowercase(bool? value = true) { Instance.Lowercase = value; return this; } - /// - /// - /// A Java regular expression. - /// Defaults to \W+. - /// - /// - public Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerDescriptor Pattern(string? value) + public Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerDescriptor Pattern(string value) { Instance.Pattern = value; return this; } - /// - /// - /// A pre-defined stop words list like _english_ or an array containing a list of stop words. - /// Defaults to _none_. - /// - /// public Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerDescriptor Stopwords(Elastic.Clients.Elasticsearch.Union>? value) { Instance.Stopwords = value; return this; } - /// - /// - /// The path to a file containing stop words. - /// - /// - public Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerDescriptor StopwordsPath(string? value) - { - Instance.StopwordsPath = value; - return this; - } - - [System.Obsolete("Deprecated in '7.14.0'.")] public Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerDescriptor Version(string? value) { Instance.Version = value; @@ -268,13 +195,8 @@ public Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerDescriptor Version( } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - internal static Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzer Build(System.Action? action) + internal static Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzer Build(System.Action action) { - if (action is null) - { - return new Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); - } - var builder = new Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzerDescriptor(new Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); action.Invoke(builder); return builder.Instance; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimpleAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimpleAnalyzer.g.cs index a6db86ae336..4c58e42fce9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimpleAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SimpleAnalyzer.g.cs @@ -57,9 +57,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.SimpleAnalyzer Read(ref S reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.Analysis.SimpleAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { -#pragma warning disable CS0618 Version = propVersion.Value -#pragma warning restore CS0618 }; } @@ -67,10 +65,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropType, value.Type, null, null); -#pragma warning disable CS0618 - writer.WriteProperty(options, PropVersion, value.Version, null, null) -#pragma warning restore CS0618 - ; + writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } } @@ -96,7 +91,6 @@ internal SimpleAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc public string Type => "simple"; - [System.Obsolete("Deprecated in '7.14.0'.")] public string? Version { get; set; } } @@ -119,7 +113,6 @@ public SimpleAnalyzerDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Analysis.SimpleAnalyzerDescriptor(Elastic.Clients.Elasticsearch.Analysis.SimpleAnalyzer instance) => new Elastic.Clients.Elasticsearch.Analysis.SimpleAnalyzerDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Analysis.SimpleAnalyzer(Elastic.Clients.Elasticsearch.Analysis.SimpleAnalyzerDescriptor descriptor) => descriptor.Instance; - [System.Obsolete("Deprecated in '7.14.0'.")] public Elastic.Clients.Elasticsearch.Analysis.SimpleAnalyzerDescriptor Version(string? value) { Instance.Version = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballAnalyzer.g.cs index e867ad9845f..9550935ff8d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballAnalyzer.g.cs @@ -73,9 +73,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.SnowballAnalyzer Read(ref { Language = propLanguage.Value, Stopwords = propStopwords.Value, -#pragma warning disable CS0618 Version = propVersion.Value -#pragma warning restore CS0618 }; } @@ -85,10 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropLanguage, value.Language, null, null); writer.WriteProperty(options, PropStopwords, value.Stopwords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union>? v) => w.WriteUnionValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null))); writer.WriteProperty(options, PropType, value.Type, null, null); -#pragma warning disable CS0618 - writer.WriteProperty(options, PropVersion, value.Version, null, null) -#pragma warning restore CS0618 - ; + writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } } @@ -127,7 +122,6 @@ internal SnowballAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstr public string Type => "snowball"; - [System.Obsolete("Deprecated in '7.14.0'.")] public string? Version { get; set; } } @@ -162,7 +156,6 @@ public Elastic.Clients.Elasticsearch.Analysis.SnowballAnalyzerDescriptor Stopwor return this; } - [System.Obsolete("Deprecated in '7.14.0'.")] public Elastic.Clients.Elasticsearch.Analysis.SnowballAnalyzerDescriptor Version(string? value) { Instance.Version = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardAnalyzer.g.cs index b7827128653..40293e736a5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardAnalyzer.g.cs @@ -27,7 +27,6 @@ internal sealed partial class StandardAnalyzerConverter : System.Text.Json.Seria { private static readonly System.Text.Json.JsonEncodedText PropMaxTokenLength = System.Text.Json.JsonEncodedText.Encode("max_token_length"); private static readonly System.Text.Json.JsonEncodedText PropStopwords = System.Text.Json.JsonEncodedText.Encode("stopwords"); - private static readonly System.Text.Json.JsonEncodedText PropStopwordsPath = System.Text.Json.JsonEncodedText.Encode("stopwords_path"); private static readonly System.Text.Json.JsonEncodedText PropType = System.Text.Json.JsonEncodedText.Encode("type"); public override Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzer Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) @@ -35,7 +34,6 @@ public override Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzer Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propMaxTokenLength = default; LocalJsonValue>?> propStopwords = default; - LocalJsonValue propStopwordsPath = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, null)) @@ -48,11 +46,6 @@ public override Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzer Read(ref continue; } - if (propStopwordsPath.TryReadProperty(ref reader, options, PropStopwordsPath, null)) - { - continue; - } - if (reader.ValueTextEquals(PropType)) { reader.Skip(); @@ -72,8 +65,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzer Read(ref return new Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { MaxTokenLength = propMaxTokenLength.Value, - Stopwords = propStopwords.Value, - StopwordsPath = propStopwordsPath.Value + Stopwords = propStopwords.Value }; } @@ -82,7 +74,6 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, null); writer.WriteProperty(options, PropStopwords, value.Stopwords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union>? v) => w.WriteUnionValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null))); - writer.WriteProperty(options, PropStopwordsPath, value.StopwordsPath, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } @@ -107,29 +98,9 @@ internal StandardAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstr _ = sentinel; } - /// - /// - /// The maximum token length. If a token is seen that exceeds this length then it is split at max_token_length intervals. - /// Defaults to 255. - /// - /// public int? MaxTokenLength { get; set; } - - /// - /// - /// A pre-defined stop words list like _english_ or an array containing a list of stop words. - /// Defaults to _none_. - /// - /// public Elastic.Clients.Elasticsearch.Union>? Stopwords { get; set; } - /// - /// - /// The path to a file containing stop words. - /// - /// - public string? StopwordsPath { get; set; } - public string Type => "standard"; } @@ -152,41 +123,18 @@ public StandardAnalyzerDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzerDescriptor(Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzer instance) => new Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzerDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzer(Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzerDescriptor descriptor) => descriptor.Instance; - /// - /// - /// The maximum token length. If a token is seen that exceeds this length then it is split at max_token_length intervals. - /// Defaults to 255. - /// - /// public Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzerDescriptor MaxTokenLength(int? value) { Instance.MaxTokenLength = value; return this; } - /// - /// - /// A pre-defined stop words list like _english_ or an array containing a list of stop words. - /// Defaults to _none_. - /// - /// public Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzerDescriptor Stopwords(Elastic.Clients.Elasticsearch.Union>? value) { Instance.Stopwords = value; return this; } - /// - /// - /// The path to a file containing stop words. - /// - /// - public Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzerDescriptor StopwordsPath(string? value) - { - Instance.StopwordsPath = value; - return this; - } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzer Build(System.Action? action) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopAnalyzer.g.cs index 155fcaa4ab5..2201f75b68b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopAnalyzer.g.cs @@ -73,9 +73,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.StopAnalyzer Read(ref Sys { Stopwords = propStopwords.Value, StopwordsPath = propStopwordsPath.Value, -#pragma warning disable CS0618 Version = propVersion.Value -#pragma warning restore CS0618 }; } @@ -85,10 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropStopwords, value.Stopwords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union>? v) => w.WriteUnionValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null))); writer.WriteProperty(options, PropStopwordsPath, value.StopwordsPath, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); -#pragma warning disable CS0618 - writer.WriteProperty(options, PropVersion, value.Version, null, null) -#pragma warning restore CS0618 - ; + writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } } @@ -112,24 +107,11 @@ internal StopAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo _ = sentinel; } - /// - /// - /// A pre-defined stop words list like _english_ or an array containing a list of stop words. - /// Defaults to _none_. - /// - /// public Elastic.Clients.Elasticsearch.Union>? Stopwords { get; set; } - - /// - /// - /// The path to a file containing stop words. - /// - /// public string? StopwordsPath { get; set; } public string Type => "stop"; - [System.Obsolete("Deprecated in '7.14.0'.")] public string? Version { get; set; } } @@ -152,30 +134,18 @@ public StopAnalyzerDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Analysis.StopAnalyzerDescriptor(Elastic.Clients.Elasticsearch.Analysis.StopAnalyzer instance) => new Elastic.Clients.Elasticsearch.Analysis.StopAnalyzerDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Analysis.StopAnalyzer(Elastic.Clients.Elasticsearch.Analysis.StopAnalyzerDescriptor descriptor) => descriptor.Instance; - /// - /// - /// A pre-defined stop words list like _english_ or an array containing a list of stop words. - /// Defaults to _none_. - /// - /// public Elastic.Clients.Elasticsearch.Analysis.StopAnalyzerDescriptor Stopwords(Elastic.Clients.Elasticsearch.Union>? value) { Instance.Stopwords = value; return this; } - /// - /// - /// The path to a file containing stop words. - /// - /// public Elastic.Clients.Elasticsearch.Analysis.StopAnalyzerDescriptor StopwordsPath(string? value) { Instance.StopwordsPath = value; return this; } - [System.Obsolete("Deprecated in '7.14.0'.")] public Elastic.Clients.Elasticsearch.Analysis.StopAnalyzerDescriptor Version(string? value) { Instance.Version = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceAnalyzer.g.cs index 6f06290ca9c..a086167b653 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceAnalyzer.g.cs @@ -57,9 +57,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.WhitespaceAnalyzer Read(r reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.Analysis.WhitespaceAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { -#pragma warning disable CS0618 Version = propVersion.Value -#pragma warning restore CS0618 }; } @@ -67,10 +65,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropType, value.Type, null, null); -#pragma warning disable CS0618 - writer.WriteProperty(options, PropVersion, value.Version, null, null) -#pragma warning restore CS0618 - ; + writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } } @@ -96,7 +91,6 @@ internal WhitespaceAnalyzer(Elastic.Clients.Elasticsearch.Serialization.JsonCons public string Type => "whitespace"; - [System.Obsolete("Deprecated in '7.14.0'.")] public string? Version { get; set; } } @@ -119,7 +113,6 @@ public WhitespaceAnalyzerDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Analysis.WhitespaceAnalyzerDescriptor(Elastic.Clients.Elasticsearch.Analysis.WhitespaceAnalyzer instance) => new Elastic.Clients.Elasticsearch.Analysis.WhitespaceAnalyzerDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Analysis.WhitespaceAnalyzer(Elastic.Clients.Elasticsearch.Analysis.WhitespaceAnalyzerDescriptor descriptor) => descriptor.Instance; - [System.Obsolete("Deprecated in '7.14.0'.")] public Elastic.Clients.Elasticsearch.Analysis.WhitespaceAnalyzerDescriptor Version(string? value) { Instance.Version = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ByteSize.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ByteSize.g.cs index 4ebc1a8d7b5..d0fec696449 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ByteSize.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ByteSize.g.cs @@ -59,7 +59,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien } /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.ByteSizeConverter))] public sealed partial class ByteSize : Elastic.Clients.Elasticsearch.Union diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Context.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Context.g.cs index 9e64566295b..55b14a322b0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Context.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Context.g.cs @@ -62,7 +62,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Text or location that we want similar documents for or a lookup to a document's field for the text. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.Search.ContextConverter))] public sealed partial class Context : Elastic.Clients.Elasticsearch.Union diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/FileSettingsIndicator.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/FileSettingsIndicator.g.cs deleted file mode 100644 index 140a2cc94c5..00000000000 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/FileSettingsIndicator.g.cs +++ /dev/null @@ -1,145 +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. -// -// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ -// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ -// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ -// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ -// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ -// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ -// ------------------------------------------------ -// -// This file is automatically generated. -// Please do not edit these files manually. -// -// ------------------------------------------------ - -#nullable restore - -using System; -using System.Linq; -using Elastic.Clients.Elasticsearch.Serialization; - -namespace Elastic.Clients.Elasticsearch.Core.HealthReport; - -internal sealed partial class FileSettingsIndicatorConverter : System.Text.Json.Serialization.JsonConverter -{ - private static readonly System.Text.Json.JsonEncodedText PropDetails = System.Text.Json.JsonEncodedText.Encode("details"); - private static readonly System.Text.Json.JsonEncodedText PropDiagnosis = System.Text.Json.JsonEncodedText.Encode("diagnosis"); - private static readonly System.Text.Json.JsonEncodedText PropImpacts = System.Text.Json.JsonEncodedText.Encode("impacts"); - private static readonly System.Text.Json.JsonEncodedText PropStatus = System.Text.Json.JsonEncodedText.Encode("status"); - private static readonly System.Text.Json.JsonEncodedText PropSymptom = System.Text.Json.JsonEncodedText.Encode("symptom"); - - public override Elastic.Clients.Elasticsearch.Core.HealthReport.FileSettingsIndicator Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) - { - reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propDetails = default; - LocalJsonValue?> propDiagnosis = default; - LocalJsonValue?> propImpacts = default; - LocalJsonValue propStatus = default; - LocalJsonValue propSymptom = default; - while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) - { - if (propDetails.TryReadProperty(ref reader, options, PropDetails, null)) - { - continue; - } - - if (propDiagnosis.TryReadProperty(ref reader, options, PropDiagnosis, static System.Collections.Generic.IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) - { - continue; - } - - if (propImpacts.TryReadProperty(ref reader, options, PropImpacts, static System.Collections.Generic.IReadOnlyCollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) - { - continue; - } - - if (propStatus.TryReadProperty(ref reader, options, PropStatus, null)) - { - continue; - } - - if (propSymptom.TryReadProperty(ref reader, options, PropSymptom, null)) - { - continue; - } - - if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) - { - reader.Skip(); - continue; - } - - throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); - } - - reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); - return new Elastic.Clients.Elasticsearch.Core.HealthReport.FileSettingsIndicator(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) - { - Details = propDetails.Value, - Diagnosis = propDiagnosis.Value, - Impacts = propImpacts.Value, - Status = propStatus.Value, - Symptom = propSymptom.Value - }; - } - - public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.HealthReport.FileSettingsIndicator value, System.Text.Json.JsonSerializerOptions options) - { - writer.WriteStartObject(); - writer.WriteProperty(options, PropDetails, value.Details, null, null); - writer.WriteProperty(options, PropDiagnosis, value.Diagnosis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropImpacts, value.Impacts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropStatus, value.Status, null, null); - writer.WriteProperty(options, PropSymptom, value.Symptom, null, null); - writer.WriteEndObject(); - } -} - -/// -/// -/// FILE_SETTINGS -/// -/// -[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.HealthReport.FileSettingsIndicatorConverter))] -public sealed partial class FileSettingsIndicator -{ - [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public FileSettingsIndicator(Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus status, string symptom) - { - Status = status; - Symptom = symptom; - } -#if NET7_0_OR_GREATER - public FileSettingsIndicator() - { - } -#endif -#if !NET7_0_OR_GREATER - [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] - public FileSettingsIndicator() - { - } -#endif - [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - internal FileSettingsIndicator(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) - { - _ = sentinel; - } - - public Elastic.Clients.Elasticsearch.Core.HealthReport.FileSettingsIndicatorDetails? Details { get; set; } - public System.Collections.Generic.IReadOnlyCollection? Diagnosis { get; set; } - public System.Collections.Generic.IReadOnlyCollection? Impacts { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus Status { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - string Symptom { get; set; } -} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/Indicators.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/Indicators.g.cs index 64d7278cad7..77428b0c876 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/Indicators.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/Indicators.g.cs @@ -27,7 +27,6 @@ internal sealed partial class IndicatorsConverter : System.Text.Json.Serializati { private static readonly System.Text.Json.JsonEncodedText PropDataStreamLifecycle = System.Text.Json.JsonEncodedText.Encode("data_stream_lifecycle"); private static readonly System.Text.Json.JsonEncodedText PropDisk = System.Text.Json.JsonEncodedText.Encode("disk"); - private static readonly System.Text.Json.JsonEncodedText PropFileSettings = System.Text.Json.JsonEncodedText.Encode("file_settings"); private static readonly System.Text.Json.JsonEncodedText PropIlm = System.Text.Json.JsonEncodedText.Encode("ilm"); private static readonly System.Text.Json.JsonEncodedText PropMasterIsStable = System.Text.Json.JsonEncodedText.Encode("master_is_stable"); private static readonly System.Text.Json.JsonEncodedText PropRepositoryIntegrity = System.Text.Json.JsonEncodedText.Encode("repository_integrity"); @@ -40,7 +39,6 @@ public override Elastic.Clients.Elasticsearch.Core.HealthReport.Indicators Read( reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDataStreamLifecycle = default; LocalJsonValue propDisk = default; - LocalJsonValue propFileSettings = default; LocalJsonValue propIlm = default; LocalJsonValue propMasterIsStable = default; LocalJsonValue propRepositoryIntegrity = default; @@ -59,11 +57,6 @@ public override Elastic.Clients.Elasticsearch.Core.HealthReport.Indicators Read( continue; } - if (propFileSettings.TryReadProperty(ref reader, options, PropFileSettings, null)) - { - continue; - } - if (propIlm.TryReadProperty(ref reader, options, PropIlm, null)) { continue; @@ -108,7 +101,6 @@ public override Elastic.Clients.Elasticsearch.Core.HealthReport.Indicators Read( { DataStreamLifecycle = propDataStreamLifecycle.Value, Disk = propDisk.Value, - FileSettings = propFileSettings.Value, Ilm = propIlm.Value, MasterIsStable = propMasterIsStable.Value, RepositoryIntegrity = propRepositoryIntegrity.Value, @@ -123,7 +115,6 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDataStreamLifecycle, value.DataStreamLifecycle, null, null); writer.WriteProperty(options, PropDisk, value.Disk, null, null); - writer.WriteProperty(options, PropFileSettings, value.FileSettings, null, null); writer.WriteProperty(options, PropIlm, value.Ilm, null, null); writer.WriteProperty(options, PropMasterIsStable, value.MasterIsStable, null, null); writer.WriteProperty(options, PropRepositoryIntegrity, value.RepositoryIntegrity, null, null); @@ -155,7 +146,6 @@ internal Indicators(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorS public Elastic.Clients.Elasticsearch.Core.HealthReport.DataStreamLifecycleIndicator? DataStreamLifecycle { get; set; } public Elastic.Clients.Elasticsearch.Core.HealthReport.DiskIndicator? Disk { get; set; } - public Elastic.Clients.Elasticsearch.Core.HealthReport.FileSettingsIndicator? FileSettings { get; set; } public Elastic.Clients.Elasticsearch.Core.HealthReport.IlmIndicator? Ilm { get; set; } public Elastic.Clients.Elasticsearch.Core.HealthReport.MasterIsStableIndicator? MasterIsStable { get; set; } public Elastic.Clients.Elasticsearch.Core.HealthReport.RepositoryIntegrityIndicator? RepositoryIntegrity { get; set; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs index 0ed76599cd6..ed517b76b82 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchBody.g.cs @@ -41,15 +41,12 @@ internal sealed partial class MultisearchBodyConverter : System.Text.Json.Serial private static readonly System.Text.Json.JsonEncodedText PropPostFilter = System.Text.Json.JsonEncodedText.Encode("post_filter"); private static readonly System.Text.Json.JsonEncodedText PropProfile = System.Text.Json.JsonEncodedText.Encode("profile"); private static readonly System.Text.Json.JsonEncodedText PropQuery = System.Text.Json.JsonEncodedText.Encode("query"); - private static readonly System.Text.Json.JsonEncodedText PropRank = System.Text.Json.JsonEncodedText.Encode("rank"); private static readonly System.Text.Json.JsonEncodedText PropRescore = System.Text.Json.JsonEncodedText.Encode("rescore"); - private static readonly System.Text.Json.JsonEncodedText PropRetriever = System.Text.Json.JsonEncodedText.Encode("retriever"); private static readonly System.Text.Json.JsonEncodedText PropRuntimeMappings = System.Text.Json.JsonEncodedText.Encode("runtime_mappings"); private static readonly System.Text.Json.JsonEncodedText PropScriptFields = System.Text.Json.JsonEncodedText.Encode("script_fields"); private static readonly System.Text.Json.JsonEncodedText PropSearchAfter = System.Text.Json.JsonEncodedText.Encode("search_after"); private static readonly System.Text.Json.JsonEncodedText PropSeqNoPrimaryTerm = System.Text.Json.JsonEncodedText.Encode("seq_no_primary_term"); private static readonly System.Text.Json.JsonEncodedText PropSize = System.Text.Json.JsonEncodedText.Encode("size"); - private static readonly System.Text.Json.JsonEncodedText PropSlice = System.Text.Json.JsonEncodedText.Encode("slice"); private static readonly System.Text.Json.JsonEncodedText PropSort = System.Text.Json.JsonEncodedText.Encode("sort"); private static readonly System.Text.Json.JsonEncodedText PropSource = System.Text.Json.JsonEncodedText.Encode("_source"); private static readonly System.Text.Json.JsonEncodedText PropStats = System.Text.Json.JsonEncodedText.Encode("stats"); @@ -79,15 +76,12 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( LocalJsonValue propPostFilter = default; LocalJsonValue propProfile = default; LocalJsonValue propQuery = default; - LocalJsonValue propRank = default; LocalJsonValue?> propRescore = default; - LocalJsonValue propRetriever = default; LocalJsonValue?> propRuntimeMappings = default; LocalJsonValue?> propScriptFields = default; LocalJsonValue?> propSearchAfter = default; LocalJsonValue propSeqNoPrimaryTerm = default; LocalJsonValue propSize = default; - LocalJsonValue propSlice = default; LocalJsonValue?> propSort = default; LocalJsonValue propSource = default; LocalJsonValue?> propStats = default; @@ -175,21 +169,11 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propRank.TryReadProperty(ref reader, options, PropRank, null)) - { - continue; - } - if (propRescore.TryReadProperty(ref reader, options, PropRescore, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null))) { continue; } - if (propRetriever.TryReadProperty(ref reader, options, PropRetriever, null)) - { - continue; - } - if (propRuntimeMappings.TryReadProperty(ref reader, options, PropRuntimeMappings, static System.Collections.Generic.IDictionary? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue(o, null, null))) { continue; @@ -215,11 +199,6 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propSlice.TryReadProperty(ref reader, options, PropSlice, null)) - { - continue; - } - if (propSort.TryReadProperty(ref reader, options, PropSort, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null))) { continue; @@ -297,15 +276,12 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( PostFilter = propPostFilter.Value, Profile = propProfile.Value, Query = propQuery.Value, - Rank = propRank.Value, Rescore = propRescore.Value, - Retriever = propRetriever.Value, RuntimeMappings = propRuntimeMappings.Value, ScriptFields = propScriptFields.Value, SearchAfter = propSearchAfter.Value, SeqNoPrimaryTerm = propSeqNoPrimaryTerm.Value, Size = propSize.Value, - Slice = propSlice.Value, Sort = propSort.Value, Source = propSource.Value, Stats = propStats.Value, @@ -337,15 +313,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropPostFilter, value.PostFilter, null, null); writer.WriteProperty(options, PropProfile, value.Profile, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); - writer.WriteProperty(options, PropRank, value.Rank, null, null); writer.WriteProperty(options, PropRescore, value.Rescore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); - writer.WriteProperty(options, PropRetriever, value.Retriever, null, null); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropScriptFields, value.ScriptFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropSearchAfter, value.SearchAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, null); writer.WriteProperty(options, PropSize, value.Size, null, null); - writer.WriteProperty(options, PropSlice, value.Slice, null, null); writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteProperty(options, PropStats, value.Stats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); @@ -379,31 +352,20 @@ internal MultisearchBody(Elastic.Clients.Elasticsearch.Serialization.JsonConstru _ = sentinel; } - /// - /// - /// Defines the aggregations that are run as part of the search request. - /// - /// public System.Collections.Generic.IDictionary? Aggregations { get; set; } - - /// - /// - /// Collapses search results the values of the specified field. - /// - /// public Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? Collapse { get; set; } /// /// - /// An array of wildcard (*) field patterns. - /// The request returns doc values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns doc values for field + /// names matching these patterns in the hits.fields property of the response. /// /// public System.Collections.Generic.ICollection? DocvalueFields { get; set; } /// /// - /// If true, the request returns detailed information about score computation as part of a hit. + /// If true, returns detailed information about score computation as part of a hit. /// /// public bool? Explain { get; set; } @@ -417,41 +379,32 @@ internal MultisearchBody(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// /// - /// An array of wildcard (*) field patterns. - /// The request returns values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns values for field names + /// matching these patterns in the hits.fields property of the response. /// /// public System.Collections.Generic.ICollection? Fields { get; set; } /// /// - /// The starting document offset, which must be non-negative. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. + /// Starting document offset. By default, you cannot page through more than 10,000 + /// hits using the from and size parameters. To page through more hits, use the + /// search_after parameter. /// /// public int? From { get; set; } - - /// - /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results. - /// - /// public Elastic.Clients.Elasticsearch.Core.Search.Highlight? Highlight { get; set; } /// /// - /// Boost the _score of documents from specified indices. - /// The boost value is the factor by which scores are multiplied. - /// A boost value greater than 1.0 increases the score. - /// A boost value between 0 and 1.0 decreases the score. + /// Boosts the _score of documents from specified indices. /// /// public System.Collections.Generic.ICollection>? IndicesBoost { get; set; } /// /// - /// The approximate kNN search to run. + /// Defines the approximate kNN search to run. /// /// public System.Collections.Generic.ICollection? Knn { get; set; } @@ -459,69 +412,33 @@ internal MultisearchBody(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// /// /// The minimum _score for matching documents. - /// Documents with a lower _score are not included in search results or results collected by aggregations. + /// Documents with a lower _score are not included in search results and results collected by aggregations. /// /// public double? MinScore { get; set; } /// /// - /// Limit the search to a point in time (PIT). - /// If you provide a PIT, you cannot specify an <index> in the request path. + /// Limits the search to a point in time (PIT). If you provide a PIT, you + /// cannot specify an <index> in the request path. /// /// public Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? Pit { get; set; } - - /// - /// - /// Use the post_filter parameter to filter search results. - /// The search hits are filtered after the aggregations are calculated. - /// A post filter has no impact on the aggregation results. - /// - /// public Elastic.Clients.Elasticsearch.QueryDsl.Query? PostFilter { get; set; } - - /// - /// - /// Set to true to return detailed timing information about the execution of individual components in a search request. - /// NOTE: This is a debugging tool and adds significant overhead to search execution. - /// - /// public bool? Profile { get; set; } /// /// - /// The search definition using the Query DSL. + /// Defines the search definition using the Query DSL. /// /// public Elastic.Clients.Elasticsearch.QueryDsl.Query? Query { get; set; } - - /// - /// - /// The Reciprocal Rank Fusion (RRF) to use. - /// - /// - public Elastic.Clients.Elasticsearch.Rank? Rank { get; set; } - - /// - /// - /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query and post_filter phases. - /// - /// public System.Collections.Generic.ICollection? Rescore { get; set; } /// /// - /// A retriever is a specification to describe top documents returned from a search. - /// A retriever replaces other elements of the search API that also return top documents such as query and knn. - /// - /// - public Elastic.Clients.Elasticsearch.Retriever? Retriever { get; set; } - - /// - /// - /// One or more runtime fields in the search request. - /// These fields take precedence over mapped fields with the same name. + /// Defines one or more runtime fields in the search request. These fields take + /// precedence over mapped fields with the same name. /// /// public System.Collections.Generic.IDictionary? RuntimeMappings { get; set; } @@ -532,102 +449,67 @@ internal MultisearchBody(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// /// public System.Collections.Generic.IDictionary? ScriptFields { get; set; } - - /// - /// - /// Used to retrieve the next page of hits using a set of sort values from the previous page. - /// - /// public System.Collections.Generic.ICollection? SearchAfter { get; set; } /// /// - /// If true, the request returns sequence number and primary term of the last modification of each hit. + /// If true, returns sequence number and primary term of the last modification + /// of each hit. See Optimistic concurrency control. /// /// public bool? SeqNoPrimaryTerm { get; set; } /// /// - /// The number of hits to return, which must not be negative. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after property. + /// The number of hits to return. By default, you cannot page through more + /// than 10,000 hits using the from and size parameters. To page through more + /// hits, use the search_after parameter. /// /// public int? Size { get; set; } - - /// - /// - /// Split a scrolled search into multiple slices that can be consumed independently. - /// - /// - public Elastic.Clients.Elasticsearch.SlicedScroll? Slice { get; set; } - - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// public System.Collections.Generic.ICollection? Sort { get; set; } /// /// - /// The source fields that are returned for matching documents. - /// These fields are returned in the hits._source property of the search response. - /// If the stored_fields property is specified, the _source property defaults to false. - /// Otherwise, it defaults to true. + /// Indicates which source fields are returned for matching documents. These + /// fields are returned in the hits._source property of the search response. /// /// public Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? Source { get; set; } /// /// - /// The stats groups to associate with the search. - /// Each group maintains a statistics aggregation for its associated searches. - /// You can retrieve these stats using the indices stats API. + /// Stats groups to associate with the search. Each group maintains a statistics + /// aggregation for its associated searches. You can retrieve these stats using + /// the indices stats API. /// /// public System.Collections.Generic.ICollection? Stats { get; set; } /// /// - /// A comma-separated list of stored fields to return as part of a hit. - /// If no fields are specified, no stored fields are included in the response. - /// If this field is specified, the _source property defaults to false. - /// You can pass _source: true to return both source fields and stored fields in the search response. + /// List of stored fields to return as part of a hit. If no fields are specified, + /// no stored fields are included in the response. If this field is specified, the _source + /// parameter defaults to false. You can pass _source: true to return both source fields + /// and stored fields in the search response. /// /// public Elastic.Clients.Elasticsearch.Fields? StoredFields { get; set; } - - /// - /// - /// Defines a suggester that provides similar looking terms based on a provided text. - /// - /// public Elastic.Clients.Elasticsearch.Core.Search.Suggester? Suggest { get; set; } /// /// - /// The maximum number of documents to collect for each shard. - /// If a query reaches this limit, Elasticsearch terminates the query early. - /// Elasticsearch collects documents before sorting. - /// - /// - /// IMPORTANT: Use with caution. - /// Elasticsearch applies this property to each shard handling the request. - /// When possible, let Elasticsearch perform early termination automatically. - /// Avoid specifying this property for requests that target data streams with backing indices across multiple data tiers. - /// - /// - /// If set to 0 (default), the query does not terminate early. + /// Maximum number of documents to collect for each shard. If a query reaches this + /// limit, Elasticsearch terminates the query early. Elasticsearch collects documents + /// before sorting. Defaults to 0, which does not terminate query execution early. /// /// public long? TerminateAfter { get; set; } /// /// - /// The period of time to wait for a response from each shard. - /// If no response is received before the timeout expires, the request fails and returns an error. + /// Specifies the period of time to wait for a response from each shard. If no response + /// is received before the timeout expires, the request fails and returns an error. /// Defaults to no timeout. /// /// @@ -635,23 +517,24 @@ internal MultisearchBody(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. + /// If true, calculate and return document scores, even if the scores are not used for sorting. /// /// public bool? TrackScores { get; set; } /// /// - /// Number of hits matching the query to count accurately. - /// If true, the exact number of hits is returned at the cost of some performance. - /// If false, the response does not include the total number of hits matching the query. + /// Number of hits matching the query to count accurately. If true, the exact + /// number of hits is returned at the cost of some performance. If false, the + /// response does not include the total number of hits matching the query. + /// Defaults to 10,000 hits. /// /// public Elastic.Clients.Elasticsearch.Core.Search.TrackHits? TrackTotalHits { get; set; } /// /// - /// If true, the request returns the document version as part of a hit. + /// If true, returns document version as part of a hit. /// /// public bool? Version { get; set; } @@ -676,33 +559,18 @@ public MultisearchBodyDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor(Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody instance) => new Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody(Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor descriptor) => descriptor.Instance; - /// - /// - /// Defines the aggregations that are run as part of the search request. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Aggregations(System.Collections.Generic.IDictionary? value) { Instance.Aggregations = value; return this; } - /// - /// - /// Defines the aggregations that are run as part of the search request. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Aggregations() { Instance.Aggregations = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringAggregation.Build(null); return this; } - /// - /// - /// Defines the aggregations that are run as part of the search request. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Aggregations(System.Action>? action) { Instance.Aggregations = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringAggregation.Build(action); @@ -723,22 +591,12 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor - /// - /// Collapses search results the values of the specified field. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Collapse(Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? value) { Instance.Collapse = value; return this; } - /// - /// - /// Collapses search results the values of the specified field. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Collapse(System.Action> action) { Instance.Collapse = Elastic.Clients.Elasticsearch.Core.Search.FieldCollapseDescriptor.Build(action); @@ -747,8 +605,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// An array of wildcard (*) field patterns. - /// The request returns doc values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns doc values for field + /// names matching these patterns in the hits.fields property of the response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor DocvalueFields(System.Collections.Generic.ICollection? value) @@ -759,8 +617,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// An array of wildcard (*) field patterns. - /// The request returns doc values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns doc values for field + /// names matching these patterns in the hits.fields property of the response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor DocvalueFields(params Elastic.Clients.Elasticsearch.QueryDsl.FieldAndFormat[] values) @@ -771,8 +629,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// An array of wildcard (*) field patterns. - /// The request returns doc values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns doc values for field + /// names matching these patterns in the hits.fields property of the response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor DocvalueFields(params System.Action>[] actions) @@ -789,7 +647,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// If true, the request returns detailed information about score computation as part of a hit. + /// If true, returns detailed information about score computation as part of a hit. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Explain(bool? value = true) @@ -840,8 +698,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// An array of wildcard (*) field patterns. - /// The request returns values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns values for field names + /// matching these patterns in the hits.fields property of the response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Fields(System.Collections.Generic.ICollection? value) @@ -852,8 +710,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// An array of wildcard (*) field patterns. - /// The request returns values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns values for field names + /// matching these patterns in the hits.fields property of the response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Fields(params Elastic.Clients.Elasticsearch.QueryDsl.FieldAndFormat[] values) @@ -864,8 +722,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// An array of wildcard (*) field patterns. - /// The request returns values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns values for field names + /// matching these patterns in the hits.fields property of the response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Fields(params System.Action>[] actions) @@ -882,9 +740,9 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// The starting document offset, which must be non-negative. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. + /// Starting document offset. By default, you cannot page through more than 10,000 + /// hits using the from and size parameters. To page through more hits, use the + /// search_after parameter. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor From(int? value) @@ -893,22 +751,12 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor - /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? value) { Instance.Highlight = value; return this; } - /// - /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Highlight(System.Action> action) { Instance.Highlight = Elastic.Clients.Elasticsearch.Core.Search.HighlightDescriptor.Build(action); @@ -917,10 +765,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// Boost the _score of documents from specified indices. - /// The boost value is the factor by which scores are multiplied. - /// A boost value greater than 1.0 increases the score. - /// A boost value between 0 and 1.0 decreases the score. + /// Boosts the _score of documents from specified indices. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor IndicesBoost(System.Collections.Generic.ICollection>? value) @@ -931,10 +776,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// Boost the _score of documents from specified indices. - /// The boost value is the factor by which scores are multiplied. - /// A boost value greater than 1.0 increases the score. - /// A boost value between 0 and 1.0 decreases the score. + /// Boosts the _score of documents from specified indices. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor IndicesBoost() @@ -945,10 +787,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// Boost the _score of documents from specified indices. - /// The boost value is the factor by which scores are multiplied. - /// A boost value greater than 1.0 increases the score. - /// A boost value between 0 and 1.0 decreases the score. + /// Boosts the _score of documents from specified indices. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor IndicesBoost(System.Action? action) @@ -966,7 +805,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// The approximate kNN search to run. + /// Defines the approximate kNN search to run. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Knn(System.Collections.Generic.ICollection? value) @@ -977,7 +816,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// The approximate kNN search to run. + /// Defines the approximate kNN search to run. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Knn(params Elastic.Clients.Elasticsearch.KnnSearch[] values) @@ -988,7 +827,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// The approximate kNN search to run. + /// Defines the approximate kNN search to run. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Knn(params System.Action>[] actions) @@ -1006,7 +845,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// /// The minimum _score for matching documents. - /// Documents with a lower _score are not included in search results or results collected by aggregations. + /// Documents with a lower _score are not included in search results and results collected by aggregations. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor MinScore(double? value) @@ -1017,8 +856,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// Limit the search to a point in time (PIT). - /// If you provide a PIT, you cannot specify an <index> in the request path. + /// Limits the search to a point in time (PIT). If you provide a PIT, you + /// cannot specify an <index> in the request path. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? value) @@ -1029,8 +868,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// Limit the search to a point in time (PIT). - /// If you provide a PIT, you cannot specify an <index> in the request path. + /// Limits the search to a point in time (PIT). If you provide a PIT, you + /// cannot specify an <index> in the request path. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Pit(System.Action action) @@ -1039,38 +878,18 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor - /// - /// Use the post_filter parameter to filter search results. - /// The search hits are filtered after the aggregations are calculated. - /// A post filter has no impact on the aggregation results. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor PostFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? value) { Instance.PostFilter = value; return this; } - /// - /// - /// Use the post_filter parameter to filter search results. - /// The search hits are filtered after the aggregations are calculated. - /// A post filter has no impact on the aggregation results. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor PostFilter(System.Action> action) { Instance.PostFilter = Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action); return this; } - /// - /// - /// Set to true to return detailed timing information about the execution of individual components in a search request. - /// NOTE: This is a debugging tool and adds significant overhead to search execution. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Profile(bool? value = true) { Instance.Profile = value; @@ -1079,7 +898,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// The search definition using the Query DSL. + /// Defines the search definition using the Query DSL. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? value) @@ -1090,7 +909,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// The search definition using the Query DSL. + /// Defines the search definition using the Query DSL. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Query(System.Action> action) @@ -1099,55 +918,18 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor - /// - /// The Reciprocal Rank Fusion (RRF) to use. - /// - /// - public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Rank(Elastic.Clients.Elasticsearch.Rank? value) - { - Instance.Rank = value; - return this; - } - - /// - /// - /// The Reciprocal Rank Fusion (RRF) to use. - /// - /// - public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Rank(System.Action action) - { - Instance.Rank = Elastic.Clients.Elasticsearch.RankDescriptor.Build(action); - return this; - } - - /// - /// - /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query and post_filter phases. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Rescore(System.Collections.Generic.ICollection? value) { Instance.Rescore = value; return this; } - /// - /// - /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query and post_filter phases. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Rescore(params Elastic.Clients.Elasticsearch.Core.Search.Rescore[] values) { Instance.Rescore = [.. values]; return this; } - /// - /// - /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query and post_filter phases. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Rescore(params System.Action>[] actions) { var items = new System.Collections.Generic.List(); @@ -1162,32 +944,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// A retriever is a specification to describe top documents returned from a search. - /// A retriever replaces other elements of the search API that also return top documents such as query and knn. - /// - /// - public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever? value) - { - Instance.Retriever = value; - return this; - } - - /// - /// - /// A retriever is a specification to describe top documents returned from a search. - /// A retriever replaces other elements of the search API that also return top documents such as query and knn. - /// - /// - public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Retriever(System.Action> action) - { - Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); - return this; - } - - /// - /// - /// One or more runtime fields in the search request. - /// These fields take precedence over mapped fields with the same name. + /// Defines one or more runtime fields in the search request. These fields take + /// precedence over mapped fields with the same name. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor RuntimeMappings(System.Collections.Generic.IDictionary? value) @@ -1198,8 +956,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// One or more runtime fields in the search request. - /// These fields take precedence over mapped fields with the same name. + /// Defines one or more runtime fields in the search request. These fields take + /// precedence over mapped fields with the same name. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor RuntimeMappings() @@ -1210,8 +968,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// One or more runtime fields in the search request. - /// These fields take precedence over mapped fields with the same name. + /// Defines one or more runtime fields in the search request. These fields take + /// precedence over mapped fields with the same name. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor RuntimeMappings(System.Action>? action) @@ -1295,22 +1053,12 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor - /// - /// Used to retrieve the next page of hits using a set of sort values from the previous page. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor SearchAfter(System.Collections.Generic.ICollection? value) { Instance.SearchAfter = value; return this; } - /// - /// - /// Used to retrieve the next page of hits using a set of sort values from the previous page. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor SearchAfter(params Elastic.Clients.Elasticsearch.FieldValue[] values) { Instance.SearchAfter = [.. values]; @@ -1319,7 +1067,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// If true, the request returns sequence number and primary term of the last modification of each hit. + /// If true, returns sequence number and primary term of the last modification + /// of each hit. See Optimistic concurrency control. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor SeqNoPrimaryTerm(bool? value = true) @@ -1330,9 +1079,9 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// The number of hits to return, which must not be negative. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after property. + /// The number of hits to return. By default, you cannot page through more + /// than 10,000 hits using the from and size parameters. To page through more + /// hits, use the search_after parameter. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Size(int? value) @@ -1341,55 +1090,18 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor - /// - /// Split a scrolled search into multiple slices that can be consumed independently. - /// - /// - public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Slice(Elastic.Clients.Elasticsearch.SlicedScroll? value) - { - Instance.Slice = value; - return this; - } - - /// - /// - /// Split a scrolled search into multiple slices that can be consumed independently. - /// - /// - public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Slice(System.Action> action) - { - Instance.Slice = Elastic.Clients.Elasticsearch.SlicedScrollDescriptor.Build(action); - return this; - } - - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Sort(System.Collections.Generic.ICollection? value) { Instance.Sort = value; return this; } - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Sort(params Elastic.Clients.Elasticsearch.SortOptions[] values) { Instance.Sort = [.. values]; return this; } - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Sort(params System.Action>[] actions) { var items = new System.Collections.Generic.List(); @@ -1404,10 +1116,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// The source fields that are returned for matching documents. - /// These fields are returned in the hits._source property of the search response. - /// If the stored_fields property is specified, the _source property defaults to false. - /// Otherwise, it defaults to true. + /// Indicates which source fields are returned for matching documents. These + /// fields are returned in the hits._source property of the search response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? value) @@ -1418,10 +1128,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// The source fields that are returned for matching documents. - /// These fields are returned in the hits._source property of the search response. - /// If the stored_fields property is specified, the _source property defaults to false. - /// Otherwise, it defaults to true. + /// Indicates which source fields are returned for matching documents. These + /// fields are returned in the hits._source property of the search response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Source(System.Func, Elastic.Clients.Elasticsearch.Core.Search.SourceConfig> action) @@ -1432,9 +1140,9 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// The stats groups to associate with the search. - /// Each group maintains a statistics aggregation for its associated searches. - /// You can retrieve these stats using the indices stats API. + /// Stats groups to associate with the search. Each group maintains a statistics + /// aggregation for its associated searches. You can retrieve these stats using + /// the indices stats API. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Stats(System.Collections.Generic.ICollection? value) @@ -1445,9 +1153,9 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// The stats groups to associate with the search. - /// Each group maintains a statistics aggregation for its associated searches. - /// You can retrieve these stats using the indices stats API. + /// Stats groups to associate with the search. Each group maintains a statistics + /// aggregation for its associated searches. You can retrieve these stats using + /// the indices stats API. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Stats(params string[] values) @@ -1458,10 +1166,10 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// A comma-separated list of stored fields to return as part of a hit. - /// If no fields are specified, no stored fields are included in the response. - /// If this field is specified, the _source property defaults to false. - /// You can pass _source: true to return both source fields and stored fields in the search response. + /// List of stored fields to return as part of a hit. If no fields are specified, + /// no stored fields are included in the response. If this field is specified, the _source + /// parameter defaults to false. You can pass _source: true to return both source fields + /// and stored fields in the search response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? value) @@ -1472,10 +1180,10 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// A comma-separated list of stored fields to return as part of a hit. - /// If no fields are specified, no stored fields are included in the response. - /// If this field is specified, the _source property defaults to false. - /// You can pass _source: true to return both source fields and stored fields in the search response. + /// List of stored fields to return as part of a hit. If no fields are specified, + /// no stored fields are included in the response. If this field is specified, the _source + /// parameter defaults to false. You can pass _source: true to return both source fields + /// and stored fields in the search response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor StoredFields(params System.Linq.Expressions.Expression>[] value) @@ -1484,33 +1192,18 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor - /// - /// Defines a suggester that provides similar looking terms based on a provided text. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Core.Search.Suggester? value) { Instance.Suggest = value; return this; } - /// - /// - /// Defines a suggester that provides similar looking terms based on a provided text. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Suggest() { Instance.Suggest = Elastic.Clients.Elasticsearch.Core.Search.SuggesterDescriptor.Build(null); return this; } - /// - /// - /// Defines a suggester that provides similar looking terms based on a provided text. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Suggest(System.Action>? action) { Instance.Suggest = Elastic.Clients.Elasticsearch.Core.Search.SuggesterDescriptor.Build(action); @@ -1519,18 +1212,9 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// The maximum number of documents to collect for each shard. - /// If a query reaches this limit, Elasticsearch terminates the query early. - /// Elasticsearch collects documents before sorting. - /// - /// - /// IMPORTANT: Use with caution. - /// Elasticsearch applies this property to each shard handling the request. - /// When possible, let Elasticsearch perform early termination automatically. - /// Avoid specifying this property for requests that target data streams with backing indices across multiple data tiers. - /// - /// - /// If set to 0 (default), the query does not terminate early. + /// Maximum number of documents to collect for each shard. If a query reaches this + /// limit, Elasticsearch terminates the query early. Elasticsearch collects documents + /// before sorting. Defaults to 0, which does not terminate query execution early. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor TerminateAfter(long? value) @@ -1541,8 +1225,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// The period of time to wait for a response from each shard. - /// If no response is received before the timeout expires, the request fails and returns an error. + /// Specifies the period of time to wait for a response from each shard. If no response + /// is received before the timeout expires, the request fails and returns an error. /// Defaults to no timeout. /// /// @@ -1554,7 +1238,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. + /// If true, calculate and return document scores, even if the scores are not used for sorting. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor TrackScores(bool? value = true) @@ -1565,9 +1249,10 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// Number of hits matching the query to count accurately. - /// If true, the exact number of hits is returned at the cost of some performance. - /// If false, the response does not include the total number of hits matching the query. + /// Number of hits matching the query to count accurately. If true, the exact + /// number of hits is returned at the cost of some performance. If false, the + /// response does not include the total number of hits matching the query. + /// Defaults to 10,000 hits. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Core.Search.TrackHits? value) @@ -1578,9 +1263,10 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// Number of hits matching the query to count accurately. - /// If true, the exact number of hits is returned at the cost of some performance. - /// If false, the response does not include the total number of hits matching the query. + /// Number of hits matching the query to count accurately. If true, the exact + /// number of hits is returned at the cost of some performance. If false, the + /// response does not include the total number of hits matching the query. + /// Defaults to 10,000 hits. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor TrackTotalHits(System.Func action) @@ -1591,7 +1277,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor /// - /// If true, the request returns the document version as part of a hit. + /// If true, returns document version as part of a hit. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Version(bool? value = true) @@ -1633,44 +1319,24 @@ public MultisearchBodyDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor(Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody instance) => new Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody(Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor descriptor) => descriptor.Instance; - /// - /// - /// Defines the aggregations that are run as part of the search request. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Aggregations(System.Collections.Generic.IDictionary? value) { Instance.Aggregations = value; return this; } - /// - /// - /// Defines the aggregations that are run as part of the search request. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Aggregations() { Instance.Aggregations = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringAggregation.Build(null); return this; } - /// - /// - /// Defines the aggregations that are run as part of the search request. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Aggregations(System.Action? action) { Instance.Aggregations = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringAggregation.Build(action); return this; } - /// - /// - /// Defines the aggregations that are run as part of the search request. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Aggregations(System.Action>? action) { Instance.Aggregations = Elastic.Clients.Elasticsearch.Fluent.FluentDictionaryOfStringAggregation.Build(action); @@ -1698,33 +1364,18 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor AddA return this; } - /// - /// - /// Collapses search results the values of the specified field. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Collapse(Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse? value) { Instance.Collapse = value; return this; } - /// - /// - /// Collapses search results the values of the specified field. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Collapse(System.Action action) { Instance.Collapse = Elastic.Clients.Elasticsearch.Core.Search.FieldCollapseDescriptor.Build(action); return this; } - /// - /// - /// Collapses search results the values of the specified field. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Collapse(System.Action> action) { Instance.Collapse = Elastic.Clients.Elasticsearch.Core.Search.FieldCollapseDescriptor.Build(action); @@ -1733,8 +1384,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Coll /// /// - /// An array of wildcard (*) field patterns. - /// The request returns doc values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns doc values for field + /// names matching these patterns in the hits.fields property of the response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor DocvalueFields(System.Collections.Generic.ICollection? value) @@ -1745,8 +1396,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Docv /// /// - /// An array of wildcard (*) field patterns. - /// The request returns doc values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns doc values for field + /// names matching these patterns in the hits.fields property of the response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor DocvalueFields(params Elastic.Clients.Elasticsearch.QueryDsl.FieldAndFormat[] values) @@ -1757,8 +1408,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Docv /// /// - /// An array of wildcard (*) field patterns. - /// The request returns doc values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns doc values for field + /// names matching these patterns in the hits.fields property of the response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor DocvalueFields(params System.Action[] actions) @@ -1775,8 +1426,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Docv /// /// - /// An array of wildcard (*) field patterns. - /// The request returns doc values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns doc values for field + /// names matching these patterns in the hits.fields property of the response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor DocvalueFields(params System.Action>[] actions) @@ -1793,7 +1444,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Docv /// /// - /// If true, the request returns detailed information about score computation as part of a hit. + /// If true, returns detailed information about score computation as part of a hit. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Explain(bool? value = true) @@ -1844,8 +1495,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor AddE /// /// - /// An array of wildcard (*) field patterns. - /// The request returns values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns values for field names + /// matching these patterns in the hits.fields property of the response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Fields(System.Collections.Generic.ICollection? value) @@ -1856,8 +1507,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Fiel /// /// - /// An array of wildcard (*) field patterns. - /// The request returns values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns values for field names + /// matching these patterns in the hits.fields property of the response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Fields(params Elastic.Clients.Elasticsearch.QueryDsl.FieldAndFormat[] values) @@ -1868,8 +1519,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Fiel /// /// - /// An array of wildcard (*) field patterns. - /// The request returns values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns values for field names + /// matching these patterns in the hits.fields property of the response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Fields(params System.Action[] actions) @@ -1886,8 +1537,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Fiel /// /// - /// An array of wildcard (*) field patterns. - /// The request returns values for field names matching these patterns in the hits.fields property of the response. + /// Array of wildcard (*) patterns. The request returns values for field names + /// matching these patterns in the hits.fields property of the response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Fields(params System.Action>[] actions) @@ -1904,9 +1555,9 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Fiel /// /// - /// The starting document offset, which must be non-negative. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after parameter. + /// Starting document offset. By default, you cannot page through more than 10,000 + /// hits using the from and size parameters. To page through more hits, use the + /// search_after parameter. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor From(int? value) @@ -1915,33 +1566,18 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor From return this; } - /// - /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Highlight(Elastic.Clients.Elasticsearch.Core.Search.Highlight? value) { Instance.Highlight = value; return this; } - /// - /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Highlight(System.Action action) { Instance.Highlight = Elastic.Clients.Elasticsearch.Core.Search.HighlightDescriptor.Build(action); return this; } - /// - /// - /// Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Highlight(System.Action> action) { Instance.Highlight = Elastic.Clients.Elasticsearch.Core.Search.HighlightDescriptor.Build(action); @@ -1950,10 +1586,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor High /// /// - /// Boost the _score of documents from specified indices. - /// The boost value is the factor by which scores are multiplied. - /// A boost value greater than 1.0 increases the score. - /// A boost value between 0 and 1.0 decreases the score. + /// Boosts the _score of documents from specified indices. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor IndicesBoost(System.Collections.Generic.ICollection>? value) @@ -1964,10 +1597,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Indi /// /// - /// Boost the _score of documents from specified indices. - /// The boost value is the factor by which scores are multiplied. - /// A boost value greater than 1.0 increases the score. - /// A boost value between 0 and 1.0 decreases the score. + /// Boosts the _score of documents from specified indices. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor IndicesBoost() @@ -1978,10 +1608,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Indi /// /// - /// Boost the _score of documents from specified indices. - /// The boost value is the factor by which scores are multiplied. - /// A boost value greater than 1.0 increases the score. - /// A boost value between 0 and 1.0 decreases the score. + /// Boosts the _score of documents from specified indices. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor IndicesBoost(System.Action? action) @@ -1999,7 +1626,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor AddI /// /// - /// The approximate kNN search to run. + /// Defines the approximate kNN search to run. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Knn(System.Collections.Generic.ICollection? value) @@ -2010,7 +1637,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Knn( /// /// - /// The approximate kNN search to run. + /// Defines the approximate kNN search to run. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Knn(params Elastic.Clients.Elasticsearch.KnnSearch[] values) @@ -2021,7 +1648,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Knn( /// /// - /// The approximate kNN search to run. + /// Defines the approximate kNN search to run. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Knn(params System.Action[] actions) @@ -2038,7 +1665,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Knn( /// /// - /// The approximate kNN search to run. + /// Defines the approximate kNN search to run. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Knn(params System.Action>[] actions) @@ -2056,7 +1683,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Knn< /// /// /// The minimum _score for matching documents. - /// Documents with a lower _score are not included in search results or results collected by aggregations. + /// Documents with a lower _score are not included in search results and results collected by aggregations. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor MinScore(double? value) @@ -2067,8 +1694,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor MinS /// /// - /// Limit the search to a point in time (PIT). - /// If you provide a PIT, you cannot specify an <index> in the request path. + /// Limits the search to a point in time (PIT). If you provide a PIT, you + /// cannot specify an <index> in the request path. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Pit(Elastic.Clients.Elasticsearch.Core.Search.PointInTimeReference? value) @@ -2079,8 +1706,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Pit( /// /// - /// Limit the search to a point in time (PIT). - /// If you provide a PIT, you cannot specify an <index> in the request path. + /// Limits the search to a point in time (PIT). If you provide a PIT, you + /// cannot specify an <index> in the request path. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Pit(System.Action action) @@ -2089,51 +1716,24 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Pit( return this; } - /// - /// - /// Use the post_filter parameter to filter search results. - /// The search hits are filtered after the aggregations are calculated. - /// A post filter has no impact on the aggregation results. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor PostFilter(Elastic.Clients.Elasticsearch.QueryDsl.Query? value) { Instance.PostFilter = value; return this; } - /// - /// - /// Use the post_filter parameter to filter search results. - /// The search hits are filtered after the aggregations are calculated. - /// A post filter has no impact on the aggregation results. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor PostFilter(System.Action action) { Instance.PostFilter = Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action); return this; } - /// - /// - /// Use the post_filter parameter to filter search results. - /// The search hits are filtered after the aggregations are calculated. - /// A post filter has no impact on the aggregation results. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor PostFilter(System.Action> action) { Instance.PostFilter = Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action); return this; } - /// - /// - /// Set to true to return detailed timing information about the execution of individual components in a search request. - /// NOTE: This is a debugging tool and adds significant overhead to search execution. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Profile(bool? value = true) { Instance.Profile = value; @@ -2142,7 +1742,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Prof /// /// - /// The search definition using the Query DSL. + /// Defines the search definition using the Query DSL. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? value) @@ -2153,7 +1753,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Quer /// /// - /// The search definition using the Query DSL. + /// Defines the search definition using the Query DSL. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Query(System.Action action) @@ -2164,7 +1764,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Quer /// /// - /// The search definition using the Query DSL. + /// Defines the search definition using the Query DSL. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Query(System.Action> action) @@ -2173,55 +1773,18 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Quer return this; } - /// - /// - /// The Reciprocal Rank Fusion (RRF) to use. - /// - /// - public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Rank(Elastic.Clients.Elasticsearch.Rank? value) - { - Instance.Rank = value; - return this; - } - - /// - /// - /// The Reciprocal Rank Fusion (RRF) to use. - /// - /// - public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Rank(System.Action action) - { - Instance.Rank = Elastic.Clients.Elasticsearch.RankDescriptor.Build(action); - return this; - } - - /// - /// - /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query and post_filter phases. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Rescore(System.Collections.Generic.ICollection? value) { Instance.Rescore = value; return this; } - /// - /// - /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query and post_filter phases. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Rescore(params Elastic.Clients.Elasticsearch.Core.Search.Rescore[] values) { Instance.Rescore = [.. values]; return this; } - /// - /// - /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query and post_filter phases. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Rescore(params System.Action[] actions) { var items = new System.Collections.Generic.List(); @@ -2234,11 +1797,6 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Resc return this; } - /// - /// - /// Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query and post_filter phases. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Rescore(params System.Action>[] actions) { var items = new System.Collections.Generic.List(); @@ -2253,44 +1811,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Resc /// /// - /// A retriever is a specification to describe top documents returned from a search. - /// A retriever replaces other elements of the search API that also return top documents such as query and knn. - /// - /// - public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever? value) - { - Instance.Retriever = value; - return this; - } - - /// - /// - /// A retriever is a specification to describe top documents returned from a search. - /// A retriever replaces other elements of the search API that also return top documents such as query and knn. - /// - /// - public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Retriever(System.Action action) - { - Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); - return this; - } - - /// - /// - /// A retriever is a specification to describe top documents returned from a search. - /// A retriever replaces other elements of the search API that also return top documents such as query and knn. - /// - /// - public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Retriever(System.Action> action) - { - Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); - return this; - } - - /// - /// - /// One or more runtime fields in the search request. - /// These fields take precedence over mapped fields with the same name. + /// Defines one or more runtime fields in the search request. These fields take + /// precedence over mapped fields with the same name. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor RuntimeMappings(System.Collections.Generic.IDictionary? value) @@ -2301,8 +1823,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Runt /// /// - /// One or more runtime fields in the search request. - /// These fields take precedence over mapped fields with the same name. + /// Defines one or more runtime fields in the search request. These fields take + /// precedence over mapped fields with the same name. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor RuntimeMappings() @@ -2313,8 +1835,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Runt /// /// - /// One or more runtime fields in the search request. - /// These fields take precedence over mapped fields with the same name. + /// Defines one or more runtime fields in the search request. These fields take + /// precedence over mapped fields with the same name. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor RuntimeMappings(System.Action? action) @@ -2325,8 +1847,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Runt /// /// - /// One or more runtime fields in the search request. - /// These fields take precedence over mapped fields with the same name. + /// Defines one or more runtime fields in the search request. These fields take + /// precedence over mapped fields with the same name. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor RuntimeMappings(System.Action>? action) @@ -2424,22 +1946,12 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor AddS return this; } - /// - /// - /// Used to retrieve the next page of hits using a set of sort values from the previous page. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor SearchAfter(System.Collections.Generic.ICollection? value) { Instance.SearchAfter = value; return this; } - /// - /// - /// Used to retrieve the next page of hits using a set of sort values from the previous page. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor SearchAfter(params Elastic.Clients.Elasticsearch.FieldValue[] values) { Instance.SearchAfter = [.. values]; @@ -2448,7 +1960,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Sear /// /// - /// If true, the request returns sequence number and primary term of the last modification of each hit. + /// If true, returns sequence number and primary term of the last modification + /// of each hit. See Optimistic concurrency control. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor SeqNoPrimaryTerm(bool? value = true) @@ -2459,9 +1972,9 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor SeqN /// /// - /// The number of hits to return, which must not be negative. - /// By default, you cannot page through more than 10,000 hits using the from and size parameters. - /// To page through more hits, use the search_after property. + /// The number of hits to return. By default, you cannot page through more + /// than 10,000 hits using the from and size parameters. To page through more + /// hits, use the search_after parameter. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Size(int? value) @@ -2470,66 +1983,18 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Size return this; } - /// - /// - /// Split a scrolled search into multiple slices that can be consumed independently. - /// - /// - public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Slice(Elastic.Clients.Elasticsearch.SlicedScroll? value) - { - Instance.Slice = value; - return this; - } - - /// - /// - /// Split a scrolled search into multiple slices that can be consumed independently. - /// - /// - public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Slice(System.Action action) - { - Instance.Slice = Elastic.Clients.Elasticsearch.SlicedScrollDescriptor.Build(action); - return this; - } - - /// - /// - /// Split a scrolled search into multiple slices that can be consumed independently. - /// - /// - public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Slice(System.Action> action) - { - Instance.Slice = Elastic.Clients.Elasticsearch.SlicedScrollDescriptor.Build(action); - return this; - } - - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Sort(System.Collections.Generic.ICollection? value) { Instance.Sort = value; return this; } - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Sort(params Elastic.Clients.Elasticsearch.SortOptions[] values) { Instance.Sort = [.. values]; return this; } - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Sort(params System.Action[] actions) { var items = new System.Collections.Generic.List(); @@ -2542,11 +2007,6 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Sort return this; } - /// - /// - /// A comma-separated list of <field>:<direction> pairs. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Sort(params System.Action>[] actions) { var items = new System.Collections.Generic.List(); @@ -2561,10 +2021,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Sort /// /// - /// The source fields that are returned for matching documents. - /// These fields are returned in the hits._source property of the search response. - /// If the stored_fields property is specified, the _source property defaults to false. - /// Otherwise, it defaults to true. + /// Indicates which source fields are returned for matching documents. These + /// fields are returned in the hits._source property of the search response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Source(Elastic.Clients.Elasticsearch.Core.Search.SourceConfig? value) @@ -2575,10 +2033,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Sour /// /// - /// The source fields that are returned for matching documents. - /// These fields are returned in the hits._source property of the search response. - /// If the stored_fields property is specified, the _source property defaults to false. - /// Otherwise, it defaults to true. + /// Indicates which source fields are returned for matching documents. These + /// fields are returned in the hits._source property of the search response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Source(System.Func action) @@ -2589,10 +2045,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Sour /// /// - /// The source fields that are returned for matching documents. - /// These fields are returned in the hits._source property of the search response. - /// If the stored_fields property is specified, the _source property defaults to false. - /// Otherwise, it defaults to true. + /// Indicates which source fields are returned for matching documents. These + /// fields are returned in the hits._source property of the search response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Source(System.Func, Elastic.Clients.Elasticsearch.Core.Search.SourceConfig> action) @@ -2603,9 +2057,9 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Sour /// /// - /// The stats groups to associate with the search. - /// Each group maintains a statistics aggregation for its associated searches. - /// You can retrieve these stats using the indices stats API. + /// Stats groups to associate with the search. Each group maintains a statistics + /// aggregation for its associated searches. You can retrieve these stats using + /// the indices stats API. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Stats(System.Collections.Generic.ICollection? value) @@ -2616,9 +2070,9 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Stat /// /// - /// The stats groups to associate with the search. - /// Each group maintains a statistics aggregation for its associated searches. - /// You can retrieve these stats using the indices stats API. + /// Stats groups to associate with the search. Each group maintains a statistics + /// aggregation for its associated searches. You can retrieve these stats using + /// the indices stats API. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Stats(params string[] values) @@ -2629,10 +2083,10 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Stat /// /// - /// A comma-separated list of stored fields to return as part of a hit. - /// If no fields are specified, no stored fields are included in the response. - /// If this field is specified, the _source property defaults to false. - /// You can pass _source: true to return both source fields and stored fields in the search response. + /// List of stored fields to return as part of a hit. If no fields are specified, + /// no stored fields are included in the response. If this field is specified, the _source + /// parameter defaults to false. You can pass _source: true to return both source fields + /// and stored fields in the search response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor StoredFields(Elastic.Clients.Elasticsearch.Fields? value) @@ -2643,10 +2097,10 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Stor /// /// - /// A comma-separated list of stored fields to return as part of a hit. - /// If no fields are specified, no stored fields are included in the response. - /// If this field is specified, the _source property defaults to false. - /// You can pass _source: true to return both source fields and stored fields in the search response. + /// List of stored fields to return as part of a hit. If no fields are specified, + /// no stored fields are included in the response. If this field is specified, the _source + /// parameter defaults to false. You can pass _source: true to return both source fields + /// and stored fields in the search response. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor StoredFields(params System.Linq.Expressions.Expression>[] value) @@ -2655,44 +2109,24 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Stor return this; } - /// - /// - /// Defines a suggester that provides similar looking terms based on a provided text. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Suggest(Elastic.Clients.Elasticsearch.Core.Search.Suggester? value) { Instance.Suggest = value; return this; } - /// - /// - /// Defines a suggester that provides similar looking terms based on a provided text. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Suggest() { Instance.Suggest = Elastic.Clients.Elasticsearch.Core.Search.SuggesterDescriptor.Build(null); return this; } - /// - /// - /// Defines a suggester that provides similar looking terms based on a provided text. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Suggest(System.Action? action) { Instance.Suggest = Elastic.Clients.Elasticsearch.Core.Search.SuggesterDescriptor.Build(action); return this; } - /// - /// - /// Defines a suggester that provides similar looking terms based on a provided text. - /// - /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Suggest(System.Action>? action) { Instance.Suggest = Elastic.Clients.Elasticsearch.Core.Search.SuggesterDescriptor.Build(action); @@ -2701,18 +2135,9 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Sugg /// /// - /// The maximum number of documents to collect for each shard. - /// If a query reaches this limit, Elasticsearch terminates the query early. - /// Elasticsearch collects documents before sorting. - /// - /// - /// IMPORTANT: Use with caution. - /// Elasticsearch applies this property to each shard handling the request. - /// When possible, let Elasticsearch perform early termination automatically. - /// Avoid specifying this property for requests that target data streams with backing indices across multiple data tiers. - /// - /// - /// If set to 0 (default), the query does not terminate early. + /// Maximum number of documents to collect for each shard. If a query reaches this + /// limit, Elasticsearch terminates the query early. Elasticsearch collects documents + /// before sorting. Defaults to 0, which does not terminate query execution early. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor TerminateAfter(long? value) @@ -2723,8 +2148,8 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Term /// /// - /// The period of time to wait for a response from each shard. - /// If no response is received before the timeout expires, the request fails and returns an error. + /// Specifies the period of time to wait for a response from each shard. If no response + /// is received before the timeout expires, the request fails and returns an error. /// Defaults to no timeout. /// /// @@ -2736,7 +2161,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Time /// /// - /// If true, calculate and return document scores, even if the scores are not used for sorting. + /// If true, calculate and return document scores, even if the scores are not used for sorting. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor TrackScores(bool? value = true) @@ -2747,9 +2172,10 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Trac /// /// - /// Number of hits matching the query to count accurately. - /// If true, the exact number of hits is returned at the cost of some performance. - /// If false, the response does not include the total number of hits matching the query. + /// Number of hits matching the query to count accurately. If true, the exact + /// number of hits is returned at the cost of some performance. If false, the + /// response does not include the total number of hits matching the query. + /// Defaults to 10,000 hits. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor TrackTotalHits(Elastic.Clients.Elasticsearch.Core.Search.TrackHits? value) @@ -2760,9 +2186,10 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Trac /// /// - /// Number of hits matching the query to count accurately. - /// If true, the exact number of hits is returned at the cost of some performance. - /// If false, the response does not include the total number of hits matching the query. + /// Number of hits matching the query to count accurately. If true, the exact + /// number of hits is returned at the cost of some performance. If false, the + /// response does not include the total number of hits matching the query. + /// Defaults to 10,000 hits. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor TrackTotalHits(System.Func action) @@ -2773,7 +2200,7 @@ public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Trac /// /// - /// If true, the request returns the document version as part of a hit. + /// If true, returns document version as part of a hit. /// /// public Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBodyDescriptor Version(bool? value = true) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs index 5e66df57943..d196fd82b8d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricDiscountedCumulativeGain.g.cs @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Discounted cumulative gain (DCG) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricDiscountedCumulativeGainConverter))] public sealed partial class RankEvalMetricDiscountedCumulativeGain @@ -115,7 +115,7 @@ internal RankEvalMetricDiscountedCumulativeGain(Elastic.Clients.Elasticsearch.Se /// /// Discounted cumulative gain (DCG) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct RankEvalMetricDiscountedCumulativeGainDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs index 31bbb03877d..7868a2caa14 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricExpectedReciprocalRank.g.cs @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Expected Reciprocal Rank (ERR) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricExpectedReciprocalRankConverter))] public sealed partial class RankEvalMetricExpectedReciprocalRank @@ -125,7 +125,7 @@ internal RankEvalMetricExpectedReciprocalRank(Elastic.Clients.Elasticsearch.Seri /// /// Expected Reciprocal Rank (ERR) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct RankEvalMetricExpectedReciprocalRankDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs index c54c6362ee0..218a75874c0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricMeanReciprocalRank.g.cs @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Mean Reciprocal Rank /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricMeanReciprocalRankConverter))] public sealed partial class RankEvalMetricMeanReciprocalRank @@ -115,7 +115,7 @@ internal RankEvalMetricMeanReciprocalRank(Elastic.Clients.Elasticsearch.Serializ /// /// Mean Reciprocal Rank /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct RankEvalMetricMeanReciprocalRankDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs index 17b06a7e66e..db1c60584e0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricPrecision.g.cs @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Precision at K (P@k) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricPrecisionConverter))] public sealed partial class RankEvalMetricPrecision @@ -131,7 +131,7 @@ internal RankEvalMetricPrecision(Elastic.Clients.Elasticsearch.Serialization.Jso /// /// Precision at K (P@k) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct RankEvalMetricPrecisionDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs index 4fb0493c985..3453d3e77dc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalMetricRecall.g.cs @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Recall at K (R@k) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricRecallConverter))] public sealed partial class RankEvalMetricRecall @@ -115,7 +115,7 @@ internal RankEvalMetricRecall(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// /// Recall at K (R@k) /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct RankEvalMetricRecallDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Hit.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Hit.g.cs index 4c6a804bcf6..fedc1cab7b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Hit.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Hit.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Hit Read(re LocalJsonValue>?> propHighlight = default; LocalJsonValue propId = default; LocalJsonValue?> propIgnored = default; - LocalJsonValue>?> propIgnoredFieldValues = default; + LocalJsonValue>?> propIgnoredFieldValues = default; LocalJsonValue propIndex = default; LocalJsonValue?> propInnerHits = default; LocalJsonValue, System.Collections.Generic.IReadOnlyDictionary>?> propMatchedQueries = default; @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Hit Read(re continue; } - if (propIgnoredFieldValues.TryReadProperty(ref reader, options, PropIgnoredFieldValues, static System.Collections.Generic.IReadOnlyDictionary>? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue>(o, null, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!))) + if (propIgnoredFieldValues.TryReadProperty(ref reader, options, PropIgnoredFieldValues, static System.Collections.Generic.IReadOnlyDictionary>? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadDictionaryValue>(o, null, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!))) { continue; } @@ -214,7 +214,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropHighlight, value.Highlight, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary>? v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIgnored, value.Ignored, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropIgnoredFieldValues, value.IgnoredFieldValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary>? v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null))); + writer.WriteProperty(options, PropIgnoredFieldValues, value.IgnoredFieldValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary>? v) => w.WriteDictionaryValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null))); writer.WriteProperty(options, PropIndex, value.Index, null, null); writer.WriteProperty(options, PropInnerHits, value.InnerHits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropMatchedQueries, value.MatchedQueries, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union, System.Collections.Generic.IReadOnlyDictionary>? v) => w.WriteUnionValue, System.Collections.Generic.IReadOnlyDictionary>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null))); @@ -285,7 +285,7 @@ internal Hit(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel #endif string Id { get; set; } public System.Collections.Generic.IReadOnlyCollection? Ignored { get; set; } - public System.Collections.Generic.IReadOnlyDictionary>? IgnoredFieldValues { get; set; } + public System.Collections.Generic.IReadOnlyDictionary>? IgnoredFieldValues { get; set; } public #if NET7_0_OR_GREATER required diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Snapshot.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Snapshot.g.cs index 5c3e74013c5..7037f3e938b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Snapshot.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Snapshot.g.cs @@ -273,35 +273,35 @@ public enum ShardsStatsStage { /// /// - /// The number of shards in the snapshot that were successfully stored in the repository. + /// Number of shards in the snapshot that were successfully stored in the repository. /// /// [System.Runtime.Serialization.EnumMember(Value = "DONE")] Done, /// /// - /// The number of shards in the snapshot that were not successfully stored in the repository. + /// Number of shards in the snapshot that were not successfully stored in the repository. /// /// [System.Runtime.Serialization.EnumMember(Value = "FAILURE")] Failure, /// /// - /// The number of shards in the snapshot that are in the finalizing stage of being stored in the repository. + /// Number of shards in the snapshot that are in the finalizing stage of being stored in the repository. /// /// [System.Runtime.Serialization.EnumMember(Value = "FINALIZE")] Finalize, /// /// - /// The number of shards in the snapshot that are in the initializing stage of being stored in the repository. + /// Number of shards in the snapshot that are in the initializing stage of being stored in the repository. /// /// [System.Runtime.Serialization.EnumMember(Value = "INIT")] Init, /// /// - /// The number of shards in the snapshot that are in the started stage of being stored in the repository. + /// Number of shards in the snapshot that are in the started stage of being stored in the repository. /// /// [System.Runtime.Serialization.EnumMember(Value = "STARTED")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Fuzziness.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Fuzziness.g.cs index 63fd3c97ca3..5cd85fd50e7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Fuzziness.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Fuzziness.g.cs @@ -59,7 +59,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien } /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.FuzzinessConverter))] public sealed partial class Fuzziness : Elastic.Clients.Elasticsearch.Union diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/Hop.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/Hop.g.cs index e29e7074a25..013b0ff2bb9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/Hop.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/Hop.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Graph.Hop Read(ref System.Text.Jso { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propConnections = default; - LocalJsonValue propQuery = default; + LocalJsonValue propQuery = default; LocalJsonValue> propVertices = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -84,8 +84,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class Hop { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public Hop(System.Collections.Generic.ICollection vertices) + public Hop(Elastic.Clients.Elasticsearch.QueryDsl.Query query, System.Collections.Generic.ICollection vertices) { + Query = query; Vertices = vertices; } #if NET7_0_OR_GREATER @@ -117,7 +118,11 @@ internal Hop(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel /// An optional guiding query that constrains the Graph API as it explores connected terms. /// /// - public Elastic.Clients.Elasticsearch.QueryDsl.Query? Query { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.QueryDsl.Query Query { get; set; } /// /// @@ -177,7 +182,7 @@ public Elastic.Clients.Elasticsearch.Graph.HopDescriptor Connections( /// An optional guiding query that constrains the Graph API as it explores connected terms. /// /// - public Elastic.Clients.Elasticsearch.Graph.HopDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? value) + public Elastic.Clients.Elasticsearch.Graph.HopDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query value) { Instance.Query = value; return this; @@ -299,7 +304,7 @@ public Elastic.Clients.Elasticsearch.Graph.HopDescriptor Connections(System.A /// An optional guiding query that constrains the Graph API as it explores connected terms. /// /// - public Elastic.Clients.Elasticsearch.Graph.HopDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query? value) + public Elastic.Clients.Elasticsearch.Graph.HopDescriptor Query(Elastic.Clients.Elasticsearch.QueryDsl.Query value) { Instance.Query = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexInclude.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexInclude.g.cs index 4180eeec4dc..4e3ced37dae 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexInclude.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexInclude.g.cs @@ -30,17 +30,8 @@ internal sealed partial class VertexIncludeConverter : System.Text.Json.Serializ public override Elastic.Clients.Elasticsearch.Graph.VertexInclude Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { - if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) - { - var value = reader.ReadValue(options, null); - return new Elastic.Clients.Elasticsearch.Graph.VertexInclude(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) - { - Term = value - }; - } - reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBoost = default; + LocalJsonValue propBoost = default; LocalJsonValue propTerm = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -84,8 +75,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class VertexInclude { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public VertexInclude(string term) + public VertexInclude(double boost, string term) { + Boost = boost; Term = term; } #if NET7_0_OR_GREATER @@ -105,7 +97,11 @@ internal VertexInclude(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct _ = sentinel; } - public double? Boost { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + double Boost { get; set; } public #if NET7_0_OR_GREATER required @@ -132,7 +128,7 @@ public VertexIncludeDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Graph.VertexIncludeDescriptor(Elastic.Clients.Elasticsearch.Graph.VertexInclude instance) => new Elastic.Clients.Elasticsearch.Graph.VertexIncludeDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Graph.VertexInclude(Elastic.Clients.Elasticsearch.Graph.VertexIncludeDescriptor descriptor) => descriptor.Instance; - public Elastic.Clients.Elasticsearch.Graph.VertexIncludeDescriptor Boost(double? value) + public Elastic.Clients.Elasticsearch.Graph.VertexIncludeDescriptor Boost(double value) { Instance.Boost = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs index 944037bd921..6f2f8183a9d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs @@ -564,7 +564,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien } /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsConverter))] public sealed partial class IndexSettings @@ -681,7 +681,7 @@ internal IndexSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct } /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct IndexSettingsDescriptor { @@ -1399,7 +1399,7 @@ internal static Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Buil } /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct IndexSettingsDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs index b8993d26f4f..e0dc5fadaaa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs @@ -138,7 +138,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Mapping Limit Settings /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsConverter))] public sealed partial class MappingLimitSettings @@ -174,7 +174,7 @@ internal MappingLimitSettings(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// /// Mapping Limit Settings /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct MappingLimitSettingsDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs index c0236eabc3e..dd90aa5321e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.AppendProcessor Read(ref Sy LocalJsonValue propAllowDuplicates = default; LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue?> propOnFailure = default; LocalJsonValue propTag = default; @@ -183,7 +183,7 @@ internal AppendProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -290,34 +290,12 @@ public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -482,34 +460,12 @@ public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor Field(S /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.AppendProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AttachmentProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AttachmentProcessor.g.cs index 8a7ccd7b303..054b5b2d0ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AttachmentProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AttachmentProcessor.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessor Read(re reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue propIndexedChars = default; @@ -219,7 +219,7 @@ internal AttachmentProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -354,34 +354,12 @@ public Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -625,34 +603,12 @@ public Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessorDescriptor Field< /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/BytesProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/BytesProcessor.g.cs index 59bc1c66bb9..f6c63e974da 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/BytesProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/BytesProcessor.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.BytesProcessor Read(ref Sys reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -174,7 +174,7 @@ internal BytesProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -272,34 +272,12 @@ public Elastic.Clients.Elasticsearch.Ingest.BytesProcessorDescriptor /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.BytesProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.BytesProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.BytesProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.BytesProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -464,34 +442,12 @@ public Elastic.Clients.Elasticsearch.Ingest.BytesProcessorDescriptor Field(Sy /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.BytesProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.BytesProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.BytesProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.BytesProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CircleProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CircleProcessor.g.cs index 940a2538649..77198c053e6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CircleProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CircleProcessor.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.CircleProcessor Read(ref Sy LocalJsonValue propDescription = default; LocalJsonValue propErrorDistance = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -205,7 +205,7 @@ internal CircleProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -325,34 +325,12 @@ public Elastic.Clients.Elasticsearch.Ingest.CircleProcessorDescriptor /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.CircleProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.CircleProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.CircleProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.CircleProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -539,34 +517,12 @@ public Elastic.Clients.Elasticsearch.Ingest.CircleProcessorDescriptor Field(S /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.CircleProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.CircleProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.CircleProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.CircleProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CommunityIDProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CommunityIDProcessor.g.cs index 1c8cce666d7..d255bcec4c7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CommunityIDProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CommunityIDProcessor.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.CommunityIDProcessor Read(r LocalJsonValue propIanaNumber = default; LocalJsonValue propIcmpCode = default; LocalJsonValue propIcmpType = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -264,7 +264,7 @@ internal CommunityIDProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -482,34 +482,12 @@ public Elastic.Clients.Elasticsearch.Ingest.CommunityIdProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.CommunityIdProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.CommunityIdProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.CommunityIdProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.CommunityIdProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -849,34 +827,12 @@ public Elastic.Clients.Elasticsearch.Ingest.CommunityIdProcessorDescriptor IcmpT /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.CommunityIdProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.CommunityIdProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.CommunityIdProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.CommunityIdProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ConvertProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ConvertProcessor.g.cs index 3a0aeda7c5d..149f6ad5ae6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ConvertProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ConvertProcessor.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.ConvertProcessor Read(ref S reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -184,7 +184,7 @@ internal ConvertProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -293,34 +293,12 @@ public Elastic.Clients.Elasticsearch.Ingest.ConvertProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.ConvertProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.ConvertProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.ConvertProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.ConvertProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -496,34 +474,12 @@ public Elastic.Clients.Elasticsearch.Ingest.ConvertProcessorDescriptor Field( /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.ConvertProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.ConvertProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.ConvertProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.ConvertProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CsvProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CsvProcessor.g.cs index f04323329d9..3ca031e4d14 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CsvProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/CsvProcessor.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.CsvProcessor Read(ref Syste LocalJsonValue propDescription = default; LocalJsonValue propEmptyValue = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -220,7 +220,7 @@ internal CsvProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -355,34 +355,12 @@ public Elastic.Clients.Elasticsearch.Ingest.CsvProcessorDescriptor Fi /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.CsvProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.CsvProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.CsvProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.CsvProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -591,34 +569,12 @@ public Elastic.Clients.Elasticsearch.Ingest.CsvProcessorDescriptor Field(Syst /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.CsvProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.CsvProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.CsvProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.CsvProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs index 2daec74e2d0..cb20c262792 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateIndexNameProcessor.g.cs @@ -41,11 +41,11 @@ internal sealed partial class DateIndexNameProcessorConverter : System.Text.Json public override Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessor Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue?> propDateFormats = default; + LocalJsonValue> propDateFormats = default; LocalJsonValue propDateRounding = default; LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIndexNameFormat = default; LocalJsonValue propIndexNamePrefix = default; @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessor Read LocalJsonValue propTimezone = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDateFormats.TryReadProperty(ref reader, options, PropDateFormats, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) + if (propDateFormats.TryReadProperty(ref reader, options, PropDateFormats, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) { continue; } @@ -145,7 +145,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessor Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessor value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDateFormats, value.DateFormats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropDateFormats, value.DateFormats, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropDateRounding, value.DateRounding, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); @@ -165,8 +165,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class DateIndexNameProcessor { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public DateIndexNameProcessor(string dateRounding, Elastic.Clients.Elasticsearch.Field field) + public DateIndexNameProcessor(System.Collections.Generic.ICollection dateFormats, string dateRounding, Elastic.Clients.Elasticsearch.Field field) { + DateFormats = dateFormats; DateRounding = dateRounding; Field = field; } @@ -193,7 +194,11 @@ internal DateIndexNameProcessor(Elastic.Clients.Elasticsearch.Serialization.Json /// Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N. /// /// - public System.Collections.Generic.ICollection? DateFormats { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.ICollection DateFormats { get; set; } /// /// @@ -232,7 +237,7 @@ internal DateIndexNameProcessor(Elastic.Clients.Elasticsearch.Serialization.Json /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -313,7 +318,7 @@ public DateIndexNameProcessorDescriptor() /// Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N. /// /// - public Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessorDescriptor DateFormats(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessorDescriptor DateFormats(System.Collections.Generic.ICollection value) { Instance.DateFormats = value; return this; @@ -383,34 +388,12 @@ public Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -554,7 +537,7 @@ public DateIndexNameProcessorDescriptor() /// Can be a java time pattern or one of the following formats: ISO8601, UNIX, UNIX_MS, or TAI64N. /// /// - public Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessorDescriptor DateFormats(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessorDescriptor DateFormats(System.Collections.Generic.ICollection value) { Instance.DateFormats = value; return this; @@ -624,34 +607,12 @@ public Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessorDescriptor Fie /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateProcessor.g.cs index edc1bf52ca5..d0ef55f5dc3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DateProcessor.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DateProcessor Read(ref Syst LocalJsonValue propDescription = default; LocalJsonValue propField = default; LocalJsonValue> propFormats = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propLocale = default; LocalJsonValue?> propOnFailure = default; @@ -214,7 +214,7 @@ internal DateProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -352,34 +352,12 @@ public Elastic.Clients.Elasticsearch.Ingest.DateProcessorDescriptor F /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.DateProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.DateProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DateProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DateProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -591,34 +569,12 @@ public Elastic.Clients.Elasticsearch.Ingest.DateProcessorDescriptor Formats(para /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.DateProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.DateProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DateProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DateProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DissectProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DissectProcessor.g.cs index fbe7b4eb0a4..7bff7b622dc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DissectProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DissectProcessor.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DissectProcessor Read(ref S LocalJsonValue propAppendSeparator = default; LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -191,7 +191,7 @@ internal DissectProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -303,34 +303,12 @@ public Elastic.Clients.Elasticsearch.Ingest.DissectProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.DissectProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.DissectProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DissectProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DissectProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -493,34 +471,12 @@ public Elastic.Clients.Elasticsearch.Ingest.DissectProcessorDescriptor Field( /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.DissectProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.DissectProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DissectProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DissectProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DotExpanderProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DotExpanderProcessor.g.cs index 5d28d340aec..6a26eafe8fd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DotExpanderProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DotExpanderProcessor.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessor Read(r reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue?> propOnFailure = default; LocalJsonValue propOverride = default; @@ -175,7 +175,7 @@ internal DotExpanderProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -277,34 +277,12 @@ public Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -461,34 +439,12 @@ public Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessorDescriptor Field /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DropProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DropProcessor.g.cs index 9ecc53e205a..b5427bdcec0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DropProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DropProcessor.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DropProcessor Read(ref Syst { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue?> propOnFailure = default; LocalJsonValue propTag = default; @@ -130,7 +130,7 @@ internal DropProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -191,34 +191,12 @@ public Elastic.Clients.Elasticsearch.Ingest.DropProcessorDescriptor D /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.DropProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.DropProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DropProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DropProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -331,34 +309,12 @@ public Elastic.Clients.Elasticsearch.Ingest.DropProcessorDescriptor Description( /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.DropProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.DropProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DropProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.DropProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/EnrichProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/EnrichProcessor.g.cs index 90f74247a4f..e6b7a3be7dc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/EnrichProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/EnrichProcessor.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.EnrichProcessor Read(ref Sy reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue propMaxMatches = default; @@ -213,7 +213,7 @@ internal EnrichProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -353,34 +353,12 @@ public Elastic.Clients.Elasticsearch.Ingest.EnrichProcessorDescriptor /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.EnrichProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.EnrichProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.EnrichProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.EnrichProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -595,34 +573,12 @@ public Elastic.Clients.Elasticsearch.Ingest.EnrichProcessorDescriptor Field(S /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.EnrichProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.EnrichProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.EnrichProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.EnrichProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FailProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FailProcessor.g.cs index 88e8bea5953..6900bc95afa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FailProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FailProcessor.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.FailProcessor Read(ref Syst { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propMessage = default; LocalJsonValue?> propOnFailure = default; @@ -145,7 +145,7 @@ internal FailProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -218,34 +218,12 @@ public Elastic.Clients.Elasticsearch.Ingest.FailProcessorDescriptor D /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.FailProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.FailProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.FailProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.FailProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -365,34 +343,12 @@ public Elastic.Clients.Elasticsearch.Ingest.FailProcessorDescriptor Description( /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.FailProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.FailProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.FailProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.FailProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FingerprintProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FingerprintProcessor.g.cs index 35e8a4fc6d3..74571f5abbb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FingerprintProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/FingerprintProcessor.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.FingerprintProcessor Read(r reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propFields = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue propMethod = default; @@ -194,7 +194,7 @@ internal FingerprintProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -311,34 +311,12 @@ public Elastic.Clients.Elasticsearch.Ingest.FingerprintProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.FingerprintProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.FingerprintProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.FingerprintProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.FingerprintProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -529,34 +507,12 @@ public Elastic.Clients.Elasticsearch.Ingest.FingerprintProcessorDescriptor Field /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.FingerprintProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.FingerprintProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.FingerprintProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.FingerprintProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ForeachProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ForeachProcessor.g.cs index 3b38cf1cc87..efda8a26177 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ForeachProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ForeachProcessor.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.ForeachProcessor Read(ref S reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -175,7 +175,7 @@ internal ForeachProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -276,34 +276,12 @@ public Elastic.Clients.Elasticsearch.Ingest.ForeachProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.ForeachProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.ForeachProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.ForeachProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.ForeachProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -466,34 +444,12 @@ public Elastic.Clients.Elasticsearch.Ingest.ForeachProcessorDescriptor Field( /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.ForeachProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.ForeachProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.ForeachProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.ForeachProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoGridProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoGridProcessor.g.cs index 2615af4e7f9..12e573c142d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoGridProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoGridProcessor.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessor Read(ref S LocalJsonValue propChildrenField = default; LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue propNonChildrenField = default; @@ -237,7 +237,7 @@ internal GeoGridProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -385,34 +385,12 @@ public Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -675,34 +653,12 @@ public Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessorDescriptor Field(str /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoIpProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoIpProcessor.g.cs index f57710930a1..e0dbe167af5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoIpProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GeoIpProcessor.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessor Read(ref Sys LocalJsonValue propDownloadDatabaseOnPipelineCreation = default; LocalJsonValue propField = default; LocalJsonValue propFirstOnly = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -232,7 +232,7 @@ internal GeoIpProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -370,34 +370,12 @@ public Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessorDescriptor /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -616,34 +594,12 @@ public Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessorDescriptor FirstOnly(b /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GrokProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GrokProcessor.g.cs index 824896503e6..275d4e99078 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GrokProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GrokProcessor.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.GrokProcessor Read(ref Syst LocalJsonValue propDescription = default; LocalJsonValue propEcsCompatibility = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -210,7 +210,7 @@ internal GrokProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -339,34 +339,12 @@ public Elastic.Clients.Elasticsearch.Ingest.GrokProcessorDescriptor F /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.GrokProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.GrokProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GrokProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GrokProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -597,34 +575,12 @@ public Elastic.Clients.Elasticsearch.Ingest.GrokProcessorDescriptor Field(Sys /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.GrokProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.GrokProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GrokProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GrokProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GsubProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GsubProcessor.g.cs index adf190f45a3..e874da4b47b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GsubProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/GsubProcessor.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.GsubProcessor Read(ref Syst reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -194,7 +194,7 @@ internal GsubProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -314,34 +314,12 @@ public Elastic.Clients.Elasticsearch.Ingest.GsubProcessorDescriptor F /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.GsubProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.GsubProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GsubProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GsubProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -528,34 +506,12 @@ public Elastic.Clients.Elasticsearch.Ingest.GsubProcessorDescriptor Field(Sys /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.GsubProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.GsubProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GsubProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.GsubProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/HtmlStripProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/HtmlStripProcessor.g.cs index d7b4e21b32d..978103a10ff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/HtmlStripProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/HtmlStripProcessor.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.HtmlStripProcessor Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -174,7 +174,7 @@ internal HtmlStripProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -272,34 +272,12 @@ public Elastic.Clients.Elasticsearch.Ingest.HtmlStripProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.HtmlStripProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.HtmlStripProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.HtmlStripProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.HtmlStripProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -464,34 +442,12 @@ public Elastic.Clients.Elasticsearch.Ingest.HtmlStripProcessorDescriptor Field /// - public Elastic.Clients.Elasticsearch.Ingest.HtmlStripProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.HtmlStripProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.HtmlStripProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.HtmlStripProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceProcessor.g.cs index 6d4639e637a..04408ae115b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceProcessor.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.InferenceProcessor Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue?> propFieldMap = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue propInferenceConfig = default; @@ -198,7 +198,7 @@ internal InferenceProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -351,34 +351,12 @@ public Elastic.Clients.Elasticsearch.Ingest.InferenceProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.InferenceProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.InferenceProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.InferenceProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.InferenceProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -658,34 +636,12 @@ public Elastic.Clients.Elasticsearch.Ingest.InferenceProcessorDescriptor AddFiel /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.InferenceProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.InferenceProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.InferenceProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.InferenceProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpLocationProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpLocationProcessor.g.cs index af7afb63e3d..16ad2cc4e7d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpLocationProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpLocationProcessor.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessor Read(re LocalJsonValue propDownloadDatabaseOnPipelineCreation = default; LocalJsonValue propField = default; LocalJsonValue propFirstOnly = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -232,7 +232,7 @@ internal IpLocationProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -370,34 +370,12 @@ public Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -616,34 +594,12 @@ public Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessorDescriptor FirstO /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JoinProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JoinProcessor.g.cs index c11e7dcf51d..3c14eada421 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JoinProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JoinProcessor.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.JoinProcessor Read(ref Syst reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue?> propOnFailure = default; LocalJsonValue propSeparator = default; @@ -175,7 +175,7 @@ internal JoinProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -277,34 +277,12 @@ public Elastic.Clients.Elasticsearch.Ingest.JoinProcessorDescriptor F /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.JoinProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.JoinProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.JoinProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.JoinProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -469,34 +447,12 @@ public Elastic.Clients.Elasticsearch.Ingest.JoinProcessorDescriptor Field(Sys /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.JoinProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.JoinProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.JoinProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.JoinProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JsonProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JsonProcessor.g.cs index b103ce95d56..450babb55cc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JsonProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JsonProcessor.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.JsonProcessor Read(ref Syst LocalJsonValue propAllowDuplicateKeys = default; LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue?> propOnFailure = default; LocalJsonValue propTag = default; @@ -217,7 +217,7 @@ internal JsonProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -345,34 +345,12 @@ public Elastic.Clients.Elasticsearch.Ingest.JsonProcessorDescriptor F /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.JsonProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.JsonProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.JsonProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.JsonProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -563,34 +541,12 @@ public Elastic.Clients.Elasticsearch.Ingest.JsonProcessorDescriptor Field(Sys /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.JsonProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.JsonProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.JsonProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.JsonProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/KeyValueProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/KeyValueProcessor.g.cs index 73b76a45501..96cd3cba9cf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/KeyValueProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/KeyValueProcessor.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessor Read(ref LocalJsonValue?> propExcludeKeys = default; LocalJsonValue propField = default; LocalJsonValue propFieldSplit = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propIncludeKeys = default; @@ -267,7 +267,7 @@ internal KeyValueProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -448,34 +448,12 @@ public Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -756,34 +734,12 @@ public Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessorDescriptor FieldSpl /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/LowercaseProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/LowercaseProcessor.g.cs index 5c0f1ad8083..a14af5c4d22 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/LowercaseProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/LowercaseProcessor.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.LowercaseProcessor Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -174,7 +174,7 @@ internal LowercaseProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -272,34 +272,12 @@ public Elastic.Clients.Elasticsearch.Ingest.LowercaseProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.LowercaseProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.LowercaseProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.LowercaseProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.LowercaseProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -464,34 +442,12 @@ public Elastic.Clients.Elasticsearch.Ingest.LowercaseProcessorDescriptor Field /// - public Elastic.Clients.Elasticsearch.Ingest.LowercaseProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.LowercaseProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.LowercaseProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.LowercaseProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/NetworkDirectionProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/NetworkDirectionProcessor.g.cs index 5fd983c86aa..4e201d1039c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/NetworkDirectionProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/NetworkDirectionProcessor.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.NetworkDirectionProcessor R reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propDestinationIp = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propInternalNetworks = default; @@ -191,7 +191,7 @@ internal NetworkDirectionProcessor(Elastic.Clients.Elasticsearch.Serialization.J /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -314,34 +314,12 @@ public Elastic.Clients.Elasticsearch.Ingest.NetworkDirectionProcessorDescriptor< /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.NetworkDirectionProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.NetworkDirectionProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.NetworkDirectionProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.NetworkDirectionProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -584,34 +562,12 @@ public Elastic.Clients.Elasticsearch.Ingest.NetworkDirectionProcessorDescriptor /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.NetworkDirectionProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.NetworkDirectionProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.NetworkDirectionProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.NetworkDirectionProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessor.g.cs index 807f9d09d75..affe4717256 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessor.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.PipelineProcessor Read(ref { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissingPipeline = default; LocalJsonValue propName = default; @@ -154,7 +154,7 @@ internal PipelineProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -234,34 +234,12 @@ public Elastic.Clients.Elasticsearch.Ingest.PipelineProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.PipelineProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.PipelineProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.PipelineProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.PipelineProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -392,34 +370,12 @@ public Elastic.Clients.Elasticsearch.Ingest.PipelineProcessorDescriptor Descript /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.PipelineProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.PipelineProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.PipelineProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.PipelineProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RedactProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RedactProcessor.g.cs index 9f0894415ae..ca802c579d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RedactProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RedactProcessor.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.RedactProcessor Read(ref Sy reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -220,7 +220,7 @@ internal RedactProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -350,34 +350,12 @@ public Elastic.Clients.Elasticsearch.Ingest.RedactProcessorDescriptor /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.RedactProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.RedactProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RedactProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RedactProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -609,34 +587,12 @@ public Elastic.Clients.Elasticsearch.Ingest.RedactProcessorDescriptor Field(S /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.RedactProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.RedactProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RedactProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RedactProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RegisteredDomainProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RegisteredDomainProcessor.g.cs index 98668d9fd25..d7cff04172b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RegisteredDomainProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RegisteredDomainProcessor.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.RegisteredDomainProcessor R reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -174,7 +174,7 @@ internal RegisteredDomainProcessor(Elastic.Clients.Elasticsearch.Serialization.J /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -273,34 +273,12 @@ public Elastic.Clients.Elasticsearch.Ingest.RegisteredDomainProcessorDescriptor< /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.RegisteredDomainProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.RegisteredDomainProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RegisteredDomainProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RegisteredDomainProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -466,34 +444,12 @@ public Elastic.Clients.Elasticsearch.Ingest.RegisteredDomainProcessorDescriptor /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.RegisteredDomainProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.RegisteredDomainProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RegisteredDomainProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RegisteredDomainProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RemoveProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RemoveProcessor.g.cs index ee01e3bf6f0..0436405bfb5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RemoveProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RemoveProcessor.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.RemoveProcessor Read(ref Sy reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue propKeep = default; @@ -174,7 +174,7 @@ internal RemoveProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -271,34 +271,12 @@ public Elastic.Clients.Elasticsearch.Ingest.RemoveProcessorDescriptor /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.RemoveProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.RemoveProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RemoveProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RemoveProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -461,34 +439,12 @@ public Elastic.Clients.Elasticsearch.Ingest.RemoveProcessorDescriptor Field(p /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.RemoveProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.RemoveProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RemoveProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RemoveProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RenameProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RenameProcessor.g.cs index e10084b3a11..1771f2e359c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RenameProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RenameProcessor.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.RenameProcessor Read(ref Sy reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -176,7 +176,7 @@ internal RenameProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -280,34 +280,12 @@ public Elastic.Clients.Elasticsearch.Ingest.RenameProcessorDescriptor /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.RenameProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.RenameProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RenameProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RenameProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -474,34 +452,12 @@ public Elastic.Clients.Elasticsearch.Ingest.RenameProcessorDescriptor Field(S /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.RenameProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.RenameProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RenameProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RenameProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RerouteProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RerouteProcessor.g.cs index b8d0e553338..87fd4a3f866 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RerouteProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/RerouteProcessor.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.RerouteProcessor Read(ref S LocalJsonValue?> propDataset = default; LocalJsonValue propDescription = default; LocalJsonValue propDestination = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue?> propNamespace = default; LocalJsonValue?> propOnFailure = default; @@ -181,7 +181,7 @@ internal RerouteProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -311,34 +311,12 @@ public Elastic.Clients.Elasticsearch.Ingest.RerouteProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.RerouteProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.RerouteProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RerouteProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RerouteProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -544,34 +522,12 @@ public Elastic.Clients.Elasticsearch.Ingest.RerouteProcessorDescriptor Destinati /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.RerouteProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.RerouteProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RerouteProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.RerouteProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ScriptProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ScriptProcessor.g.cs index d295f8a2fad..c0c0b4d47c8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ScriptProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/ScriptProcessor.g.cs @@ -40,9 +40,9 @@ public override Elastic.Clients.Elasticsearch.Ingest.ScriptProcessor Read(ref Sy reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propId = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; - LocalJsonValue propLang = default; + LocalJsonValue propLang = default; LocalJsonValue?> propOnFailure = default; LocalJsonValue?> propParams = default; LocalJsonValue propSource = default; @@ -174,7 +174,7 @@ internal ScriptProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -188,7 +188,7 @@ internal ScriptProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// Script language. /// /// - public Elastic.Clients.Elasticsearch.ScriptLanguage? Lang { get; set; } + public string? Lang { get; set; } /// /// @@ -269,34 +269,12 @@ public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -313,7 +291,7 @@ public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor /// Script language. /// /// - public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor Lang(Elastic.Clients.Elasticsearch.ScriptLanguage? value) + public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor Lang(string? value) { Instance.Lang = value; return this; @@ -484,34 +462,12 @@ public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor Id(Elastic /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -528,7 +484,7 @@ public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor IgnoreFail /// Script language. /// /// - public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor Lang(Elastic.Clients.Elasticsearch.ScriptLanguage? value) + public Elastic.Clients.Elasticsearch.Ingest.ScriptProcessorDescriptor Lang(string? value) { Instance.Lang = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetProcessor.g.cs index 03d476eabda..f38988de349 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetProcessor.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.SetProcessor Read(ref Syste LocalJsonValue propCopyFrom = default; LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreEmptyValue = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propMediaType = default; @@ -210,7 +210,7 @@ internal SetProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -352,34 +352,12 @@ public Elastic.Clients.Elasticsearch.Ingest.SetProcessorDescriptor Fi /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.SetProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.SetProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SetProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SetProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// If true and value is a template snippet that evaluates to null or the empty string, the processor quietly exits without modifying the document. @@ -584,34 +562,12 @@ public Elastic.Clients.Elasticsearch.Ingest.SetProcessorDescriptor Field(Syst /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.SetProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.SetProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SetProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SetProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// If true and value is a template snippet that evaluates to null or the empty string, the processor quietly exits without modifying the document. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs index aa8f9e687e7..9bf3c177e40 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SetSecurityUserProcessor.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.SetSecurityUserProcessor Re reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue?> propOnFailure = default; LocalJsonValue?> propProperties = default; @@ -165,7 +165,7 @@ internal SetSecurityUserProcessor(Elastic.Clients.Elasticsearch.Serialization.Js /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -255,34 +255,12 @@ public Elastic.Clients.Elasticsearch.Ingest.SetSecurityUserProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.SetSecurityUserProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.SetSecurityUserProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SetSecurityUserProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SetSecurityUserProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -434,34 +412,12 @@ public Elastic.Clients.Elasticsearch.Ingest.SetSecurityUserProcessorDescriptor F /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.SetSecurityUserProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.SetSecurityUserProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SetSecurityUserProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SetSecurityUserProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SortProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SortProcessor.g.cs index 4e68a7fce1c..62764d5d776 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SortProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SortProcessor.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.SortProcessor Read(ref Syst reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue?> propOnFailure = default; LocalJsonValue propOrder = default; @@ -174,7 +174,7 @@ internal SortProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -273,34 +273,12 @@ public Elastic.Clients.Elasticsearch.Ingest.SortProcessorDescriptor F /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.SortProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.SortProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SortProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SortProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -466,34 +444,12 @@ public Elastic.Clients.Elasticsearch.Ingest.SortProcessorDescriptor Field(Sys /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.SortProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.SortProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SortProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SortProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SplitProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SplitProcessor.g.cs index 3414e2f7b58..c7d64030d9a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SplitProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/SplitProcessor.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.SplitProcessor Read(ref Sys reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -193,7 +193,7 @@ internal SplitProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -309,34 +309,12 @@ public Elastic.Clients.Elasticsearch.Ingest.SplitProcessorDescriptor /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.SplitProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.SplitProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SplitProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SplitProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -523,34 +501,12 @@ public Elastic.Clients.Elasticsearch.Ingest.SplitProcessorDescriptor Field(Sy /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.SplitProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.SplitProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SplitProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.SplitProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TerminateProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TerminateProcessor.g.cs index 2e103a3a538..8b5fb526e0f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TerminateProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TerminateProcessor.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.TerminateProcessor Read(ref { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue?> propOnFailure = default; LocalJsonValue propTag = default; @@ -130,7 +130,7 @@ internal TerminateProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -191,34 +191,12 @@ public Elastic.Clients.Elasticsearch.Ingest.TerminateProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.TerminateProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.TerminateProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.TerminateProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.TerminateProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -331,34 +309,12 @@ public Elastic.Clients.Elasticsearch.Ingest.TerminateProcessorDescriptor Descrip /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.TerminateProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.TerminateProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.TerminateProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.TerminateProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TrimProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TrimProcessor.g.cs index ae620133de2..42e9c1745f5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TrimProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/TrimProcessor.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.TrimProcessor Read(ref Syst reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -174,7 +174,7 @@ internal TrimProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -272,34 +272,12 @@ public Elastic.Clients.Elasticsearch.Ingest.TrimProcessorDescriptor F /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.TrimProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.TrimProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.TrimProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.TrimProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -464,34 +442,12 @@ public Elastic.Clients.Elasticsearch.Ingest.TrimProcessorDescriptor Field(Sys /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.TrimProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.TrimProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.TrimProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.TrimProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UppercaseProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UppercaseProcessor.g.cs index c41b363e571..582c95b6dd8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UppercaseProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UppercaseProcessor.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.UppercaseProcessor Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -174,7 +174,7 @@ internal UppercaseProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -272,34 +272,12 @@ public Elastic.Clients.Elasticsearch.Ingest.UppercaseProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.UppercaseProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.UppercaseProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UppercaseProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UppercaseProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -464,34 +442,12 @@ public Elastic.Clients.Elasticsearch.Ingest.UppercaseProcessorDescriptor Field /// - public Elastic.Clients.Elasticsearch.Ingest.UppercaseProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.UppercaseProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UppercaseProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UppercaseProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UriPartsProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UriPartsProcessor.g.cs index cc92a66dd15..5e9c36cfcfa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UriPartsProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UriPartsProcessor.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessor Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue propKeepOriginal = default; @@ -192,7 +192,7 @@ internal UriPartsProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -304,34 +304,12 @@ public Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -517,34 +495,12 @@ public Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessorDescriptor Field /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UrlDecodeProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UrlDecodeProcessor.g.cs index 5cd7f35f782..a1f5a48328f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UrlDecodeProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UrlDecodeProcessor.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.UrlDecodeProcessor Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propDescription = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -174,7 +174,7 @@ internal UrlDecodeProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -272,34 +272,12 @@ public Elastic.Clients.Elasticsearch.Ingest.UrlDecodeProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.UrlDecodeProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.UrlDecodeProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UrlDecodeProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UrlDecodeProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -464,34 +442,12 @@ public Elastic.Clients.Elasticsearch.Ingest.UrlDecodeProcessorDescriptor Field /// - public Elastic.Clients.Elasticsearch.Ingest.UrlDecodeProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.UrlDecodeProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UrlDecodeProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UrlDecodeProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UserAgentProcessor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UserAgentProcessor.g.cs index f2c89acd4bb..a067c5dfa14 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UserAgentProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/UserAgentProcessor.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessor Read(ref LocalJsonValue propDescription = default; LocalJsonValue propExtractDeviceType = default; LocalJsonValue propField = default; - LocalJsonValue propIf = default; + LocalJsonValue propIf = default; LocalJsonValue propIgnoreFailure = default; LocalJsonValue propIgnoreMissing = default; LocalJsonValue?> propOnFailure = default; @@ -208,7 +208,7 @@ internal UserAgentProcessor(Elastic.Clients.Elasticsearch.Serialization.JsonCons /// Conditionally execute the processor. /// /// - public Elastic.Clients.Elasticsearch.Script? If { get; set; } + public string? If { get; set; } /// /// @@ -330,34 +330,12 @@ public Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessorDescriptor /// - public Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. @@ -564,34 +542,12 @@ public Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessorDescriptor Field /// - public Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessorDescriptor If(Elastic.Clients.Elasticsearch.Script? value) + public Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessorDescriptor If(string? value) { Instance.If = value; return this; } - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessorDescriptor If() - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(null); - return this; - } - - /// - /// - /// Conditionally execute the processor. - /// - /// - public Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessorDescriptor If(System.Action? action) - { - Instance.If = Elastic.Clients.Elasticsearch.ScriptDescriptor.Build(action); - return this; - } - /// /// /// Ignore failures for the processor. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs index 63058c73929..ae0d4537b72 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/CalendarEvent.g.cs @@ -29,9 +29,6 @@ internal sealed partial class CalendarEventConverter : System.Text.Json.Serializ private static readonly System.Text.Json.JsonEncodedText PropDescription = System.Text.Json.JsonEncodedText.Encode("description"); private static readonly System.Text.Json.JsonEncodedText PropEndTime = System.Text.Json.JsonEncodedText.Encode("end_time"); private static readonly System.Text.Json.JsonEncodedText PropEventId = System.Text.Json.JsonEncodedText.Encode("event_id"); - private static readonly System.Text.Json.JsonEncodedText PropForceTimeShift = System.Text.Json.JsonEncodedText.Encode("force_time_shift"); - private static readonly System.Text.Json.JsonEncodedText PropSkipModelUpdate = System.Text.Json.JsonEncodedText.Encode("skip_model_update"); - private static readonly System.Text.Json.JsonEncodedText PropSkipResult = System.Text.Json.JsonEncodedText.Encode("skip_result"); private static readonly System.Text.Json.JsonEncodedText PropStartTime = System.Text.Json.JsonEncodedText.Encode("start_time"); public override Elastic.Clients.Elasticsearch.MachineLearning.CalendarEvent Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) @@ -41,9 +38,6 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.CalendarEvent Read LocalJsonValue propDescription = default; LocalJsonValue propEndTime = default; LocalJsonValue propEventId = default; - LocalJsonValue propForceTimeShift = default; - LocalJsonValue propSkipModelUpdate = default; - LocalJsonValue propSkipResult = default; LocalJsonValue propStartTime = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -67,21 +61,6 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.CalendarEvent Read continue; } - if (propForceTimeShift.TryReadProperty(ref reader, options, PropForceTimeShift, null)) - { - continue; - } - - if (propSkipModelUpdate.TryReadProperty(ref reader, options, PropSkipModelUpdate, null)) - { - continue; - } - - if (propSkipResult.TryReadProperty(ref reader, options, PropSkipResult, null)) - { - continue; - } - if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; @@ -103,9 +82,6 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.CalendarEvent Read Description = propDescription.Value, EndTime = propEndTime.Value, EventId = propEventId.Value, - ForceTimeShift = propForceTimeShift.Value, - SkipModelUpdate = propSkipModelUpdate.Value, - SkipResult = propSkipResult.Value, StartTime = propStartTime.Value }; } @@ -117,9 +93,6 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropEndTime, value.EndTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropEventId, value.EventId, null, null); - writer.WriteProperty(options, PropForceTimeShift, value.ForceTimeShift, null, null); - writer.WriteProperty(options, PropSkipModelUpdate, value.SkipModelUpdate, null, null); - writer.WriteProperty(options, PropSkipResult, value.SkipResult, null, null); writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } @@ -182,27 +155,6 @@ internal CalendarEvent(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct System.DateTimeOffset EndTime { get; set; } public Elastic.Clients.Elasticsearch.Id? EventId { get; set; } - /// - /// - /// Shift time by this many seconds. For example adjust time for daylight savings changes - /// - /// - public int? ForceTimeShift { get; set; } - - /// - /// - /// When true the model will not be updated for this calendar period. - /// - /// - public bool? SkipModelUpdate { get; set; } - - /// - /// - /// When true the model will not create results for this calendar period. - /// - /// - public bool? SkipResult { get; set; } - /// /// /// The timestamp for the beginning of the scheduled event in milliseconds since the epoch or ISO 8601 format. @@ -273,39 +225,6 @@ public Elastic.Clients.Elasticsearch.MachineLearning.CalendarEventDescriptor Eve return this; } - /// - /// - /// Shift time by this many seconds. For example adjust time for daylight savings changes - /// - /// - public Elastic.Clients.Elasticsearch.MachineLearning.CalendarEventDescriptor ForceTimeShift(int? value) - { - Instance.ForceTimeShift = value; - return this; - } - - /// - /// - /// When true the model will not be updated for this calendar period. - /// - /// - public Elastic.Clients.Elasticsearch.MachineLearning.CalendarEventDescriptor SkipModelUpdate(bool? value = true) - { - Instance.SkipModelUpdate = value; - return this; - } - - /// - /// - /// When true the model will not create results for this calendar period. - /// - /// - public Elastic.Clients.Elasticsearch.MachineLearning.CalendarEventDescriptor SkipResult(bool? value = true) - { - Instance.SkipResult = value; - return this; - } - /// /// /// The timestamp for the beginning of the scheduled event in milliseconds since the epoch or ISO 8601 format. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisAnalyzedFields.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisAnalyzedFields.g.cs index 321ef230cea..ae341ce4ea7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisAnalyzedFields.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisAnalyzedFields.g.cs @@ -32,7 +32,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisA { if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { - var value = reader.ReadValue?>(options, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)); + var value = reader.ReadValue>(options, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!); return new Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFields(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Includes = value @@ -40,16 +40,16 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisA } reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue?> propExcludes = default; - LocalJsonValue?> propIncludes = default; + LocalJsonValue> propExcludes = default; + LocalJsonValue> propIncludes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExcludes.TryReadProperty(ref reader, options, PropExcludes, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) + if (propExcludes.TryReadProperty(ref reader, options, PropExcludes, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) { continue; } - if (propIncludes.TryReadProperty(ref reader, options, PropIncludes, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) + if (propIncludes.TryReadProperty(ref reader, options, PropIncludes, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) { continue; } @@ -74,8 +74,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisA public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFields value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExcludes, value.Excludes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropIncludes, value.Includes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropExcludes, value.Excludes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropIncludes, value.Includes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); } } @@ -83,12 +83,19 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsConverter))] public sealed partial class DataframeAnalysisAnalyzedFields { + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public DataframeAnalysisAnalyzedFields(System.Collections.Generic.ICollection excludes, System.Collections.Generic.ICollection includes) + { + Excludes = excludes; + Includes = includes; + } #if NET7_0_OR_GREATER public DataframeAnalysisAnalyzedFields() { } #endif #if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] public DataframeAnalysisAnalyzedFields() { } @@ -104,14 +111,22 @@ internal DataframeAnalysisAnalyzedFields(Elastic.Clients.Elasticsearch.Serializa /// An array of strings that defines the fields that will be included in the analysis. /// /// - public System.Collections.Generic.ICollection? Excludes { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.ICollection Excludes { get; set; } /// /// /// An array of strings that defines the fields that will be excluded from the analysis. You do not need to add fields with unsupported data types to excludes, these fields are excluded from the analysis automatically. /// /// - public System.Collections.Generic.ICollection? Includes { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.ICollection Includes { get; set; } } public readonly partial struct DataframeAnalysisAnalyzedFieldsDescriptor @@ -138,7 +153,7 @@ public DataframeAnalysisAnalyzedFieldsDescriptor() /// An array of strings that defines the fields that will be included in the analysis. /// /// - public Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor Excludes(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor Excludes(System.Collections.Generic.ICollection value) { Instance.Excludes = value; return this; @@ -160,7 +175,7 @@ public Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFi /// An array of strings that defines the fields that will be excluded from the analysis. You do not need to add fields with unsupported data types to excludes, these fields are excluded from the analysis automatically. /// /// - public Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor Includes(System.Collections.Generic.ICollection? value) + public Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor Includes(System.Collections.Generic.ICollection value) { Instance.Includes = value; return this; @@ -178,13 +193,8 @@ public Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFi } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - internal static Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFields Build(System.Action? action) + internal static Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFields Build(System.Action action) { - if (action is null) - { - return new Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFields(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); - } - var builder = new Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor(new Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFields(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); action.Invoke(builder); return builder.Instance; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsSource.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsSource.g.cs index 8406c123a9a..b82a938dfc6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsSource.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsSource.g.cs @@ -276,18 +276,7 @@ public Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalyticsSourceDes /// Specify includes and/or `excludes patterns to select which fields will be present in the destination. Fields that are excluded cannot be included in the analysis. /// /// - public Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalyticsSourceDescriptor Source() - { - Instance.Source = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(null); - return this; - } - - /// - /// - /// Specify includes and/or `excludes patterns to select which fields will be present in the destination. Fields that are excluded cannot be included in the analysis. - /// - /// - public Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalyticsSourceDescriptor Source(System.Action? action) + public Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalyticsSourceDescriptor Source(System.Action action) { Instance.Source = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(action); return this; @@ -467,18 +456,7 @@ public Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalyticsSourceDes /// Specify includes and/or `excludes patterns to select which fields will be present in the destination. Fields that are excluded cannot be included in the analysis. /// /// - public Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalyticsSourceDescriptor Source() - { - Instance.Source = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(null); - return this; - } - - /// - /// - /// Specify includes and/or `excludes patterns to select which fields will be present in the destination. Fields that are excluded cannot be included in the analysis. - /// - /// - public Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalyticsSourceDescriptor Source(System.Action? action) + public Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalyticsSourceDescriptor Source(System.Action action) { Instance.Source = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(action); return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframePreviewConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframePreviewConfig.g.cs index d2c74fbf910..32cec9c2511 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframePreviewConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframePreviewConfig.g.cs @@ -176,13 +176,7 @@ public Elastic.Clients.Elasticsearch.MachineLearning.DataframePreviewConfigDescr return this; } - public Elastic.Clients.Elasticsearch.MachineLearning.DataframePreviewConfigDescriptor AnalyzedFields() - { - Instance.AnalyzedFields = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(null); - return this; - } - - public Elastic.Clients.Elasticsearch.MachineLearning.DataframePreviewConfigDescriptor AnalyzedFields(System.Action? action) + public Elastic.Clients.Elasticsearch.MachineLearning.DataframePreviewConfigDescriptor AnalyzedFields(System.Action action) { Instance.AnalyzedFields = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(action); return this; @@ -264,13 +258,7 @@ public Elastic.Clients.Elasticsearch.MachineLearning.DataframePreviewConfigDescr return this; } - public Elastic.Clients.Elasticsearch.MachineLearning.DataframePreviewConfigDescriptor AnalyzedFields() - { - Instance.AnalyzedFields = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(null); - return this; - } - - public Elastic.Clients.Elasticsearch.MachineLearning.DataframePreviewConfigDescriptor AnalyzedFields(System.Action? action) + public Elastic.Clients.Elasticsearch.MachineLearning.DataframePreviewConfigDescriptor AnalyzedFields(System.Action action) { Instance.AnalyzedFields = Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisAnalyzedFieldsDescriptor.Build(action); return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ChunkingSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ChunkingSettings.g.cs new file mode 100644 index 00000000000..c55deb46921 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ChunkingSettings.g.cs @@ -0,0 +1,235 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Mapping; + +internal sealed partial class ChunkingSettingsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropMaxChunkSize = System.Text.Json.JsonEncodedText.Encode("max_chunk_size"); + private static readonly System.Text.Json.JsonEncodedText PropOverlap = System.Text.Json.JsonEncodedText.Encode("overlap"); + private static readonly System.Text.Json.JsonEncodedText PropSentenceOverlap = System.Text.Json.JsonEncodedText.Encode("sentence_overlap"); + private static readonly System.Text.Json.JsonEncodedText PropStrategy = System.Text.Json.JsonEncodedText.Encode("strategy"); + + public override Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propMaxChunkSize = default; + LocalJsonValue propOverlap = default; + LocalJsonValue propSentenceOverlap = default; + LocalJsonValue propStrategy = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propMaxChunkSize.TryReadProperty(ref reader, options, PropMaxChunkSize, null)) + { + continue; + } + + if (propOverlap.TryReadProperty(ref reader, options, PropOverlap, null)) + { + continue; + } + + if (propSentenceOverlap.TryReadProperty(ref reader, options, PropSentenceOverlap, null)) + { + continue; + } + + if (propStrategy.TryReadProperty(ref reader, options, PropStrategy, null)) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + MaxChunkSize = propMaxChunkSize.Value, + Overlap = propOverlap.Value, + SentenceOverlap = propSentenceOverlap.Value, + Strategy = propStrategy.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropMaxChunkSize, value.MaxChunkSize, null, null); + writer.WriteProperty(options, PropOverlap, value.Overlap, null, null); + writer.WriteProperty(options, PropSentenceOverlap, value.SentenceOverlap, null, null); + writer.WriteProperty(options, PropStrategy, value.Strategy, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsConverter))] +public sealed partial class ChunkingSettings +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ChunkingSettings(int maxChunkSize, string strategy) + { + MaxChunkSize = maxChunkSize; + Strategy = strategy; + } +#if NET7_0_OR_GREATER + public ChunkingSettings() + { + } +#endif +#if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] + public ChunkingSettings() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal ChunkingSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// The maximum size of a chunk in words. + /// This value cannot be higher than 300 or lower than 20 (for sentence strategy) or 10 (for word strategy). + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + int MaxChunkSize { get; set; } + + /// + /// + /// The number of overlapping words for chunks. + /// It is applicable only to a word chunking strategy. + /// This value cannot be higher than half the max_chunk_size value. + /// + /// + public int? Overlap { get; set; } + + /// + /// + /// The number of overlapping sentences for chunks. + /// It is applicable only for a sentence chunking strategy. + /// It can be either 1 or 0. + /// + /// + public int? SentenceOverlap { get; set; } + + /// + /// + /// The chunking strategy: sentence or word. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + string Strategy { get; set; } +} + +public readonly partial struct ChunkingSettingsDescriptor +{ + internal Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ChunkingSettingsDescriptor(Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public ChunkingSettingsDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor(Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings instance) => new Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings(Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// The maximum size of a chunk in words. + /// This value cannot be higher than 300 or lower than 20 (for sentence strategy) or 10 (for word strategy). + /// + /// + public Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor MaxChunkSize(int value) + { + Instance.MaxChunkSize = value; + return this; + } + + /// + /// + /// The number of overlapping words for chunks. + /// It is applicable only to a word chunking strategy. + /// This value cannot be higher than half the max_chunk_size value. + /// + /// + public Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor Overlap(int? value) + { + Instance.Overlap = value; + return this; + } + + /// + /// + /// The number of overlapping sentences for chunks. + /// It is applicable only for a sentence chunking strategy. + /// It can be either 1 or 0. + /// + /// + public Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor SentenceOverlap(int? value) + { + Instance.SentenceOverlap = value; + return this; + } + + /// + /// + /// The chunking strategy: sentence or word. + /// + /// + public Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor Strategy(string value) + { + Instance.Strategy = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor(new Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs index 5463cc871cc..db7d6ab5529 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs @@ -201,7 +201,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// The geo_shape data type facilitates the indexing of and searching with arbitrary geo shapes such as rectangles /// and polygons. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Mapping.GeoShapePropertyConverter))] public sealed partial class GeoShapeProperty : Elastic.Clients.Elasticsearch.Mapping.IProperty @@ -252,7 +252,7 @@ internal GeoShapeProperty(Elastic.Clients.Elasticsearch.Serialization.JsonConstr /// The geo_shape data type facilitates the indexing of and searching with arbitrary geo shapes such as rectangles /// and polygons. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct GeoShapePropertyDescriptor { @@ -434,7 +434,7 @@ internal static Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty Build(Sys /// The geo_shape data type facilitates the indexing of and searching with arbitrary geo shapes such as rectangles /// and polygons. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct GeoShapePropertyDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SemanticTextProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SemanticTextProperty.g.cs index 23dcca746c5..0a95317203e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SemanticTextProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SemanticTextProperty.g.cs @@ -25,6 +25,7 @@ namespace Elastic.Clients.Elasticsearch.Mapping; internal sealed partial class SemanticTextPropertyConverter : System.Text.Json.Serialization.JsonConverter { + private static readonly System.Text.Json.JsonEncodedText PropChunkingSettings = System.Text.Json.JsonEncodedText.Encode("chunking_settings"); private static readonly System.Text.Json.JsonEncodedText PropInferenceId = System.Text.Json.JsonEncodedText.Encode("inference_id"); private static readonly System.Text.Json.JsonEncodedText PropMeta = System.Text.Json.JsonEncodedText.Encode("meta"); private static readonly System.Text.Json.JsonEncodedText PropSearchInferenceId = System.Text.Json.JsonEncodedText.Encode("search_inference_id"); @@ -33,11 +34,17 @@ internal sealed partial class SemanticTextPropertyConverter : System.Text.Json.S public override Elastic.Clients.Elasticsearch.Mapping.SemanticTextProperty Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propChunkingSettings = default; LocalJsonValue propInferenceId = default; LocalJsonValue?> propMeta = default; LocalJsonValue propSearchInferenceId = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { + if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) + { + continue; + } + if (propInferenceId.TryReadProperty(ref reader, options, PropInferenceId, null)) { continue; @@ -71,6 +78,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SemanticTextProperty Read( reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.Mapping.SemanticTextProperty(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { + ChunkingSettings = propChunkingSettings.Value, InferenceId = propInferenceId.Value, Meta = propMeta.Value, SearchInferenceId = propSearchInferenceId.Value @@ -80,6 +88,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SemanticTextProperty Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.SemanticTextProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); + writer.WriteProperty(options, PropChunkingSettings, value.ChunkingSettings, null, null); writer.WriteProperty(options, PropInferenceId, value.InferenceId, null, null); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteProperty(options, PropSearchInferenceId, value.SearchInferenceId, null, null); @@ -107,6 +116,15 @@ internal SemanticTextProperty(Elastic.Clients.Elasticsearch.Serialization.JsonCo _ = sentinel; } + /// + /// + /// Settings for chunking text into smaller passages. If specified, these will override the + /// chunking settings sent in the inference endpoint associated with inference_id. If chunking settings are updated, + /// they will not be applied to existing documents until they are reindexed. + /// + /// + public Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings? ChunkingSettings { get; set; } + /// /// /// Inference endpoint that will be used to generate embeddings for the field. @@ -148,6 +166,32 @@ public SemanticTextPropertyDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Mapping.SemanticTextPropertyDescriptor(Elastic.Clients.Elasticsearch.Mapping.SemanticTextProperty instance) => new Elastic.Clients.Elasticsearch.Mapping.SemanticTextPropertyDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Mapping.SemanticTextProperty(Elastic.Clients.Elasticsearch.Mapping.SemanticTextPropertyDescriptor descriptor) => descriptor.Instance; + /// + /// + /// Settings for chunking text into smaller passages. If specified, these will override the + /// chunking settings sent in the inference endpoint associated with inference_id. If chunking settings are updated, + /// they will not be applied to existing documents until they are reindexed. + /// + /// + public Elastic.Clients.Elasticsearch.Mapping.SemanticTextPropertyDescriptor ChunkingSettings(Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings? value) + { + Instance.ChunkingSettings = value; + return this; + } + + /// + /// + /// Settings for chunking text into smaller passages. If specified, these will override the + /// chunking settings sent in the inference endpoint associated with inference_id. If chunking settings are updated, + /// they will not be applied to existing documents until they are reindexed. + /// + /// + public Elastic.Clients.Elasticsearch.Mapping.SemanticTextPropertyDescriptor ChunkingSettings(System.Action action) + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor.Build(action); + return this; + } + /// /// /// Inference endpoint that will be used to generate embeddings for the field. @@ -232,6 +276,32 @@ public SemanticTextPropertyDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Mapping.SemanticTextPropertyDescriptor(Elastic.Clients.Elasticsearch.Mapping.SemanticTextProperty instance) => new Elastic.Clients.Elasticsearch.Mapping.SemanticTextPropertyDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Mapping.SemanticTextProperty(Elastic.Clients.Elasticsearch.Mapping.SemanticTextPropertyDescriptor descriptor) => descriptor.Instance; + /// + /// + /// Settings for chunking text into smaller passages. If specified, these will override the + /// chunking settings sent in the inference endpoint associated with inference_id. If chunking settings are updated, + /// they will not be applied to existing documents until they are reindexed. + /// + /// + public Elastic.Clients.Elasticsearch.Mapping.SemanticTextPropertyDescriptor ChunkingSettings(Elastic.Clients.Elasticsearch.Mapping.ChunkingSettings? value) + { + Instance.ChunkingSettings = value; + return this; + } + + /// + /// + /// Settings for chunking text into smaller passages. If specified, these will override the + /// chunking settings sent in the inference endpoint associated with inference_id. If chunking settings are updated, + /// they will not be applied to existing documents until they are reindexed. + /// + /// + public Elastic.Clients.Elasticsearch.Mapping.SemanticTextPropertyDescriptor ChunkingSettings(System.Action action) + { + Instance.ChunkingSettings = Elastic.Clients.Elasticsearch.Mapping.ChunkingSettingsDescriptor.Build(action); + return this; + } + /// /// /// Inference endpoint that will be used to generate embeddings for the field. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs index 60577dcb307..02a708eaa1a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs @@ -183,7 +183,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// The shape data type facilitates the indexing of and searching with arbitrary x, y cartesian shapes such as /// rectangles and polygons. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Mapping.ShapePropertyConverter))] public sealed partial class ShapeProperty : Elastic.Clients.Elasticsearch.Mapping.IProperty @@ -232,7 +232,7 @@ internal ShapeProperty(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// The shape data type facilitates the indexing of and searching with arbitrary x, y cartesian shapes such as /// rectangles and polygons. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct ShapePropertyDescriptor { @@ -402,7 +402,7 @@ internal static Elastic.Clients.Elasticsearch.Mapping.ShapeProperty Build(System /// The shape data type facilitates the indexing of and searching with arbitrary x, y cartesian shapes such as /// rectangles and polygons. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// public readonly partial struct ShapePropertyDescriptor { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Like.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Like.g.cs index ad70553788e..8a3d4fe9388 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Like.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Like.g.cs @@ -62,7 +62,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// Text that we want similar documents for or a lookup to a document's field for the text. /// -/// Learn more about this API in the Elasticsearch documentation. +/// Learn more about this API in the Elasticsearch documentation. /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.LikeConverter))] public sealed partial class Like : Elastic.Clients.Elasticsearch.Union diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedDoc.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedDoc.g.cs index a068e6c3a29..36a73082192 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedDoc.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedDoc.g.cs @@ -32,7 +32,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PinnedDoc Read(ref System { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propId = default; - LocalJsonValue propIndex = default; + LocalJsonValue propIndex = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propId.TryReadProperty(ref reader, options, PropId, null)) @@ -75,9 +75,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class PinnedDoc { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public PinnedDoc(Elastic.Clients.Elasticsearch.Id id) + public PinnedDoc(Elastic.Clients.Elasticsearch.Id id, Elastic.Clients.Elasticsearch.IndexName index) { Id = id; + Index = index; } #if NET7_0_OR_GREATER public PinnedDoc() @@ -112,7 +113,11 @@ internal PinnedDoc(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSe /// The index that contains the document. /// /// - public Elastic.Clients.Elasticsearch.IndexName? Index { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.IndexName Index { get; set; } } public readonly partial struct PinnedDocDescriptor @@ -150,7 +155,7 @@ public Elastic.Clients.Elasticsearch.QueryDsl.PinnedDocDescriptor Id(Elastic.Cli /// The index that contains the document. /// /// - public Elastic.Clients.Elasticsearch.QueryDsl.PinnedDocDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? value) + public Elastic.Clients.Elasticsearch.QueryDsl.PinnedDocDescriptor Index(Elastic.Clients.Elasticsearch.IndexName value) { Instance.Index = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanTermQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanTermQuery.g.cs index 64a6d292c43..e759f926982 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanTermQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanTermQuery.g.cs @@ -28,7 +28,6 @@ internal sealed partial class SpanTermQueryConverter : System.Text.Json.Serializ private static readonly System.Text.Json.JsonEncodedText PropBoost = System.Text.Json.JsonEncodedText.Encode("boost"); private static readonly System.Text.Json.JsonEncodedText PropQueryName = System.Text.Json.JsonEncodedText.Encode("_name"); private static readonly System.Text.Json.JsonEncodedText PropValue = System.Text.Json.JsonEncodedText.Encode("value"); - private static readonly System.Text.Json.JsonEncodedText PropValue1 = System.Text.Json.JsonEncodedText.Encode("term"); public override Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQuery Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { @@ -39,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQuery Read(ref Sy reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { - var value = reader.ReadValue(options, null); + var value = reader.ReadValue(options, null); reader.Read(); return new Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQuery(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { @@ -51,7 +50,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQuery Read(ref Sy reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; LocalJsonValue propQueryName = default; - LocalJsonValue propValue = default; + LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) @@ -64,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQuery Read(ref Sy continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null) || propValue.TryReadProperty(ref reader, options, PropValue1, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, null)) { continue; } @@ -113,7 +112,7 @@ public SpanTermQuery(Elastic.Clients.Elasticsearch.Field field) } [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public SpanTermQuery(Elastic.Clients.Elasticsearch.Field field, Elastic.Clients.Elasticsearch.FieldValue value) + public SpanTermQuery(Elastic.Clients.Elasticsearch.Field field, string value) { Field = field; Value = value; @@ -148,7 +147,7 @@ internal SpanTermQuery(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.FieldValue Value { get; set; } + string Value { get; set; } } public readonly partial struct SpanTermQueryDescriptor @@ -202,7 +201,7 @@ public Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQueryDescriptor return this; } - public Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQueryDescriptor Value(Elastic.Clients.Elasticsearch.FieldValue value) + public Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQueryDescriptor Value(string value) { Instance.Value = value; return this; @@ -268,7 +267,7 @@ public Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQueryDescriptor QueryName( return this; } - public Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQueryDescriptor Value(Elastic.Clients.Elasticsearch.FieldValue value) + public Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQueryDescriptor Value(string value) { Instance.Value = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermQuery.g.cs index 90c9e99c82b..dc3ff1bd66f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermQuery.g.cs @@ -37,17 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermQuery Read(ref System reader.Read(); propField.ReadPropertyName(ref reader, options, null); reader.Read(); - if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) - { - var value = reader.ReadValue(options, null); - reader.Read(); - return new Elastic.Clients.Elasticsearch.QueryDsl.TermQuery(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) - { - Field = propField.Value, - Value = value - }; - } - + var readerSnapshot = reader; reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; LocalJsonValue propCaseInsensitive = default; @@ -75,13 +65,20 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermQuery Read(ref System continue; } - if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + try { - reader.Skip(); - continue; + reader = readerSnapshot; + var result = reader.ReadValue(options, null); + return new Elastic.Clients.Elasticsearch.QueryDsl.TermQuery(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Field = propField.Value, + Value = result + }; + } + catch (System.Text.Json.JsonException) + { + throw; } - - throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs index 765975ada69..3728b1b7e06 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQuery Read(ref Sy LocalJsonValue propMinimumShouldMatchField = default; LocalJsonValue propMinimumShouldMatchScript = default; LocalJsonValue propQueryName = default; - LocalJsonValue> propTerms = default; + LocalJsonValue> propTerms = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQuery Read(ref Sy continue; } - if (propTerms.TryReadProperty(ref reader, options, PropTerms, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) + if (propTerms.TryReadProperty(ref reader, options, PropTerms, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) { continue; } @@ -112,7 +112,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropMinimumShouldMatchField, value.MinimumShouldMatchField, null, null); writer.WriteProperty(options, PropMinimumShouldMatchScript, value.MinimumShouldMatchScript, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropTerms, value.Terms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); + writer.WriteProperty(options, PropTerms, value.Terms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); writer.WriteEndObject(); } @@ -128,7 +128,7 @@ public TermsSetQuery(Elastic.Clients.Elasticsearch.Field field) } [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public TermsSetQuery(Elastic.Clients.Elasticsearch.Field field, System.Collections.Generic.ICollection terms) + public TermsSetQuery(Elastic.Clients.Elasticsearch.Field field, System.Collections.Generic.ICollection terms) { Field = field; Terms = terms; @@ -190,7 +190,7 @@ internal TermsSetQuery(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct #if NET7_0_OR_GREATER required #endif - System.Collections.Generic.ICollection Terms { get; set; } + System.Collections.Generic.ICollection Terms { get; set; } } public readonly partial struct TermsSetQueryDescriptor @@ -315,7 +315,7 @@ public Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQueryDescriptor /// Array of terms you wish to find in the provided field. /// /// - public Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQueryDescriptor Terms(System.Collections.Generic.ICollection value) + public Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQueryDescriptor Terms(System.Collections.Generic.ICollection value) { Instance.Terms = value; return this; @@ -326,7 +326,7 @@ public Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQueryDescriptor /// Array of terms you wish to find in the provided field. /// /// - public Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQueryDescriptor Terms(params Elastic.Clients.Elasticsearch.FieldValue[] values) + public Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQueryDescriptor Terms(params string[] values) { Instance.Terms = [.. values]; return this; @@ -463,7 +463,7 @@ public Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQueryDescriptor QueryName( /// Array of terms you wish to find in the provided field. /// /// - public Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQueryDescriptor Terms(System.Collections.Generic.ICollection value) + public Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQueryDescriptor Terms(System.Collections.Generic.ICollection value) { Instance.Terms = value; return this; @@ -474,7 +474,7 @@ public Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQueryDescriptor Terms(Syst /// Array of terms you wish to find in the provided field. /// /// - public Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQueryDescriptor Terms(params Elastic.Clients.Elasticsearch.FieldValue[] values) + public Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQueryDescriptor Terms(params string[] values) { Instance.Terms = [.. values]; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/FieldRule.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/FieldRule.g.cs new file mode 100644 index 00000000000..744490a5b25 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/FieldRule.g.cs @@ -0,0 +1,192 @@ +// 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. +// +// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗ +// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝ +// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗ +// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝ +// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗ +// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ +// ------------------------------------------------ +// +// This file is automatically generated. +// Please do not edit these files manually. +// +// ------------------------------------------------ + +#nullable restore + +using System; +using System.Linq; +using Elastic.Clients.Elasticsearch.Serialization; + +namespace Elastic.Clients.Elasticsearch.Security; + +internal sealed partial class FieldRuleConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText VariantDn = System.Text.Json.JsonEncodedText.Encode("dn"); + private static readonly System.Text.Json.JsonEncodedText VariantGroups = System.Text.Json.JsonEncodedText.Encode("groups"); + private static readonly System.Text.Json.JsonEncodedText VariantUsername = System.Text.Json.JsonEncodedText.Encode("username"); + + public override Elastic.Clients.Elasticsearch.Security.FieldRule Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + string? variantType = null; + object? variant = null; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (reader.ValueTextEquals(VariantDn)) + { + variantType = VariantDn.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + + if (reader.ValueTextEquals(VariantGroups)) + { + variantType = VariantGroups.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + + if (reader.ValueTextEquals(VariantUsername)) + { + variantType = VariantUsername.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + continue; + } + + throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'."); + } + + reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); + return new Elastic.Clients.Elasticsearch.Security.FieldRule(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + VariantType = variantType, + Variant = variant + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.FieldRule value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + switch (value.VariantType) + { + case null: + break; + case "dn": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.Names)value.Variant, null, null); + break; + case "groups": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.Names)value.Variant, null, null); + break; + case "username": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.Names)value.Variant, null, null); + break; + default: + throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.Security.FieldRule)}'."); + } + + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Security.FieldRuleConverter))] +public sealed partial class FieldRule +{ + internal string? VariantType { get; set; } + internal object? Variant { get; set; } +#if NET7_0_OR_GREATER + public FieldRule() + { + } +#endif +#if !NET7_0_OR_GREATER + public FieldRule() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal FieldRule(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public Elastic.Clients.Elasticsearch.Names? Dn { get => GetVariant("dn"); set => SetVariant("dn", value); } + public Elastic.Clients.Elasticsearch.Names? Groups { get => GetVariant("groups"); set => SetVariant("groups", value); } + public Elastic.Clients.Elasticsearch.Names? Username { get => GetVariant("username"); set => SetVariant("username", value); } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + private T? GetVariant(string type) + { + if (string.Equals(VariantType, type, System.StringComparison.Ordinal) && Variant is T result) + { + return result; + } + + return default; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + private void SetVariant(string type, T? value) + { + VariantType = type; + Variant = value; + } +} + +public readonly partial struct FieldRuleDescriptor +{ + internal Elastic.Clients.Elasticsearch.Security.FieldRule Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public FieldRuleDescriptor(Elastic.Clients.Elasticsearch.Security.FieldRule instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public FieldRuleDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Security.FieldRule(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Security.FieldRuleDescriptor(Elastic.Clients.Elasticsearch.Security.FieldRule instance) => new Elastic.Clients.Elasticsearch.Security.FieldRuleDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Security.FieldRule(Elastic.Clients.Elasticsearch.Security.FieldRuleDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.Security.FieldRuleDescriptor Dn(Elastic.Clients.Elasticsearch.Names? value) + { + Instance.Dn = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Security.FieldRuleDescriptor Groups(Elastic.Clients.Elasticsearch.Names? value) + { + Instance.Groups = value; + return this; + } + + public Elastic.Clients.Elasticsearch.Security.FieldRuleDescriptor Username(Elastic.Clients.Elasticsearch.Names? value) + { + Instance.Username = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Security.FieldRule Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.Security.FieldRuleDescriptor(new Elastic.Clients.Elasticsearch.Security.FieldRule(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndicesPrivileges.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndicesPrivileges.g.cs index 9cf65ee4b44..069359f83a7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndicesPrivileges.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndicesPrivileges.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Security.IndicesPrivileges Read(re continue; } - if (propNames.TryReadProperty(ref reader, options, PropNames, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)!)) + if (propNames.TryReadProperty(ref reader, options, PropNames, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, null); writer.WriteProperty(options, PropFieldSecurity, value.FieldSecurity, null, null); - writer.WriteProperty(options, PropNames, value.Names, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); + writer.WriteProperty(options, PropNames, value.Names, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropPrivileges, value.Privileges, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteIndicesPrivileges.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteIndicesPrivileges.g.cs index 5fb8b33d475..391a0a3509f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteIndicesPrivileges.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteIndicesPrivileges.g.cs @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivileges R continue; } - if (propNames.TryReadProperty(ref reader, options, PropNames, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)!)) + if (propNames.TryReadProperty(ref reader, options, PropNames, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) { continue; } @@ -100,7 +100,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, null); writer.WriteProperty(options, PropClusters, value.Clusters, null, null); writer.WriteProperty(options, PropFieldSecurity, value.FieldSecurity, null, null); - writer.WriteProperty(options, PropNames, value.Names, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); + writer.WriteProperty(options, PropNames, value.Names, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropPrivileges, value.Privileges, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleMappingRule.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleMappingRule.g.cs index 8b591a871b7..3286e471500 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleMappingRule.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleMappingRule.g.cs @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Security.RoleMappingRule Read(ref { variantType = VariantField.Value; reader.Read(); - variant = reader.ReadValue>>(options, static System.Collections.Generic.KeyValuePair> (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadKeyValuePairValue>(o, null, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)!)); + variant = reader.ReadValue(options, null); continue; } @@ -103,7 +103,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.Security.RoleMappingRule)value.Variant, null, null); break; case "field": - writer.WriteProperty(options, value.VariantType, (System.Collections.Generic.KeyValuePair>)value.Variant, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair> v) => w.WriteKeyValuePairValue>(o, v, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null))); + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.Security.FieldRule)value.Variant, null, null); break; default: throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.Security.RoleMappingRule)}'."); @@ -137,9 +137,9 @@ internal RoleMappingRule(Elastic.Clients.Elasticsearch.Serialization.JsonConstru public System.Collections.Generic.ICollection? All { get => GetVariant>("all"); set => SetVariant("all", value); } public System.Collections.Generic.ICollection? Any { get => GetVariant>("any"); set => SetVariant("any", value); } public Elastic.Clients.Elasticsearch.Security.RoleMappingRule? Except { get => GetVariant("except"); set => SetVariant("except", value); } - public System.Collections.Generic.KeyValuePair>? Field { get => GetVariant>>("field"); set => SetVariant("field", value); } + public Elastic.Clients.Elasticsearch.Security.FieldRule? Field { get => GetVariant("field"); set => SetVariant("field", value); } - public static implicit operator Elastic.Clients.Elasticsearch.Security.RoleMappingRule(System.Collections.Generic.KeyValuePair> value) => new Elastic.Clients.Elasticsearch.Security.RoleMappingRule { Field = value }; + public static implicit operator Elastic.Clients.Elasticsearch.Security.RoleMappingRule(Elastic.Clients.Elasticsearch.Security.FieldRule value) => new Elastic.Clients.Elasticsearch.Security.RoleMappingRule { Field = value }; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private T? GetVariant(string type) @@ -160,124 +160,6 @@ private void SetVariant(string type, T? value) } } -public readonly partial struct RoleMappingRuleDescriptor -{ - internal Elastic.Clients.Elasticsearch.Security.RoleMappingRule Instance { get; init; } - - [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public RoleMappingRuleDescriptor(Elastic.Clients.Elasticsearch.Security.RoleMappingRule instance) - { - Instance = instance; - } - - [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public RoleMappingRuleDescriptor() - { - Instance = new Elastic.Clients.Elasticsearch.Security.RoleMappingRule(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); - } - - public static explicit operator Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor(Elastic.Clients.Elasticsearch.Security.RoleMappingRule instance) => new Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor(instance); - public static implicit operator Elastic.Clients.Elasticsearch.Security.RoleMappingRule(Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor descriptor) => descriptor.Instance; - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor All(System.Collections.Generic.ICollection? value) - { - Instance.All = value; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor All(params Elastic.Clients.Elasticsearch.Security.RoleMappingRule[] values) - { - Instance.All = [.. values]; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor All(params System.Action>[] actions) - { - var items = new System.Collections.Generic.List(); - foreach (var action in actions) - { - items.Add(Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor.Build(action)); - } - - Instance.All = items; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Any(System.Collections.Generic.ICollection? value) - { - Instance.Any = value; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Any(params Elastic.Clients.Elasticsearch.Security.RoleMappingRule[] values) - { - Instance.Any = [.. values]; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Any(params System.Action>[] actions) - { - var items = new System.Collections.Generic.List(); - foreach (var action in actions) - { - items.Add(Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor.Build(action)); - } - - Instance.Any = items; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Except(Elastic.Clients.Elasticsearch.Security.RoleMappingRule? value) - { - Instance.Except = value; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Except(System.Action> action) - { - Instance.Except = Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor.Build(action); - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Field(System.Collections.Generic.KeyValuePair>? value) - { - Instance.Field = value; - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Field(Elastic.Clients.Elasticsearch.Field key, System.Collections.Generic.ICollection value) - { - Instance.Field = new System.Collections.Generic.KeyValuePair>(key, value); - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Field(System.Linq.Expressions.Expression> key, System.Collections.Generic.ICollection value) - { - Instance.Field = new System.Collections.Generic.KeyValuePair>(key, value); - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Field(Elastic.Clients.Elasticsearch.Field key, params Elastic.Clients.Elasticsearch.FieldValue[] values) - { - Instance.Field = new System.Collections.Generic.KeyValuePair>(key, [.. values]); - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Field(System.Linq.Expressions.Expression> key, params Elastic.Clients.Elasticsearch.FieldValue[] values) - { - Instance.Field = new System.Collections.Generic.KeyValuePair>(key, [.. values]); - return this; - } - - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - internal static Elastic.Clients.Elasticsearch.Security.RoleMappingRule Build(System.Action> action) - { - var builder = new Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor(new Elastic.Clients.Elasticsearch.Security.RoleMappingRule(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); - action.Invoke(builder); - return builder.Instance; - } -} - public readonly partial struct RoleMappingRuleDescriptor { internal Elastic.Clients.Elasticsearch.Security.RoleMappingRule Instance { get; init; } @@ -321,18 +203,6 @@ public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor All(para return this; } - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor All(params System.Action>[] actions) - { - var items = new System.Collections.Generic.List(); - foreach (var action in actions) - { - items.Add(Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor.Build(action)); - } - - Instance.All = items; - return this; - } - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Any(System.Collections.Generic.ICollection? value) { Instance.Any = value; @@ -357,18 +227,6 @@ public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Any(para return this; } - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Any(params System.Action>[] actions) - { - var items = new System.Collections.Generic.List(); - foreach (var action in actions) - { - items.Add(Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor.Build(action)); - } - - Instance.Any = items; - return this; - } - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Except(Elastic.Clients.Elasticsearch.Security.RoleMappingRule? value) { Instance.Except = value; @@ -381,39 +239,15 @@ public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Except(S return this; } - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Except(System.Action> action) - { - Instance.Except = Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor.Build(action); - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Field(System.Collections.Generic.KeyValuePair>? value) + public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Field(Elastic.Clients.Elasticsearch.Security.FieldRule? value) { Instance.Field = value; return this; } - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Field(Elastic.Clients.Elasticsearch.Field key, System.Collections.Generic.ICollection value) - { - Instance.Field = new System.Collections.Generic.KeyValuePair>(key, value); - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Field(System.Linq.Expressions.Expression> key, System.Collections.Generic.ICollection value) - { - Instance.Field = new System.Collections.Generic.KeyValuePair>(key, value); - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Field(Elastic.Clients.Elasticsearch.Field key, params Elastic.Clients.Elasticsearch.FieldValue[] values) - { - Instance.Field = new System.Collections.Generic.KeyValuePair>(key, [.. values]); - return this; - } - - public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Field(System.Linq.Expressions.Expression> key, params Elastic.Clients.Elasticsearch.FieldValue[] values) + public Elastic.Clients.Elasticsearch.Security.RoleMappingRuleDescriptor Field(System.Action action) { - Instance.Field = new System.Collections.Generic.KeyValuePair>(key, [.. values]); + Instance.Field = Elastic.Clients.Elasticsearch.Security.FieldRuleDescriptor.Build(action); return this; } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserIndicesPrivileges.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserIndicesPrivileges.g.cs index d71618c851c..9090abb421d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserIndicesPrivileges.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserIndicesPrivileges.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Security.UserIndicesPrivileges Rea reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propAllowRestrictedIndices = default; LocalJsonValue?> propFieldSecurity = default; - LocalJsonValue> propNames = default; + LocalJsonValue> propNames = default; LocalJsonValue> propPrivileges = default; LocalJsonValue propQuery = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Security.UserIndicesPrivileges Rea continue; } - if (propNames.TryReadProperty(ref reader, options, PropNames, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)!)) + if (propNames.TryReadProperty(ref reader, options, PropNames, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, null); writer.WriteProperty(options, PropFieldSecurity, value.FieldSecurity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropNames, value.Names, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); + writer.WriteProperty(options, PropNames, value.Names, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropPrivileges, value.Privileges, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteEndObject(); @@ -102,7 +102,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class UserIndicesPrivileges { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public UserIndicesPrivileges(bool allowRestrictedIndices, System.Collections.Generic.ICollection names, System.Collections.Generic.IReadOnlyCollection privileges) + public UserIndicesPrivileges(bool allowRestrictedIndices, System.Collections.Generic.IReadOnlyCollection names, System.Collections.Generic.IReadOnlyCollection privileges) { AllowRestrictedIndices = allowRestrictedIndices; Names = names; @@ -152,7 +152,7 @@ internal UserIndicesPrivileges(Elastic.Clients.Elasticsearch.Serialization.JsonC #if NET7_0_OR_GREATER required #endif - System.Collections.Generic.ICollection Names { get; set; } + System.Collections.Generic.IReadOnlyCollection Names { get; set; } /// /// diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/AzureRepository.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/AzureRepository.g.cs index 6cf9b18bcc7..b2ac5bab484 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/AzureRepository.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/AzureRepository.g.cs @@ -32,7 +32,7 @@ internal sealed partial class AzureRepositoryConverter : System.Text.Json.Serial public override Elastic.Clients.Elasticsearch.Snapshot.AzureRepository Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propSettings = default; + LocalJsonValue propSettings = default; LocalJsonValue propUuid = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -82,12 +82,18 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Snapshot.AzureRepositoryConverter))] public sealed partial class AzureRepository : Elastic.Clients.Elasticsearch.Snapshot.IRepository { + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public AzureRepository(Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings settings) + { + Settings = settings; + } #if NET7_0_OR_GREATER public AzureRepository() { } #endif #if !NET7_0_OR_GREATER + [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] public AzureRepository() { } @@ -98,18 +104,12 @@ internal AzureRepository(Elastic.Clients.Elasticsearch.Serialization.JsonConstru _ = sentinel; } - /// - /// - /// The repository settings. - /// - /// - public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings? Settings { get; set; } - - /// - /// - /// The Azure repository type. - /// - /// + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings Settings { get; set; } + public string Type => "azure"; public string? Uuid { get; set; } @@ -134,33 +134,18 @@ public AzureRepositoryDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Snapshot.AzureRepositoryDescriptor(Elastic.Clients.Elasticsearch.Snapshot.AzureRepository instance) => new Elastic.Clients.Elasticsearch.Snapshot.AzureRepositoryDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Snapshot.AzureRepository(Elastic.Clients.Elasticsearch.Snapshot.AzureRepositoryDescriptor descriptor) => descriptor.Instance; - /// - /// - /// The repository settings. - /// - /// - public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings? value) + public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings value) { Instance.Settings = value; return this; } - /// - /// - /// The repository settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositoryDescriptor Settings() { Instance.Settings = Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor.Build(null); return this; } - /// - /// - /// The repository settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositoryDescriptor Settings(System.Action? action) { Instance.Settings = Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor.Build(action); @@ -174,13 +159,8 @@ public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositoryDescriptor Uuid(str } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] - internal static Elastic.Clients.Elasticsearch.Snapshot.AzureRepository Build(System.Action? action) + internal static Elastic.Clients.Elasticsearch.Snapshot.AzureRepository Build(System.Action action) { - if (action is null) - { - return new Elastic.Clients.Elasticsearch.Snapshot.AzureRepository(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); - } - var builder = new Elastic.Clients.Elasticsearch.Snapshot.AzureRepositoryDescriptor(new Elastic.Clients.Elasticsearch.Snapshot.AzureRepository(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); action.Invoke(builder); return builder.Instance; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/AzureRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/AzureRepositorySettings.g.cs index 2c314c0390e..b5b138d5519 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/AzureRepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/AzureRepositorySettings.g.cs @@ -30,9 +30,7 @@ internal sealed partial class AzureRepositorySettingsConverter : System.Text.Jso private static readonly System.Text.Json.JsonEncodedText PropClient = System.Text.Json.JsonEncodedText.Encode("client"); private static readonly System.Text.Json.JsonEncodedText PropCompress = System.Text.Json.JsonEncodedText.Encode("compress"); private static readonly System.Text.Json.JsonEncodedText PropContainer = System.Text.Json.JsonEncodedText.Encode("container"); - private static readonly System.Text.Json.JsonEncodedText PropDeleteObjectsMaxSize = System.Text.Json.JsonEncodedText.Encode("delete_objects_max_size"); private static readonly System.Text.Json.JsonEncodedText PropLocationMode = System.Text.Json.JsonEncodedText.Encode("location_mode"); - private static readonly System.Text.Json.JsonEncodedText PropMaxConcurrentBatchDeletes = System.Text.Json.JsonEncodedText.Encode("max_concurrent_batch_deletes"); private static readonly System.Text.Json.JsonEncodedText PropMaxRestoreBytesPerSec = System.Text.Json.JsonEncodedText.Encode("max_restore_bytes_per_sec"); private static readonly System.Text.Json.JsonEncodedText PropMaxSnapshotBytesPerSec = System.Text.Json.JsonEncodedText.Encode("max_snapshot_bytes_per_sec"); private static readonly System.Text.Json.JsonEncodedText PropReadonly = System.Text.Json.JsonEncodedText.Encode("readonly"); @@ -45,9 +43,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings R LocalJsonValue propClient = default; LocalJsonValue propCompress = default; LocalJsonValue propContainer = default; - LocalJsonValue propDeleteObjectsMaxSize = default; LocalJsonValue propLocationMode = default; - LocalJsonValue propMaxConcurrentBatchDeletes = default; LocalJsonValue propMaxRestoreBytesPerSec = default; LocalJsonValue propMaxSnapshotBytesPerSec = default; LocalJsonValue propReadonly = default; @@ -78,21 +74,11 @@ public override Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings R continue; } - if (propDeleteObjectsMaxSize.TryReadProperty(ref reader, options, PropDeleteObjectsMaxSize, null)) - { - continue; - } - if (propLocationMode.TryReadProperty(ref reader, options, PropLocationMode, null)) { continue; } - if (propMaxConcurrentBatchDeletes.TryReadProperty(ref reader, options, PropMaxConcurrentBatchDeletes, null)) - { - continue; - } - if (propMaxRestoreBytesPerSec.TryReadProperty(ref reader, options, PropMaxRestoreBytesPerSec, null)) { continue; @@ -125,9 +111,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings R Client = propClient.Value, Compress = propCompress.Value, Container = propContainer.Value, - DeleteObjectsMaxSize = propDeleteObjectsMaxSize.Value, LocationMode = propLocationMode.Value, - MaxConcurrentBatchDeletes = propMaxConcurrentBatchDeletes.Value, MaxRestoreBytesPerSec = propMaxRestoreBytesPerSec.Value, MaxSnapshotBytesPerSec = propMaxSnapshotBytesPerSec.Value, Readonly = propReadonly.Value @@ -142,9 +126,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClient, value.Client, null, null); writer.WriteProperty(options, PropCompress, value.Compress, null, null); writer.WriteProperty(options, PropContainer, value.Container, null, null); - writer.WriteProperty(options, PropDeleteObjectsMaxSize, value.DeleteObjectsMaxSize, null, null); writer.WriteProperty(options, PropLocationMode, value.LocationMode, null, null); - writer.WriteProperty(options, PropMaxConcurrentBatchDeletes, value.MaxConcurrentBatchDeletes, null, null); writer.WriteProperty(options, PropMaxRestoreBytesPerSec, value.MaxRestoreBytesPerSec, null, null); writer.WriteProperty(options, PropMaxSnapshotBytesPerSec, value.MaxSnapshotBytesPerSec, null, null); writer.WriteProperty(options, PropReadonly, value.Readonly, null, null); @@ -171,109 +153,14 @@ internal AzureRepositorySettings(Elastic.Clients.Elasticsearch.Serialization.Jso _ = sentinel; } - /// - /// - /// The path to the repository data within the container. - /// It defaults to the root directory. - /// - /// - /// NOTE: Don't set base_path when configuring a snapshot repository for Elastic Cloud Enterprise. - /// Elastic Cloud Enterprise automatically generates the base_path for each deployment so that multiple deployments can share the same bucket. - /// - /// public string? BasePath { get; set; } - - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? ChunkSize { get; set; } - - /// - /// - /// The name of the Azure repository client to use. - /// - /// public string? Client { get; set; } - - /// - /// - /// When set to true, metadata files are stored in compressed format. - /// This setting doesn't affect index files that are already compressed by default. - /// - /// public bool? Compress { get; set; } - - /// - /// - /// The Azure container. - /// - /// public string? Container { get; set; } - - /// - /// - /// The maxmimum batch size, between 1 and 256, used for BlobBatch requests. - /// Defaults to 256 which is the maximum number supported by the Azure blob batch API. - /// - /// - public int? DeleteObjectsMaxSize { get; set; } - - /// - /// - /// Either primary_only or secondary_only. - /// Note that if you set it to secondary_only, it will force readonly to true. - /// - /// public string? LocationMode { get; set; } - - /// - /// - /// The maximum number of concurrent batch delete requests that will be submitted for any individual bulk delete with BlobBatch. - /// Note that the effective number of concurrent deletes is further limited by the Azure client connection and event loop thread limits. - /// Defaults to 10, minimum is 1, maximum is 100. - /// - /// - public int? MaxConcurrentBatchDeletes { get; set; } - - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? MaxRestoreBytesPerSec { get; set; } - - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? MaxSnapshotBytesPerSec { get; set; } - - /// - /// - /// If true, the repository is read-only. - /// The cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it. - /// - /// - /// Only a cluster with write access can create snapshots in the repository. - /// All other clusters connected to the repository should have the readonly parameter set to true. - /// If false, the cluster can write to the repository and create snapshots in it. - /// - /// - /// IMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository. - /// Having multiple clusters write to the repository at the same time risks corrupting the contents of the repository. - /// - /// public bool? Readonly { get; set; } } @@ -296,190 +183,72 @@ public AzureRepositorySettingsDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor(Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings instance) => new Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings(Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor descriptor) => descriptor.Instance; - /// - /// - /// The path to the repository data within the container. - /// It defaults to the root directory. - /// - /// - /// NOTE: Don't set base_path when configuring a snapshot repository for Elastic Cloud Enterprise. - /// Elastic Cloud Enterprise automatically generates the base_path for each deployment so that multiple deployments can share the same bucket. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor BasePath(string? value) { Instance.BasePath = value; return this; } - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor ChunkSize(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.ChunkSize = value; return this; } - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor ChunkSize(System.Func action) { Instance.ChunkSize = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// The name of the Azure repository client to use. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor Client(string? value) { Instance.Client = value; return this; } - /// - /// - /// When set to true, metadata files are stored in compressed format. - /// This setting doesn't affect index files that are already compressed by default. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor Compress(bool? value = true) { Instance.Compress = value; return this; } - /// - /// - /// The Azure container. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor Container(string? value) { Instance.Container = value; return this; } - /// - /// - /// The maxmimum batch size, between 1 and 256, used for BlobBatch requests. - /// Defaults to 256 which is the maximum number supported by the Azure blob batch API. - /// - /// - public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor DeleteObjectsMaxSize(int? value) - { - Instance.DeleteObjectsMaxSize = value; - return this; - } - - /// - /// - /// Either primary_only or secondary_only. - /// Note that if you set it to secondary_only, it will force readonly to true. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor LocationMode(string? value) { Instance.LocationMode = value; return this; } - /// - /// - /// The maximum number of concurrent batch delete requests that will be submitted for any individual bulk delete with BlobBatch. - /// Note that the effective number of concurrent deletes is further limited by the Azure client connection and event loop thread limits. - /// Defaults to 10, minimum is 1, maximum is 100. - /// - /// - public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor MaxConcurrentBatchDeletes(int? value) - { - Instance.MaxConcurrentBatchDeletes = value; - return this; - } - - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor MaxRestoreBytesPerSec(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.MaxRestoreBytesPerSec = value; return this; } - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor MaxRestoreBytesPerSec(System.Func action) { Instance.MaxRestoreBytesPerSec = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor MaxSnapshotBytesPerSec(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.MaxSnapshotBytesPerSec = value; return this; } - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor MaxSnapshotBytesPerSec(System.Func action) { Instance.MaxSnapshotBytesPerSec = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// If true, the repository is read-only. - /// The cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it. - /// - /// - /// Only a cluster with write access can create snapshots in the repository. - /// All other clusters connected to the repository should have the readonly parameter set to true. - /// If false, the cluster can write to the repository and create snapshots in it. - /// - /// - /// IMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository. - /// Having multiple clusters write to the repository at the same time risks corrupting the contents of the repository. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettingsDescriptor Readonly(bool? value = true) { Instance.Readonly = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/CleanupRepositoryResults.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/CleanupRepositoryResults.g.cs index c4a4c4f8259..e39b1f04762 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/CleanupRepositoryResults.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/CleanupRepositoryResults.g.cs @@ -99,8 +99,7 @@ internal CleanupRepositoryResults(Elastic.Clients.Elasticsearch.Serialization.Js /// /// - /// The number of binary large objects (blobs) removed from the snapshot repository during cleanup operations. - /// A non-zero value indicates that unreferenced blobs were found and subsequently cleaned up. + /// Number of binary large objects (blobs) removed during cleanup. /// /// public @@ -111,7 +110,7 @@ internal CleanupRepositoryResults(Elastic.Clients.Elasticsearch.Serialization.Js /// /// - /// The number of bytes freed by cleanup operations. + /// Number of bytes freed by cleanup operations. /// /// public diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/CompactNodeInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/CompactNodeInfo.g.cs index 1857a0795b8..8d768a100ef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/CompactNodeInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/CompactNodeInfo.g.cs @@ -87,13 +87,6 @@ internal CompactNodeInfo(Elastic.Clients.Elasticsearch.Serialization.JsonConstru _ = sentinel; } - /// - /// - /// A human-readable name for the node. - /// You can set this name using the node.name property in elasticsearch.yml. - /// The default value is the machine's hostname. - /// - /// public #if NET7_0_OR_GREATER required diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/GcsRepository.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/GcsRepository.g.cs index 64480c2e6bf..e823351ead1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/GcsRepository.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/GcsRepository.g.cs @@ -104,22 +104,12 @@ internal GcsRepository(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct _ = sentinel; } - /// - /// - /// The repository settings. - /// - /// public #if NET7_0_OR_GREATER required #endif Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettings Settings { get; set; } - /// - /// - /// The Google Cloud Storage repository type. - /// - /// public string Type => "gcs"; public string? Uuid { get; set; } @@ -144,22 +134,12 @@ public GcsRepositoryDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Snapshot.GcsRepositoryDescriptor(Elastic.Clients.Elasticsearch.Snapshot.GcsRepository instance) => new Elastic.Clients.Elasticsearch.Snapshot.GcsRepositoryDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Snapshot.GcsRepository(Elastic.Clients.Elasticsearch.Snapshot.GcsRepositoryDescriptor descriptor) => descriptor.Instance; - /// - /// - /// The repository settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.GcsRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettings value) { Instance.Settings = value; return this; } - /// - /// - /// The repository settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.GcsRepositoryDescriptor Settings(System.Action action) { Instance.Settings = Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor.Build(action); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/GcsRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/GcsRepositorySettings.g.cs index 0c74d9ee65b..896382221ac 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/GcsRepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/GcsRepositorySettings.g.cs @@ -106,10 +106,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettings Rea reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); return new Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { -#pragma warning disable CS0618 - ApplicationName = propApplicationName.Value -#pragma warning restore CS0618 -, + ApplicationName = propApplicationName.Value, BasePath = propBasePath.Value, Bucket = propBucket.Value, ChunkSize = propChunkSize.Value, @@ -124,10 +121,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettings Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); -#pragma warning disable CS0618 - writer.WriteProperty(options, PropApplicationName, value.ApplicationName, null, null) -#pragma warning restore CS0618 - ; + writer.WriteProperty(options, PropApplicationName, value.ApplicationName, null, null); writer.WriteProperty(options, PropBasePath, value.BasePath, null, null); writer.WriteProperty(options, PropBucket, value.Bucket, null, null); writer.WriteProperty(options, PropChunkSize, value.ChunkSize, null, null); @@ -165,98 +159,18 @@ internal GcsRepositorySettings(Elastic.Clients.Elasticsearch.Serialization.JsonC _ = sentinel; } - /// - /// - /// The name used by the client when it uses the Google Cloud Storage service. - /// - /// - [System.Obsolete("Deprecated in '6.3.0'.")] public string? ApplicationName { get; set; } - - /// - /// - /// The path to the repository data within the bucket. - /// It defaults to the root of the bucket. - /// - /// - /// NOTE: Don't set base_path when configuring a snapshot repository for Elastic Cloud Enterprise. - /// Elastic Cloud Enterprise automatically generates the base_path for each deployment so that multiple deployments can share the same bucket. - /// - /// public string? BasePath { get; set; } - - /// - /// - /// The name of the bucket to be used for snapshots. - /// - /// public #if NET7_0_OR_GREATER required #endif string Bucket { get; set; } - - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? ChunkSize { get; set; } - - /// - /// - /// The name of the client to use to connect to Google Cloud Storage. - /// - /// public string? Client { get; set; } - - /// - /// - /// When set to true, metadata files are stored in compressed format. - /// This setting doesn't affect index files that are already compressed by default. - /// - /// public bool? Compress { get; set; } - - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? MaxRestoreBytesPerSec { get; set; } - - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? MaxSnapshotBytesPerSec { get; set; } - - /// - /// - /// If true, the repository is read-only. - /// The cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it. - /// - /// - /// Only a cluster with write access can create snapshots in the repository. - /// All other clusters connected to the repository should have the readonly parameter set to true. - /// - /// - /// If false, the cluster can write to the repository and create snapshots in it. - /// - /// - /// IMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository. - /// Having multiple clusters write to the repository at the same time risks corrupting the contents of the repository. - /// - /// public bool? Readonly { get; set; } } @@ -279,167 +193,72 @@ public GcsRepositorySettingsDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor(Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettings instance) => new Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettings(Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor descriptor) => descriptor.Instance; - [System.Obsolete("Deprecated in '6.3.0'.")] - /// - /// - /// The name used by the client when it uses the Google Cloud Storage service. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor ApplicationName(string? value) { Instance.ApplicationName = value; return this; } - /// - /// - /// The path to the repository data within the bucket. - /// It defaults to the root of the bucket. - /// - /// - /// NOTE: Don't set base_path when configuring a snapshot repository for Elastic Cloud Enterprise. - /// Elastic Cloud Enterprise automatically generates the base_path for each deployment so that multiple deployments can share the same bucket. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor BasePath(string? value) { Instance.BasePath = value; return this; } - /// - /// - /// The name of the bucket to be used for snapshots. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor Bucket(string value) { Instance.Bucket = value; return this; } - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor ChunkSize(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.ChunkSize = value; return this; } - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor ChunkSize(System.Func action) { Instance.ChunkSize = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// The name of the client to use to connect to Google Cloud Storage. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor Client(string? value) { Instance.Client = value; return this; } - /// - /// - /// When set to true, metadata files are stored in compressed format. - /// This setting doesn't affect index files that are already compressed by default. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor Compress(bool? value = true) { Instance.Compress = value; return this; } - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor MaxRestoreBytesPerSec(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.MaxRestoreBytesPerSec = value; return this; } - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor MaxRestoreBytesPerSec(System.Func action) { Instance.MaxRestoreBytesPerSec = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor MaxSnapshotBytesPerSec(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.MaxSnapshotBytesPerSec = value; return this; } - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor MaxSnapshotBytesPerSec(System.Func action) { Instance.MaxSnapshotBytesPerSec = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// If true, the repository is read-only. - /// The cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it. - /// - /// - /// Only a cluster with write access can create snapshots in the repository. - /// All other clusters connected to the repository should have the readonly parameter set to true. - /// - /// - /// If false, the cluster can write to the repository and create snapshots in it. - /// - /// - /// IMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository. - /// Having multiple clusters write to the repository at the same time risks corrupting the contents of the repository. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettingsDescriptor Readonly(bool? value = true) { Instance.Readonly = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadOnlyUrlRepository.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadOnlyUrlRepository.g.cs index e8f41f8f1f3..ded9ab4bbaf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadOnlyUrlRepository.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadOnlyUrlRepository.g.cs @@ -104,22 +104,12 @@ internal ReadOnlyUrlRepository(Elastic.Clients.Elasticsearch.Serialization.JsonC _ = sentinel; } - /// - /// - /// The repository settings. - /// - /// public #if NET7_0_OR_GREATER required #endif Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettings Settings { get; set; } - /// - /// - /// The read-only URL repository type. - /// - /// public string Type => "url"; public string? Uuid { get; set; } @@ -144,22 +134,12 @@ public ReadOnlyUrlRepositoryDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositoryDescriptor(Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepository instance) => new Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositoryDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepository(Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositoryDescriptor descriptor) => descriptor.Instance; - /// - /// - /// The repository settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettings value) { Instance.Settings = value; return this; } - /// - /// - /// The repository settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositoryDescriptor Settings(System.Action action) { Instance.Settings = Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor.Build(action); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadOnlyUrlRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadOnlyUrlRepositorySettings.g.cs index 49768335a28..803585f7d0a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadOnlyUrlRepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadOnlyUrlRepositorySettings.g.cs @@ -150,107 +150,13 @@ internal ReadOnlyUrlRepositorySettings(Elastic.Clients.Elasticsearch.Serializati _ = sentinel; } - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? ChunkSize { get; set; } - - /// - /// - /// When set to true, metadata files are stored in compressed format. - /// This setting doesn't affect index files that are already compressed by default. - /// - /// public bool? Compress { get; set; } - - /// - /// - /// The maximum number of retries for HTTP and HTTPS URLs. - /// - /// public int? HttpMaxRetries { get; set; } - - /// - /// - /// The maximum wait time for data transfers over a connection. - /// - /// public Elastic.Clients.Elasticsearch.Duration? HttpSocketTimeout { get; set; } - - /// - /// - /// The maximum number of snapshots the repository can contain. - /// The default is Integer.MAX_VALUE, which is 2^31-1 or 2147483647. - /// - /// public int? MaxNumberOfSnapshots { get; set; } - - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? MaxRestoreBytesPerSec { get; set; } - - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? MaxSnapshotBytesPerSec { get; set; } - - /// - /// - /// The URL location of the root of the shared filesystem repository. - /// The following protocols are supported: - /// - /// - /// - /// - /// file - /// - /// - /// - /// - /// ftp - /// - /// - /// - /// - /// http - /// - /// - /// - /// - /// https - /// - /// - /// - /// - /// jar - /// - /// - /// - /// - /// URLs using the HTTP, HTTPS, or FTP protocols must be explicitly allowed with the repositories.url.allowed_urls cluster setting. - /// This setting supports wildcards in the place of a host, path, query, or fragment in the URL. - /// - /// - /// URLs using the file protocol must point to the location of a shared filesystem accessible to all master and data nodes in the cluster. - /// This location must be registered in the path.repo setting. - /// You don't need to register URLs using the FTP, HTTP, HTTPS, or JAR protocols in the path.repo setting. - /// - /// public #if NET7_0_OR_GREATER required @@ -277,176 +183,66 @@ public ReadOnlyUrlRepositorySettingsDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor(Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettings instance) => new Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettings(Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor descriptor) => descriptor.Instance; - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor ChunkSize(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.ChunkSize = value; return this; } - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor ChunkSize(System.Func action) { Instance.ChunkSize = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// When set to true, metadata files are stored in compressed format. - /// This setting doesn't affect index files that are already compressed by default. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor Compress(bool? value = true) { Instance.Compress = value; return this; } - /// - /// - /// The maximum number of retries for HTTP and HTTPS URLs. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor HttpMaxRetries(int? value) { Instance.HttpMaxRetries = value; return this; } - /// - /// - /// The maximum wait time for data transfers over a connection. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor HttpSocketTimeout(Elastic.Clients.Elasticsearch.Duration? value) { Instance.HttpSocketTimeout = value; return this; } - /// - /// - /// The maximum number of snapshots the repository can contain. - /// The default is Integer.MAX_VALUE, which is 2^31-1 or 2147483647. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor MaxNumberOfSnapshots(int? value) { Instance.MaxNumberOfSnapshots = value; return this; } - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor MaxRestoreBytesPerSec(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.MaxRestoreBytesPerSec = value; return this; } - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor MaxRestoreBytesPerSec(System.Func action) { Instance.MaxRestoreBytesPerSec = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor MaxSnapshotBytesPerSec(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.MaxSnapshotBytesPerSec = value; return this; } - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor MaxSnapshotBytesPerSec(System.Func action) { Instance.MaxSnapshotBytesPerSec = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// The URL location of the root of the shared filesystem repository. - /// The following protocols are supported: - /// - /// - /// - /// - /// file - /// - /// - /// - /// - /// ftp - /// - /// - /// - /// - /// http - /// - /// - /// - /// - /// https - /// - /// - /// - /// - /// jar - /// - /// - /// - /// - /// URLs using the HTTP, HTTPS, or FTP protocols must be explicitly allowed with the repositories.url.allowed_urls cluster setting. - /// This setting supports wildcards in the place of a host, path, query, or fragment in the URL. - /// - /// - /// URLs using the file protocol must point to the location of a shared filesystem accessible to all master and data nodes in the cluster. - /// This location must be registered in the path.repo setting. - /// You don't need to register URLs using the FTP, HTTP, HTTPS, or JAR protocols in the path.repo setting. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySettingsDescriptor Url(string value) { Instance.Url = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/Repository.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/Repository.g.cs index 7aa9a5f6df3..ac13ffd3cf4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/Repository.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/Repository.g.cs @@ -96,12 +96,7 @@ public Elastic.Clients.Elasticsearch.Snapshot.IRepository Azure(Elastic.Clients. return value; } - public Elastic.Clients.Elasticsearch.Snapshot.IRepository Azure() - { - return Elastic.Clients.Elasticsearch.Snapshot.AzureRepositoryDescriptor.Build(null); - } - - public Elastic.Clients.Elasticsearch.Snapshot.IRepository Azure(System.Action? action) + public Elastic.Clients.Elasticsearch.Snapshot.IRepository Azure(System.Action action) { return Elastic.Clients.Elasticsearch.Snapshot.AzureRepositoryDescriptor.Build(action); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/S3Repository.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/S3Repository.g.cs index 971a5957cc6..2e6b17b298e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/S3Repository.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/S3Repository.g.cs @@ -104,27 +104,12 @@ internal S3Repository(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo _ = sentinel; } - /// - /// - /// The repository settings. - /// - /// - /// NOTE: In addition to the specified settings, you can also use all non-secure client settings in the repository settings. - /// In this case, the client settings found in the repository settings will be merged with those of the named client used by the repository. - /// Conflicts between client and repository settings are resolved by the repository settings taking precedence over client settings. - /// - /// public #if NET7_0_OR_GREATER required #endif Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings Settings { get; set; } - /// - /// - /// The S3 repository type. - /// - /// public string Type => "s3"; public string? Uuid { get; set; } @@ -149,32 +134,12 @@ public S3RepositoryDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Snapshot.S3RepositoryDescriptor(Elastic.Clients.Elasticsearch.Snapshot.S3Repository instance) => new Elastic.Clients.Elasticsearch.Snapshot.S3RepositoryDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Snapshot.S3Repository(Elastic.Clients.Elasticsearch.Snapshot.S3RepositoryDescriptor descriptor) => descriptor.Instance; - /// - /// - /// The repository settings. - /// - /// - /// NOTE: In addition to the specified settings, you can also use all non-secure client settings in the repository settings. - /// In this case, the client settings found in the repository settings will be merged with those of the named client used by the repository. - /// Conflicts between client and repository settings are resolved by the repository settings taking precedence over client settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings value) { Instance.Settings = value; return this; } - /// - /// - /// The repository settings. - /// - /// - /// NOTE: In addition to the specified settings, you can also use all non-secure client settings in the repository settings. - /// In this case, the client settings found in the repository settings will be merged with those of the named client used by the repository. - /// Conflicts between client and repository settings are resolved by the repository settings taking precedence over client settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositoryDescriptor Settings(System.Action action) { Instance.Settings = Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor.Build(action); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/S3RepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/S3RepositorySettings.g.cs index 156f20f0959..e524b08f955 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/S3RepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/S3RepositorySettings.g.cs @@ -32,18 +32,11 @@ internal sealed partial class S3RepositorySettingsConverter : System.Text.Json.S private static readonly System.Text.Json.JsonEncodedText PropChunkSize = System.Text.Json.JsonEncodedText.Encode("chunk_size"); private static readonly System.Text.Json.JsonEncodedText PropClient = System.Text.Json.JsonEncodedText.Encode("client"); private static readonly System.Text.Json.JsonEncodedText PropCompress = System.Text.Json.JsonEncodedText.Encode("compress"); - private static readonly System.Text.Json.JsonEncodedText PropDeleteObjectsMaxSize = System.Text.Json.JsonEncodedText.Encode("delete_objects_max_size"); - private static readonly System.Text.Json.JsonEncodedText PropGetRegisterRetryDelay = System.Text.Json.JsonEncodedText.Encode("get_register_retry_delay"); - private static readonly System.Text.Json.JsonEncodedText PropMaxMultipartParts = System.Text.Json.JsonEncodedText.Encode("max_multipart_parts"); - private static readonly System.Text.Json.JsonEncodedText PropMaxMultipartUploadCleanupSize = System.Text.Json.JsonEncodedText.Encode("max_multipart_upload_cleanup_size"); private static readonly System.Text.Json.JsonEncodedText PropMaxRestoreBytesPerSec = System.Text.Json.JsonEncodedText.Encode("max_restore_bytes_per_sec"); private static readonly System.Text.Json.JsonEncodedText PropMaxSnapshotBytesPerSec = System.Text.Json.JsonEncodedText.Encode("max_snapshot_bytes_per_sec"); private static readonly System.Text.Json.JsonEncodedText PropReadonly = System.Text.Json.JsonEncodedText.Encode("readonly"); private static readonly System.Text.Json.JsonEncodedText PropServerSideEncryption = System.Text.Json.JsonEncodedText.Encode("server_side_encryption"); private static readonly System.Text.Json.JsonEncodedText PropStorageClass = System.Text.Json.JsonEncodedText.Encode("storage_class"); - private static readonly System.Text.Json.JsonEncodedText PropThrottledDeleteRetryDelayIncrement = System.Text.Json.JsonEncodedText.Encode("throttled_delete_retry.delay_increment"); - private static readonly System.Text.Json.JsonEncodedText PropThrottledDeleteRetryMaximumDelay = System.Text.Json.JsonEncodedText.Encode("throttled_delete_retry.maximum_delay"); - private static readonly System.Text.Json.JsonEncodedText PropThrottledDeleteRetryMaximumNumberOfRetries = System.Text.Json.JsonEncodedText.Encode("throttled_delete_retry.maximum_number_of_retries"); public override Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { @@ -55,18 +48,11 @@ public override Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings Read LocalJsonValue propChunkSize = default; LocalJsonValue propClient = default; LocalJsonValue propCompress = default; - LocalJsonValue propDeleteObjectsMaxSize = default; - LocalJsonValue propGetRegisterRetryDelay = default; - LocalJsonValue propMaxMultipartParts = default; - LocalJsonValue propMaxMultipartUploadCleanupSize = default; LocalJsonValue propMaxRestoreBytesPerSec = default; LocalJsonValue propMaxSnapshotBytesPerSec = default; LocalJsonValue propReadonly = default; LocalJsonValue propServerSideEncryption = default; LocalJsonValue propStorageClass = default; - LocalJsonValue propThrottledDeleteRetryDelayIncrement = default; - LocalJsonValue propThrottledDeleteRetryMaximumDelay = default; - LocalJsonValue propThrottledDeleteRetryMaximumNumberOfRetries = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propBasePath.TryReadProperty(ref reader, options, PropBasePath, null)) @@ -104,26 +90,6 @@ public override Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings Read continue; } - if (propDeleteObjectsMaxSize.TryReadProperty(ref reader, options, PropDeleteObjectsMaxSize, null)) - { - continue; - } - - if (propGetRegisterRetryDelay.TryReadProperty(ref reader, options, PropGetRegisterRetryDelay, null)) - { - continue; - } - - if (propMaxMultipartParts.TryReadProperty(ref reader, options, PropMaxMultipartParts, null)) - { - continue; - } - - if (propMaxMultipartUploadCleanupSize.TryReadProperty(ref reader, options, PropMaxMultipartUploadCleanupSize, null)) - { - continue; - } - if (propMaxRestoreBytesPerSec.TryReadProperty(ref reader, options, PropMaxRestoreBytesPerSec, null)) { continue; @@ -149,21 +115,6 @@ public override Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings Read continue; } - if (propThrottledDeleteRetryDelayIncrement.TryReadProperty(ref reader, options, PropThrottledDeleteRetryDelayIncrement, null)) - { - continue; - } - - if (propThrottledDeleteRetryMaximumDelay.TryReadProperty(ref reader, options, PropThrottledDeleteRetryMaximumDelay, null)) - { - continue; - } - - if (propThrottledDeleteRetryMaximumNumberOfRetries.TryReadProperty(ref reader, options, PropThrottledDeleteRetryMaximumNumberOfRetries, null)) - { - continue; - } - if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) { reader.Skip(); @@ -183,18 +134,11 @@ public override Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings Read ChunkSize = propChunkSize.Value, Client = propClient.Value, Compress = propCompress.Value, - DeleteObjectsMaxSize = propDeleteObjectsMaxSize.Value, - GetRegisterRetryDelay = propGetRegisterRetryDelay.Value, - MaxMultipartParts = propMaxMultipartParts.Value, - MaxMultipartUploadCleanupSize = propMaxMultipartUploadCleanupSize.Value, MaxRestoreBytesPerSec = propMaxRestoreBytesPerSec.Value, MaxSnapshotBytesPerSec = propMaxSnapshotBytesPerSec.Value, Readonly = propReadonly.Value, ServerSideEncryption = propServerSideEncryption.Value, - StorageClass = propStorageClass.Value, - ThrottledDeleteRetryDelayIncrement = propThrottledDeleteRetryDelayIncrement.Value, - ThrottledDeleteRetryMaximumDelay = propThrottledDeleteRetryMaximumDelay.Value, - ThrottledDeleteRetryMaximumNumberOfRetries = propThrottledDeleteRetryMaximumNumberOfRetries.Value + StorageClass = propStorageClass.Value }; } @@ -208,18 +152,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropChunkSize, value.ChunkSize, null, null); writer.WriteProperty(options, PropClient, value.Client, null, null); writer.WriteProperty(options, PropCompress, value.Compress, null, null); - writer.WriteProperty(options, PropDeleteObjectsMaxSize, value.DeleteObjectsMaxSize, null, null); - writer.WriteProperty(options, PropGetRegisterRetryDelay, value.GetRegisterRetryDelay, null, null); - writer.WriteProperty(options, PropMaxMultipartParts, value.MaxMultipartParts, null, null); - writer.WriteProperty(options, PropMaxMultipartUploadCleanupSize, value.MaxMultipartUploadCleanupSize, null, null); writer.WriteProperty(options, PropMaxRestoreBytesPerSec, value.MaxRestoreBytesPerSec, null, null); writer.WriteProperty(options, PropMaxSnapshotBytesPerSec, value.MaxSnapshotBytesPerSec, null, null); writer.WriteProperty(options, PropReadonly, value.Readonly, null, null); writer.WriteProperty(options, PropServerSideEncryption, value.ServerSideEncryption, null, null); writer.WriteProperty(options, PropStorageClass, value.StorageClass, null, null); - writer.WriteProperty(options, PropThrottledDeleteRetryDelayIncrement, value.ThrottledDeleteRetryDelayIncrement, null, null); - writer.WriteProperty(options, PropThrottledDeleteRetryMaximumDelay, value.ThrottledDeleteRetryMaximumDelay, null, null); - writer.WriteProperty(options, PropThrottledDeleteRetryMaximumNumberOfRetries, value.ThrottledDeleteRetryMaximumNumberOfRetries, null, null); writer.WriteEndObject(); } } @@ -249,187 +186,22 @@ internal S3RepositorySettings(Elastic.Clients.Elasticsearch.Serialization.JsonCo _ = sentinel; } - /// - /// - /// The path to the repository data within its bucket. - /// It defaults to an empty string, meaning that the repository is at the root of the bucket. - /// The value of this setting should not start or end with a forward slash (/). - /// - /// - /// NOTE: Don't set base_path when configuring a snapshot repository for Elastic Cloud Enterprise. - /// Elastic Cloud Enterprise automatically generates the base_path for each deployment so that multiple deployments may share the same bucket. - /// - /// public string? BasePath { get; set; } - - /// - /// - /// The name of the S3 bucket to use for snapshots. - /// The bucket name must adhere to Amazon's S3 bucket naming rules. - /// - /// public #if NET7_0_OR_GREATER required #endif string Bucket { get; set; } - - /// - /// - /// The minimum threshold below which the chunk is uploaded using a single request. - /// Beyond this threshold, the S3 repository will use the AWS Multipart Upload API to split the chunk into several parts, each of buffer_size length, and to upload each part in its own request. - /// Note that setting a buffer size lower than 5mb is not allowed since it will prevent the use of the Multipart API and may result in upload errors. - /// It is also not possible to set a buffer size greater than 5gb as it is the maximum upload size allowed by S3. - /// Defaults to 100mb or 5% of JVM heap, whichever is smaller. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? BufferSize { get; set; } - - /// - /// - /// The S3 repository supports all S3 canned ACLs: private, public-read, public-read-write, authenticated-read, log-delivery-write, bucket-owner-read, bucket-owner-full-control. - /// You could specify a canned ACL using the canned_acl setting. - /// When the S3 repository creates buckets and objects, it adds the canned ACL into the buckets and objects. - /// - /// public string? CannedAcl { get; set; } - - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? ChunkSize { get; set; } - - /// - /// - /// The name of the S3 client to use to connect to S3. - /// - /// public string? Client { get; set; } - - /// - /// - /// When set to true, metadata files are stored in compressed format. - /// This setting doesn't affect index files that are already compressed by default. - /// - /// public bool? Compress { get; set; } - - /// - /// - /// The maxmimum batch size, between 1 and 1000, used for DeleteObjects requests. - /// Defaults to 1000 which is the maximum number supported by the AWS DeleteObjects API. - /// - /// - public int? DeleteObjectsMaxSize { get; set; } - - /// - /// - /// The time to wait before trying again if an attempt to read a linearizable register fails. - /// - /// - public Elastic.Clients.Elasticsearch.Duration? GetRegisterRetryDelay { get; set; } - - /// - /// - /// The maximum number of parts that Elasticsearch will write during a multipart upload of a single object. - /// Files which are larger than buffer_size × max_multipart_parts will be chunked into several smaller objects. - /// Elasticsearch may also split a file across multiple objects to satisfy other constraints such as the chunk_size limit. - /// Defaults to 10000 which is the maximum number of parts in a multipart upload in AWS S3. - /// - /// - public int? MaxMultipartParts { get; set; } - - /// - /// - /// The maximum number of possibly-dangling multipart uploads to clean up in each batch of snapshot deletions. - /// Defaults to 1000 which is the maximum number supported by the AWS ListMultipartUploads API. - /// If set to 0, Elasticsearch will not attempt to clean up dangling multipart uploads. - /// - /// - public int? MaxMultipartUploadCleanupSize { get; set; } - - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? MaxRestoreBytesPerSec { get; set; } - - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? MaxSnapshotBytesPerSec { get; set; } - - /// - /// - /// If true, the repository is read-only. - /// The cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it. - /// - /// - /// Only a cluster with write access can create snapshots in the repository. - /// All other clusters connected to the repository should have the readonly parameter set to true. - /// - /// - /// If false, the cluster can write to the repository and create snapshots in it. - /// - /// - /// IMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository. - /// Having multiple clusters write to the repository at the same time risks corrupting the contents of the repository. - /// - /// public bool? Readonly { get; set; } - - /// - /// - /// When set to true, files are encrypted on server side using an AES256 algorithm. - /// - /// public bool? ServerSideEncryption { get; set; } - - /// - /// - /// The S3 storage class for objects written to the repository. - /// Values may be standard, reduced_redundancy, standard_ia, onezone_ia, and intelligent_tiering. - /// - /// public string? StorageClass { get; set; } - - /// - /// - /// The delay before the first retry and the amount the delay is incremented by on each subsequent retry. - /// The default is 50ms and the minimum is 0ms. - /// - /// - public Elastic.Clients.Elasticsearch.Duration? ThrottledDeleteRetryDelayIncrement { get; set; } - - /// - /// - /// The upper bound on how long the delays between retries will grow to. - /// The default is 5s and the minimum is 0ms. - /// - /// - public Elastic.Clients.Elasticsearch.Duration? ThrottledDeleteRetryMaximumDelay { get; set; } - - /// - /// - /// The number times to retry a throttled snapshot deletion. - /// The default is 10 and the minimum value is 0 which will disable retries altogether. - /// Note that if retries are enabled in the Azure client, each of these retries comprises that many client-level retries. - /// - /// - public int? ThrottledDeleteRetryMaximumNumberOfRetries { get; set; } } public readonly partial struct S3RepositorySettingsDescriptor @@ -451,316 +223,102 @@ public S3RepositorySettingsDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor(Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings instance) => new Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings(Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor descriptor) => descriptor.Instance; - /// - /// - /// The path to the repository data within its bucket. - /// It defaults to an empty string, meaning that the repository is at the root of the bucket. - /// The value of this setting should not start or end with a forward slash (/). - /// - /// - /// NOTE: Don't set base_path when configuring a snapshot repository for Elastic Cloud Enterprise. - /// Elastic Cloud Enterprise automatically generates the base_path for each deployment so that multiple deployments may share the same bucket. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor BasePath(string? value) { Instance.BasePath = value; return this; } - /// - /// - /// The name of the S3 bucket to use for snapshots. - /// The bucket name must adhere to Amazon's S3 bucket naming rules. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor Bucket(string value) { Instance.Bucket = value; return this; } - /// - /// - /// The minimum threshold below which the chunk is uploaded using a single request. - /// Beyond this threshold, the S3 repository will use the AWS Multipart Upload API to split the chunk into several parts, each of buffer_size length, and to upload each part in its own request. - /// Note that setting a buffer size lower than 5mb is not allowed since it will prevent the use of the Multipart API and may result in upload errors. - /// It is also not possible to set a buffer size greater than 5gb as it is the maximum upload size allowed by S3. - /// Defaults to 100mb or 5% of JVM heap, whichever is smaller. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor BufferSize(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.BufferSize = value; return this; } - /// - /// - /// The minimum threshold below which the chunk is uploaded using a single request. - /// Beyond this threshold, the S3 repository will use the AWS Multipart Upload API to split the chunk into several parts, each of buffer_size length, and to upload each part in its own request. - /// Note that setting a buffer size lower than 5mb is not allowed since it will prevent the use of the Multipart API and may result in upload errors. - /// It is also not possible to set a buffer size greater than 5gb as it is the maximum upload size allowed by S3. - /// Defaults to 100mb or 5% of JVM heap, whichever is smaller. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor BufferSize(System.Func action) { Instance.BufferSize = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// The S3 repository supports all S3 canned ACLs: private, public-read, public-read-write, authenticated-read, log-delivery-write, bucket-owner-read, bucket-owner-full-control. - /// You could specify a canned ACL using the canned_acl setting. - /// When the S3 repository creates buckets and objects, it adds the canned ACL into the buckets and objects. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor CannedAcl(string? value) { Instance.CannedAcl = value; return this; } - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor ChunkSize(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.ChunkSize = value; return this; } - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor ChunkSize(System.Func action) { Instance.ChunkSize = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// The name of the S3 client to use to connect to S3. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor Client(string? value) { Instance.Client = value; return this; } - /// - /// - /// When set to true, metadata files are stored in compressed format. - /// This setting doesn't affect index files that are already compressed by default. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor Compress(bool? value = true) { Instance.Compress = value; return this; } - /// - /// - /// The maxmimum batch size, between 1 and 1000, used for DeleteObjects requests. - /// Defaults to 1000 which is the maximum number supported by the AWS DeleteObjects API. - /// - /// - public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor DeleteObjectsMaxSize(int? value) - { - Instance.DeleteObjectsMaxSize = value; - return this; - } - - /// - /// - /// The time to wait before trying again if an attempt to read a linearizable register fails. - /// - /// - public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor GetRegisterRetryDelay(Elastic.Clients.Elasticsearch.Duration? value) - { - Instance.GetRegisterRetryDelay = value; - return this; - } - - /// - /// - /// The maximum number of parts that Elasticsearch will write during a multipart upload of a single object. - /// Files which are larger than buffer_size × max_multipart_parts will be chunked into several smaller objects. - /// Elasticsearch may also split a file across multiple objects to satisfy other constraints such as the chunk_size limit. - /// Defaults to 10000 which is the maximum number of parts in a multipart upload in AWS S3. - /// - /// - public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor MaxMultipartParts(int? value) - { - Instance.MaxMultipartParts = value; - return this; - } - - /// - /// - /// The maximum number of possibly-dangling multipart uploads to clean up in each batch of snapshot deletions. - /// Defaults to 1000 which is the maximum number supported by the AWS ListMultipartUploads API. - /// If set to 0, Elasticsearch will not attempt to clean up dangling multipart uploads. - /// - /// - public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor MaxMultipartUploadCleanupSize(int? value) - { - Instance.MaxMultipartUploadCleanupSize = value; - return this; - } - - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor MaxRestoreBytesPerSec(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.MaxRestoreBytesPerSec = value; return this; } - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor MaxRestoreBytesPerSec(System.Func action) { Instance.MaxRestoreBytesPerSec = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor MaxSnapshotBytesPerSec(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.MaxSnapshotBytesPerSec = value; return this; } - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor MaxSnapshotBytesPerSec(System.Func action) { Instance.MaxSnapshotBytesPerSec = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// If true, the repository is read-only. - /// The cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it. - /// - /// - /// Only a cluster with write access can create snapshots in the repository. - /// All other clusters connected to the repository should have the readonly parameter set to true. - /// - /// - /// If false, the cluster can write to the repository and create snapshots in it. - /// - /// - /// IMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository. - /// Having multiple clusters write to the repository at the same time risks corrupting the contents of the repository. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor Readonly(bool? value = true) { Instance.Readonly = value; return this; } - /// - /// - /// When set to true, files are encrypted on server side using an AES256 algorithm. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor ServerSideEncryption(bool? value = true) { Instance.ServerSideEncryption = value; return this; } - /// - /// - /// The S3 storage class for objects written to the repository. - /// Values may be standard, reduced_redundancy, standard_ia, onezone_ia, and intelligent_tiering. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor StorageClass(string? value) { Instance.StorageClass = value; return this; } - /// - /// - /// The delay before the first retry and the amount the delay is incremented by on each subsequent retry. - /// The default is 50ms and the minimum is 0ms. - /// - /// - public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor ThrottledDeleteRetryDelayIncrement(Elastic.Clients.Elasticsearch.Duration? value) - { - Instance.ThrottledDeleteRetryDelayIncrement = value; - return this; - } - - /// - /// - /// The upper bound on how long the delays between retries will grow to. - /// The default is 5s and the minimum is 0ms. - /// - /// - public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor ThrottledDeleteRetryMaximumDelay(Elastic.Clients.Elasticsearch.Duration? value) - { - Instance.ThrottledDeleteRetryMaximumDelay = value; - return this; - } - - /// - /// - /// The number times to retry a throttled snapshot deletion. - /// The default is 10 and the minimum value is 0 which will disable retries altogether. - /// Note that if retries are enabled in the Azure client, each of these retries comprises that many client-level retries. - /// - /// - public Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettingsDescriptor ThrottledDeleteRetryMaximumNumberOfRetries(int? value) - { - Instance.ThrottledDeleteRetryMaximumNumberOfRetries = value; - return this; - } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings Build(System.Action action) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ShardsStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ShardsStats.g.cs index 3f7d6582972..a272b0660d8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ShardsStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ShardsStats.g.cs @@ -137,66 +137,31 @@ internal ShardsStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructor _ = sentinel; } - /// - /// - /// The number of shards that initialized, started, and finalized successfully. - /// - /// public #if NET7_0_OR_GREATER required #endif long Done { get; set; } - - /// - /// - /// The number of shards that failed to be included in the snapshot. - /// - /// public #if NET7_0_OR_GREATER required #endif long Failed { get; set; } - - /// - /// - /// The number of shards that are finalizing but are not done. - /// - /// public #if NET7_0_OR_GREATER required #endif long Finalizing { get; set; } - - /// - /// - /// The number of shards that are still initializing. - /// - /// public #if NET7_0_OR_GREATER required #endif long Initializing { get; set; } - - /// - /// - /// The number of shards that have started but are not finalized. - /// - /// public #if NET7_0_OR_GREATER required #endif long Started { get; set; } - - /// - /// - /// The total number of shards included in the snapshot. - /// - /// public #if NET7_0_OR_GREATER required diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SharedFileSystemRepository.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SharedFileSystemRepository.g.cs index 05ae927b64b..6bbbc03fedd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SharedFileSystemRepository.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SharedFileSystemRepository.g.cs @@ -104,22 +104,12 @@ internal SharedFileSystemRepository(Elastic.Clients.Elasticsearch.Serialization. _ = sentinel; } - /// - /// - /// The repository settings. - /// - /// public #if NET7_0_OR_GREATER required #endif Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettings Settings { get; set; } - /// - /// - /// The shared file system repository type. - /// - /// public string Type => "fs"; public string? Uuid { get; set; } @@ -144,22 +134,12 @@ public SharedFileSystemRepositoryDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositoryDescriptor(Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepository instance) => new Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositoryDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepository(Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositoryDescriptor descriptor) => descriptor.Instance; - /// - /// - /// The repository settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettings value) { Instance.Settings = value; return this; } - /// - /// - /// The repository settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositoryDescriptor Settings(System.Action action) { Instance.Settings = Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettingsDescriptor.Build(action); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SharedFileSystemRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SharedFileSystemRepositorySettings.g.cs index 04bf0fa089f..11f8bea286d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SharedFileSystemRepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SharedFileSystemRepositorySettings.g.cs @@ -141,81 +141,16 @@ internal SharedFileSystemRepositorySettings(Elastic.Clients.Elasticsearch.Serial _ = sentinel; } - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? ChunkSize { get; set; } - - /// - /// - /// When set to true, metadata files are stored in compressed format. - /// This setting doesn't affect index files that are already compressed by default. - /// - /// public bool? Compress { get; set; } - - /// - /// - /// The location of the shared filesystem used to store and retrieve snapshots. - /// This location must be registered in the path.repo setting on all master and data nodes in the cluster. - /// Unlike path.repo, this setting supports only a single file path. - /// - /// public #if NET7_0_OR_GREATER required #endif string Location { get; set; } - - /// - /// - /// The maximum number of snapshots the repository can contain. - /// The default is Integer.MAX_VALUE, which is 2^31-1 or 2147483647. - /// - /// public int? MaxNumberOfSnapshots { get; set; } - - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? MaxRestoreBytesPerSec { get; set; } - - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? MaxSnapshotBytesPerSec { get; set; } - - /// - /// - /// If true, the repository is read-only. - /// The cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it. - /// - /// - /// Only a cluster with write access can create snapshots in the repository. - /// All other clusters connected to the repository should have the readonly parameter set to true. - /// - /// - /// If false, the cluster can write to the repository and create snapshots in it. - /// - /// - /// IMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository. - /// Having multiple clusters write to the repository at the same time risks corrupting the contents of the repository. - /// - /// public bool? Readonly { get; set; } } @@ -238,142 +173,60 @@ public SharedFileSystemRepositorySettingsDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettingsDescriptor(Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettings instance) => new Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettingsDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettings(Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettingsDescriptor descriptor) => descriptor.Instance; - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettingsDescriptor ChunkSize(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.ChunkSize = value; return this; } - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettingsDescriptor ChunkSize(System.Func action) { Instance.ChunkSize = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// When set to true, metadata files are stored in compressed format. - /// This setting doesn't affect index files that are already compressed by default. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettingsDescriptor Compress(bool? value = true) { Instance.Compress = value; return this; } - /// - /// - /// The location of the shared filesystem used to store and retrieve snapshots. - /// This location must be registered in the path.repo setting on all master and data nodes in the cluster. - /// Unlike path.repo, this setting supports only a single file path. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettingsDescriptor Location(string value) { Instance.Location = value; return this; } - /// - /// - /// The maximum number of snapshots the repository can contain. - /// The default is Integer.MAX_VALUE, which is 2^31-1 or 2147483647. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettingsDescriptor MaxNumberOfSnapshots(int? value) { Instance.MaxNumberOfSnapshots = value; return this; } - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettingsDescriptor MaxRestoreBytesPerSec(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.MaxRestoreBytesPerSec = value; return this; } - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettingsDescriptor MaxRestoreBytesPerSec(System.Func action) { Instance.MaxRestoreBytesPerSec = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettingsDescriptor MaxSnapshotBytesPerSec(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.MaxSnapshotBytesPerSec = value; return this; } - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettingsDescriptor MaxSnapshotBytesPerSec(System.Func action) { Instance.MaxSnapshotBytesPerSec = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// If true, the repository is read-only. - /// The cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it. - /// - /// - /// Only a cluster with write access can create snapshots in the repository. - /// All other clusters connected to the repository should have the readonly parameter set to true. - /// - /// - /// If false, the cluster can write to the repository and create snapshots in it. - /// - /// - /// IMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository. - /// Having multiple clusters write to the repository at the same time risks corrupting the contents of the repository. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositorySettingsDescriptor Readonly(bool? value = true) { Instance.Readonly = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotStats.g.cs index 38c2ea0e401..d90c7e693ee 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotStats.g.cs @@ -126,46 +126,22 @@ internal SnapshotStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct _ = sentinel; } - /// - /// - /// The number and size of files that still need to be copied as part of the incremental snapshot. - /// For completed snapshots, this property indicates the number and size of files that were not already in the repository and were copied as part of the incremental snapshot. - /// - /// public #if NET7_0_OR_GREATER required #endif Elastic.Clients.Elasticsearch.Snapshot.FileCountSnapshotStats Incremental { get; set; } - - /// - /// - /// The time, in milliseconds, when the snapshot creation process started. - /// - /// public #if NET7_0_OR_GREATER required #endif System.DateTimeOffset StartTimeInMillis { get; set; } public Elastic.Clients.Elasticsearch.Duration? Time { get; set; } - - /// - /// - /// The total time, in milliseconds, that it took for the snapshot process to complete. - /// - /// public #if NET7_0_OR_GREATER required #endif System.TimeSpan TimeInMillis { get; set; } - - /// - /// - /// The total number and size of files that are referenced by the snapshot. - /// - /// public #if NET7_0_OR_GREATER required diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SourceOnlyRepository.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SourceOnlyRepository.g.cs index e658bdab278..90b06e16022 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SourceOnlyRepository.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SourceOnlyRepository.g.cs @@ -104,22 +104,12 @@ internal SourceOnlyRepository(Elastic.Clients.Elasticsearch.Serialization.JsonCo _ = sentinel; } - /// - /// - /// The repository settings. - /// - /// public #if NET7_0_OR_GREATER required #endif Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettings Settings { get; set; } - /// - /// - /// The source-only repository type. - /// - /// public string Type => "source"; public string? Uuid { get; set; } @@ -144,33 +134,18 @@ public SourceOnlyRepositoryDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositoryDescriptor(Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepository instance) => new Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositoryDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepository(Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositoryDescriptor descriptor) => descriptor.Instance; - /// - /// - /// The repository settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositoryDescriptor Settings(Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettings value) { Instance.Settings = value; return this; } - /// - /// - /// The repository settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositoryDescriptor Settings() { Instance.Settings = Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor.Build(null); return this; } - /// - /// - /// The repository settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositoryDescriptor Settings(System.Action? action) { Instance.Settings = Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor.Build(action); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SourceOnlyRepositorySettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SourceOnlyRepositorySettings.g.cs index b53950ba72b..40baa6befab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SourceOnlyRepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SourceOnlyRepositorySettings.g.cs @@ -136,76 +136,12 @@ internal SourceOnlyRepositorySettings(Elastic.Clients.Elasticsearch.Serializatio _ = sentinel; } - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? ChunkSize { get; set; } - - /// - /// - /// When set to true, metadata files are stored in compressed format. - /// This setting doesn't affect index files that are already compressed by default. - /// - /// public bool? Compress { get; set; } - - /// - /// - /// The delegated repository type. For valid values, refer to the type parameter. - /// Source repositories can use settings properties for its delegated repository type. - /// - /// public string? DelegateType { get; set; } - - /// - /// - /// The maximum number of snapshots the repository can contain. - /// The default is Integer.MAX_VALUE, which is 2^31-1 or 2147483647. - /// - /// public int? MaxNumberOfSnapshots { get; set; } - - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? MaxRestoreBytesPerSec { get; set; } - - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.ByteSize? MaxSnapshotBytesPerSec { get; set; } - - /// - /// - /// If true, the repository is read-only. - /// The cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it. - /// - /// - /// Only a cluster with write access can create snapshots in the repository. - /// All other clusters connected to the repository should have the readonly parameter set to true. - /// - /// - /// If false, the cluster can write to the repository and create snapshots in it. - /// - /// - /// IMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository. - /// Having multiple clusters write to the repository at the same time risks corrupting the contents of the repository. - /// - /// public bool? ReadOnly { get; set; } } @@ -228,141 +164,60 @@ public SourceOnlyRepositorySettingsDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor(Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettings instance) => new Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettings(Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor descriptor) => descriptor.Instance; - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor ChunkSize(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.ChunkSize = value; return this; } - /// - /// - /// Big files can be broken down into multiple smaller blobs in the blob store during snapshotting. - /// It is not recommended to change this value from its default unless there is an explicit reason for limiting the size of blobs in the repository. - /// Setting a value lower than the default can result in an increased number of API calls to the blob store during snapshot create and restore operations compared to using the default value and thus make both operations slower and more costly. - /// Specify the chunk size as a byte unit, for example: 10MB, 5KB, 500B. - /// The default varies by repository type. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor ChunkSize(System.Func action) { Instance.ChunkSize = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// When set to true, metadata files are stored in compressed format. - /// This setting doesn't affect index files that are already compressed by default. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor Compress(bool? value = true) { Instance.Compress = value; return this; } - /// - /// - /// The delegated repository type. For valid values, refer to the type parameter. - /// Source repositories can use settings properties for its delegated repository type. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor DelegateType(string? value) { Instance.DelegateType = value; return this; } - /// - /// - /// The maximum number of snapshots the repository can contain. - /// The default is Integer.MAX_VALUE, which is 2^31-1 or 2147483647. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor MaxNumberOfSnapshots(int? value) { Instance.MaxNumberOfSnapshots = value; return this; } - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor MaxRestoreBytesPerSec(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.MaxRestoreBytesPerSec = value; return this; } - /// - /// - /// The maximum snapshot restore rate per node. - /// It defaults to unlimited. - /// Note that restores are also throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor MaxRestoreBytesPerSec(System.Func action) { Instance.MaxRestoreBytesPerSec = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor MaxSnapshotBytesPerSec(Elastic.Clients.Elasticsearch.ByteSize? value) { Instance.MaxSnapshotBytesPerSec = value; return this; } - /// - /// - /// The maximum snapshot creation rate per node. - /// It defaults to 40mb per second. - /// Note that if the recovery settings for managed services are set, then it defaults to unlimited, and the rate is additionally throttled through recovery settings. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor MaxSnapshotBytesPerSec(System.Func action) { Instance.MaxSnapshotBytesPerSec = Elastic.Clients.Elasticsearch.ByteSizeFactory.Build(action); return this; } - /// - /// - /// If true, the repository is read-only. - /// The cluster can retrieve and restore snapshots from the repository but not write to the repository or create snapshots in it. - /// - /// - /// Only a cluster with write access can create snapshots in the repository. - /// All other clusters connected to the repository should have the readonly parameter set to true. - /// - /// - /// If false, the cluster can write to the repository and create snapshots in it. - /// - /// - /// IMPORTANT: If you register the same snapshot repository with multiple clusters, only one cluster should have write access to the repository. - /// Having multiple clusters write to the repository at the same time risks corrupting the contents of the repository. - /// - /// public Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySettingsDescriptor ReadOnly(bool? value = true) { Instance.ReadOnly = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/Status.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/Status.g.cs index 8ab6ad5b3ae..ceffefadde1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/Status.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/Status.g.cs @@ -157,11 +157,6 @@ internal Status(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSenti _ = sentinel; } - /// - /// - /// Indicates whether the current cluster state is included in the snapshot. - /// - /// public #if NET7_0_OR_GREATER required @@ -172,84 +167,31 @@ internal Status(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSenti required #endif System.Collections.Generic.IReadOnlyDictionary Indices { get; set; } - - /// - /// - /// The name of the repository that includes the snapshot. - /// - /// public #if NET7_0_OR_GREATER required #endif string Repository { get; set; } - - /// - /// - /// Statistics for the shards in the snapshot. - /// - /// public #if NET7_0_OR_GREATER required #endif Elastic.Clients.Elasticsearch.Snapshot.ShardsStats ShardsStats { get; set; } - - /// - /// - /// The name of the snapshot. - /// - /// public #if NET7_0_OR_GREATER required #endif string Snapshot { get; set; } - - /// - /// - /// The current snapshot state: - /// - /// - /// - /// - /// FAILED: The snapshot finished with an error and failed to store any data. - /// - /// - /// - /// - /// STARTED: The snapshot is currently running. - /// - /// - /// - /// - /// SUCCESS: The snapshot completed. - /// - /// - /// - /// public #if NET7_0_OR_GREATER required #endif string State { get; set; } - - /// - /// - /// Details about the number (file_count) and size (size_in_bytes) of files included in the snapshot. - /// - /// public #if NET7_0_OR_GREATER required #endif Elastic.Clients.Elasticsearch.Snapshot.SnapshotStats Stats { get; set; } - - /// - /// - /// The universally unique identifier (UUID) for the snapshot. - /// - /// public #if NET7_0_OR_GREATER required diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScript.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScript.g.cs index 757643f3610..b1fcee131f0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScript.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoredScript.g.cs @@ -109,7 +109,7 @@ internal StoredScript(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo /// /// /// The language the script is written in. - /// For search templates, use mustache. + /// For serach templates, use mustache. /// /// public @@ -154,7 +154,7 @@ public StoredScriptDescriptor() /// /// /// The language the script is written in. - /// For search templates, use mustache. + /// For serach templates, use mustache. /// /// public Elastic.Clients.Elasticsearch.StoredScriptDescriptor Language(Elastic.Clients.Elasticsearch.ScriptLanguage value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Synonyms/SynonymRuleRead.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Synonyms/SynonymRuleRead.g.cs index 3cab7540eba..4f722a08dca 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Synonyms/SynonymRuleRead.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Synonyms/SynonymRuleRead.g.cs @@ -110,7 +110,7 @@ internal SynonymRuleRead(Elastic.Clients.Elasticsearch.Serialization.JsonConstru /// /// - /// Synonyms, in Solr format, that conform the synonym rule. + /// Synonyms, in Solr format, that conform the synonym rule. See https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-graph-tokenfilter.html#_solr_synonyms_2 /// /// public diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Features.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Features.g.cs index 00d2b91c2f5..479937515d1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Features.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Features.g.cs @@ -35,6 +35,7 @@ internal sealed partial class FeaturesConverter : System.Text.Json.Serialization private static readonly System.Text.Json.JsonEncodedText PropEnterpriseSearch = System.Text.Json.JsonEncodedText.Encode("enterprise_search"); private static readonly System.Text.Json.JsonEncodedText PropEql = System.Text.Json.JsonEncodedText.Encode("eql"); private static readonly System.Text.Json.JsonEncodedText PropEsql = System.Text.Json.JsonEncodedText.Encode("esql"); + private static readonly System.Text.Json.JsonEncodedText PropFrozenIndices = System.Text.Json.JsonEncodedText.Encode("frozen_indices"); private static readonly System.Text.Json.JsonEncodedText PropGraph = System.Text.Json.JsonEncodedText.Encode("graph"); private static readonly System.Text.Json.JsonEncodedText PropIlm = System.Text.Json.JsonEncodedText.Encode("ilm"); private static readonly System.Text.Json.JsonEncodedText PropLogsdb = System.Text.Json.JsonEncodedText.Encode("logsdb"); @@ -66,6 +67,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.Features Read(ref System.Tex LocalJsonValue propEnterpriseSearch = default; LocalJsonValue propEql = default; LocalJsonValue propEsql = default; + LocalJsonValue propFrozenIndices = default; LocalJsonValue propGraph = default; LocalJsonValue propIlm = default; LocalJsonValue propLogsdb = default; @@ -135,6 +137,11 @@ public override Elastic.Clients.Elasticsearch.Xpack.Features Read(ref System.Tex continue; } + if (propFrozenIndices.TryReadProperty(ref reader, options, PropFrozenIndices, null)) + { + continue; + } + if (propGraph.TryReadProperty(ref reader, options, PropGraph, null)) { continue; @@ -242,6 +249,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.Features Read(ref System.Tex EnterpriseSearch = propEnterpriseSearch.Value, Eql = propEql.Value, Esql = propEsql.Value, + FrozenIndices = propFrozenIndices.Value, Graph = propGraph.Value, Ilm = propIlm.Value, Logsdb = propLogsdb.Value, @@ -275,6 +283,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropEnterpriseSearch, value.EnterpriseSearch, null, null); writer.WriteProperty(options, PropEql, value.Eql, null, null); writer.WriteProperty(options, PropEsql, value.Esql, null, null); + writer.WriteProperty(options, PropFrozenIndices, value.FrozenIndices, null, null); writer.WriteProperty(options, PropGraph, value.Graph, null, null); writer.WriteProperty(options, PropIlm, value.Ilm, null, null); writer.WriteProperty(options, PropLogsdb, value.Logsdb, null, null); @@ -300,7 +309,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class Features { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public Features(Elastic.Clients.Elasticsearch.Xpack.Feature aggregateMetric, Elastic.Clients.Elasticsearch.Xpack.Feature analytics, Elastic.Clients.Elasticsearch.Xpack.Feature archive, Elastic.Clients.Elasticsearch.Xpack.Feature ccr, Elastic.Clients.Elasticsearch.Xpack.Feature dataStreams, Elastic.Clients.Elasticsearch.Xpack.Feature dataTiers, Elastic.Clients.Elasticsearch.Xpack.Feature enrich, Elastic.Clients.Elasticsearch.Xpack.Feature enterpriseSearch, Elastic.Clients.Elasticsearch.Xpack.Feature eql, Elastic.Clients.Elasticsearch.Xpack.Feature esql, Elastic.Clients.Elasticsearch.Xpack.Feature graph, Elastic.Clients.Elasticsearch.Xpack.Feature ilm, Elastic.Clients.Elasticsearch.Xpack.Feature logsdb, Elastic.Clients.Elasticsearch.Xpack.Feature logstash, Elastic.Clients.Elasticsearch.Xpack.Feature ml, Elastic.Clients.Elasticsearch.Xpack.Feature monitoring, Elastic.Clients.Elasticsearch.Xpack.Feature rollup, Elastic.Clients.Elasticsearch.Xpack.Feature searchableSnapshots, Elastic.Clients.Elasticsearch.Xpack.Feature security, Elastic.Clients.Elasticsearch.Xpack.Feature slm, Elastic.Clients.Elasticsearch.Xpack.Feature spatial, Elastic.Clients.Elasticsearch.Xpack.Feature sql, Elastic.Clients.Elasticsearch.Xpack.Feature transform, Elastic.Clients.Elasticsearch.Xpack.Feature universalProfiling, Elastic.Clients.Elasticsearch.Xpack.Feature votingOnly, Elastic.Clients.Elasticsearch.Xpack.Feature watcher) + public Features(Elastic.Clients.Elasticsearch.Xpack.Feature aggregateMetric, Elastic.Clients.Elasticsearch.Xpack.Feature analytics, Elastic.Clients.Elasticsearch.Xpack.Feature archive, Elastic.Clients.Elasticsearch.Xpack.Feature ccr, Elastic.Clients.Elasticsearch.Xpack.Feature dataStreams, Elastic.Clients.Elasticsearch.Xpack.Feature dataTiers, Elastic.Clients.Elasticsearch.Xpack.Feature enrich, Elastic.Clients.Elasticsearch.Xpack.Feature enterpriseSearch, Elastic.Clients.Elasticsearch.Xpack.Feature eql, Elastic.Clients.Elasticsearch.Xpack.Feature esql, Elastic.Clients.Elasticsearch.Xpack.Feature frozenIndices, Elastic.Clients.Elasticsearch.Xpack.Feature graph, Elastic.Clients.Elasticsearch.Xpack.Feature ilm, Elastic.Clients.Elasticsearch.Xpack.Feature logsdb, Elastic.Clients.Elasticsearch.Xpack.Feature logstash, Elastic.Clients.Elasticsearch.Xpack.Feature ml, Elastic.Clients.Elasticsearch.Xpack.Feature monitoring, Elastic.Clients.Elasticsearch.Xpack.Feature rollup, Elastic.Clients.Elasticsearch.Xpack.Feature searchableSnapshots, Elastic.Clients.Elasticsearch.Xpack.Feature security, Elastic.Clients.Elasticsearch.Xpack.Feature slm, Elastic.Clients.Elasticsearch.Xpack.Feature spatial, Elastic.Clients.Elasticsearch.Xpack.Feature sql, Elastic.Clients.Elasticsearch.Xpack.Feature transform, Elastic.Clients.Elasticsearch.Xpack.Feature universalProfiling, Elastic.Clients.Elasticsearch.Xpack.Feature votingOnly, Elastic.Clients.Elasticsearch.Xpack.Feature watcher) { AggregateMetric = aggregateMetric; Analytics = analytics; @@ -312,6 +321,7 @@ public Features(Elastic.Clients.Elasticsearch.Xpack.Feature aggregateMetric, Ela EnterpriseSearch = enterpriseSearch; Eql = eql; Esql = esql; + FrozenIndices = frozenIndices; Graph = graph; Ilm = ilm; Logsdb = logsdb; @@ -399,6 +409,11 @@ internal Features(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSen public #if NET7_0_OR_GREATER required +#endif + Elastic.Clients.Elasticsearch.Xpack.Feature FrozenIndices { get; set; } + public +#if NET7_0_OR_GREATER + required #endif Elastic.Clients.Elasticsearch.Xpack.Feature Graph { get; set; } public diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/FileSettingsIndicatorDetails.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/FrozenIndices.g.cs similarity index 52% rename from src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/FileSettingsIndicatorDetails.g.cs rename to src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/FrozenIndices.g.cs index d113cb95709..9cabf500dba 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/FileSettingsIndicatorDetails.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/FrozenIndices.g.cs @@ -21,26 +21,33 @@ using System.Linq; using Elastic.Clients.Elasticsearch.Serialization; -namespace Elastic.Clients.Elasticsearch.Core.HealthReport; +namespace Elastic.Clients.Elasticsearch.Xpack; -internal sealed partial class FileSettingsIndicatorDetailsConverter : System.Text.Json.Serialization.JsonConverter +internal sealed partial class FrozenIndicesConverter : System.Text.Json.Serialization.JsonConverter { - private static readonly System.Text.Json.JsonEncodedText PropFailureStreak = System.Text.Json.JsonEncodedText.Encode("failure_streak"); - private static readonly System.Text.Json.JsonEncodedText PropMostRecentFailure = System.Text.Json.JsonEncodedText.Encode("most_recent_failure"); + private static readonly System.Text.Json.JsonEncodedText PropAvailable = System.Text.Json.JsonEncodedText.Encode("available"); + private static readonly System.Text.Json.JsonEncodedText PropEnabled = System.Text.Json.JsonEncodedText.Encode("enabled"); + private static readonly System.Text.Json.JsonEncodedText PropIndicesCount = System.Text.Json.JsonEncodedText.Encode("indices_count"); - public override Elastic.Clients.Elasticsearch.Core.HealthReport.FileSettingsIndicatorDetails Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + public override Elastic.Clients.Elasticsearch.Xpack.FrozenIndices Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propFailureStreak = default; - LocalJsonValue propMostRecentFailure = default; + LocalJsonValue propAvailable = default; + LocalJsonValue propEnabled = default; + LocalJsonValue propIndicesCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFailureStreak.TryReadProperty(ref reader, options, PropFailureStreak, null)) + if (propAvailable.TryReadProperty(ref reader, options, PropAvailable, null)) { continue; } - if (propMostRecentFailure.TryReadProperty(ref reader, options, PropMostRecentFailure, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + { + continue; + } + + if (propIndicesCount.TryReadProperty(ref reader, options, PropIndicesCount, null)) { continue; } @@ -55,44 +62,47 @@ public override Elastic.Clients.Elasticsearch.Core.HealthReport.FileSettingsIndi } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); - return new Elastic.Clients.Elasticsearch.Core.HealthReport.FileSettingsIndicatorDetails(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + return new Elastic.Clients.Elasticsearch.Xpack.FrozenIndices(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { - FailureStreak = propFailureStreak.Value, - MostRecentFailure = propMostRecentFailure.Value + Available = propAvailable.Value, + Enabled = propEnabled.Value, + IndicesCount = propIndicesCount.Value }; } - public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.HealthReport.FileSettingsIndicatorDetails value, System.Text.Json.JsonSerializerOptions options) + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Xpack.FrozenIndices value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFailureStreak, value.FailureStreak, null, null); - writer.WriteProperty(options, PropMostRecentFailure, value.MostRecentFailure, null, null); + writer.WriteProperty(options, PropAvailable, value.Available, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropIndicesCount, value.IndicesCount, null, null); writer.WriteEndObject(); } } -[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Core.HealthReport.FileSettingsIndicatorDetailsConverter))] -public sealed partial class FileSettingsIndicatorDetails +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Xpack.FrozenIndicesConverter))] +public sealed partial class FrozenIndices { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public FileSettingsIndicatorDetails(long failureStreak, string mostRecentFailure) + public FrozenIndices(bool available, bool enabled, long indicesCount) { - FailureStreak = failureStreak; - MostRecentFailure = mostRecentFailure; + Available = available; + Enabled = enabled; + IndicesCount = indicesCount; } #if NET7_0_OR_GREATER - public FileSettingsIndicatorDetails() + public FrozenIndices() { } #endif #if !NET7_0_OR_GREATER [System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")] - public FileSettingsIndicatorDetails() + public FrozenIndices() { } #endif [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - internal FileSettingsIndicatorDetails(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + internal FrozenIndices(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) { _ = sentinel; } @@ -101,10 +111,15 @@ internal FileSettingsIndicatorDetails(Elastic.Clients.Elasticsearch.Serializatio #if NET7_0_OR_GREATER required #endif - long FailureStreak { get; set; } + bool Available { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + bool Enabled { get; set; } public #if NET7_0_OR_GREATER required #endif - string MostRecentFailure { get; set; } + long IndicesCount { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/GetSourceResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/GetSourceResponse.cs index 19db7764bbb..0d76799059c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/GetSourceResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/GetSourceResponse.cs @@ -8,6 +8,6 @@ namespace Elastic.Clients.Elasticsearch; public partial class GetSourceResponse { - [Obsolete($"Use '{nameof(Source)}' instead.")] - public TDocument Body { get => Source; set => Source = value; } + [Obsolete($"Use '{nameof(Document)}' instead.")] + public TDocument Body { get => Document; set => Document = value; } } diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetAliasResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetAliasResponse.cs index 0a36644731a..aec50dbf2b4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetAliasResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetAliasResponse.cs @@ -14,5 +14,5 @@ public partial class GetAliasResponse /// the client considers the response to be valid. /// /// - public override bool IsValidResponse => base.IsValidResponse || Aliases?.Count > 0; + public override bool IsValidResponse => base.IsValidResponse || Values?.Count > 0; } diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetFieldMappingResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetFieldMappingResponse.cs index 2afdf7cbcfb..d9dc6a8adb6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetFieldMappingResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetFieldMappingResponse.cs @@ -60,7 +60,7 @@ public bool TryGetProperty(string index, string field, [NotNullWhen(true)] out I private IReadOnlyDictionary? MappingsFor(string index) { - if (FieldMappings!.TryGetValue(index, out var indexMapping)) + if (Values!.TryGetValue(index, out var indexMapping)) return null; return indexMapping.Mappings; diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetMappingResponse.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetMappingResponse.cs index c47b62cc243..6fff3748cb1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetMappingResponse.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetMappingResponse.cs @@ -13,6 +13,6 @@ public static class GetMappingResponseExtensions if (index.IsNullOrEmpty()) return null; - return response.Mappings.TryGetValue(index, out var indexMappings) ? indexMappings.Mappings : null; + return response.Values.TryGetValue(index, out var indexMappings) ? indexMappings.Mappings : null; } } diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/MSearch/SearchRequestItem.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/MSearch/SearchRequestItem.cs index 906b581163b..7cb1e87b8e2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/MSearch/SearchRequestItem.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Core/MSearch/SearchRequestItem.cs @@ -7,6 +7,7 @@ using Elastic.Clients.Elasticsearch.Serialization; using Elastic.Transport; +using Elastic.Transport.Extensions; namespace Elastic.Clients.Elasticsearch.Core.MSearch;