diff --git a/README.md b/README.md index 217074fd379..35ebe0e742e 100644 --- a/README.md +++ b/README.md @@ -10,27 +10,37 @@ or **for a free trial of Elastic Cloud**. The .NET client for Elasticsearch provides strongly typed requests and responses - for Elasticsearch APIs. It delegates protocol handling to the - [Elastic.Transport](https://github.com/elastic/elastic-transport-net) library, + for Elasticsearch APIs. It delegates protocol handling to the +[Elastic.Transport](https://github.com/elastic/elastic-transport-net) library, which takes care of all transport-level concerns (HTTP connection establishment and pooling, retries, etc.). +## Versioning + +The *major* and *minor* version parts of the Elasticsearch .NET client are dictated by the version of the Elasticsearch server. + +> [!WARNING] +> This means that the Elasticsearch .NET client **does not** strictly follows semantic versioning! +> +> Although we try to avoid this as much as possible, it can happen that a *minor* or even *patch* version contains breaking changes (see also: [breaking changes policy](https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/breaking-changes-policy.html)). Please always check the [release notes](https://github.com/elastic/elasticsearch-net/releases) before updating the client package. + ## 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/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/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/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/reference/aggregations.md b/docs/usage/aggregations.asciidoc similarity index 76% rename from docs/reference/aggregations.md rename to docs/usage/aggregations.asciidoc index 8a3ca8e8327..1f159763aaa 100644 --- a/docs/reference/aggregations.md +++ b/docs/usage/aggregations.asciidoc @@ -1,19 +1,16 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/aggregations.html ---- - -# Aggregation examples [aggregations] +[[aggregations]] +== Aggregation examples This page demonstrates how to use aggregations. +[discrete] +=== Top-level aggreggation -## Top-level aggreggation [_top_level_aggreggation] - - -### Fluent API [_fluent_api] +[discrete] +==== Fluent API -```csharp +[source,csharp] +---- var response = await client .SearchAsync(search => search .Index("persons") @@ -29,12 +26,13 @@ var response = await client ) .Size(10) ); -``` +---- +[discrete] +==== Object initializer API -### Object initializer API [_object_initializer_api] - -```csharp +[source,csharp] +---- var response = await client.SearchAsync(new SearchRequest("persons") { Query = Query.MatchAll(new MatchAllQuery()), @@ -47,23 +45,25 @@ var response = await client.SearchAsync(new SearchRequest("persons") }, Size = 10 }); -``` - +---- -### Consume the response [_consume_the_response] +[discrete] +==== Consume the response -```csharp +[source,csharp] +---- var max = response.Aggregations!.GetMax("agg_name")!; Console.WriteLine(max.Value); -``` +---- +[discrete] +=== Sub-aggregation -## Sub-aggregation [_sub_aggregation] +[discrete] +==== Fluent API - -### Fluent API [_fluent_api_2] - -```csharp +[source,csharp] +---- var response = await client .SearchAsync(search => search .Index("persons") @@ -86,12 +86,13 @@ var response = await client ) .Size(10) ); -``` - +---- -### Object initializer API [_object_initializer_api_2] +[discrete] +==== Object initializer API -```csharp +[source,csharp] +---- var topLevelAggregation = Aggregation.Terms(new TermsAggregation { Field = Infer.Field(x => x.FirstName) @@ -114,17 +115,17 @@ var response = await client.SearchAsync(new SearchRequest("persons") }, Size = 10 }); -``` +---- +[discrete] +==== Consume the response -### Consume the response [_consume_the_response_2] - -```csharp +[source,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/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/reference/mappings.md b/docs/usage/mappings.asciidoc similarity index 60% rename from docs/reference/mappings.md rename to docs/usage/mappings.asciidoc index b28b8ba4a5e..13d62f63147 100644 --- a/docs/reference/mappings.md +++ b/docs/usage/mappings.asciidoc @@ -1,16 +1,13 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/mappings.html ---- - -# Custom mapping examples [mappings] +[[mappings]] +== Custom mapping examples This page demonstrates how to configure custom mappings on an index. +[discrete] +=== Configure mappings during index creation -## Configure mappings during index creation [_configure_mappings_during_index_creation] - -```csharp +[source,csharp] +---- await client.Indices.CreateAsync(index => index .Index("index") .Mappings(mappings => mappings @@ -20,12 +17,13 @@ await client.Indices.CreateAsync(index => index ) ) ); -``` +---- +[discrete] +=== Configure mappings after index creation -## Configure mappings after index creation [_configure_mappings_after_index_creation] - -```csharp +[source,csharp] +---- await client.Indices.PutMappingAsync(mappings => mappings .Indices("index") .Properties(properties => properties @@ -33,5 +31,4 @@ await client.Indices.PutMappingAsync(mappings => mappings .Keyword(x => x.FirstName!, keyword => keyword.Index(false)) ) ); -``` - +---- diff --git a/docs/reference/query.md b/docs/usage/query.asciidoc similarity index 64% rename from docs/reference/query.md rename to docs/usage/query.asciidoc index 11f0e1d1452..b365825cdbd 100644 --- a/docs/reference/query.md +++ b/docs/usage/query.asciidoc @@ -1,16 +1,13 @@ ---- -mapped_pages: - - https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/query.html ---- - -# Query examples [query] +[[query]] +== Query examples This page demonstrates how to perform a search request. +[discrete] +=== Fluent API -## Fluent API [_fluent_api_3] - -```csharp +[source,csharp] +---- var response = await client .SearchAsync(search => search .Index("persons") @@ -22,12 +19,13 @@ var response = await client ) .Size(10) ); -``` +---- +[discrete] +=== Object initializer API -## Object initializer API [_object_initializer_api_3] - -```csharp +[source,csharp] +---- var response = await client .SearchAsync(new SearchRequest("persons") { @@ -37,15 +35,16 @@ var response = await client }), Size = 10 }); -``` +---- -## Consume the response [_consume_the_response_3] +[discrete] +=== Consume the response -```csharp +[source,csharp] +---- foreach (var person in response.Documents) { Console.WriteLine(person.FirstName); } -``` - +---- 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/Elastic.Clients.Elasticsearch.csproj b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj index 9945a675d3f..bb9197f0bc9 100644 --- a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj +++ b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj @@ -31,7 +31,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs index be4446982ec..7bd62350c9e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs @@ -60,22 +60,22 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.AsyncSearchStatusRespo continue; } - if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, null)) + if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -105,7 +105,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.AsyncSearchStatusRespo 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)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -146,16 +146,16 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropClusters, value.Clusters, null, null); - writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, null); - writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, 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, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, 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, PropCompletionStatus, value.CompletionStatus, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); - writer.WriteProperty(options, PropStartTime, value.StartTime, null, 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, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs index e3713e3ef6e..44ce685e483 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.GetAsyncSearchResponse LocalJsonValue propStartTimeInMillis = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.GetAsyncSearchResponse 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)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -129,15 +129,15 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.GetAsyncSearchResponse public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.AsyncSearch.GetAsyncSearchResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, 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, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, 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, PropCompletionTime, value.CompletionTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null); writer.WriteProperty(options, PropResponse, value.Response, null, null); - writer.WriteProperty(options, PropStartTime, value.StartTime, null, 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, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteEndObject(); } 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..66d98466ba7 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); } /// /// @@ -320,7 +321,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -335,7 +336,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -355,7 +356,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -370,7 +371,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propProfile.TryReadProperty(ref reader, options, PropProfile, null)) + if (propProfile.TryReadProperty(ref reader, options, PropProfile, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -400,12 +401,12 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, null)) + if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -440,7 +441,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, null)) + if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -450,7 +451,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, null)) + if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -460,7 +461,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchReque continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -518,35 +519,35 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAggregations, value.Aggregations, 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, PropCollapse, value.Collapse, null, null); writer.WriteProperty(options, PropDocvalueFields, value.DocvalueFields, 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, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExt, value.Ext, 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, PropFields, value.Fields, 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, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlight, value.Highlight, null, null); writer.WriteProperty(options, PropIndicesBoost, value.IndicesBoost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); writer.WriteProperty(options, PropKnn, value.Knn, 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, PropMinScore, value.MinScore, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPit, value.Pit, null, null); writer.WriteProperty(options, PropPostFilter, value.PostFilter, null, null); - writer.WriteProperty(options, PropProfile, value.Profile, null, null); + writer.WriteProperty(options, PropProfile, value.Profile, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropRescore, value.Rescore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, 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, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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)); writer.WriteProperty(options, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, null); + writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); - writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, null); + writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTrackTotalHits, value.TrackTotalHits, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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/AsyncSearch/SubmitAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs index c61794f4dc4..a553ee35b9a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/SubmitAsyncSearchResponse.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRespo LocalJsonValue propStartTimeInMillis = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRespo 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)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -129,15 +129,15 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchRespo public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.AsyncSearch.SubmitAsyncSearchResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, 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, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, 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, PropCompletionTime, value.CompletionTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null); writer.WriteProperty(options, PropResponse, value.Response, null, null); - writer.WriteProperty(options, PropStartTime, value.StartTime, null, 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, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs index 366c541b6dc..c93dabef493 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.BulkResponse Read(ref System.Text. continue; } - if (propIngestTook.TryReadProperty(ref reader, options, PropIngestTook, null)) + if (propIngestTook.TryReadProperty(ref reader, options, PropIngestTook, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropErrors, value.Errors, null, null); - writer.WriteProperty(options, PropIngestTook, value.IngestTook, null, null); + writer.WriteProperty(options, PropIngestTook, value.IngestTook, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropItems, value.Items, 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, PropTook, value.Took, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainRequest.g.cs index 5e9716147d5..09a920f82d1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainRequest.g.cs @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.Cluster.AllocationExplainRequest R continue; } - if (propPrimary.TryReadProperty(ref reader, options, PropPrimary, null)) + if (propPrimary.TryReadProperty(ref reader, options, PropPrimary, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShard.TryReadProperty(ref reader, options, PropShard, null)) + if (propShard.TryReadProperty(ref reader, options, PropShard, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,8 +107,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCurrentNode, value.CurrentNode, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimary, value.Primary, null, null); - writer.WriteProperty(options, PropShard, value.Shard, null, null); + writer.WriteProperty(options, PropPrimary, value.Primary, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShard, value.Shard, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainResponse.g.cs index 3e6df5c86a5..f06a745222c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/AllocationExplainResponse.g.cs @@ -91,22 +91,22 @@ public override Elastic.Clients.Elasticsearch.Cluster.AllocationExplainResponse continue; } - if (propAllocationDelayInMillis.TryReadProperty(ref reader, options, PropAllocationDelayInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propAllocationDelayInMillis.TryReadProperty(ref reader, options, PropAllocationDelayInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propCanAllocate.TryReadProperty(ref reader, options, PropCanAllocate, null)) + if (propCanAllocate.TryReadProperty(ref reader, options, PropCanAllocate, static Elastic.Clients.Elasticsearch.Cluster.Decision? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCanMoveToOtherNode.TryReadProperty(ref reader, options, PropCanMoveToOtherNode, null)) + if (propCanMoveToOtherNode.TryReadProperty(ref reader, options, PropCanMoveToOtherNode, static Elastic.Clients.Elasticsearch.Cluster.Decision? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCanRebalanceCluster.TryReadProperty(ref reader, options, PropCanRebalanceCluster, null)) + if (propCanRebalanceCluster.TryReadProperty(ref reader, options, PropCanRebalanceCluster, static Elastic.Clients.Elasticsearch.Cluster.Decision? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,7 +116,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.AllocationExplainResponse continue; } - if (propCanRebalanceToOtherNode.TryReadProperty(ref reader, options, PropCanRebalanceToOtherNode, null)) + if (propCanRebalanceToOtherNode.TryReadProperty(ref reader, options, PropCanRebalanceToOtherNode, static Elastic.Clients.Elasticsearch.Cluster.Decision? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -126,7 +126,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.AllocationExplainResponse continue; } - if (propCanRemainOnCurrentNode.TryReadProperty(ref reader, options, PropCanRemainOnCurrentNode, null)) + if (propCanRemainOnCurrentNode.TryReadProperty(ref reader, options, PropCanRemainOnCurrentNode, static Elastic.Clients.Elasticsearch.Cluster.Decision? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,7 +141,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.AllocationExplainResponse continue; } - if (propConfiguredDelayInMillis.TryReadProperty(ref reader, options, PropConfiguredDelayInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propConfiguredDelayInMillis.TryReadProperty(ref reader, options, PropConfiguredDelayInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -191,7 +191,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.AllocationExplainResponse continue; } - if (propRemainingDelayInMillis.TryReadProperty(ref reader, options, PropRemainingDelayInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propRemainingDelayInMillis.TryReadProperty(ref reader, options, PropRemainingDelayInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -251,17 +251,17 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAllocateExplanation, value.AllocateExplanation, null, null); writer.WriteProperty(options, PropAllocationDelay, value.AllocationDelay, null, null); - writer.WriteProperty(options, PropAllocationDelayInMillis, value.AllocationDelayInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropCanAllocate, value.CanAllocate, null, null); - writer.WriteProperty(options, PropCanMoveToOtherNode, value.CanMoveToOtherNode, null, null); - writer.WriteProperty(options, PropCanRebalanceCluster, value.CanRebalanceCluster, null, null); + writer.WriteProperty(options, PropAllocationDelayInMillis, value.AllocationDelayInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropCanAllocate, value.CanAllocate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Cluster.Decision? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCanMoveToOtherNode, value.CanMoveToOtherNode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Cluster.Decision? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCanRebalanceCluster, value.CanRebalanceCluster, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Cluster.Decision? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCanRebalanceClusterDecisions, value.CanRebalanceClusterDecisions, 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, PropCanRebalanceToOtherNode, value.CanRebalanceToOtherNode, null, null); + writer.WriteProperty(options, PropCanRebalanceToOtherNode, value.CanRebalanceToOtherNode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Cluster.Decision? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCanRemainDecisions, value.CanRemainDecisions, 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, PropCanRemainOnCurrentNode, value.CanRemainOnCurrentNode, null, null); + writer.WriteProperty(options, PropCanRemainOnCurrentNode, value.CanRemainOnCurrentNode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Cluster.Decision? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropClusterInfo, value.ClusterInfo, null, null); writer.WriteProperty(options, PropConfiguredDelay, value.ConfiguredDelay, null, null); - writer.WriteProperty(options, PropConfiguredDelayInMillis, value.ConfiguredDelayInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropConfiguredDelayInMillis, value.ConfiguredDelayInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropCurrentNode, value.CurrentNode, null, null); writer.WriteProperty(options, PropCurrentState, value.CurrentState, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); @@ -271,7 +271,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropPrimary, value.Primary, null, null); writer.WriteProperty(options, PropRebalanceExplanation, value.RebalanceExplanation, null, null); writer.WriteProperty(options, PropRemainingDelay, value.RemainingDelay, null, null); - writer.WriteProperty(options, PropRemainingDelayInMillis, value.RemainingDelayInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropRemainingDelayInMillis, value.RemainingDelayInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropShard, value.Shard, null, null); writer.WriteProperty(options, PropUnassignedInfo, value.UnassignedInfo, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs index c9f07e19eaf..87cb38e5618 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/GetClusterSettingsResponse.g.cs @@ -94,15 +94,32 @@ internal GetClusterSettingsResponse(Elastic.Clients.Elasticsearch.Serialization. _ = sentinel; } + /// + /// + /// The default setting values. + /// + /// public System.Collections.Generic.IReadOnlyDictionary? Defaults { get; set; } + + /// + /// + /// The settings that persist after the cluster restarts. + /// + /// public #if NET7_0_OR_GREATER - required + required #endif - System.Collections.Generic.IReadOnlyDictionary Persistent { get; set; } + System.Collections.Generic.IReadOnlyDictionary Persistent { get; set; } + + /// + /// + /// The settings that do not persist after the cluster restarts. + /// + /// public #if NET7_0_OR_GREATER - required + required #endif - System.Collections.Generic.IReadOnlyDictionary Transient { get; set; } + System.Collections.Generic.IReadOnlyDictionary Transient { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs index c966445a8ee..829b40743a7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/PutComponentTemplateRequest.g.cs @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateReques LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, null)) + if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateReques continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,10 +99,10 @@ public override Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateReques public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.PutComponentTemplateRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, null); + writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropTemplate, value.Template, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs index 7be6879be5c..dccc0dc7325 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.CreateResponse Read(ref System.Tex LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, null)) + if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.CreateResponse Read(ref System.Tex continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.CreateResponse Read(ref System.Tex continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,12 +113,12 @@ public override Elastic.Clients.Elasticsearch.CreateResponse Read(ref System.Tex public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.CreateResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, null); + writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResult, value.Result, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs index a789ac6515b..6c44dc9c71a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/FollowRequest.g.cs @@ -89,17 +89,17 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowRequ continue; } - if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, null)) + if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, null)) + if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, null)) + if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowRequ continue; } - if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, null)) + if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,7 +124,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowRequ continue; } - if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, null)) + if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -183,14 +183,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDataStreamName, value.DataStreamName, null, null); writer.WriteProperty(options, PropLeaderIndex, value.LeaderIndex, null, null); - writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, null); - writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, null); - writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxReadRequestSize, value.MaxReadRequestSize, null, null); writer.WriteProperty(options, PropMaxRetryDelay, value.MaxRetryDelay, null, null); - writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, null); + writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteBufferSize, value.MaxWriteBufferSize, null, null); - writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteRequestSize, value.MaxWriteRequestSize, null, null); writer.WriteProperty(options, PropReadPollTimeout, value.ReadPollTimeout, null, null); writer.WriteProperty(options, PropRemoteCluster, value.RemoteCluster, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternRequest.g.cs index a77e49be32e..c67f8f4a7c6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/PutAutoFollowPatternRequest.g.cs @@ -86,17 +86,17 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.PutAutoFol continue; } - if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, null)) + if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, null)) + if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, null)) + if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -111,7 +111,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.PutAutoFol continue; } - if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, null)) + if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,7 +121,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.PutAutoFol continue; } - if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, null)) + if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -182,14 +182,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropFollowIndexPattern, value.FollowIndexPattern, null, null); writer.WriteProperty(options, PropLeaderIndexExclusionPatterns, value.LeaderIndexExclusionPatterns, 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, PropLeaderIndexPatterns, value.LeaderIndexPatterns, 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, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, null); - writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, null); - writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxReadRequestSize, value.MaxReadRequestSize, null, null); writer.WriteProperty(options, PropMaxRetryDelay, value.MaxRetryDelay, null, null); - writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, null); + writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteBufferSize, value.MaxWriteBufferSize, null, null); - writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteRequestSize, value.MaxWriteRequestSize, null, null); writer.WriteProperty(options, PropReadPollTimeout, value.ReadPollTimeout, null, null); writer.WriteProperty(options, PropRemoteCluster, value.RemoteCluster, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowRequest.g.cs index 53b3077bbb4..474e5aad32a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CrossClusterReplication/ResumeFollowRequest.g.cs @@ -61,17 +61,17 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.ResumeFoll LocalJsonValue propReadPollTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, null)) + if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, null)) + if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, null)) + if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.ResumeFoll continue; } - if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, null)) + if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.ResumeFoll continue; } - if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, null)) + if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -139,14 +139,14 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.ResumeFoll public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.CrossClusterReplication.ResumeFollowRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, null); - writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, null); - writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxReadRequestSize, value.MaxReadRequestSize, null, null); writer.WriteProperty(options, PropMaxRetryDelay, value.MaxRetryDelay, null, null); - writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, null); + writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteBufferSize, value.MaxWriteBufferSize, null, null); - writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteRequestSize, value.MaxWriteRequestSize, null, null); writer.WriteProperty(options, PropReadPollTimeout, value.ReadPollTimeout, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs index e11295bfb1c..fc4bda3ee80 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryRequest.g.cs @@ -262,7 +262,7 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryRequest Read(ref Syst LocalJsonValue propSlice = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, null)) + if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -298,7 +298,7 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryRequest Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.DeleteByQueryRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, null); + writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropSlice, value.Slice, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs index 15d7f83b15b..ff5cd28c6f5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteByQueryResponse.g.cs @@ -63,12 +63,12 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryResponse Read(ref Sys LocalJsonValue propVersionConflicts = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBatches.TryReadProperty(ref reader, options, PropBatches, null)) + if (propBatches.TryReadProperty(ref reader, options, PropBatches, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, null)) + if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -78,12 +78,12 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryResponse Read(ref Sys continue; } - if (propNoops.TryReadProperty(ref reader, options, PropNoops, null)) + if (propNoops.TryReadProperty(ref reader, options, PropNoops, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, null)) + if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryResponse Read(ref Sys continue; } - if (propSliceId.TryReadProperty(ref reader, options, PropSliceId, null)) + if (propSliceId.TryReadProperty(ref reader, options, PropSliceId, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,7 +108,7 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryResponse Read(ref Sys continue; } - if (propThrottledMillis.TryReadProperty(ref reader, options, PropThrottledMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propThrottledMillis.TryReadProperty(ref reader, options, PropThrottledMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -118,27 +118,27 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryResponse Read(ref Sys continue; } - if (propThrottledUntilMillis.TryReadProperty(ref reader, options, PropThrottledUntilMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propThrottledUntilMillis.TryReadProperty(ref reader, options, PropThrottledUntilMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, null)) + if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + if (propTotal.TryReadProperty(ref reader, options, PropTotal, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionConflicts.TryReadProperty(ref reader, options, PropVersionConflicts, null)) + if (propVersionConflicts.TryReadProperty(ref reader, options, PropVersionConflicts, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -177,22 +177,22 @@ public override Elastic.Clients.Elasticsearch.DeleteByQueryResponse Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.DeleteByQueryResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBatches, value.Batches, null, null); - writer.WriteProperty(options, PropDeleted, value.Deleted, null, null); + writer.WriteProperty(options, PropBatches, value.Batches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDeleted, value.Deleted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFailures, value.Failures, 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, PropNoops, value.Noops, null, null); - writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, null); + writer.WriteProperty(options, PropNoops, value.Noops, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRetries, value.Retries, null, null); - writer.WriteProperty(options, PropSliceId, value.SliceId, null, null); + writer.WriteProperty(options, PropSliceId, value.SliceId, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTask, value.Task, null, null); writer.WriteProperty(options, PropThrottled, value.Throttled, null, null); - writer.WriteProperty(options, PropThrottledMillis, value.ThrottledMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropThrottledMillis, value.ThrottledMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropThrottledUntil, value.ThrottledUntil, null, null); - writer.WriteProperty(options, PropThrottledUntilMillis, value.ThrottledUntilMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); - writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropTotal, value.Total, null, null); - writer.WriteProperty(options, PropVersionConflicts, value.VersionConflicts, null, null); + writer.WriteProperty(options, PropThrottledUntilMillis, value.ThrottledUntilMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTotal, value.Total, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionConflicts, value.VersionConflicts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs index 54fb28ded4f..a37c40e5f44 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteRequest.g.cs @@ -611,6 +611,11 @@ public DeleteRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, El Instance = new Elastic.Clients.Elasticsearch.DeleteRequest(index, id); } + public DeleteRequestDescriptor(string index, Elastic.Clients.Elasticsearch.Id id) + { + Instance = new Elastic.Clients.Elasticsearch.DeleteRequest((Elastic.Clients.Elasticsearch.IndexName)index, id); + } + public DeleteRequestDescriptor(TDocument document) { Instance = new Elastic.Clients.Elasticsearch.DeleteRequest(typeof(TDocument), Elastic.Clients.Elasticsearch.Id.From(document)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs index b474a093846..139eb39770e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.DeleteResponse Read(ref System.Tex LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, null)) + if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.DeleteResponse Read(ref System.Tex continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.DeleteResponse Read(ref System.Tex continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,12 +113,12 @@ public override Elastic.Clients.Elasticsearch.DeleteResponse Read(ref System.Tex public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.DeleteResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, null); + writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResult, value.Result, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs index a3ebea57b32..a18dabbe78b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetResponse.g.cs @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlGetResponse Read(re continue; } - if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, null)) + if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, null)) + if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,12 +70,12 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlGetResponse Read(re continue; } - if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, null)) + if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -107,11 +107,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropHits, value.Hits, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); - writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null); + writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShardFailures, value.ShardFailures, 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, PropTimedOut, value.TimedOut, null, null); - writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs index edadd293dce..326334e9db0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchRequest.g.cs @@ -78,17 +78,17 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchRequest Read(ref Syst LocalJsonValue propWaitForCompletionTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowPartialSearchResults.TryReadProperty(ref reader, options, PropAllowPartialSearchResults, null)) + if (propAllowPartialSearchResults.TryReadProperty(ref reader, options, PropAllowPartialSearchResults, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propAllowPartialSequenceResults.TryReadProperty(ref reader, options, PropAllowPartialSequenceResults, null)) + if (propAllowPartialSequenceResults.TryReadProperty(ref reader, options, PropAllowPartialSequenceResults, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseSensitive.TryReadProperty(ref reader, options, PropCaseSensitive, null)) + if (propCaseSensitive.TryReadProperty(ref reader, options, PropCaseSensitive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,7 +98,7 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchRequest Read(ref Syst continue; } - if (propFetchSize.TryReadProperty(ref reader, options, PropFetchSize, null)) + if (propFetchSize.TryReadProperty(ref reader, options, PropFetchSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchRequest Read(ref Syst continue; } - if (propKeepOnCompletion.TryReadProperty(ref reader, options, PropKeepOnCompletion, null)) + if (propKeepOnCompletion.TryReadProperty(ref reader, options, PropKeepOnCompletion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxSamplesPerKey.TryReadProperty(ref reader, options, PropMaxSamplesPerKey, null)) + if (propMaxSamplesPerKey.TryReadProperty(ref reader, options, PropMaxSamplesPerKey, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -133,7 +133,7 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchRequest Read(ref Syst continue; } - if (propResultPosition.TryReadProperty(ref reader, options, PropResultPosition, null)) + if (propResultPosition.TryReadProperty(ref reader, options, PropResultPosition, static Elastic.Clients.Elasticsearch.Eql.ResultPosition? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -143,7 +143,7 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchRequest Read(ref Syst continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -198,20 +198,20 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchRequest Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Eql.EqlSearchRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowPartialSearchResults, value.AllowPartialSearchResults, null, null); - writer.WriteProperty(options, PropAllowPartialSequenceResults, value.AllowPartialSequenceResults, null, null); - writer.WriteProperty(options, PropCaseSensitive, value.CaseSensitive, null, null); + writer.WriteProperty(options, PropAllowPartialSearchResults, value.AllowPartialSearchResults, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropAllowPartialSequenceResults, value.AllowPartialSequenceResults, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseSensitive, value.CaseSensitive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropEventCategoryField, value.EventCategoryField, null, null); - writer.WriteProperty(options, PropFetchSize, value.FetchSize, null, null); + writer.WriteProperty(options, PropFetchSize, value.FetchSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, 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, PropFilter, value.Filter, 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, PropKeepAlive, value.KeepAlive, null, null); - writer.WriteProperty(options, PropKeepOnCompletion, value.KeepOnCompletion, null, null); - writer.WriteProperty(options, PropMaxSamplesPerKey, value.MaxSamplesPerKey, null, null); + writer.WriteProperty(options, PropKeepOnCompletion, value.KeepOnCompletion, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxSamplesPerKey, value.MaxSamplesPerKey, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); - writer.WriteProperty(options, PropResultPosition, value.ResultPosition, null, null); + writer.WriteProperty(options, PropResultPosition, value.ResultPosition, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Eql.ResultPosition? v) => w.WriteNullableValue(o, v)); 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, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTiebreakerField, value.TiebreakerField, null, null); writer.WriteProperty(options, PropTimestampField, value.TimestampField, null, null); writer.WriteProperty(options, PropWaitForCompletionTimeout, value.WaitForCompletionTimeout, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs index a4add7b80ee..49826436b1e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlSearchResponse.g.cs @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchResponse Read continue; } - if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, null)) + if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, null)) + if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,12 +70,12 @@ public override Elastic.Clients.Elasticsearch.Eql.EqlSearchResponse Read continue; } - if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, null)) + if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -107,11 +107,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropHits, value.Hits, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); - writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null); + writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShardFailures, value.ShardFailures, 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, PropTimedOut, value.TimedOut, null, null); - writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusResponse.g.cs index b0d6fb139fd..d3f2094068f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/GetEqlStatusResponse.g.cs @@ -43,12 +43,12 @@ public override Elastic.Clients.Elasticsearch.Eql.GetEqlStatusResponse Read(ref LocalJsonValue propStartTimeInMillis = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, null)) + if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExpirationTimeInMillis.TryReadProperty(ref reader, options, PropExpirationTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propExpirationTimeInMillis.TryReadProperty(ref reader, options, PropExpirationTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Eql.GetEqlStatusResponse Read(ref continue; } - if (propStartTimeInMillis.TryReadProperty(ref reader, options, PropStartTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propStartTimeInMillis.TryReadProperty(ref reader, options, PropStartTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.Eql.GetEqlStatusResponse Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Eql.GetEqlStatusResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, null); - writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null); - writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteEndObject(); } } 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..050e123bb78 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. @@ -47,24 +58,6 @@ public sealed partial class AsyncQueryRequestParameters : Elastic.Transport.Requ /// /// public Elastic.Clients.Elasticsearch.Esql.EsqlFormat? Format { get => Q("format"); set => Q("format", value); } - - /// - /// - /// The period for which the query and its results are stored in the cluster. - /// The default period is five days. - /// When this period expires, the query and its results are deleted, even if the query is still ongoing. - /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value. - /// - /// - public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } - - /// - /// - /// Indicates whether the query and its results are stored in the cluster. - /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter. - /// - /// - public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); } } internal sealed partial class AsyncQueryRequestConverter : System.Text.Json.Serialization.JsonConverter @@ -72,6 +65,8 @@ internal sealed partial class AsyncQueryRequestConverter : System.Text.Json.Seri private static readonly System.Text.Json.JsonEncodedText PropColumnar = System.Text.Json.JsonEncodedText.Encode("columnar"); private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); private static readonly System.Text.Json.JsonEncodedText PropIncludeCcsMetadata = System.Text.Json.JsonEncodedText.Encode("include_ccs_metadata"); + private static readonly System.Text.Json.JsonEncodedText PropKeepAlive = System.Text.Json.JsonEncodedText.Encode("keep_alive"); + private static readonly System.Text.Json.JsonEncodedText PropKeepOnCompletion = System.Text.Json.JsonEncodedText.Encode("keep_on_completion"); private static readonly System.Text.Json.JsonEncodedText PropLocale = System.Text.Json.JsonEncodedText.Encode("locale"); private static readonly System.Text.Json.JsonEncodedText PropParams = System.Text.Json.JsonEncodedText.Encode("params"); private static readonly System.Text.Json.JsonEncodedText PropProfile = System.Text.Json.JsonEncodedText.Encode("profile"); @@ -84,6 +79,8 @@ public override Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest Read(ref Sy LocalJsonValue propColumnar = default; LocalJsonValue propFilter = default; LocalJsonValue propIncludeCcsMetadata = default; + LocalJsonValue propKeepAlive = default; + LocalJsonValue propKeepOnCompletion = default; LocalJsonValue propLocale = default; LocalJsonValue?> propParams = default; LocalJsonValue propProfile = default; @@ -91,7 +88,7 @@ public override Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest Read(ref Sy LocalJsonValue propWaitForCompletionTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propColumnar.TryReadProperty(ref reader, options, PropColumnar, null)) + if (propColumnar.TryReadProperty(ref reader, options, PropColumnar, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -101,7 +98,17 @@ public override Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest Read(ref Sy continue; } - if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, null)) + if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propKeepAlive.TryReadProperty(ref reader, options, PropKeepAlive, null)) + { + continue; + } + + if (propKeepOnCompletion.TryReadProperty(ref reader, options, PropKeepOnCompletion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,7 +123,7 @@ public override Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest Read(ref Sy continue; } - if (propProfile.TryReadProperty(ref reader, options, PropProfile, null)) + if (propProfile.TryReadProperty(ref reader, options, PropProfile, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -146,6 +153,8 @@ public override Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest Read(ref Sy Columnar = propColumnar.Value, Filter = propFilter.Value, IncludeCcsMetadata = propIncludeCcsMetadata.Value, + KeepAlive = propKeepAlive.Value, + KeepOnCompletion = propKeepOnCompletion.Value, Locale = propLocale.Value, Params = propParams.Value, Profile = propProfile.Value, @@ -157,12 +166,14 @@ public override Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropColumnar, value.Columnar, null, null); + writer.WriteProperty(options, PropColumnar, value.Columnar, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropIncludeCcsMetadata, value.IncludeCcsMetadata, null, null); + writer.WriteProperty(options, PropIncludeCcsMetadata, value.IncludeCcsMetadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropKeepAlive, value.KeepAlive, null, null); + writer.WriteProperty(options, PropKeepOnCompletion, value.KeepOnCompletion, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLocale, value.Locale, null, null); writer.WriteProperty(options, PropParams, value.Params, 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, PropProfile, value.Profile, null, null); + writer.WriteProperty(options, PropProfile, value.Profile, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropWaitForCompletionTimeout, value.WaitForCompletionTimeout, null, null); writer.WriteEndObject(); @@ -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. @@ -236,44 +258,44 @@ internal AsyncQueryRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// /// - /// The period for which the query and its results are stored in the cluster. - /// The default period is five days. - /// When this period expires, the query and its results are deleted, even if the query is still ongoing. - /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value. + /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. /// /// - public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get => Q("keep_alive"); set => Q("keep_alive", value); } + public bool? Columnar { get; set; } /// /// - /// Indicates whether the query and its results are stored in the cluster. - /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter. + /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. /// /// - public bool? KeepOnCompletion { get => Q("keep_on_completion"); set => Q("keep_on_completion", value); } + public Elastic.Clients.Elasticsearch.QueryDsl.Query? Filter { get; set; } /// /// - /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. + /// When set to true and performing a cross-cluster query, the response will include an extra _clusters + /// object with information about the clusters that participated in the search along with info such as shards + /// count. /// /// - public bool? Columnar { get; set; } + public bool? IncludeCcsMetadata { get; set; } /// /// - /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. + /// The period for which the query and its results are stored in the cluster. + /// The default period is five days. + /// When this period expires, the query and its results are deleted, even if the query is still ongoing. + /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value. /// /// - public Elastic.Clients.Elasticsearch.QueryDsl.Query? Filter { get; set; } + public Elastic.Clients.Elasticsearch.Duration? KeepAlive { get; set; } /// /// - /// When set to true and performing a cross-cluster query, the response will include an extra _clusters - /// object with information about the clusters that participated in the search along with info such as shards - /// count. + /// Indicates whether the query and its results are stored in the cluster. + /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter. /// /// - public bool? IncludeCcsMetadata { get; set; } + public bool? KeepOnCompletion { get; set; } public string? Locale { get; set; } /// @@ -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. @@ -377,32 +414,6 @@ public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Format(Ela return this; } - /// - /// - /// The period for which the query and its results are stored in the cluster. - /// The default period is five days. - /// When this period expires, the query and its results are deleted, even if the query is still ongoing. - /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value. - /// - /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? value) - { - Instance.KeepAlive = value; - return this; - } - - /// - /// - /// Indicates whether the query and its results are stored in the cluster. - /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter. - /// - /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepOnCompletion(bool? value = true) - { - Instance.KeepOnCompletion = value; - return this; - } - /// /// /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. @@ -460,6 +471,32 @@ public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor IncludeCcs return this; } + /// + /// + /// The period for which the query and its results are stored in the cluster. + /// The default period is five days. + /// When this period expires, the query and its results are deleted, even if the query is still ongoing. + /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value. + /// + /// + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? value) + { + Instance.KeepAlive = value; + return this; + } + + /// + /// + /// Indicates whether the query and its results are stored in the cluster. + /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter. + /// + /// + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepOnCompletion(bool? value = true) + { + Instance.KeepOnCompletion = value; + return this; + } + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Locale(string? value) { Instance.Locale = value; @@ -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. @@ -642,73 +694,73 @@ public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor /// /// - /// The period for which the query and its results are stored in the cluster. - /// The default period is five days. - /// When this period expires, the query and its results are deleted, even if the query is still ongoing. - /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value. + /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. /// /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? value) + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Columnar(bool? value = true) { - Instance.KeepAlive = value; + Instance.Columnar = value; return this; } /// /// - /// Indicates whether the query and its results are stored in the cluster. - /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter. + /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. /// /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepOnCompletion(bool? value = true) + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? value) { - Instance.KeepOnCompletion = value; + Instance.Filter = value; return this; } /// /// - /// By default, ES|QL returns results as rows. For example, FROM returns each individual document as one row. For the JSON, YAML, CBOR and smile formats, ES|QL can return the results in a columnar fashion where one row represents all the values of a certain column in the results. + /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. /// /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Columnar(bool? value = true) + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Filter(System.Action> action) { - Instance.Columnar = value; + Instance.Filter = Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action); return this; } /// /// - /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. + /// When set to true and performing a cross-cluster query, the response will include an extra _clusters + /// object with information about the clusters that participated in the search along with info such as shards + /// count. /// /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Filter(Elastic.Clients.Elasticsearch.QueryDsl.Query? value) + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor IncludeCcsMetadata(bool? value = true) { - Instance.Filter = value; + Instance.IncludeCcsMetadata = value; return this; } /// /// - /// Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on. + /// The period for which the query and its results are stored in the cluster. + /// The default period is five days. + /// When this period expires, the query and its results are deleted, even if the query is still ongoing. + /// If the keep_on_completion parameter is false, Elasticsearch only stores async queries that do not complete within the period set by the wait_for_completion_timeout parameter, regardless of this value. /// /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor Filter(System.Action> action) + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepAlive(Elastic.Clients.Elasticsearch.Duration? value) { - Instance.Filter = Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action); + Instance.KeepAlive = value; return this; } /// /// - /// When set to true and performing a cross-cluster query, the response will include an extra _clusters - /// object with information about the clusters that participated in the search along with info such as shards - /// count. + /// Indicates whether the query and its results are stored in the cluster. + /// If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the wait_for_completion_timeout parameter. /// /// - public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor IncludeCcsMetadata(bool? value = true) + public Elastic.Clients.Elasticsearch.Esql.AsyncQueryRequestDescriptor KeepOnCompletion(bool? value = true) { - Instance.IncludeCcsMetadata = value; + Instance.KeepOnCompletion = value; return this; } 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..f1d24593370 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. @@ -70,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest Read(ref Sys LocalJsonValue propQuery = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propColumnar.TryReadProperty(ref reader, options, PropColumnar, null)) + if (propColumnar.TryReadProperty(ref reader, options, PropColumnar, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest Read(ref Sys continue; } - if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, null)) + if (propIncludeCcsMetadata.TryReadProperty(ref reader, options, PropIncludeCcsMetadata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -95,7 +106,7 @@ public override Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest Read(ref Sys continue; } - if (propProfile.TryReadProperty(ref reader, options, PropProfile, null)) + if (propProfile.TryReadProperty(ref reader, options, PropProfile, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,12 +141,12 @@ public override Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Esql.EsqlQueryRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropColumnar, value.Columnar, null, null); + writer.WriteProperty(options, PropColumnar, value.Columnar, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropIncludeCcsMetadata, value.IncludeCcsMetadata, null, null); + writer.WriteProperty(options, PropIncludeCcsMetadata, value.IncludeCcsMetadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLocale, value.Locale, null, null); writer.WriteProperty(options, PropParams, value.Params, 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, PropProfile, value.Profile, null, null); + writer.WriteProperty(options, PropProfile, value.Profile, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteEndObject(); } @@ -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/ExistsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs index 21725210d8c..68a57ba22d8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsRequest.g.cs @@ -659,6 +659,11 @@ public ExistsRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, El Instance = new Elastic.Clients.Elasticsearch.ExistsRequest(index, id); } + public ExistsRequestDescriptor(string index, Elastic.Clients.Elasticsearch.Id id) + { + Instance = new Elastic.Clients.Elasticsearch.ExistsRequest((Elastic.Clients.Elasticsearch.IndexName)index, id); + } + public ExistsRequestDescriptor(TDocument document) { Instance = new Elastic.Clients.Elasticsearch.ExistsRequest(typeof(TDocument), Elastic.Clients.Elasticsearch.Id.From(document)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs index 30dee1597ae..69ec3b5b575 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExistsSourceRequest.g.cs @@ -541,6 +541,11 @@ public ExistsSourceRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName ind Instance = new Elastic.Clients.Elasticsearch.ExistsSourceRequest(index, id); } + public ExistsSourceRequestDescriptor(string index, Elastic.Clients.Elasticsearch.Id id) + { + Instance = new Elastic.Clients.Elasticsearch.ExistsSourceRequest((Elastic.Clients.Elasticsearch.IndexName)index, id); + } + public ExistsSourceRequestDescriptor(TDocument document) { Instance = new Elastic.Clients.Elasticsearch.ExistsSourceRequest(typeof(TDocument), Elastic.Clients.Elasticsearch.Id.From(document)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs index 3d383d1fb8d..13ff52fde28 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ExplainRequest.g.cs @@ -682,6 +682,11 @@ public ExplainRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, E Instance = new Elastic.Clients.Elasticsearch.ExplainRequest(index, id); } + public ExplainRequestDescriptor(string index, Elastic.Clients.Elasticsearch.Id id) + { + Instance = new Elastic.Clients.Elasticsearch.ExplainRequest((Elastic.Clients.Elasticsearch.IndexName)index, id); + } + public ExplainRequestDescriptor(TDocument document) { Instance = new Elastic.Clients.Elasticsearch.ExplainRequest(typeof(TDocument), Elastic.Clients.Elasticsearch.Id.From(document)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs index 6b5a6ed241f..1ba52d8db38 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetRequest.g.cs @@ -831,6 +831,11 @@ public GetRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, Elast Instance = new Elastic.Clients.Elasticsearch.GetRequest(index, id); } + public GetRequestDescriptor(string index, Elastic.Clients.Elasticsearch.Id id) + { + Instance = new Elastic.Clients.Elasticsearch.GetRequest((Elastic.Clients.Elasticsearch.IndexName)index, id); + } + public GetRequestDescriptor(TDocument document) { Instance = new Elastic.Clients.Elasticsearch.GetRequest(typeof(TDocument), Elastic.Clients.Elasticsearch.Id.From(document)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs index e9f0a87b85a..cc410e53478 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.GetResponse Read(ref Sy continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.GetResponse Read(ref Sy continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.GetResponse Read(ref Sy continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -134,11 +134,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien 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, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs index 936f3dd5be1..f4c77282c86 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetSourceRequest.g.cs @@ -584,6 +584,11 @@ public GetSourceRequestDescriptor(Elastic.Clients.Elasticsearch.IndexName index, Instance = new Elastic.Clients.Elasticsearch.GetSourceRequest(index, id); } + public GetSourceRequestDescriptor(string index, Elastic.Clients.Elasticsearch.Id id) + { + Instance = new Elastic.Clients.Elasticsearch.GetSourceRequest((Elastic.Clients.Elasticsearch.IndexName)index, id); + } + public GetSourceRequestDescriptor(TDocument document) { Instance = new Elastic.Clients.Elasticsearch.GetSourceRequest(typeof(TDocument), Elastic.Clients.Elasticsearch.Id.From(document)); 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/HealthReportResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/HealthReportResponse.g.cs index 422b2d9bcbc..624165f5504 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/HealthReportResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/HealthReportResponse.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.HealthReportResponse Read(ref Syst continue; } - if (propStatus.TryReadProperty(ref reader, options, PropStatus, null)) + if (propStatus.TryReadProperty(ref reader, options, PropStatus, static Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropClusterName, value.ClusterName, null, null); writer.WriteProperty(options, PropIndicators, value.Indicators, null, null); - writer.WriteProperty(options, PropStatus, value.Status, null, null); + writer.WriteProperty(options, PropStatus, value.Status, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.HealthReport.IndicatorHealthStatus? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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/AnalyzeIndexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs index e4139deac79..9b4a72817bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/AnalyzeIndexRequest.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.AnalyzeIndexReques continue; } - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -128,7 +128,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); writer.WriteProperty(options, PropAttributes, value.Attributes, 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, PropCharFilter, value.CharFilter, 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, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFilter, value.Filter, 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, PropNormalizer, value.Normalizer, null, null); 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/FieldUsageStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FieldUsageStatsResponse.g.cs index 6665bfe081e..c7fdc6108ca 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FieldUsageStatsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/FieldUsageStatsResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.FieldUsageStatsRes } propStats ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out Elastic.Clients.Elasticsearch.IndexManagement.UsageStatsIndex value, null, null); + reader.ReadProperty(options, out string key, out Elastic.Clients.Elasticsearch.IndexManagement.UsageStatsIndex value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static Elastic.Clients.Elasticsearch.IndexManagement.UsageStatsIndex (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propStats[key] = value; } @@ -60,7 +60,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.Stats) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } 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..a4ba05793e7 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)); } } @@ -50,9 +50,5 @@ internal GetAliasResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstr _ = sentinel; } - public -#if NET7_0_OR_GREATER -required -#endif -System.Collections.Generic.IReadOnlyDictionary Aliases { get; set; } + public System.Collections.Generic.IReadOnlyDictionary? Values { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleStatsResponse.g.cs index dba8e30ee07..7935e65f7a8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleStatsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetDataLifecycleStatsResponse.g.cs @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.GetDataLifecycleSt continue; } - if (propLastRunDurationInMillis.TryReadProperty(ref reader, options, PropLastRunDurationInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propLastRunDurationInMillis.TryReadProperty(ref reader, options, PropLastRunDurationInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propTimeBetweenStartsInMillis.TryReadProperty(ref reader, options, PropTimeBetweenStartsInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTimeBetweenStartsInMillis.TryReadProperty(ref reader, options, PropTimeBetweenStartsInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -83,8 +83,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDataStreamCount, value.DataStreamCount, null, null); writer.WriteProperty(options, PropDataStreams, value.DataStreams, 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, PropLastRunDurationInMillis, value.LastRunDurationInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropTimeBetweenStartsInMillis, value.TimeBetweenStartsInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropLastRunDurationInMillis, value.LastRunDurationInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTimeBetweenStartsInMillis, value.TimeBetweenStartsInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } 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/GetMigrateReindexStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMigrateReindexStatusResponse.g.cs index 7c092fbfd45..db19e3f8358 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMigrateReindexStatusResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/GetMigrateReindexStatusResponse.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.GetMigrateReindexS 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)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -134,7 +134,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropException, value.Exception, null, null); writer.WriteProperty(options, PropInProgress, value.InProgress, 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, PropPending, value.Pending, 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.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropStartTimeMillis, value.StartTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropSuccesses, value.Successes, null, null); writer.WriteProperty(options, PropTotalIndicesInDataStream, value.TotalIndicesInDataStream, null, null); 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/PutAliasRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs index 1af2e90b105..a9f6190a39f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutAliasRequest.g.cs @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutAliasRequest Re continue; } - if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, null)) + if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,7 +110,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFilter, value.Filter, null, null); writer.WriteProperty(options, PropIndexRouting, value.IndexRouting, null, null); - writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, null); + writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropSearchRouting, value.SearchRouting, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs index faaabbc3a33..2ed8b9dffb3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutDataLifecycleRequest.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutDataLifecycleRe continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,7 +104,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDataRetention, value.DataRetention, null, null); writer.WriteProperty(options, PropDownsampling, value.Downsampling, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs index 1e5ac240245..1fcacf215ff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndexTemplateRequest.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutIndexTemplateRe LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowAutoCreate.TryReadProperty(ref reader, options, PropAllowAutoCreate, null)) + if (propAllowAutoCreate.TryReadProperty(ref reader, options, PropAllowAutoCreate, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutIndexTemplateRe continue; } - if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, null)) + if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -111,7 +111,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutIndexTemplateRe continue; } - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,7 +121,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutIndexTemplateRe continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -154,16 +154,16 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutIndexTemplateRe public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.PutIndexTemplateRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowAutoCreate, value.AllowAutoCreate, null, null); + writer.WriteProperty(options, PropAllowAutoCreate, value.AllowAutoCreate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropComposedOf, value.ComposedOf, 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, PropDataStream, value.DataStream, null, null); - writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, null); + writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIgnoreMissingComponentTemplates, value.IgnoreMissingComponentTemplates, 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, PropIndexPatterns, value.IndexPatterns, 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, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTemplate, value.Template, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs index 092f7376244..75ff713121c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutIndicesSettingsRequest.g.cs @@ -115,10 +115,48 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// /// To revert a setting to the default value, use a null value. -/// The list of per-index settings that can be updated dynamically on live indices can be found in index module documentation. +/// The list of per-index settings that can be updated dynamically on live indices can be found in index settings documentation. /// To preserve existing settings from being updated, set the preserve_existing parameter to true. /// /// +/// There are multiple valid ways to represent index settings in the request body. You can specify only the setting, for example: +/// +/// +/// { +/// "number_of_replicas": 1 +/// } +/// +/// +/// Or you can use an index setting object: +/// +/// +/// { +/// "index": { +/// "number_of_replicas": 1 +/// } +/// } +/// +/// +/// Or you can use dot annotation: +/// +/// +/// { +/// "index.number_of_replicas": 1 +/// } +/// +/// +/// Or you can embed any of the aforementioned options in a settings object. For example: +/// +/// +/// { +/// "settings": { +/// "index": { +/// "number_of_replicas": 1 +/// } +/// } +/// } +/// +/// /// NOTE: You can only define new analyzers on closed indices. /// To add an analyzer, you must close the index, define the analyzer, and reopen the index. /// You cannot close the write index of a data stream. @@ -265,10 +303,48 @@ internal PutIndicesSettingsRequest(Elastic.Clients.Elasticsearch.Serialization.J /// /// /// To revert a setting to the default value, use a null value. -/// The list of per-index settings that can be updated dynamically on live indices can be found in index module documentation. +/// The list of per-index settings that can be updated dynamically on live indices can be found in index settings documentation. /// To preserve existing settings from being updated, set the preserve_existing parameter to true. /// /// +/// There are multiple valid ways to represent index settings in the request body. You can specify only the setting, for example: +/// +/// +/// { +/// "number_of_replicas": 1 +/// } +/// +/// +/// Or you can use an index setting object: +/// +/// +/// { +/// "index": { +/// "number_of_replicas": 1 +/// } +/// } +/// +/// +/// Or you can use dot annotation: +/// +/// +/// { +/// "index.number_of_replicas": 1 +/// } +/// +/// +/// Or you can embed any of the aforementioned options in a settings object. For example: +/// +/// +/// { +/// "settings": { +/// "index": { +/// "number_of_replicas": 1 +/// } +/// } +/// } +/// +/// /// NOTE: You can only define new analyzers on closed indices. /// To add an analyzer, you must close the index, define the analyzer, and reopen the index. /// You cannot close the write index of a data stream. @@ -514,10 +590,48 @@ public Elastic.Clients.Elasticsearch.IndexManagement.PutIndicesSettingsRequestDe /// /// /// To revert a setting to the default value, use a null value. -/// The list of per-index settings that can be updated dynamically on live indices can be found in index module documentation. +/// The list of per-index settings that can be updated dynamically on live indices can be found in index settings documentation. /// To preserve existing settings from being updated, set the preserve_existing parameter to true. /// /// +/// There are multiple valid ways to represent index settings in the request body. You can specify only the setting, for example: +/// +/// +/// { +/// "number_of_replicas": 1 +/// } +/// +/// +/// Or you can use an index setting object: +/// +/// +/// { +/// "index": { +/// "number_of_replicas": 1 +/// } +/// } +/// +/// +/// Or you can use dot annotation: +/// +/// +/// { +/// "index.number_of_replicas": 1 +/// } +/// +/// +/// Or you can embed any of the aforementioned options in a settings object. For example: +/// +/// +/// { +/// "settings": { +/// "index": { +/// "number_of_replicas": 1 +/// } +/// } +/// } +/// +/// /// NOTE: You can only define new analyzers on closed indices. /// To add an analyzer, you must close the index, define the analyzer, and reopen the index. /// You cannot close the write index of a data stream. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs index ebccfe90c59..2bf017fba6a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutMappingRequest.g.cs @@ -104,12 +104,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutMappingRequest LocalJsonValue propSource = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDateDetection.TryReadProperty(ref reader, options, PropDateDetection, null)) + if (propDateDetection.TryReadProperty(ref reader, options, PropDateDetection, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -134,7 +134,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutMappingRequest continue; } - if (propNumericDetection.TryReadProperty(ref reader, options, PropNumericDetection, null)) + if (propNumericDetection.TryReadProperty(ref reader, options, PropNumericDetection, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -188,13 +188,13 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutMappingRequest public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.PutMappingRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDateDetection, value.DateDetection, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDateDetection, value.DateDetection, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDynamicDateFormats, value.DynamicDateFormats, 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, PropDynamicTemplates, value.DynamicTemplates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); writer.WriteProperty(options, PropFieldNames, value.FieldNames, 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, PropNumericDetection, value.NumericDetection, null, null); + writer.WriteProperty(options, PropNumericDetection, value.NumericDetection, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropRuntime, value.Runtime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs index be23a48f4d8..ae4d415aa00 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/PutTemplateRequest.g.cs @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutTemplateRequest continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.PutTemplateRequest continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -125,9 +125,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAliases, value.Aliases, 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, PropIndexPatterns, value.IndexPatterns, 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, PropMappings, value.Mappings, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSettings, value.Settings, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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/IndexManagement/SimulateTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs index b2c35221491..fa9459662dc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/SimulateTemplateRequest.g.cs @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SimulateTemplateRe LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowAutoCreate.TryReadProperty(ref reader, options, PropAllowAutoCreate, null)) + if (propAllowAutoCreate.TryReadProperty(ref reader, options, PropAllowAutoCreate, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,7 +97,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SimulateTemplateRe continue; } - if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, null)) + if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -117,7 +117,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SimulateTemplateRe continue; } - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,7 +127,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SimulateTemplateRe continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -160,16 +160,16 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SimulateTemplateRe public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SimulateTemplateRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowAutoCreate, value.AllowAutoCreate, null, null); + writer.WriteProperty(options, PropAllowAutoCreate, value.AllowAutoCreate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropComposedOf, value.ComposedOf, 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, PropDataStream, value.DataStream, null, null); - writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, null); + writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIgnoreMissingComponentTemplates, value.IgnoreMissingComponentTemplates, 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, PropIndexPatterns, value.IndexPatterns, 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, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTemplate, value.Template, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs index 49baf101077..7876d9bb30d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.IndexResponse Read(ref System.Text LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, null)) + if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.IndexResponse Read(ref System.Text continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.IndexResponse Read(ref System.Text continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,12 +113,12 @@ public override Elastic.Clients.Elasticsearch.IndexResponse Read(ref System.Text public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, null); + writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResult, value.Result, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/ChatCompletionUnifiedRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/ChatCompletionUnifiedRequest.g.cs index e8813c17772..85cb48b1150 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/ChatCompletionUnifiedRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/ChatCompletionUnifiedRequest.g.cs @@ -55,14 +55,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// It only works with the chat_completion task type for openai and elastic inference services. /// /// -/// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. -/// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. -/// -/// /// NOTE: The chat_completion task type is only available within the _stream API and only supports streaming. /// The Chat completion inference API and the Stream inference API differ in their response structure and capabilities. /// The Chat completion inference API provides more comprehensive customization options through more fields and function calling support. -/// If you use the openai service or the elastic service, use the Chat completion inference API. +/// If you use the openai, hugging_face or the elastic service, use the Chat completion inference API. /// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.ChatCompletionUnifiedRequestConverter))] @@ -131,14 +127,10 @@ internal ChatCompletionUnifiedRequest(Elastic.Clients.Elasticsearch.Serializatio /// It only works with the chat_completion task type for openai and elastic inference services. /// /// -/// IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. -/// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. -/// -/// /// NOTE: The chat_completion task type is only available within the _stream API and only supports streaming. /// The Chat completion inference API and the Stream inference API differ in their response structure and capabilities. /// The Chat completion inference API provides more comprehensive customization options through more fields and function calling support. -/// If you use the openai service or the elastic service, use the Chat completion inference API. +/// If you use the openai, hugging_face or the elastic service, use the Chat completion inference API. /// /// public readonly partial struct ChatCompletionUnifiedRequestDescriptor 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/PutAlibabacloudResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAlibabacloudResponse.g.cs index 31d317bddda..f4cd328413d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAlibabacloudResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAlibabacloudResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.PutAlibabacloudResponse LocalJsonValue propService = default; LocalJsonValue propServiceSettings = default; LocalJsonValue propTaskSettings = default; - LocalJsonValue propTaskType = default; + LocalJsonValue propTaskType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -177,5 +177,5 @@ internal PutAlibabacloudResponse(Elastic.Clients.Elasticsearch.Serialization.Jso #if NET7_0_OR_GREATER required #endif - Elastic.Clients.Elasticsearch.Inference.TaskType TaskType { get; set; } + Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI TaskType { get; set; } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockRequest.g.cs index 227f5e0d8de..7ebf3c21e32 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutAmazonbedrockRequest.g.cs @@ -97,7 +97,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// Create an Amazon Bedrock inference endpoint. /// /// -/// Creates an inference endpoint to perform an inference task with the amazonbedrock service. +/// Create an inference endpoint to perform an inference task with the amazonbedrock service. /// /// /// info @@ -198,7 +198,7 @@ internal PutAmazonbedrockRequest(Elastic.Clients.Elasticsearch.Serialization.Jso /// Create an Amazon Bedrock inference endpoint. /// /// -/// Creates an inference endpoint to perform an inference task with the amazonbedrock service. +/// Create an inference endpoint to perform an inference task with the amazonbedrock service. /// /// /// info diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceRequest.g.cs index 5fd154eb21b..06e56e72c70 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutHuggingFaceRequest.g.cs @@ -32,12 +32,14 @@ internal sealed partial class PutHuggingFaceRequestConverter : System.Text.Json. private static readonly System.Text.Json.JsonEncodedText PropChunkingSettings = System.Text.Json.JsonEncodedText.Encode("chunking_settings"); private static readonly System.Text.Json.JsonEncodedText PropService = System.Text.Json.JsonEncodedText.Encode("service"); private static readonly System.Text.Json.JsonEncodedText PropServiceSettings = System.Text.Json.JsonEncodedText.Encode("service_settings"); + private static readonly System.Text.Json.JsonEncodedText PropTaskSettings = System.Text.Json.JsonEncodedText.Encode("task_settings"); public override Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequest 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 propServiceSettings = default; + LocalJsonValue propTaskSettings = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { if (propChunkingSettings.TryReadProperty(ref reader, options, PropChunkingSettings, null)) @@ -56,6 +58,11 @@ public override Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequest Re continue; } + if (propTaskSettings.TryReadProperty(ref reader, options, PropTaskSettings, null)) + { + continue; + } + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) { reader.Skip(); @@ -69,7 +76,8 @@ public override Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequest Re return new Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { ChunkingSettings = propChunkingSettings.Value, - ServiceSettings = propServiceSettings.Value + ServiceSettings = propServiceSettings.Value, + TaskSettings = propTaskSettings.Value }; } @@ -79,6 +87,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropChunkingSettings, value.ChunkingSettings, null, null); writer.WriteProperty(options, PropService, value.Service, null, null); writer.WriteProperty(options, PropServiceSettings, value.ServiceSettings, null, null); + writer.WriteProperty(options, PropTaskSettings, value.TaskSettings, null, null); writer.WriteEndObject(); } } @@ -89,14 +98,17 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// /// Create an inference endpoint to perform an inference task with the hugging_face service. +/// Supported tasks include: text_embedding, completion, and chat_completion. /// /// -/// You must first create an inference endpoint on the Hugging Face endpoint page to get an endpoint URL. -/// Select the model you want to use on the new endpoint creation page (for example intfloat/e5-small-v2), then select the sentence embeddings task under the advanced configuration section. -/// Create the endpoint and copy the URL after the endpoint initialization has been finished. +/// To configure the endpoint, first visit the Hugging Face Inference Endpoints page and create a new endpoint. +/// Select a model that supports the task you intend to use. /// /// -/// The following models are recommended for the Hugging Face service: +/// For Elastic's text_embedding task: +/// The selected model must support the Sentence Embeddings task. On the new endpoint creation page, select the Sentence Embeddings task under the Advanced Configuration section. +/// After the endpoint has initialized, copy the generated endpoint URL. +/// Recommended models for text_embedding task: /// /// /// @@ -135,6 +147,48 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// /// /// +/// +/// For Elastic's chat_completion and completion tasks: +/// The selected model must support the Text Generation task and expose OpenAI API. HuggingFace supports both serverless and dedicated endpoints for Text Generation. When creating dedicated endpoint select the Text Generation task. +/// After the endpoint is initialized (for dedicated) or ready (for serverless), ensure it supports the OpenAI API and includes /v1/chat/completions part in URL. Then, copy the full endpoint URL for use. +/// Recommended models for chat_completion and completion tasks: +/// +/// +/// +/// +/// Mistral-7B-Instruct-v0.2 +/// +/// +/// +/// +/// QwQ-32B +/// +/// +/// +/// +/// Phi-3-mini-128k-instruct +/// +/// +/// +/// +/// For Elastic's rerank task: +/// The selected model must support the sentence-ranking task and expose OpenAI API. +/// HuggingFace supports only dedicated (not serverless) endpoints for Rerank so far. +/// After the endpoint is initialized, copy the full endpoint URL for use. +/// Tested models for rerank task: +/// +/// +/// +/// +/// bge-reranker-base +/// +/// +/// +/// +/// jina-reranker-v1-turbo-en-GGUF +/// +/// +/// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequestConverter))] public sealed partial class PutHuggingFaceRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest @@ -215,6 +269,14 @@ internal PutHuggingFaceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC required #endif Elastic.Clients.Elasticsearch.Inference.HuggingFaceServiceSettings ServiceSettings { get; set; } + + /// + /// + /// Settings to configure the inference task. + /// These settings are specific to the task type you specified. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettings? TaskSettings { get; set; } } /// @@ -223,14 +285,17 @@ internal PutHuggingFaceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// /// Create an inference endpoint to perform an inference task with the hugging_face service. +/// Supported tasks include: text_embedding, completion, and chat_completion. /// /// -/// You must first create an inference endpoint on the Hugging Face endpoint page to get an endpoint URL. -/// Select the model you want to use on the new endpoint creation page (for example intfloat/e5-small-v2), then select the sentence embeddings task under the advanced configuration section. -/// Create the endpoint and copy the URL after the endpoint initialization has been finished. +/// To configure the endpoint, first visit the Hugging Face Inference Endpoints page and create a new endpoint. +/// Select a model that supports the task you intend to use. /// /// -/// The following models are recommended for the Hugging Face service: +/// For Elastic's text_embedding task: +/// The selected model must support the Sentence Embeddings task. On the new endpoint creation page, select the Sentence Embeddings task under the Advanced Configuration section. +/// After the endpoint has initialized, copy the generated endpoint URL. +/// Recommended models for text_embedding task: /// /// /// @@ -269,6 +334,48 @@ internal PutHuggingFaceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// /// +/// +/// For Elastic's chat_completion and completion tasks: +/// The selected model must support the Text Generation task and expose OpenAI API. HuggingFace supports both serverless and dedicated endpoints for Text Generation. When creating dedicated endpoint select the Text Generation task. +/// After the endpoint is initialized (for dedicated) or ready (for serverless), ensure it supports the OpenAI API and includes /v1/chat/completions part in URL. Then, copy the full endpoint URL for use. +/// Recommended models for chat_completion and completion tasks: +/// +/// +/// +/// +/// Mistral-7B-Instruct-v0.2 +/// +/// +/// +/// +/// QwQ-32B +/// +/// +/// +/// +/// Phi-3-mini-128k-instruct +/// +/// +/// +/// +/// For Elastic's rerank task: +/// The selected model must support the sentence-ranking task and expose OpenAI API. +/// HuggingFace supports only dedicated (not serverless) endpoints for Rerank so far. +/// After the endpoint is initialized, copy the full endpoint URL for use. +/// Tested models for rerank task: +/// +/// +/// +/// +/// bge-reranker-base +/// +/// +/// +/// +/// jina-reranker-v1-turbo-en-GGUF +/// +/// +/// /// public readonly partial struct PutHuggingFaceRequestDescriptor { @@ -373,6 +480,42 @@ public Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequestDescriptor S return this; } + /// + /// + /// Settings to configure the inference task. + /// These settings are specific to the task type you specified. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequestDescriptor TaskSettings(Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettings? value) + { + Instance.TaskSettings = value; + return this; + } + + /// + /// + /// Settings to configure the inference task. + /// These settings are specific to the task type you specified. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequestDescriptor TaskSettings() + { + Instance.TaskSettings = Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettingsDescriptor.Build(null); + return this; + } + + /// + /// + /// Settings to configure the inference task. + /// These settings are specific to the task type you specified. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequestDescriptor TaskSettings(System.Action? action) + { + Instance.TaskSettings = Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettingsDescriptor.Build(action); + return this; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] internal static Elastic.Clients.Elasticsearch.Inference.PutHuggingFaceRequest Build(System.Action action) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceRequest.g.cs index d9cff4d8225..7d4f3c9213d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutInferenceRequest.g.cs @@ -49,6 +49,91 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. /// However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. /// +/// +/// The following integrations are available through the inference API. You can find the available task types next to the integration name: +/// +/// +/// +/// +/// AlibabaCloud AI Search (completion, rerank, sparse_embedding, text_embedding) +/// +/// +/// +/// +/// Amazon Bedrock (completion, text_embedding) +/// +/// +/// +/// +/// Anthropic (completion) +/// +/// +/// +/// +/// Azure AI Studio (completion, text_embedding) +/// +/// +/// +/// +/// Azure OpenAI (completion, text_embedding) +/// +/// +/// +/// +/// Cohere (completion, rerank, text_embedding) +/// +/// +/// +/// +/// Elasticsearch (rerank, sparse_embedding, text_embedding - this service is for built-in models and models uploaded through Eland) +/// +/// +/// +/// +/// ELSER (sparse_embedding) +/// +/// +/// +/// +/// Google AI Studio (completion, text_embedding) +/// +/// +/// +/// +/// Google Vertex AI (rerank, text_embedding) +/// +/// +/// +/// +/// Hugging Face (chat_completion, completion, rerank, text_embedding) +/// +/// +/// +/// +/// Mistral (chat_completion, completion, text_embedding) +/// +/// +/// +/// +/// OpenAI (chat_completion, completion, text_embedding) +/// +/// +/// +/// +/// VoyageAI (text_embedding, rerank) +/// +/// +/// +/// +/// Watsonx inference integration (text_embedding) +/// +/// +/// +/// +/// JinaAI (text_embedding, rerank) +/// +/// +/// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.PutInferenceRequestConverter))] public sealed partial class PutInferenceRequest : Elastic.Clients.Elasticsearch.Requests.PlainRequest @@ -108,7 +193,7 @@ internal PutInferenceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// /// - /// The task type + /// The task type. Refer to the integration list in the API description for the available task types. /// /// public Elastic.Clients.Elasticsearch.Inference.TaskType? TaskType { get => P("task_type"); set => PO("task_type", value); } @@ -128,6 +213,91 @@ internal PutInferenceRequest(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models. /// However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs. /// +/// +/// The following integrations are available through the inference API. You can find the available task types next to the integration name: +/// +/// +/// +/// +/// AlibabaCloud AI Search (completion, rerank, sparse_embedding, text_embedding) +/// +/// +/// +/// +/// Amazon Bedrock (completion, text_embedding) +/// +/// +/// +/// +/// Anthropic (completion) +/// +/// +/// +/// +/// Azure AI Studio (completion, text_embedding) +/// +/// +/// +/// +/// Azure OpenAI (completion, text_embedding) +/// +/// +/// +/// +/// Cohere (completion, rerank, text_embedding) +/// +/// +/// +/// +/// Elasticsearch (rerank, sparse_embedding, text_embedding - this service is for built-in models and models uploaded through Eland) +/// +/// +/// +/// +/// ELSER (sparse_embedding) +/// +/// +/// +/// +/// Google AI Studio (completion, text_embedding) +/// +/// +/// +/// +/// Google Vertex AI (rerank, text_embedding) +/// +/// +/// +/// +/// Hugging Face (chat_completion, completion, rerank, text_embedding) +/// +/// +/// +/// +/// Mistral (chat_completion, completion, text_embedding) +/// +/// +/// +/// +/// OpenAI (chat_completion, completion, text_embedding) +/// +/// +/// +/// +/// VoyageAI (text_embedding, rerank) +/// +/// +/// +/// +/// Watsonx inference integration (text_embedding) +/// +/// +/// +/// +/// JinaAI (text_embedding, rerank) +/// +/// +/// /// public readonly partial struct PutInferenceRequestDescriptor { @@ -175,7 +345,7 @@ public Elastic.Clients.Elasticsearch.Inference.PutInferenceRequestDescriptor Inf /// /// - /// The task type + /// The task type. Refer to the integration list in the API description for the available task types. /// /// public Elastic.Clients.Elasticsearch.Inference.PutInferenceRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Inference.TaskType? value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralRequest.g.cs index 34adeb02365..34c305f7f3c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Inference/PutMistralRequest.g.cs @@ -88,7 +88,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien /// Create a Mistral inference endpoint. /// /// -/// Creates an inference endpoint to perform an inference task with the mistral service. +/// Create an inference endpoint to perform an inference task with the mistral service. /// /// [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.PutMistralRequestConverter))] @@ -137,8 +137,7 @@ internal PutMistralRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// /// - /// The task type. - /// The only valid task type for the model to perform is text_embedding. + /// The type of the inference task that the model will perform. /// /// public @@ -178,7 +177,7 @@ internal PutMistralRequest(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// Create a Mistral inference endpoint. /// /// -/// Creates an inference endpoint to perform an inference task with the mistral service. +/// Create an inference endpoint to perform an inference task with the mistral service. /// /// public readonly partial struct PutMistralRequestDescriptor @@ -220,8 +219,7 @@ public Elastic.Clients.Elasticsearch.Inference.PutMistralRequestDescriptor Mistr /// /// - /// The task type. - /// The only valid task type for the model to perform is text_embedding. + /// The type of the inference task that the model will perform. /// /// public Elastic.Clients.Elasticsearch.Inference.PutMistralRequestDescriptor TaskType(Elastic.Clients.Elasticsearch.Inference.MistralTaskType value) 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/Ingest/PutPipelineRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs index c199bde3d89..507c6e82465 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Ingest/PutPipelineRequest.g.cs @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequest Read(ref LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, null)) + if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,7 +92,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequest Read(ref continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,12 +121,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequest Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.PutPipelineRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, null); + writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, 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, PropOnFailure, value.OnFailure, 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, PropProcessors, value.Processors, 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, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartBasicResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartBasicResponse.g.cs index ca8db273d91..8350f33c90d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartBasicResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartBasicResponse.g.cs @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.LicenseManagement.PostStartBasicRe continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.LicenseManagement.LicenseType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAcknowledged, value.Acknowledged, null, null); writer.WriteProperty(options, PropBasicWasStarted, value.BasicWasStarted, null, null); writer.WriteProperty(options, PropErrorMessage, value.ErrorMessage, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.LicenseManagement.LicenseType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartTrialResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartTrialResponse.g.cs index 66145dadcc6..a0b2f6ee026 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartTrialResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/LicenseManagement/PostStartTrialResponse.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.LicenseManagement.PostStartTrialRe continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.LicenseManagement.LicenseType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAcknowledged, value.Acknowledged, null, null); writer.WriteProperty(options, PropErrorMessage, value.ErrorMessage, null, null); writer.WriteProperty(options, PropTrialWasStarted, value.TrialWasStarted, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.LicenseManagement.LicenseType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/CloseJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/CloseJobRequest.g.cs index 819f68b0e26..d8faf8a4b68 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/CloseJobRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/CloseJobRequest.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.CloseJobRequest Re LocalJsonValue propTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowNoMatch.TryReadProperty(ref reader, options, PropAllowNoMatch, null)) + if (propAllowNoMatch.TryReadProperty(ref reader, options, PropAllowNoMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propForce.TryReadProperty(ref reader, options, PropForce, null)) + if (propForce.TryReadProperty(ref reader, options, PropForce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -77,8 +77,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.CloseJobRequest Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.CloseJobRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowNoMatch, value.AllowNoMatch, null, null); - writer.WriteProperty(options, PropForce, value.Force, null, null); + writer.WriteProperty(options, PropAllowNoMatch, value.AllowNoMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropForce, value.Force, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/DeleteExpiredDataRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/DeleteExpiredDataRequest.g.cs index 28d63c49ca4..a10b531ead9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/DeleteExpiredDataRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/DeleteExpiredDataRequest.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DeleteExpiredDataR LocalJsonValue propTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, null)) + if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -69,7 +69,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DeleteExpiredDataR public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DeleteExpiredDataRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, null); + writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); writer.WriteEndObject(); } 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..007887865b1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ExplainDataFrameAnalyticsRequest.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAn LocalJsonValue propSource = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, null)) + if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAn continue; } - if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, null)) + if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -117,12 +117,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAn public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.ExplainDataFrameAnalyticsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, null); + writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAnalysis, value.Analysis, null, null); writer.WriteProperty(options, PropAnalyzedFields, value.AnalyzedFields, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropDest, value.Dest, null, null); - writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, null); + writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelMemoryLimit, value.ModelMemoryLimit, null, null); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteEndObject(); @@ -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/FlushJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobRequest.g.cs index 34bdf48e8b2..26d21bfab0b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobRequest.g.cs @@ -45,27 +45,27 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.FlushJobRequest Re LocalJsonValue propStart = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAdvanceTime.TryReadProperty(ref reader, options, PropAdvanceTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propAdvanceTime.TryReadProperty(ref reader, options, PropAdvanceTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propCalcInterim.TryReadProperty(ref reader, options, PropCalcInterim, null)) + if (propCalcInterim.TryReadProperty(ref reader, options, PropCalcInterim, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propSkipTime.TryReadProperty(ref reader, options, PropSkipTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propSkipTime.TryReadProperty(ref reader, options, PropSkipTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -93,11 +93,11 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.FlushJobRequest Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.FlushJobRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAdvanceTime, value.AdvanceTime, 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, PropCalcInterim, value.CalcInterim, null, null); - writer.WriteProperty(options, PropEnd, value.End, 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, PropSkipTime, value.SkipTime, 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, PropStart, value.Start, 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, PropAdvanceTime, value.AdvanceTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropCalcInterim, value.CalcInterim, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropSkipTime, value.SkipTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobResponse.g.cs index 24655c04dcf..ea1d8c49ff1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/FlushJobResponse.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.FlushJobResponse R continue; } - if (propLastFinalizedBucketEnd.TryReadProperty(ref reader, options, PropLastFinalizedBucketEnd, null)) + if (propLastFinalizedBucketEnd.TryReadProperty(ref reader, options, PropLastFinalizedBucketEnd, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFlushed, value.Flushed, null, null); - writer.WriteProperty(options, PropLastFinalizedBucketEnd, value.LastFinalizedBucketEnd, null, null); + writer.WriteProperty(options, PropLastFinalizedBucketEnd, value.LastFinalizedBucketEnd, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetBucketsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetBucketsRequest.g.cs index 9874c668109..e3c68ca89b3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetBucketsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetBucketsRequest.g.cs @@ -64,27 +64,27 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetBucketsRequest LocalJsonValue propStart = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAnomalyScore.TryReadProperty(ref reader, options, PropAnomalyScore, null)) + if (propAnomalyScore.TryReadProperty(ref reader, options, PropAnomalyScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDesc.TryReadProperty(ref reader, options, PropDesc, null)) + if (propDesc.TryReadProperty(ref reader, options, PropDesc, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propExcludeInterim.TryReadProperty(ref reader, options, PropExcludeInterim, null)) + if (propExcludeInterim.TryReadProperty(ref reader, options, PropExcludeInterim, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExpand.TryReadProperty(ref reader, options, PropExpand, null)) + if (propExpand.TryReadProperty(ref reader, options, PropExpand, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,7 +99,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetBucketsRequest continue; } - if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -130,14 +130,14 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetBucketsRequest public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.GetBucketsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAnomalyScore, value.AnomalyScore, null, null); - writer.WriteProperty(options, PropDesc, value.Desc, null, null); - writer.WriteProperty(options, PropEnd, value.End, 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, PropExcludeInterim, value.ExcludeInterim, null, null); - writer.WriteProperty(options, PropExpand, value.Expand, null, null); + writer.WriteProperty(options, PropAnomalyScore, value.AnomalyScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDesc, value.Desc, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropExcludeInterim, value.ExcludeInterim, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExpand, value.Expand, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPage, value.Page, null, null); writer.WriteProperty(options, PropSort, value.Sort, null, null); - writer.WriteProperty(options, PropStart, value.Start, 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, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetModelSnapshotsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetModelSnapshotsRequest.g.cs index 4b73272b113..6c01ea208ba 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetModelSnapshotsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetModelSnapshotsRequest.g.cs @@ -58,12 +58,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetModelSnapshotsR LocalJsonValue propStart = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDesc.TryReadProperty(ref reader, options, PropDesc, null)) + if (propDesc.TryReadProperty(ref reader, options, PropDesc, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -78,7 +78,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetModelSnapshotsR continue; } - if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -106,11 +106,11 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetModelSnapshotsR public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.GetModelSnapshotsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDesc, value.Desc, null, null); - writer.WriteProperty(options, PropEnd, value.End, 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, PropDesc, value.Desc, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropPage, value.Page, null, null); writer.WriteProperty(options, PropSort, value.Sort, null, null); - writer.WriteProperty(options, PropStart, value.Start, 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, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs index c49129b12ed..61c4da75b8e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetOverallBucketsRequest.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsR LocalJsonValue propTopN = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowNoMatch.TryReadProperty(ref reader, options, PropAllowNoMatch, null)) + if (propAllowNoMatch.TryReadProperty(ref reader, options, PropAllowNoMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -59,12 +59,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsR continue; } - if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propExcludeInterim.TryReadProperty(ref reader, options, PropExcludeInterim, null)) + if (propExcludeInterim.TryReadProperty(ref reader, options, PropExcludeInterim, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,12 +74,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsR continue; } - if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propTopN.TryReadProperty(ref reader, options, PropTopN, null)) + if (propTopN.TryReadProperty(ref reader, options, PropTopN, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -109,13 +109,13 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsR public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.GetOverallBucketsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowNoMatch, value.AllowNoMatch, null, null); + writer.WriteProperty(options, PropAllowNoMatch, value.AllowNoMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropBucketSpan, value.BucketSpan, null, null); - writer.WriteProperty(options, PropEnd, value.End, 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, PropExcludeInterim, value.ExcludeInterim, null, null); + writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropExcludeInterim, value.ExcludeInterim, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOverallScore, value.OverallScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); - writer.WriteProperty(options, PropStart, value.Start, 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, PropTopN, value.TopN, null, null); + writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropTopN, value.TopN, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetRecordsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetRecordsRequest.g.cs index d289c9cb6eb..4fa2e8f1838 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetRecordsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/GetRecordsRequest.g.cs @@ -62,17 +62,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetRecordsRequest LocalJsonValue propStart = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDesc.TryReadProperty(ref reader, options, PropDesc, null)) + if (propDesc.TryReadProperty(ref reader, options, PropDesc, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propExcludeInterim.TryReadProperty(ref reader, options, PropExcludeInterim, null)) + if (propExcludeInterim.TryReadProperty(ref reader, options, PropExcludeInterim, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetRecordsRequest continue; } - if (propRecordScore.TryReadProperty(ref reader, options, PropRecordScore, null)) + if (propRecordScore.TryReadProperty(ref reader, options, PropRecordScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,7 +92,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetRecordsRequest continue; } - if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -122,13 +122,13 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.GetRecordsRequest public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.GetRecordsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDesc, value.Desc, null, null); - writer.WriteProperty(options, PropEnd, value.End, 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, PropExcludeInterim, value.ExcludeInterim, null, null); + writer.WriteProperty(options, PropDesc, value.Desc, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropExcludeInterim, value.ExcludeInterim, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPage, value.Page, null, null); - writer.WriteProperty(options, PropRecordScore, value.RecordScore, null, null); + writer.WriteProperty(options, PropRecordScore, value.RecordScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSort, value.Sort, null, null); - writer.WriteProperty(options, PropStart, value.Start, 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, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } 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..3f69fc974df 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDataFrameAnalyticsRequest.g.cs @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyt LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, null)) + if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,7 +87,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyt continue; } - if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, null)) + if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,13 +141,13 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyt public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.PutDataFrameAnalyticsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, null); + writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAnalysis, value.Analysis, null, null); writer.WriteProperty(options, PropAnalyzedFields, value.AnalyzedFields, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropDest, value.Dest, null, null); writer.WriteProperty(options, PropHeaders, value.Headers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary>? v) => w.WriteDictionaryValue>(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, PropMaxNumThreads, value.MaxNumThreads, null, null); + writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropModelMemoryLimit, value.ModelMemoryLimit, null, null); writer.WriteProperty(options, PropSource, value.Source, null, null); @@ -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/MachineLearning/PutDatafeedRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs index 2747076cc86..4caf5059d35 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedRequest.g.cs @@ -135,7 +135,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutDatafeedRequest continue; } - if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, null)) + if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -160,7 +160,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutDatafeedRequest continue; } - if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, null)) + if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -205,12 +205,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndices, value.Indices, null, null); writer.WriteProperty(options, PropIndicesOptions, value.IndicesOptions, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, null); + writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryDelay, value.QueryDelay, 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, PropScrollSize, value.ScrollSize, null, null); + writer.WriteProperty(options, PropScrollSize, value.ScrollSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedResponse.g.cs index 41185acb78c..643e754eeed 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutDatafeedResponse.g.cs @@ -106,7 +106,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutDatafeedRespons continue; } - if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, null)) + if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -178,7 +178,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndices, value.Indices, 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, PropIndicesOptions, value.IndicesOptions, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, null); + writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryDelay, value.QueryDelay, null, null); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs index 9c44893f119..52d994fbc07 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobRequest.g.cs @@ -124,7 +124,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest Read LocalJsonValue propResultsRetentionDays = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowLazyOpen.TryReadProperty(ref reader, options, PropAllowLazyOpen, null)) + if (propAllowLazyOpen.TryReadProperty(ref reader, options, PropAllowLazyOpen, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -149,7 +149,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest Read continue; } - if (propDailyModelSnapshotRetentionAfterDays.TryReadProperty(ref reader, options, PropDailyModelSnapshotRetentionAfterDays, null)) + if (propDailyModelSnapshotRetentionAfterDays.TryReadProperty(ref reader, options, PropDailyModelSnapshotRetentionAfterDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -184,12 +184,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest Read continue; } - if (propModelSnapshotRetentionDays.TryReadProperty(ref reader, options, PropModelSnapshotRetentionDays, null)) + if (propModelSnapshotRetentionDays.TryReadProperty(ref reader, options, PropModelSnapshotRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, null)) + if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -199,7 +199,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest Read continue; } - if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, null)) + if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -238,22 +238,22 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.PutJobRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowLazyOpen, value.AllowLazyOpen, null, null); + writer.WriteProperty(options, PropAllowLazyOpen, value.AllowLazyOpen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAnalysisConfig, value.AnalysisConfig, null, null); writer.WriteProperty(options, PropAnalysisLimits, value.AnalysisLimits, null, null); writer.WriteProperty(options, PropBackgroundPersistInterval, value.BackgroundPersistInterval, null, null); writer.WriteProperty(options, PropCustomSettings, value.CustomSettings, null, null); - writer.WriteProperty(options, PropDailyModelSnapshotRetentionAfterDays, value.DailyModelSnapshotRetentionAfterDays, null, null); + writer.WriteProperty(options, PropDailyModelSnapshotRetentionAfterDays, value.DailyModelSnapshotRetentionAfterDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDataDescription, value.DataDescription, null, null); writer.WriteProperty(options, PropDatafeedConfig, value.DatafeedConfig, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropGroups, value.Groups, 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, PropJobId, value.JobId, null, null); writer.WriteProperty(options, PropModelPlotConfig, value.ModelPlotConfig, null, null); - writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, null); - writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, null); + writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsIndexName, value.ResultsIndexName, null, null); - writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, null); + writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobResponse.g.cs index 58e51bc043d..c756fdc7537 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutJobResponse.g.cs @@ -156,7 +156,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobResponse Rea continue; } - if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, null)) + if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -166,7 +166,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutJobResponse Rea continue; } - if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, null)) + if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -226,9 +226,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropModelPlotConfig, value.ModelPlotConfig, null, null); writer.WriteProperty(options, PropModelSnapshotId, value.ModelSnapshotId, null, null); writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, null); - writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, null); + writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsIndexName, value.ResultsIndexName, null, null); - writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, null); + writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelRequest.g.cs index 9592c96c54e..1371d4826c0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelRequest.g.cs @@ -103,12 +103,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutTrainedModelReq continue; } - if (propModelSizeBytes.TryReadProperty(ref reader, options, PropModelSizeBytes, null)) + if (propModelSizeBytes.TryReadProperty(ref reader, options, PropModelSizeBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propModelType.TryReadProperty(ref reader, options, PropModelType, null)) + if (propModelType.TryReadProperty(ref reader, options, PropModelType, static Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -163,8 +163,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropInferenceConfig, value.InferenceConfig, null, null); writer.WriteProperty(options, PropInput, value.Input, null, null); writer.WriteProperty(options, PropMetadata, value.Metadata, null, null); - writer.WriteProperty(options, PropModelSizeBytes, value.ModelSizeBytes, null, null); - writer.WriteProperty(options, PropModelType, value.ModelType, null, null); + writer.WriteProperty(options, PropModelSizeBytes, value.ModelSizeBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropModelType, value.ModelType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPlatformArchitecture, value.PlatformArchitecture, null, null); writer.WriteProperty(options, PropPrefixStrings, value.PrefixStrings, null, null); writer.WriteProperty(options, PropTags, value.Tags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelResponse.g.cs index a165262fac2..3c6407c1877 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/PutTrainedModelResponse.g.cs @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutTrainedModelRes continue; } - if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutTrainedModelRes continue; } - if (propEstimatedHeapMemoryUsageBytes.TryReadProperty(ref reader, options, PropEstimatedHeapMemoryUsageBytes, null)) + if (propEstimatedHeapMemoryUsageBytes.TryReadProperty(ref reader, options, PropEstimatedHeapMemoryUsageBytes, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEstimatedOperations.TryReadProperty(ref reader, options, PropEstimatedOperations, null)) + if (propEstimatedOperations.TryReadProperty(ref reader, options, PropEstimatedOperations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFullyDefined.TryReadProperty(ref reader, options, PropFullyDefined, null)) + if (propFullyDefined.TryReadProperty(ref reader, options, PropFullyDefined, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -153,7 +153,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PutTrainedModelRes continue; } - if (propModelType.TryReadProperty(ref reader, options, PropModelType, null)) + if (propModelType.TryReadProperty(ref reader, options, PropModelType, static Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -219,12 +219,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCompressedDefinition, value.CompressedDefinition, null, null); writer.WriteProperty(options, PropCreatedBy, value.CreatedBy, null, null); - writer.WriteProperty(options, PropCreateTime, value.CreateTime, 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, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropDefaultFieldMap, value.DefaultFieldMap, 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, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropEstimatedHeapMemoryUsageBytes, value.EstimatedHeapMemoryUsageBytes, null, null); - writer.WriteProperty(options, PropEstimatedOperations, value.EstimatedOperations, null, null); - writer.WriteProperty(options, PropFullyDefined, value.FullyDefined, null, null); + writer.WriteProperty(options, PropEstimatedHeapMemoryUsageBytes, value.EstimatedHeapMemoryUsageBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEstimatedOperations, value.EstimatedOperations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFullyDefined, value.FullyDefined, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInferenceConfig, value.InferenceConfig, null, null); writer.WriteProperty(options, PropInput, value.Input, null, null); writer.WriteProperty(options, PropLicenseLevel, value.LicenseLevel, null, null); @@ -233,7 +233,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropModelPackage, value.ModelPackage, null, null); writer.WriteProperty(options, PropModelSizeBytes, value.ModelSizeBytes, null, null); - writer.WriteProperty(options, PropModelType, value.ModelType, null, null); + writer.WriteProperty(options, PropModelType, value.ModelType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPlatformArchitecture, value.PlatformArchitecture, null, null); writer.WriteProperty(options, PropPrefixStrings, value.PrefixStrings, null, null); writer.WriteProperty(options, PropTags, value.Tags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/RevertModelSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/RevertModelSnapshotRequest.g.cs index 32d2b24ea0f..be7e7983d61 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/RevertModelSnapshotRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/RevertModelSnapshotRequest.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.RevertModelSnapsho LocalJsonValue propDeleteInterveningResults = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeleteInterveningResults.TryReadProperty(ref reader, options, PropDeleteInterveningResults, null)) + if (propDeleteInterveningResults.TryReadProperty(ref reader, options, PropDeleteInterveningResults, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.RevertModelSnapsho public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.RevertModelSnapshotRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeleteInterveningResults, value.DeleteInterveningResults, null, null); + writer.WriteProperty(options, PropDeleteInterveningResults, value.DeleteInterveningResults, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDatafeedRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDatafeedRequest.g.cs index 363246da72b..427591dfaa0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDatafeedRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StartDatafeedRequest.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.StartDatafeedReque LocalJsonValue propTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEnd.TryReadProperty(ref reader, options, PropEnd, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStart.TryReadProperty(ref reader, options, PropStart, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -77,8 +77,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.StartDatafeedReque public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.StartDatafeedRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEnd, value.End, 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, PropStart, value.Start, 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, PropEnd, value.End, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDatafeedRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDatafeedRequest.g.cs index 621908a8803..a8bb1a53d6d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDatafeedRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/StopDatafeedRequest.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.StopDatafeedReques LocalJsonValue propTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowNoMatch.TryReadProperty(ref reader, options, PropAllowNoMatch, null)) + if (propAllowNoMatch.TryReadProperty(ref reader, options, PropAllowNoMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propForce.TryReadProperty(ref reader, options, PropForce, null)) + if (propForce.TryReadProperty(ref reader, options, PropForce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -77,8 +77,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.StopDatafeedReques public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.StopDatafeedRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowNoMatch, value.AllowNoMatch, null, null); - writer.WriteProperty(options, PropForce, value.Force, null, null); + writer.WriteProperty(options, PropAllowNoMatch, value.AllowNoMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropForce, value.Force, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsRequest.g.cs index 2af12cef3c6..bcdf616f9fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDataFrameAnalyticsRequest.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateDataFrameAna LocalJsonValue propModelMemoryLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, null)) + if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateDataFrameAna continue; } - if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, null)) + if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,9 +85,9 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateDataFrameAna public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.UpdateDataFrameAnalyticsRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, null); + writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, null); + writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelMemoryLimit, value.ModelMemoryLimit, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedRequest.g.cs index 996fc46017f..5e97d3bc24b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedRequest.g.cs @@ -154,7 +154,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateDatafeedRequ continue; } - if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, null)) + if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -179,7 +179,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateDatafeedRequ continue; } - if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, null)) + if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -222,12 +222,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndices, value.Indices, 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, PropIndicesOptions, value.IndicesOptions, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, null); + writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryDelay, value.QueryDelay, 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, PropScrollSize, value.ScrollSize, null, null); + writer.WriteProperty(options, PropScrollSize, value.ScrollSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs index 1914a21b5bc..88b1cf9eb76 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateDatafeedResponse.g.cs @@ -106,7 +106,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateDatafeedResp continue; } - if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, null)) + if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -178,7 +178,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndices, value.Indices, 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, PropIndicesOptions, value.IndicesOptions, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, null); + writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryDelay, value.QueryDelay, null, null); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobRequest.g.cs index 2172625a44f..64bf72cf1b8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobRequest.g.cs @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobRequest R LocalJsonValue propResultsRetentionDays = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowLazyOpen.TryReadProperty(ref reader, options, PropAllowLazyOpen, null)) + if (propAllowLazyOpen.TryReadProperty(ref reader, options, PropAllowLazyOpen, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,7 +90,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobRequest R continue; } - if (propDailyModelSnapshotRetentionAfterDays.TryReadProperty(ref reader, options, PropDailyModelSnapshotRetentionAfterDays, null)) + if (propDailyModelSnapshotRetentionAfterDays.TryReadProperty(ref reader, options, PropDailyModelSnapshotRetentionAfterDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -120,7 +120,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobRequest R continue; } - if (propModelSnapshotRetentionDays.TryReadProperty(ref reader, options, PropModelSnapshotRetentionDays, null)) + if (propModelSnapshotRetentionDays.TryReadProperty(ref reader, options, PropModelSnapshotRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,12 +130,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobRequest R continue; } - if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, null)) + if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, null)) + if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -173,21 +173,21 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobRequest R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowLazyOpen, value.AllowLazyOpen, null, null); + writer.WriteProperty(options, PropAllowLazyOpen, value.AllowLazyOpen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAnalysisLimits, value.AnalysisLimits, null, null); writer.WriteProperty(options, PropBackgroundPersistInterval, value.BackgroundPersistInterval, null, null); writer.WriteProperty(options, PropCategorizationFilters, value.CategorizationFilters, 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, PropCustomSettings, value.CustomSettings, 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, PropDailyModelSnapshotRetentionAfterDays, value.DailyModelSnapshotRetentionAfterDays, null, null); + writer.WriteProperty(options, PropDailyModelSnapshotRetentionAfterDays, value.DailyModelSnapshotRetentionAfterDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropDetectors, value.Detectors, 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, PropGroups, value.Groups, 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, PropModelPlotConfig, value.ModelPlotConfig, null, null); writer.WriteProperty(options, PropModelPruneWindow, value.ModelPruneWindow, null, null); - writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, null); + writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPerPartitionCategorization, value.PerPartitionCategorization, null, null); - writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, null); - writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, null); + writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobResponse.g.cs index 9779e6f0b75..a9a9ef57522 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateJobResponse.g.cs @@ -123,7 +123,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobResponse continue; } - if (propFinishedTime.TryReadProperty(ref reader, options, PropFinishedTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propFinishedTime.TryReadProperty(ref reader, options, PropFinishedTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -163,7 +163,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobResponse continue; } - if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, null)) + if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -173,7 +173,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateJobResponse continue; } - if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, null)) + if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -227,7 +227,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDataDescription, value.DataDescription, null, null); writer.WriteProperty(options, PropDatafeedConfig, value.DatafeedConfig, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropFinishedTime, value.FinishedTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropFinishedTime, value.FinishedTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropGroups, value.Groups, 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, PropJobId, value.JobId, null, null); writer.WriteProperty(options, PropJobType, value.JobType, null, null); @@ -235,9 +235,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropModelPlotConfig, value.ModelPlotConfig, null, null); writer.WriteProperty(options, PropModelSnapshotId, value.ModelSnapshotId, null, null); writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, null); - writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, null); + writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsIndexName, value.ResultsIndexName, null, null); - writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, null); + writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateModelSnapshotRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateModelSnapshotRequest.g.cs index 7e5649a3517..ff2f8f2283f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateModelSnapshotRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateModelSnapshotRequest.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateModelSnapsho continue; } - if (propRetain.TryReadProperty(ref reader, options, PropRetain, null)) + if (propRetain.TryReadProperty(ref reader, options, PropRetain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,7 +70,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropRetain, value.Retain, null, null); + writer.WriteProperty(options, PropRetain, value.Retain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateTrainedModelDeploymentRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateTrainedModelDeploymentRequest.g.cs index 3510350177d..8b1de0e1a88 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateTrainedModelDeploymentRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/UpdateTrainedModelDeploymentRequest.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.UpdateTrainedModel continue; } - if (propNumberOfAllocations.TryReadProperty(ref reader, options, PropNumberOfAllocations, null)) + if (propNumberOfAllocations.TryReadProperty(ref reader, options, PropNumberOfAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,7 +70,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAdaptiveAllocations, value.AdaptiveAllocations, null, null); - writer.WriteProperty(options, PropNumberOfAllocations, value.NumberOfAllocations, null, null); + writer.WriteProperty(options, PropNumberOfAllocations, value.NumberOfAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ValidateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ValidateRequest.g.cs index 9391628c814..dfa936bbd78 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ValidateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/MachineLearning/ValidateRequest.g.cs @@ -88,7 +88,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ValidateRequest Re continue; } - if (propModelSnapshotRetentionDays.TryReadProperty(ref reader, options, PropModelSnapshotRetentionDays, null)) + if (propModelSnapshotRetentionDays.TryReadProperty(ref reader, options, PropModelSnapshotRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,7 +132,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropJobId, value.JobId, null, null); writer.WriteProperty(options, PropModelPlot, value.ModelPlot, null, null); writer.WriteProperty(options, PropModelSnapshotId, value.ModelSnapshotId, null, null); - writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, null); + writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsIndexName, value.ResultsIndexName, null, null); writer.WriteEndObject(); } 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..aa8830ebba8 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. + /// For more information about the nodes selective options, refer to the node specification documentation. /// /// public @@ -137,6 +138,7 @@ public GetRepositoriesMeteringInfoRequestDescriptor() /// /// /// Comma-separated list of node IDs or names used to limit returned information. + /// For more information about the nodes selective options, refer to the node specification documentation. /// /// public Elastic.Clients.Elasticsearch.Nodes.GetRepositoriesMeteringInfoRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.NodeIds value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRuleResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRuleResponse.g.cs index 32b3fd7e520..60f8de8c4d6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRuleResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/GetRuleResponse.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.QueryRules.GetRuleResponse Read(re continue; } - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropActions, value.Actions, null, null); writer.WriteProperty(options, PropCriteria, value.Criteria, 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, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRuleId, value.RuleId, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRuleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRuleRequest.g.cs index 070e04c600d..cf36adc3c62 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRuleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/QueryRules/PutRuleRequest.g.cs @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.QueryRules.PutRuleRequest Read(ref continue; } - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,7 +87,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropActions, value.Actions, null, null); writer.WriteProperty(options, PropCriteria, value.Criteria, 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, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs index 86e6d769933..db0e7dc9d3d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexRequest.g.cs @@ -120,7 +120,7 @@ public override Elastic.Clients.Elasticsearch.ReindexRequest Read(ref System.Tex LocalJsonValue propSource = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propConflicts.TryReadProperty(ref reader, options, PropConflicts, null)) + if (propConflicts.TryReadProperty(ref reader, options, PropConflicts, static Elastic.Clients.Elasticsearch.Conflicts? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,7 +130,7 @@ public override Elastic.Clients.Elasticsearch.ReindexRequest Read(ref System.Tex continue; } - if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, null)) + if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -140,7 +140,7 @@ public override Elastic.Clients.Elasticsearch.ReindexRequest Read(ref System.Tex continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -174,11 +174,11 @@ public override Elastic.Clients.Elasticsearch.ReindexRequest Read(ref System.Tex public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ReindexRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropConflicts, value.Conflicts, null, null); + writer.WriteProperty(options, PropConflicts, value.Conflicts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Conflicts? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDest, value.Dest, null, null); - writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, null); + writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexResponse.g.cs index b0f5b8dd4f5..9d122ee93e8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ReindexResponse.g.cs @@ -63,17 +63,17 @@ public override Elastic.Clients.Elasticsearch.ReindexResponse Read(ref System.Te LocalJsonValue propVersionConflicts = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBatches.TryReadProperty(ref reader, options, PropBatches, null)) + if (propBatches.TryReadProperty(ref reader, options, PropBatches, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCreated.TryReadProperty(ref reader, options, PropCreated, null)) + if (propCreated.TryReadProperty(ref reader, options, PropCreated, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, null)) + if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.ReindexResponse Read(ref System.Te continue; } - if (propNoops.TryReadProperty(ref reader, options, PropNoops, null)) + if (propNoops.TryReadProperty(ref reader, options, PropNoops, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, null)) + if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,7 +98,7 @@ public override Elastic.Clients.Elasticsearch.ReindexResponse Read(ref System.Te continue; } - if (propSliceId.TryReadProperty(ref reader, options, PropSliceId, null)) + if (propSliceId.TryReadProperty(ref reader, options, PropSliceId, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,37 +108,37 @@ public override Elastic.Clients.Elasticsearch.ReindexResponse Read(ref System.Te continue; } - if (propThrottledMillis.TryReadProperty(ref reader, options, PropThrottledMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propThrottledMillis.TryReadProperty(ref reader, options, PropThrottledMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propThrottledUntilMillis.TryReadProperty(ref reader, options, PropThrottledUntilMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propThrottledUntilMillis.TryReadProperty(ref reader, options, PropThrottledUntilMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, null)) + if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + if (propTotal.TryReadProperty(ref reader, options, PropTotal, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUpdated.TryReadProperty(ref reader, options, PropUpdated, null)) + if (propUpdated.TryReadProperty(ref reader, options, PropUpdated, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionConflicts.TryReadProperty(ref reader, options, PropVersionConflicts, null)) + if (propVersionConflicts.TryReadProperty(ref reader, options, PropVersionConflicts, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -177,22 +177,22 @@ public override Elastic.Clients.Elasticsearch.ReindexResponse Read(ref System.Te public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ReindexResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBatches, value.Batches, null, null); - writer.WriteProperty(options, PropCreated, value.Created, null, null); - writer.WriteProperty(options, PropDeleted, value.Deleted, null, null); + writer.WriteProperty(options, PropBatches, value.Batches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCreated, value.Created, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDeleted, value.Deleted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFailures, value.Failures, 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, PropNoops, value.Noops, null, null); - writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, null); + writer.WriteProperty(options, PropNoops, value.Noops, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRetries, value.Retries, null, null); - writer.WriteProperty(options, PropSliceId, value.SliceId, null, null); + writer.WriteProperty(options, PropSliceId, value.SliceId, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTask, value.Task, null, null); - writer.WriteProperty(options, PropThrottledMillis, value.ThrottledMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropThrottledUntilMillis, value.ThrottledUntilMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); - writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropTotal, value.Total, null, null); - writer.WriteProperty(options, PropUpdated, value.Updated, null, null); - writer.WriteProperty(options, PropVersionConflicts, value.VersionConflicts, null, null); + writer.WriteProperty(options, PropThrottledMillis, value.ThrottledMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropThrottledUntilMillis, value.ThrottledUntilMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTotal, value.Total, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUpdated, value.Updated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionConflicts, value.VersionConflicts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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/Rollup/RollupSearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs index 905105bc74f..03b548b8b02 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchRequest.g.cs @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Rollup.RollupSearchRequest Read(re continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAggregations, value.Aggregations, 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, PropQuery, value.Query, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchResponse.g.cs index b814d9d470e..fb960c48b53 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Rollup/RollupSearchResponse.g.cs @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Rollup.RollupSearchResponse r.ReadNullableValue(o))) { continue; } @@ -100,7 +100,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAggregations, value.Aggregations, null, null); writer.WriteProperty(options, PropHits, value.Hits, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); - writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, null); + writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptsPainlessExecuteRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptsPainlessExecuteRequest.g.cs index ef7eda61322..43a8c7829f2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptsPainlessExecuteRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScriptsPainlessExecuteRequest.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.ScriptsPainlessExecuteRequest Read LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propContext.TryReadProperty(ref reader, options, PropContext, null)) + if (propContext.TryReadProperty(ref reader, options, PropContext, static Elastic.Clients.Elasticsearch.Core.ScriptsPainlessExecute.PainlessContext? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -77,7 +77,7 @@ public override Elastic.Clients.Elasticsearch.ScriptsPainlessExecuteRequest Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ScriptsPainlessExecuteRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropContext, value.Context, null, null); + writer.WriteProperty(options, PropContext, value.Context, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.ScriptsPainlessExecute.PainlessContext? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropContextSetup, value.ContextSetup, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs index 0fca15c87ec..72b5a16956e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ScrollResponse.g.cs @@ -79,12 +79,12 @@ public override Elastic.Clients.Elasticsearch.ScrollResponse Read(ref continue; } - if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, null)) + if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, null)) + if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.ScrollResponse Read(ref continue; } - if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, null)) + if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,14 +165,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClusters, value.Clusters, null, null); writer.WriteProperty(options, PropFields, value.Fields, 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, PropHitsMetadata, value.HitsMetadata, null, null); - writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, null); - writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, null); + writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPitId, value.PitId, null, null); writer.WriteProperty(options, PropProfile, value.Profile, null, null); writer.WriteProperty(options, PropScrollId, value.ScrollId, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, null); + writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); 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/SearchApplication/SearchApplicationSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchResponse.g.cs index dfb6b116cf8..4bd8491158e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchApplication/SearchApplicationSearchResponse.g.cs @@ -79,12 +79,12 @@ public override Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicatio continue; } - if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, null)) + if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, null)) + if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.SearchApplication.SearchApplicatio continue; } - if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, null)) + if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,14 +165,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClusters, value.Clusters, null, null); writer.WriteProperty(options, PropFields, value.Fields, 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, PropHitsMetadata, value.HitsMetadata, null, null); - writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, null); - writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, null); + writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPitId, value.PitId, null, null); writer.WriteProperty(options, PropProfile, value.Profile, null, null); writer.WriteProperty(options, PropScrollId, value.ScrollId, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, null); + writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchMvtRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchMvtRequest.g.cs index a6b51fbf99e..92b00795660 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchMvtRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchMvtRequest.g.cs @@ -68,17 +68,17 @@ public override Elastic.Clients.Elasticsearch.SearchMvtRequest Read(ref System.T continue; } - if (propBuffer.TryReadProperty(ref reader, options, PropBuffer, null)) + if (propBuffer.TryReadProperty(ref reader, options, PropBuffer, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExactBounds.TryReadProperty(ref reader, options, PropExactBounds, null)) + if (propExactBounds.TryReadProperty(ref reader, options, PropExactBounds, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExtent.TryReadProperty(ref reader, options, PropExtent, null)) + if (propExtent.TryReadProperty(ref reader, options, PropExtent, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,17 +88,17 @@ public override Elastic.Clients.Elasticsearch.SearchMvtRequest Read(ref System.T continue; } - if (propGridAgg.TryReadProperty(ref reader, options, PropGridAgg, null)) + if (propGridAgg.TryReadProperty(ref reader, options, PropGridAgg, static Elastic.Clients.Elasticsearch.Core.SearchMvt.GridAggregationType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGridPrecision.TryReadProperty(ref reader, options, PropGridPrecision, null)) + if (propGridPrecision.TryReadProperty(ref reader, options, PropGridPrecision, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGridType.TryReadProperty(ref reader, options, PropGridType, null)) + if (propGridType.TryReadProperty(ref reader, options, PropGridType, static Elastic.Clients.Elasticsearch.Core.SearchMvt.GridType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,7 +113,7 @@ public override Elastic.Clients.Elasticsearch.SearchMvtRequest Read(ref System.T continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -128,7 +128,7 @@ public override Elastic.Clients.Elasticsearch.SearchMvtRequest Read(ref System.T continue; } - if (propWithLabels.TryReadProperty(ref reader, options, PropWithLabels, null)) + if (propWithLabels.TryReadProperty(ref reader, options, PropWithLabels, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -166,19 +166,19 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAggs, value.Aggs, 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, PropBuffer, value.Buffer, null, null); - writer.WriteProperty(options, PropExactBounds, value.ExactBounds, null, null); - writer.WriteProperty(options, PropExtent, value.Extent, null, null); + writer.WriteProperty(options, PropBuffer, value.Buffer, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExactBounds, value.ExactBounds, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExtent, value.Extent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropGridAgg, value.GridAgg, null, null); - writer.WriteProperty(options, PropGridPrecision, value.GridPrecision, null, null); - writer.WriteProperty(options, PropGridType, value.GridType, null, null); + writer.WriteProperty(options, PropGridAgg, value.GridAgg, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.SearchMvt.GridAggregationType? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGridPrecision, value.GridPrecision, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGridType, value.GridType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.SearchMvt.GridType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, 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, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropTrackTotalHits, value.TrackTotalHits, null, null); - writer.WriteProperty(options, PropWithLabels, value.WithLabels, null, null); + writer.WriteProperty(options, PropWithLabels, value.WithLabels, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchRequest.g.cs index 29c824eb9fe..bdc83aa5d06 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; /// /// /// @@ -420,7 +428,7 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -435,7 +443,7 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -455,7 +463,7 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -470,7 +478,7 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propProfile.TryReadProperty(ref reader, options, PropProfile, null)) + if (propProfile.TryReadProperty(ref reader, options, PropProfile, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -510,12 +518,12 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, null)) + if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -550,7 +558,7 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, null)) + if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -560,7 +568,7 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, null)) + if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -570,7 +578,7 @@ public override Elastic.Clients.Elasticsearch.SearchRequest Read(ref System.Text continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -630,17 +638,17 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAggregations, value.Aggregations, 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, PropCollapse, value.Collapse, null, null); writer.WriteProperty(options, PropDocvalueFields, value.DocvalueFields, 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, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExt, value.Ext, 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, PropFields, value.Fields, 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, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlight, value.Highlight, null, null); writer.WriteProperty(options, PropIndicesBoost, value.IndicesBoost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); writer.WriteProperty(options, PropKnn, value.Knn, 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, PropMinScore, value.MinScore, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPit, value.Pit, null, null); writer.WriteProperty(options, PropPostFilter, value.PostFilter, null, null); - writer.WriteProperty(options, PropProfile, value.Profile, null, null); + writer.WriteProperty(options, PropProfile, value.Profile, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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)); @@ -648,19 +656,19 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien 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, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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)); writer.WriteProperty(options, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, null); + writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); - writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, null); + writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTrackTotalHits, value.TrackTotalHits, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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/SearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs index 2f08a074a48..0ac08ea4f11 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs @@ -79,12 +79,12 @@ public override Elastic.Clients.Elasticsearch.SearchResponse Read(ref continue; } - if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, null)) + if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, null)) + if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.SearchResponse Read(ref continue; } - if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, null)) + if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,14 +165,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClusters, value.Clusters, null, null); writer.WriteProperty(options, PropFields, value.Fields, 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, PropHitsMetadata, value.HitsMetadata, null, null); - writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, null); - writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, null); + writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPitId, value.PitId, null, null); writer.WriteProperty(options, PropProfile, value.Profile, null, null); writer.WriteProperty(options, PropScrollId, value.ScrollId, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, null); + writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs index ba0e0286c88..2de889d5dfa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateRequest.g.cs @@ -130,7 +130,7 @@ public override Elastic.Clients.Elasticsearch.SearchTemplateRequest Read(ref Sys LocalJsonValue propSource = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,7 +145,7 @@ public override Elastic.Clients.Elasticsearch.SearchTemplateRequest Read(ref Sys continue; } - if (propProfile.TryReadProperty(ref reader, options, PropProfile, null)) + if (propProfile.TryReadProperty(ref reader, options, PropProfile, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -178,10 +178,10 @@ public override Elastic.Clients.Elasticsearch.SearchTemplateRequest Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.SearchTemplateRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropParams, value.Params, 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, PropProfile, value.Profile, null, null); + writer.WriteProperty(options, PropProfile, value.Profile, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateResponse.g.cs index c7b3cbad976..4623dcee401 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchTemplateResponse.g.cs @@ -79,12 +79,12 @@ public override Elastic.Clients.Elasticsearch.SearchTemplateResponse continue; } - if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, null)) + if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, null)) + if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.SearchTemplateResponse continue; } - if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, null)) + if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,14 +165,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClusters, value.Clusters, null, null); writer.WriteProperty(options, PropFields, value.Fields, 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, PropHits, value.Hits, null, null); - writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, null); - writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, null); + writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPitId, value.PitId, null, null); writer.WriteProperty(options, PropProfile, value.Profile, null, null); writer.WriteProperty(options, PropScrollId, value.ScrollId, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, null); + writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); 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/ActivateUserProfileResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ActivateUserProfileResponse.g.cs index 4da626075f0..e657ccdb837 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ActivateUserProfileResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/ActivateUserProfileResponse.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.Security.ActivateUserProfileRespon continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,7 +107,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropData, value.Data, 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, PropDoc, value.Doc, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLabels, value.Labels, 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, PropLastSynchronized, value.LastSynchronized, null, null); writer.WriteProperty(options, PropUid, value.Uid, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyResponse.g.cs index ebabbdda924..eea64e53cbb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateApiKeyResponse.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Security.CreateApiKeyResponse Read continue; } - if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, null)) + if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); writer.WriteProperty(options, PropEncoded, value.Encoded, null, null); - writer.WriteProperty(options, PropExpiration, value.Expiration, null, null); + writer.WriteProperty(options, PropExpiration, value.Expiration, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateCrossClusterApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateCrossClusterApiKeyResponse.g.cs index 6ab82acc145..9f5762ec039 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateCrossClusterApiKeyResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/CreateCrossClusterApiKeyResponse.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Security.CreateCrossClusterApiKeyR continue; } - if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); writer.WriteProperty(options, PropEncoded, value.Encoded, null, null); - writer.WriteProperty(options, PropExpiration, value.Expiration, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropExpiration, value.Expiration, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteEndObject(); 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/GetTokenRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetTokenRequest.g.cs index e246fcb3db7..dd547ea04b4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetTokenRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GetTokenRequest.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Security.GetTokenRequest Read(ref LocalJsonValue propUsername = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propGrantType.TryReadProperty(ref reader, options, PropGrantType, null)) + if (propGrantType.TryReadProperty(ref reader, options, PropGrantType, static Elastic.Clients.Elasticsearch.Security.AccessTokenGrantType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -101,7 +101,7 @@ public override Elastic.Clients.Elasticsearch.Security.GetTokenRequest Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.GetTokenRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropGrantType, value.GrantType, null, null); + writer.WriteProperty(options, PropGrantType, value.GrantType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Security.AccessTokenGrantType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKerberosTicket, value.KerberosTicket, null, null); writer.WriteProperty(options, PropPassword, value.Password, null, null); writer.WriteProperty(options, PropRefreshToken, value.RefreshToken, null, null); 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/GrantApiKeyResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyResponse.g.cs index 0522fde5072..5c60b7aae71 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/GrantApiKeyResponse.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Security.GrantApiKeyResponse Read( continue; } - if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); writer.WriteProperty(options, PropEncoded, value.Encoded, null, null); - writer.WriteProperty(options, PropExpiration, value.Expiration, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropExpiration, value.Expiration, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs index c14d2ee4dc8..8802a0031a0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/InvalidateApiKeyRequest.g.cs @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Security.InvalidateApiKeyRequest R continue; } - if (propOwner.TryReadProperty(ref reader, options, PropOwner, null)) + if (propOwner.TryReadProperty(ref reader, options, PropOwner, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,7 +104,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIds, value.Ids, 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, PropName, value.Name, null, null); - writer.WriteProperty(options, PropOwner, value.Owner, null, null); + writer.WriteProperty(options, PropOwner, value.Owner, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRealmName, value.RealmName, null, null); writer.WriteProperty(options, PropUsername, value.Username, null, null); writer.WriteEndObject(); 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..0c1c5146253 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingRequest.g.cs @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequest Rea LocalJsonValue?> propRunAs = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,7 +107,7 @@ public override Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequest Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.PutRoleMappingRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMetadata, value.Metadata, 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, PropRoles, value.Roles, 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, PropRoleTemplates, value.RoleTemplates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); @@ -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/PutRoleMappingResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingResponse.g.cs index c3f73a4631e..6cf926f6561 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutRoleMappingResponse.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Security.PutRoleMappingResponse Re LocalJsonValue propRoleMapping = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCreated.TryReadProperty(ref reader, options, PropCreated, null)) + if (propCreated.TryReadProperty(ref reader, options, PropCreated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Security.PutRoleMappingResponse Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.PutRoleMappingResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCreated, value.Created, null, null); + writer.WriteProperty(options, PropCreated, value.Created, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRoleMapping, value.RoleMapping, null, null); writer.WriteEndObject(); } 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/Security/PutUserRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs index e9284ae9399..cbc3f4ceb4b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/PutUserRequest.g.cs @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.Security.PutUserRequest Read(ref S continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -125,7 +125,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropEmail, value.Email, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFullName, value.FullName, null, null); writer.WriteProperty(options, PropMetadata, value.Metadata, 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, PropPassword, value.Password, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryApiKeysRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryApiKeysRequest.g.cs index 59d0944e0e7..8894999dc98 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryApiKeysRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryApiKeysRequest.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Security.QueryApiKeysRequest Read( continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.Security.QueryApiKeysRequest Read( continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -126,10 +126,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAggregations, value.Aggregations, 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, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, 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, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs index 933af11ae4d..fddff00bc8a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryRoleRequest.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Security.QueryRoleRequest Read(ref LocalJsonValue?> propSort = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -60,7 +60,7 @@ public override Elastic.Clients.Elasticsearch.Security.QueryRoleRequest Read(ref continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,10 +93,10 @@ public override Elastic.Clients.Elasticsearch.Security.QueryRoleRequest Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.QueryRoleRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, 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, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserRequest.g.cs index 43a85232afd..609995bfda2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/QueryUserRequest.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Security.QueryUserRequest Read(ref LocalJsonValue?> propSort = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Security.QueryUserRequest Read(ref continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,10 +99,10 @@ public override Elastic.Clients.Elasticsearch.Security.QueryUserRequest Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.QueryUserRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, 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, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs index f3668953670..a58e6c84ac7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Security/SuggestUserProfilesRequest.g.cs @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Security.SuggestUserProfilesReques continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,7 +88,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropData, value.Data, 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, PropHint, value.Hint, null, null); writer.WriteProperty(options, PropName, value.Name, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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..f5f7110264c 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,22 +60,17 @@ 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; } - if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, null)) + if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, null)) + if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -94,7 +85,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotRequest Rea continue; } - if (propPartial.TryReadProperty(ref reader, options, PropPartial, null)) + if (propPartial.TryReadProperty(ref reader, options, PropPartial, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { 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,13 +114,12 @@ 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); + writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncludeGlobalState, value.IncludeGlobalState, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndices, value.Indices, null, null); writer.WriteProperty(options, PropMetadata, value.Metadata, 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, PropPartial, value.Partial, null, null); + writer.WriteProperty(options, PropPartial, value.Partial, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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/CreateSnapshotResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotResponse.g.cs index dcf3179cbbd..70286996b8c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/CreateSnapshotResponse.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotResponse Re LocalJsonValue propSnapshot = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAccepted.TryReadProperty(ref reader, options, PropAccepted, null)) + if (propAccepted.TryReadProperty(ref reader, options, PropAccepted, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotResponse Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Snapshot.CreateSnapshotResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAccepted, value.Accepted, null, null); + writer.WriteProperty(options, PropAccepted, value.Accepted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSnapshot, value.Snapshot, null, null); writer.WriteEndObject(); } 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..8bf4a68f470 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); } @@ -85,17 +78,17 @@ public override Elastic.Clients.Elasticsearch.Snapshot.RestoreRequest Read(ref S continue; } - if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, null)) + if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncludeAliases.TryReadProperty(ref reader, options, PropIncludeAliases, null)) + if (propIncludeAliases.TryReadProperty(ref reader, options, PropIncludeAliases, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, null)) + if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.RestoreRequest Read(ref S continue; } - if (propPartial.TryReadProperty(ref reader, options, PropPartial, null)) + if (propPartial.TryReadProperty(ref reader, options, PropPartial, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -155,12 +148,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); 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, PropIgnoreIndexSettings, value.IgnoreIndexSettings, 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, PropIncludeAliases, value.IncludeAliases, null, null); - writer.WriteProperty(options, PropIncludeGlobalState, value.IncludeGlobalState, null, null); + writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncludeAliases, value.IncludeAliases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncludeGlobalState, value.IncludeGlobalState, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexSettings, value.IndexSettings, null, null); writer.WriteProperty(options, PropIndices, value.Indices, null, null); - writer.WriteProperty(options, PropPartial, value.Partial, null, null); + writer.WriteProperty(options, PropPartial, value.Partial, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRenamePattern, value.RenamePattern, null, null); writer.WriteProperty(options, PropRenameReplacement, value.RenameReplacement, null, null); writer.WriteEndObject(); @@ -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/RestoreResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreResponse.g.cs index c38e4cd15e3..4856316a416 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Snapshot/RestoreResponse.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.RestoreResponse Read(ref LocalJsonValue propSnapshot = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAccepted.TryReadProperty(ref reader, options, PropAccepted, null)) + if (propAccepted.TryReadProperty(ref reader, options, PropAccepted, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.RestoreResponse Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Snapshot.RestoreResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAccepted, value.Accepted, null, null); + writer.WriteProperty(options, PropAccepted, value.Accepted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSnapshot, value.Snapshot, null, null); writer.WriteEndObject(); } 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/SnapshotLifecycleManagement/GetStatsResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetStatsResponse.g.cs index ce49c9f0a80..0d699acc141 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetStatsResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SnapshotLifecycleManagement/GetStatsResponse.g.cs @@ -39,7 +39,7 @@ internal sealed partial class GetStatsResponseConverter : System.Text.Json.Seria public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.GetStatsResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue> propPolicyStats = default; + LocalJsonValue> propPolicyStats = default; LocalJsonValue propRetentionDeletionTime = default; LocalJsonValue propRetentionDeletionTimeMillis = default; LocalJsonValue propRetentionFailed = default; @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.GetSta LocalJsonValue propTotalSnapshotsTaken = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propPolicyStats.TryReadProperty(ref reader, options, PropPolicyStats, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) + if (propPolicyStats.TryReadProperty(ref reader, options, PropPolicyStats, static System.Collections.Generic.IReadOnlyCollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) { continue; } @@ -129,7 +129,7 @@ public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.GetSta public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.GetStatsResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropPolicyStats, value.PolicyStats, 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, PropPolicyStats, value.PolicyStats, 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, PropRetentionDeletionTime, value.RetentionDeletionTime, null, null); writer.WriteProperty(options, PropRetentionDeletionTimeMillis, value.RetentionDeletionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropRetentionFailed, value.RetentionFailed, null, null); @@ -161,7 +161,7 @@ internal GetStatsResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstr #if NET7_0_OR_GREATER required #endif - System.Collections.Generic.IReadOnlyCollection PolicyStats { get; set; } + System.Collections.Generic.IReadOnlyCollection PolicyStats { get; set; } public #if NET7_0_OR_GREATER required diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs index cc232f6c44e..3cfb41e102d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/GetAsyncStatusResponse.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Sql.GetAsyncStatusResponse Read(re LocalJsonValue propStartTimeInMillis = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, null)) + if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,7 +97,7 @@ public override Elastic.Clients.Elasticsearch.Sql.GetAsyncStatusResponse Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Sql.GetAsyncStatusResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, null); + writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs index d259001539d..95426b306c7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryRequest.g.cs @@ -77,7 +77,7 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryRequest Read(ref System.T LocalJsonValue propWaitForCompletionTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowPartialSearchResults.TryReadProperty(ref reader, options, PropAllowPartialSearchResults, null)) + if (propAllowPartialSearchResults.TryReadProperty(ref reader, options, PropAllowPartialSearchResults, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,7 +87,7 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryRequest Read(ref System.T continue; } - if (propColumnar.TryReadProperty(ref reader, options, PropColumnar, null)) + if (propColumnar.TryReadProperty(ref reader, options, PropColumnar, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryRequest Read(ref System.T continue; } - if (propFetchSize.TryReadProperty(ref reader, options, PropFetchSize, null)) + if (propFetchSize.TryReadProperty(ref reader, options, PropFetchSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFieldMultiValueLeniency.TryReadProperty(ref reader, options, PropFieldMultiValueLeniency, null)) + if (propFieldMultiValueLeniency.TryReadProperty(ref reader, options, PropFieldMultiValueLeniency, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,7 +112,7 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryRequest Read(ref System.T continue; } - if (propIndexUsingFrozen.TryReadProperty(ref reader, options, PropIndexUsingFrozen, null)) + if (propIndexUsingFrozen.TryReadProperty(ref reader, options, PropIndexUsingFrozen, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -122,7 +122,7 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryRequest Read(ref System.T continue; } - if (propKeepOnCompletion.TryReadProperty(ref reader, options, PropKeepOnCompletion, null)) + if (propKeepOnCompletion.TryReadProperty(ref reader, options, PropKeepOnCompletion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -197,16 +197,16 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryRequest Read(ref System.T public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Sql.QueryRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowPartialSearchResults, value.AllowPartialSearchResults, null, null); + writer.WriteProperty(options, PropAllowPartialSearchResults, value.AllowPartialSearchResults, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCatalog, value.Catalog, null, null); - writer.WriteProperty(options, PropColumnar, value.Columnar, null, null); + writer.WriteProperty(options, PropColumnar, value.Columnar, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCursor, value.Cursor, null, null); - writer.WriteProperty(options, PropFetchSize, value.FetchSize, null, null); - writer.WriteProperty(options, PropFieldMultiValueLeniency, value.FieldMultiValueLeniency, null, null); + writer.WriteProperty(options, PropFetchSize, value.FetchSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFieldMultiValueLeniency, value.FieldMultiValueLeniency, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropIndexUsingFrozen, value.IndexUsingFrozen, null, null); + writer.WriteProperty(options, PropIndexUsingFrozen, value.IndexUsingFrozen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKeepAlive, value.KeepAlive, null, null); - writer.WriteProperty(options, PropKeepOnCompletion, value.KeepOnCompletion, null, null); + writer.WriteProperty(options, PropKeepOnCompletion, value.KeepOnCompletion, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPageTimeout, value.PageTimeout, null, null); writer.WriteProperty(options, PropParams, value.Params, 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, PropQuery, value.Query, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryResponse.g.cs index 62aff016a21..fa95d0b7f11 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/QueryResponse.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Sql.QueryResponse Read(ref System. continue; } - if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, null)) + if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, null)) + if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,8 +92,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropColumns, value.Columns, 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, PropCursor, value.Cursor, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null); - writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null); + writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateRequest.g.cs index 9f65c235269..dbe91200e95 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateRequest.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Sql.TranslateRequest Read(ref Syst LocalJsonValue propTimeZone = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFetchSize.TryReadProperty(ref reader, options, PropFetchSize, null)) + if (propFetchSize.TryReadProperty(ref reader, options, PropFetchSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,7 +85,7 @@ public override Elastic.Clients.Elasticsearch.Sql.TranslateRequest Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Sql.TranslateRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFetchSize, value.FetchSize, null, null); + writer.WriteProperty(options, PropFetchSize, value.FetchSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropTimeZone, value.TimeZone, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateResponse.g.cs index 49a6f6631da..922993e9ab5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/TranslateResponse.g.cs @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Sql.TranslateResponse Read(ref Sys continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,7 +100,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAggregations, value.Aggregations, 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, PropFields, value.Fields, 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.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); 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.WriteEndObject(); 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/TermVectorsRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs index 095bde8f418..c3b9fee9ba4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermVectorsRequest.g.cs @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.TermVectorsRequest Read continue; } - if (propFieldStatistics.TryReadProperty(ref reader, options, PropFieldStatistics, null)) + if (propFieldStatistics.TryReadProperty(ref reader, options, PropFieldStatistics, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,12 +93,12 @@ public override Elastic.Clients.Elasticsearch.TermVectorsRequest Read continue; } - if (propOffsets.TryReadProperty(ref reader, options, PropOffsets, null)) + if (propOffsets.TryReadProperty(ref reader, options, PropOffsets, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPayloads.TryReadProperty(ref reader, options, PropPayloads, null)) + if (propPayloads.TryReadProperty(ref reader, options, PropPayloads, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,7 +108,7 @@ public override Elastic.Clients.Elasticsearch.TermVectorsRequest Read continue; } - if (propPositions.TryReadProperty(ref reader, options, PropPositions, null)) + if (propPositions.TryReadProperty(ref reader, options, PropPositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,17 +118,17 @@ public override Elastic.Clients.Elasticsearch.TermVectorsRequest Read continue; } - if (propTermStatistics.TryReadProperty(ref reader, options, PropTermStatistics, null)) + if (propTermStatistics.TryReadProperty(ref reader, options, PropTermStatistics, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, null)) + if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, static Elastic.Clients.Elasticsearch.VersionType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,16 +165,16 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDoc, value.Doc, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropFieldStatistics, value.FieldStatistics, null, null); + writer.WriteProperty(options, PropFieldStatistics, value.FieldStatistics, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropOffsets, value.Offsets, null, null); - writer.WriteProperty(options, PropPayloads, value.Payloads, null, null); + writer.WriteProperty(options, PropOffsets, value.Offsets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPayloads, value.Payloads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPerFieldAnalyzer, value.PerFieldAnalyzer, 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, PropPositions, value.Positions, null, null); + writer.WriteProperty(options, PropPositions, value.Positions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropTermStatistics, value.TermStatistics, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropVersionType, value.VersionType, null, null); + writer.WriteProperty(options, PropTermStatistics, value.TermStatistics, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionType, value.VersionType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.VersionType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs index d38bf955c4b..bdc6e0d2d4b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TermsEnumRequest.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.TermsEnumRequest Read(ref System.T LocalJsonValue propTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, null)) + if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -69,7 +69,7 @@ public override Elastic.Clients.Elasticsearch.TermsEnumRequest Read(ref System.T continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -109,11 +109,11 @@ public override Elastic.Clients.Elasticsearch.TermsEnumRequest Read(ref System.T public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.TermsEnumRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, null); + writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIndexFilter, value.IndexFilter, null, null); writer.WriteProperty(options, PropSearchAfter, value.SearchAfter, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropString, value.String, null, null); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindFieldStructureResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindFieldStructureResponse.g.cs index 490c05e8a19..fe5c21229fb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindFieldStructureResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindFieldStructureResponse.g.cs @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.TextStructure.FindFieldStructureRe continue; } - if (propEcsCompatibility.TryReadProperty(ref reader, options, PropEcsCompatibility, null)) + if (propEcsCompatibility.TryReadProperty(ref reader, options, PropEcsCompatibility, static Elastic.Clients.Elasticsearch.TextStructure.EcsCompatibilityType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -170,7 +170,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCharset, value.Charset, null, null); - writer.WriteProperty(options, PropEcsCompatibility, value.EcsCompatibility, null, null); + writer.WriteProperty(options, PropEcsCompatibility, value.EcsCompatibility, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.TextStructure.EcsCompatibilityType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFieldStats, value.FieldStats, 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, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropGrokPattern, value.GrokPattern, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindMessageStructureResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindMessageStructureResponse.g.cs index 638e3913804..890559004a6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindMessageStructureResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/TextStructure/FindMessageStructureResponse.g.cs @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.TextStructure.FindMessageStructure continue; } - if (propEcsCompatibility.TryReadProperty(ref reader, options, PropEcsCompatibility, null)) + if (propEcsCompatibility.TryReadProperty(ref reader, options, PropEcsCompatibility, static Elastic.Clients.Elasticsearch.TextStructure.EcsCompatibilityType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -170,7 +170,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCharset, value.Charset, null, null); - writer.WriteProperty(options, PropEcsCompatibility, value.EcsCompatibility, null, null); + writer.WriteProperty(options, PropEcsCompatibility, value.EcsCompatibility, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.TextStructure.EcsCompatibilityType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFieldStats, value.FieldStats, 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, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropGrokPattern, value.GrokPattern, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs index c4d57cf50b2..4e46a5a7140 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryRequest.g.cs @@ -279,12 +279,12 @@ public override Elastic.Clients.Elasticsearch.UpdateByQueryRequest Read(ref Syst LocalJsonValue propSlice = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propConflicts.TryReadProperty(ref reader, options, PropConflicts, null)) + if (propConflicts.TryReadProperty(ref reader, options, PropConflicts, static Elastic.Clients.Elasticsearch.Conflicts? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, null)) + if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -327,8 +327,8 @@ public override Elastic.Clients.Elasticsearch.UpdateByQueryRequest Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.UpdateByQueryRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropConflicts, value.Conflicts, null, null); - writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, null); + writer.WriteProperty(options, PropConflicts, value.Conflicts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Conflicts? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteProperty(options, PropSlice, value.Slice, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryResponse.g.cs index 495969e4c2b..d99afaa2a35 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateByQueryResponse.g.cs @@ -63,12 +63,12 @@ public override Elastic.Clients.Elasticsearch.UpdateByQueryResponse Read(ref Sys LocalJsonValue propVersionConflicts = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBatches.TryReadProperty(ref reader, options, PropBatches, null)) + if (propBatches.TryReadProperty(ref reader, options, PropBatches, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, null)) + if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -78,12 +78,12 @@ public override Elastic.Clients.Elasticsearch.UpdateByQueryResponse Read(ref Sys continue; } - if (propNoops.TryReadProperty(ref reader, options, PropNoops, null)) + if (propNoops.TryReadProperty(ref reader, options, PropNoops, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, null)) + if (propRequestsPerSecond.TryReadProperty(ref reader, options, PropRequestsPerSecond, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.UpdateByQueryResponse Read(ref Sys continue; } - if (propThrottledMillis.TryReadProperty(ref reader, options, PropThrottledMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propThrottledMillis.TryReadProperty(ref reader, options, PropThrottledMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -113,32 +113,32 @@ public override Elastic.Clients.Elasticsearch.UpdateByQueryResponse Read(ref Sys continue; } - if (propThrottledUntilMillis.TryReadProperty(ref reader, options, PropThrottledUntilMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propThrottledUntilMillis.TryReadProperty(ref reader, options, PropThrottledUntilMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, null)) + if (propTimedOut.TryReadProperty(ref reader, options, PropTimedOut, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + if (propTotal.TryReadProperty(ref reader, options, PropTotal, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUpdated.TryReadProperty(ref reader, options, PropUpdated, null)) + if (propUpdated.TryReadProperty(ref reader, options, PropUpdated, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionConflicts.TryReadProperty(ref reader, options, PropVersionConflicts, null)) + if (propVersionConflicts.TryReadProperty(ref reader, options, PropVersionConflicts, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -177,22 +177,22 @@ public override Elastic.Clients.Elasticsearch.UpdateByQueryResponse Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.UpdateByQueryResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBatches, value.Batches, null, null); - writer.WriteProperty(options, PropDeleted, value.Deleted, null, null); + writer.WriteProperty(options, PropBatches, value.Batches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDeleted, value.Deleted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFailures, value.Failures, 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, PropNoops, value.Noops, null, null); - writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, null); + writer.WriteProperty(options, PropNoops, value.Noops, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRequestsPerSecond, value.RequestsPerSecond, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRetries, value.Retries, null, null); writer.WriteProperty(options, PropTask, value.Task, null, null); writer.WriteProperty(options, PropThrottled, value.Throttled, null, null); - writer.WriteProperty(options, PropThrottledMillis, value.ThrottledMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropThrottledMillis, value.ThrottledMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropThrottledUntil, value.ThrottledUntil, null, null); - writer.WriteProperty(options, PropThrottledUntilMillis, value.ThrottledUntilMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); - writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropTotal, value.Total, null, null); - writer.WriteProperty(options, PropUpdated, value.Updated, null, null); - writer.WriteProperty(options, PropVersionConflicts, value.VersionConflicts, null, null); + writer.WriteProperty(options, PropThrottledUntilMillis, value.ThrottledUntilMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTotal, value.Total, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUpdated, value.Updated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionConflicts, value.VersionConflicts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs index fddf0253f30..5b284cfe510 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateRequest.g.cs @@ -138,7 +138,7 @@ public override Elastic.Clients.Elasticsearch.UpdateRequest propUpsert = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDetectNoop.TryReadProperty(ref reader, options, PropDetectNoop, null)) + if (propDetectNoop.TryReadProperty(ref reader, options, PropDetectNoop, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -148,7 +148,7 @@ public override Elastic.Clients.Elasticsearch.UpdateRequest r.ReadNullableValue(o))) { continue; } @@ -158,7 +158,7 @@ public override Elastic.Clients.Elasticsearch.UpdateRequest r.ReadNullableValue(o))) { continue; } @@ -198,11 +198,11 @@ public override Elastic.Clients.Elasticsearch.UpdateRequest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDetectNoop, value.DetectNoop, null, null); + writer.WriteProperty(options, PropDetectNoop, value.DetectNoop, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDoc, value.Doc, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TPartialDocument? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); - writer.WriteProperty(options, PropDocAsUpsert, value.DocAsUpsert, null, null); + writer.WriteProperty(options, PropDocAsUpsert, value.DocAsUpsert, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropScriptedUpsert, value.ScriptedUpsert, null, null); + writer.WriteProperty(options, PropScriptedUpsert, value.ScriptedUpsert, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteProperty(options, PropUpsert, value.Upsert, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs index ef7df1634d7..123f3171375 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.UpdateResponse Read(ref LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, null)) + if (propForcedRefresh.TryReadProperty(ref reader, options, PropForcedRefresh, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -69,7 +69,7 @@ public override Elastic.Clients.Elasticsearch.UpdateResponse Read(ref continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -79,7 +79,7 @@ public override Elastic.Clients.Elasticsearch.UpdateResponse Read(ref continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,13 +121,13 @@ public override Elastic.Clients.Elasticsearch.UpdateResponse Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.UpdateResponse value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, null); + writer.WriteProperty(options, PropForcedRefresh, value.ForcedRefresh, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropGet, value.Get, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResult, value.Result, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); 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/Client/ElasticsearchClient.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs index 4e1c4d2df31..ad17753b7b8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.g.cs @@ -567,6 +567,23 @@ public virtual Elastic.Clients.Elasticsearch.DeleteResponse Delete(Elastic.Clien return DoRequest(request); } + public virtual Elastic.Clients.Elasticsearch.DeleteResponse Delete(string index, Elastic.Clients.Elasticsearch.Id id) + { + var builder = new Elastic.Clients.Elasticsearch.DeleteRequestDescriptor(index, id); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.DeleteResponse Delete(string index, Elastic.Clients.Elasticsearch.Id id, System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.DeleteRequestDescriptor(index, id); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + public virtual Elastic.Clients.Elasticsearch.DeleteResponse Delete(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, System.Action> action) { var builder = new Elastic.Clients.Elasticsearch.DeleteRequestDescriptor(index, id); @@ -650,6 +667,23 @@ public virtual Elastic.Clients.Elasticsearch.DeleteResponse Delete(El return DoRequestAsync(request, cancellationToken); } + public virtual System.Threading.Tasks.Task DeleteAsync(string index, Elastic.Clients.Elasticsearch.Id id, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.DeleteRequestDescriptor(index, id); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task DeleteAsync(string index, Elastic.Clients.Elasticsearch.Id id, System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.DeleteRequestDescriptor(index, id); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + public virtual System.Threading.Tasks.Task DeleteAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, System.Action> action, System.Threading.CancellationToken cancellationToken = default) { var builder = new Elastic.Clients.Elasticsearch.DeleteRequestDescriptor(index, id); @@ -923,6 +957,23 @@ public virtual Elastic.Clients.Elasticsearch.ExistsResponse Exists(Elastic.Clien return DoRequest(request); } + public virtual Elastic.Clients.Elasticsearch.ExistsResponse Exists(string index, Elastic.Clients.Elasticsearch.Id id) + { + var builder = new Elastic.Clients.Elasticsearch.ExistsRequestDescriptor(index, id); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.ExistsResponse Exists(string index, Elastic.Clients.Elasticsearch.Id id, System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.ExistsRequestDescriptor(index, id); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + public virtual Elastic.Clients.Elasticsearch.ExistsResponse Exists(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, System.Action> action) { var builder = new Elastic.Clients.Elasticsearch.ExistsRequestDescriptor(index, id); @@ -1006,6 +1057,23 @@ public virtual Elastic.Clients.Elasticsearch.ExistsResponse Exists(El return DoRequestAsync(request, cancellationToken); } + public virtual System.Threading.Tasks.Task ExistsAsync(string index, Elastic.Clients.Elasticsearch.Id id, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.ExistsRequestDescriptor(index, id); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task ExistsAsync(string index, Elastic.Clients.Elasticsearch.Id id, System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.ExistsRequestDescriptor(index, id); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + public virtual System.Threading.Tasks.Task ExistsAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, System.Action> action, System.Threading.CancellationToken cancellationToken = default) { var builder = new Elastic.Clients.Elasticsearch.ExistsRequestDescriptor(index, id); @@ -1089,6 +1157,23 @@ public virtual Elastic.Clients.Elasticsearch.ExistsSourceResponse ExistsSource(E return DoRequest(request); } + public virtual Elastic.Clients.Elasticsearch.ExistsSourceResponse ExistsSource(string index, Elastic.Clients.Elasticsearch.Id id) + { + var builder = new Elastic.Clients.Elasticsearch.ExistsSourceRequestDescriptor(index, id); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + + public virtual Elastic.Clients.Elasticsearch.ExistsSourceResponse ExistsSource(string index, Elastic.Clients.Elasticsearch.Id id, System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.ExistsSourceRequestDescriptor(index, id); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequest(request); + } + public virtual Elastic.Clients.Elasticsearch.ExistsSourceResponse ExistsSource(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, System.Action> action) { var builder = new Elastic.Clients.Elasticsearch.ExistsSourceRequestDescriptor(index, id); @@ -1172,6 +1257,23 @@ public virtual Elastic.Clients.Elasticsearch.ExistsSourceResponse ExistsSource(request, cancellationToken); } + public virtual System.Threading.Tasks.Task ExistsSourceAsync(string index, Elastic.Clients.Elasticsearch.Id id, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.ExistsSourceRequestDescriptor(index, id); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + + public virtual System.Threading.Tasks.Task ExistsSourceAsync(string index, Elastic.Clients.Elasticsearch.Id id, System.Action action, System.Threading.CancellationToken cancellationToken = default) + { + var builder = new Elastic.Clients.Elasticsearch.ExistsSourceRequestDescriptor(index, id); + action.Invoke(builder); + var request = builder.Instance; + request.BeforeRequest(); + return DoRequestAsync(request, cancellationToken); + } + public virtual System.Threading.Tasks.Task ExistsSourceAsync(Elastic.Clients.Elasticsearch.IndexName index, Elastic.Clients.Elasticsearch.Id id, System.Action> action, System.Threading.CancellationToken cancellationToken = default) { var builder = new Elastic.Clients.Elasticsearch.ExistsSourceRequestDescriptor(index, id); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs index cbf2701dee0..66137cc65a7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregateDictionary.g.cs @@ -52,7 +52,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien internal static void ReadItem(ref System.Text.Json.Utf8JsonReader reader, System.Text.Json.JsonSerializerOptions options, out string name, out Elastic.Clients.Elasticsearch.Aggregations.IAggregate value) { - var key = reader.ReadPropertyName(options, null); + var key = reader.ReadPropertyName(options, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); reader.Read(); var parts = key.Split('#'); if (parts.Length != 2) @@ -144,214 +144,214 @@ internal static void WriteItem(System.Text.Json.Utf8JsonWriter writer, System.Te switch (value) { case Elastic.Clients.Elasticsearch.Aggregations.AdjacencyMatrixAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.AdjacencyMatrixAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.AutoDateHistogramAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.AutoDateHistogramAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.AverageAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.AverageAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.BucketMetricValueAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.BucketMetricValueAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.CardinalityAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.CardinalityAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.ChildrenAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ChildrenAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.DateRangeAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.DateRangeAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.DerivativeAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.DerivativeAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.DoubleTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.DoubleTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.FilterAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.FilterAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.FiltersAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.FiltersAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.FrequentItemSetsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.FrequentItemSetsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GeoBoundsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GeoBoundsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GeoCentroidAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GeoCentroidAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GeoDistanceAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GeoDistanceAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GeohashGridAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GeohashGridAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GeohexGridAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GeohexGridAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GeotileGridAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GeotileGridAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.GlobalAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GlobalAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.HdrPercentileRanksAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.HdrPercentileRanksAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.HdrPercentilesAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.HdrPercentilesAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.HistogramAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.HistogramAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.IpPrefixAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.IpPrefixAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.IpRangeAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.IpRangeAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.LongRareTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.LongRareTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.LongTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.LongTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.MatrixStatsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MatrixStatsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.MaxAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MaxAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviationAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviationAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.MinAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MinAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.MissingAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MissingAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.NestedAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.NestedAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.ParentAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ParentAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.RangeAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.RangeAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.RateAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.RateAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.ReverseNestedAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ReverseNestedAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.ScriptedMetricAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ScriptedMetricAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.SignificantLongTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.SignificantLongTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.SignificantStringTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.SignificantStringTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.CumulativeCardinalityAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.CumulativeCardinalityAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.SimpleValueAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.SimpleValueAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.StringRareTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.StringRareTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.StringTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.StringTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.SumAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.SumAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.TTestAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TTestAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.TDigestPercentileRanksAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TDigestPercentileRanksAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.TDigestPercentilesAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TDigestPercentilesAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.TopMetricsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TopMetricsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.UnmappedRareTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.UnmappedRareTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.UnmappedSignificantTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.UnmappedSignificantTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.UnmappedTermsAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.UnmappedTermsAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.UnmappedSamplerAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.UnmappedSamplerAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.ValueCountAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ValueCountAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.VariableWidthHistogramAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.VariableWidthHistogramAggregate v) => w.WritePropertyName(o, v)); break; case Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageAggregate v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageAggregate v) => w.WritePropertyName(o, v)); break; default: throw new System.Text.Json.JsonException($"Variant '{0}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.Aggregations.IAggregate)}'."); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregationRange.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregationRange.g.cs index 3929c3332d6..f0632e93961 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregationRange.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AggregationRange.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AggregationRange Read LocalJsonValue propTo = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AggregationRange Read continue; } - if (propTo.TryReadProperty(ref reader, options, PropTo, null)) + if (propTo.TryReadProperty(ref reader, options, PropTo, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AggregationRange Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.AggregationRange value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKey, value.Key, null, null); - writer.WriteProperty(options, PropTo, value.To, null, null); + writer.WriteProperty(options, PropTo, value.To, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ArrayPercentilesItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ArrayPercentilesItem.g.cs index 9f32ee6be43..88eef8e4386 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ArrayPercentilesItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ArrayPercentilesItem.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ArrayPercentilesItem continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropKey, value.Key, null, null); - writer.WriteProperty(options, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs index ad9a573549a..bcd848e2a70 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AutoDateHistogramAggregation.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AutoDateHistogramAggr LocalJsonValue propTimeZone = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBuckets.TryReadProperty(ref reader, options, PropBuckets, null)) + if (propBuckets.TryReadProperty(ref reader, options, PropBuckets, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -64,12 +64,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AutoDateHistogramAggr continue; } - if (propMinimumInterval.TryReadProperty(ref reader, options, PropMinimumInterval, null)) + if (propMinimumInterval.TryReadProperty(ref reader, options, PropMinimumInterval, static Elastic.Clients.Elasticsearch.Aggregations.MinimumInterval? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissing.TryReadProperty(ref reader, options, PropMissing, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propMissing.TryReadProperty(ref reader, options, PropMissing, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -121,11 +121,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AutoDateHistogramAggr public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.AutoDateHistogramAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBuckets, value.Buckets, null, null); + writer.WriteProperty(options, PropBuckets, value.Buckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropMinimumInterval, value.MinimumInterval, null, null); - writer.WriteProperty(options, PropMissing, value.Missing, 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, PropMinimumInterval, value.MinimumInterval, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MinimumInterval? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropOffset, value.Offset, null, null); writer.WriteProperty(options, PropParams, value.Params, 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, PropScript, value.Script, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregate.g.cs index f0ab2b896e7..7afa9ed7c76 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AverageAggregate Read continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs index e8b8325c251..1503eb6a700 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/AverageBucketAggregation.g.cs @@ -32,7 +32,7 @@ internal sealed partial class AverageBucketAggregationConverter : System.Text.Js public override Elastic.Clients.Elasticsearch.Aggregations.AverageBucketAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.AverageBucketAggregat continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -104,7 +104,7 @@ internal AverageBucketAggregation(Elastic.Clients.Elasticsearch.Serialization.Js /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -146,7 +146,7 @@ public AverageBucketAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.AverageBucketAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.AverageBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxplotAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxplotAggregation.g.cs index 6d30c06e26b..71e0f01a82d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxplotAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BoxplotAggregation.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregation Re LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompression.TryReadProperty(ref reader, options, PropCompression, null)) + if (propCompression.TryReadProperty(ref reader, options, PropCompression, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregation Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.BoxplotAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompression, value.Compression, null, null); + writer.WriteProperty(options, PropCompression, value.Compression, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketCorrelationAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketCorrelationAggregation.g.cs index 1d49f101c3e..19f9aa62061 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketCorrelationAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketCorrelationAggregation.g.cs @@ -31,7 +31,7 @@ internal sealed partial class BucketCorrelationAggregationConverter : System.Tex public override Elastic.Clients.Elasticsearch.Aggregations.BucketCorrelationAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFunction = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -106,7 +106,7 @@ internal BucketCorrelationAggregation(Elastic.Clients.Elasticsearch.Serializatio /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -149,7 +149,7 @@ public BucketCorrelationAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.BucketCorrelationAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.BucketCorrelationAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketKsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketKsAggregation.g.cs index ee4fc75c001..864f6c6734a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketKsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketKsAggregation.g.cs @@ -34,7 +34,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BucketKsAggregation R { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue?> propAlternative = default; - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue?> propFractions = default; LocalJsonValue propSamplingMethod = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -135,7 +135,7 @@ internal BucketKsAggregation(Elastic.Clients.Elasticsearch.Serialization.JsonCon /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -222,7 +222,7 @@ public Elastic.Clients.Elasticsearch.Aggregations.BucketKsAggregationDescriptor /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.BucketKsAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.BucketKsAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketMetricValueAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketMetricValueAggregate.g.cs index bb08fda0587..0201b074a9d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketMetricValueAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketMetricValueAggregate.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BucketMetricValueAggr continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropKeys, value.Keys, 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, PropMeta, value.Meta, 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, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs index 1710fb3031a..65febcbb61a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketScriptAggregation.g.cs @@ -33,7 +33,7 @@ internal sealed partial class BucketScriptAggregationConverter : System.Text.Jso public override Elastic.Clients.Elasticsearch.Aggregations.BucketScriptAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; LocalJsonValue propScript = default; @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BucketScriptAggregati continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); } @@ -113,7 +113,7 @@ internal BucketScriptAggregation(Elastic.Clients.Elasticsearch.Serialization.Jso /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -162,7 +162,7 @@ public BucketScriptAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.BucketScriptAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.BucketScriptAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs index 3ddde26218a..560276291ff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSelectorAggregation.g.cs @@ -33,7 +33,7 @@ internal sealed partial class BucketSelectorAggregationConverter : System.Text.J public override Elastic.Clients.Elasticsearch.Aggregations.BucketSelectorAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; LocalJsonValue propScript = default; @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BucketSelectorAggrega continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); } @@ -113,7 +113,7 @@ internal BucketSelectorAggregation(Elastic.Clients.Elasticsearch.Serialization.J /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -162,7 +162,7 @@ public BucketSelectorAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.BucketSelectorAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.BucketSelectorAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs index 9cbe5dac0a9..e5fb71b1674 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/BucketSortAggregation.g.cs @@ -39,17 +39,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BucketSortAggregation LocalJsonValue?> propSort = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Aggregations.BucketSortAggregation public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.BucketSortAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFrom, value.From, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CardinalityAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CardinalityAggregation.g.cs index 2df42a5f795..478e93172e3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CardinalityAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CardinalityAggregation.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CardinalityAggregatio LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, null)) + if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, static Elastic.Clients.Elasticsearch.Aggregations.CardinalityExecutionMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,12 +58,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CardinalityAggregatio continue; } - if (propPrecisionThreshold.TryReadProperty(ref reader, options, PropPrecisionThreshold, null)) + if (propPrecisionThreshold.TryReadProperty(ref reader, options, PropPrecisionThreshold, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRehash.TryReadProperty(ref reader, options, PropRehash, null)) + if (propRehash.TryReadProperty(ref reader, options, PropRehash, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,11 +97,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CardinalityAggregatio public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.CardinalityAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, null); + writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.CardinalityExecutionMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropPrecisionThreshold, value.PrecisionThreshold, null, null); - writer.WriteProperty(options, PropRehash, value.Rehash, null, null); + writer.WriteProperty(options, PropPrecisionThreshold, value.PrecisionThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRehash, value.Rehash, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); } 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..4530d0fefc7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CategorizeTextAggregation.g.cs @@ -66,37 +66,37 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CategorizeTextAggrega continue; } - if (propMaxMatchedTokens.TryReadProperty(ref reader, options, PropMaxMatchedTokens, null)) + if (propMaxMatchedTokens.TryReadProperty(ref reader, options, PropMaxMatchedTokens, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxUniqueTokens.TryReadProperty(ref reader, options, PropMaxUniqueTokens, null)) + if (propMaxUniqueTokens.TryReadProperty(ref reader, options, PropMaxUniqueTokens, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, null)) + if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSimilarityThreshold.TryReadProperty(ref reader, options, PropSimilarityThreshold, null)) + if (propSimilarityThreshold.TryReadProperty(ref reader, options, PropSimilarityThreshold, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,13 +132,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCategorizationAnalyzer, value.CategorizationAnalyzer, null, null); writer.WriteProperty(options, PropCategorizationFilters, value.CategorizationFilters, 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, PropField, value.Field, null, null); - writer.WriteProperty(options, PropMaxMatchedTokens, value.MaxMatchedTokens, null, null); - writer.WriteProperty(options, PropMaxUniqueTokens, value.MaxUniqueTokens, null, null); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); - writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSimilarityThreshold, value.SimilarityThreshold, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropMaxMatchedTokens, value.MaxMatchedTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxUniqueTokens, value.MaxUniqueTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSimilarityThreshold, value.SimilarityThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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/Aggregations/CompositeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs index 5e09f2a9319..2f842aaa9f4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeAggregation.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeAggregation continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAfter, value.After, 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, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSources, value.Sources, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary v) => w.WriteDictionaryValue(o, v, null, null))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeDateHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeDateHistogramAggregation.g.cs index ac41b509ee0..d0e83214bab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeDateHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeDateHistogramAggregation.g.cs @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeDateHistogra continue; } - if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, null)) + if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, null)) + if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, static Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,7 +88,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeDateHistogra continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeDateHistogra continue; } - if (propValueType.TryReadProperty(ref reader, options, PropValueType, null)) + if (propValueType.TryReadProperty(ref reader, options, PropValueType, static Elastic.Clients.Elasticsearch.Aggregations.ValueType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,13 +141,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFixedInterval, value.FixedInterval, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, null); - writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, null); + writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOffset, value.Offset, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteProperty(options, PropTimeZone, value.TimeZone, null, null); - writer.WriteProperty(options, PropValueType, value.ValueType, null, null); + writer.WriteProperty(options, PropValueType, value.ValueType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ValueType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeGeoTileGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeGeoTileGridAggregation.g.cs index f9dd876de95..9080054cb1f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeGeoTileGridAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeGeoTileGridAggregation.g.cs @@ -57,22 +57,22 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeGeoTileGridA continue; } - if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, null)) + if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, null)) + if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, static Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, null)) + if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeGeoTileGridA continue; } - if (propValueType.TryReadProperty(ref reader, options, PropValueType, null)) + if (propValueType.TryReadProperty(ref reader, options, PropValueType, static Elastic.Clients.Elasticsearch.Aggregations.ValueType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -115,12 +115,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBounds, value.Bounds, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, null); - writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); - writer.WriteProperty(options, PropPrecision, value.Precision, null, null); + writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrecision, value.Precision, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropValueType, value.ValueType, null, null); + writer.WriteProperty(options, PropValueType, value.ValueType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ValueType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeHistogramAggregation.g.cs index a0f4882607a..f718be19eaa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeHistogramAggregation.g.cs @@ -55,17 +55,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeHistogramAgg continue; } - if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, null)) + if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, null)) + if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, static Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeHistogramAgg continue; } - if (propValueType.TryReadProperty(ref reader, options, PropValueType, null)) + if (propValueType.TryReadProperty(ref reader, options, PropValueType, static Elastic.Clients.Elasticsearch.Aggregations.ValueType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,11 +107,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropInterval, value.Interval, null, null); - writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, null); - writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); + writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropValueType, value.ValueType, null, null); + writer.WriteProperty(options, PropValueType, value.ValueType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ValueType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeTermsAggregation.g.cs index ba53d180cae..c66a65e22a5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CompositeTermsAggregation.g.cs @@ -48,17 +48,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeTermsAggrega continue; } - if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, null)) + if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, null)) + if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, static Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CompositeTermsAggrega continue; } - if (propValueType.TryReadProperty(ref reader, options, PropValueType, null)) + if (propValueType.TryReadProperty(ref reader, options, PropValueType, static Elastic.Clients.Elasticsearch.Aggregations.ValueType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,11 +98,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, null); - writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); + writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropValueType, value.ValueType, null, null); + writer.WriteProperty(options, PropValueType, value.ValueType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ValueType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs index 0ab62d50197..9ed709e697d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeCardinalityAggregation.g.cs @@ -32,7 +32,7 @@ internal sealed partial class CumulativeCardinalityAggregationConverter : System public override Elastic.Clients.Elasticsearch.Aggregations.CumulativeCardinalityAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CumulativeCardinality continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -104,7 +104,7 @@ internal CumulativeCardinalityAggregation(Elastic.Clients.Elasticsearch.Serializ /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -146,7 +146,7 @@ public CumulativeCardinalityAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.CumulativeCardinalityAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.CumulativeCardinalityAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs index fad254c7c5f..5549934b46e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/CumulativeSumAggregation.g.cs @@ -32,7 +32,7 @@ internal sealed partial class CumulativeSumAggregationConverter : System.Text.Js public override Elastic.Clients.Elasticsearch.Aggregations.CumulativeSumAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.CumulativeSumAggregat continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -104,7 +104,7 @@ internal CumulativeSumAggregation(Elastic.Clients.Elasticsearch.Serialization.Js /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -146,7 +146,7 @@ public CumulativeSumAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.CumulativeSumAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.CumulativeSumAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs index e9ae813e335..0952fdd3670 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DateHistogramAggregation.g.cs @@ -59,7 +59,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregat LocalJsonValue propTimeZone = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCalendarInterval.TryReadProperty(ref reader, options, PropCalendarInterval, null)) + if (propCalendarInterval.TryReadProperty(ref reader, options, PropCalendarInterval, static Elastic.Clients.Elasticsearch.Aggregations.CalendarInterval? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -94,12 +94,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregat continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissing.TryReadProperty(ref reader, options, PropMissing, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propMissing.TryReadProperty(ref reader, options, PropMissing, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -164,7 +164,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregat public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.DateHistogramAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCalendarInterval, value.CalendarInterval, null, null); + writer.WriteProperty(options, PropCalendarInterval, value.CalendarInterval, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.CalendarInterval? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExtendedBounds, value.ExtendedBounds, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFixedInterval, value.FixedInterval, null, null); @@ -174,8 +174,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropInterval, value.Interval, null, null) #pragma warning restore CS0618 ; - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); - writer.WriteProperty(options, PropMissing, value.Missing, 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, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropOffset, value.Offset, null, null); writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteSingleOrManyCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); writer.WriteProperty(options, PropParams, value.Params, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregate.g.cs index fdba37882fe..f2d1219e092 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregate.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DerivativeAggregate R continue; } - if (propNormalizedValue.TryReadProperty(ref reader, options, PropNormalizedValue, null)) + if (propNormalizedValue.TryReadProperty(ref reader, options, PropNormalizedValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DerivativeAggregate R continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,9 +90,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropNormalizedValue, value.NormalizedValue, null, null); + writer.WriteProperty(options, PropNormalizedValue, value.NormalizedValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNormalizedValueAsString, value.NormalizedValueAsString, null, null); - writer.WriteProperty(options, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs index 4b0b1058c34..8caea294504 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DerivativeAggregation.g.cs @@ -32,7 +32,7 @@ internal sealed partial class DerivativeAggregationConverter : System.Text.Json. public override Elastic.Clients.Elasticsearch.Aggregations.DerivativeAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DerivativeAggregation continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -104,7 +104,7 @@ internal DerivativeAggregation(Elastic.Clients.Elasticsearch.Serialization.JsonC /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -146,7 +146,7 @@ public DerivativeAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.DerivativeAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.DerivativeAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs index b61c7ddbf0c..068a831781b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DiversifiedSamplerAggregation.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DiversifiedSamplerAgg LocalJsonValue propShardSize = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, null)) + if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, static Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregationExecutionHint? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DiversifiedSamplerAgg continue; } - if (propMaxDocsPerValue.TryReadProperty(ref reader, options, PropMaxDocsPerValue, null)) + if (propMaxDocsPerValue.TryReadProperty(ref reader, options, PropMaxDocsPerValue, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DiversifiedSamplerAgg continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DiversifiedSamplerAgg public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.DiversifiedSamplerAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, null); + writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregationExecutionHint? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropMaxDocsPerValue, value.MaxDocsPerValue, null, null); + writer.WriteProperty(options, PropMaxDocsPerValue, value.MaxDocsPerValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsAggregate.g.cs index 15c411095f8..15f37e4d9ab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsAggregate.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DoubleTermsAggregate continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DoubleTermsAggregate continue; } - if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, null)) + if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBuckets, value.Buckets, 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, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropSumOtherDocCount, value.SumOtherDocCount, null, null); + writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs index 7dcc6fbbd1e..1d136f6238b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/DoubleTermsBucket.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.DoubleTermsBucket Rea continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDocCount, value.DocCount, null, null); - writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKey, value.Key, null, null); writer.WriteProperty(options, PropKeyAsString, value.KeyAsString, null, null); if (value.Aggregations is not null) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregate.g.cs index b6f058b9b1f..e59e27cb14b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregate.g.cs @@ -79,7 +79,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat LocalJsonValue propVarianceSamplingAsString = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAvg.TryReadProperty(ref reader, options, PropAvg, null)) + if (propAvg.TryReadProperty(ref reader, options, PropAvg, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -94,7 +94,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propMax.TryReadProperty(ref reader, options, PropMax, null)) + if (propMax.TryReadProperty(ref reader, options, PropMax, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -109,7 +109,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propMin.TryReadProperty(ref reader, options, PropMin, null)) + if (propMin.TryReadProperty(ref reader, options, PropMin, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -119,7 +119,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propStdDeviation.TryReadProperty(ref reader, options, PropStdDeviation, null)) + if (propStdDeviation.TryReadProperty(ref reader, options, PropStdDeviation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -139,12 +139,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propStdDeviationPopulation.TryReadProperty(ref reader, options, PropStdDeviationPopulation, null)) + if (propStdDeviationPopulation.TryReadProperty(ref reader, options, PropStdDeviationPopulation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStdDeviationSampling.TryReadProperty(ref reader, options, PropStdDeviationSampling, null)) + if (propStdDeviationSampling.TryReadProperty(ref reader, options, PropStdDeviationSampling, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -159,7 +159,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propSumOfSquares.TryReadProperty(ref reader, options, PropSumOfSquares, null)) + if (propSumOfSquares.TryReadProperty(ref reader, options, PropSumOfSquares, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -169,7 +169,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propVariance.TryReadProperty(ref reader, options, PropVariance, null)) + if (propVariance.TryReadProperty(ref reader, options, PropVariance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -179,7 +179,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propVariancePopulation.TryReadProperty(ref reader, options, PropVariancePopulation, null)) + if (propVariancePopulation.TryReadProperty(ref reader, options, PropVariancePopulation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -189,7 +189,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propVarianceSampling.TryReadProperty(ref reader, options, PropVarianceSampling, null)) + if (propVarianceSampling.TryReadProperty(ref reader, options, PropVarianceSampling, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -241,29 +241,29 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAvg, value.Avg, null, null); + writer.WriteProperty(options, PropAvg, value.Avg, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAvgAsString, value.AvgAsString, null, null); writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropMax, value.Max, null, null); + writer.WriteProperty(options, PropMax, value.Max, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxAsString, value.MaxAsString, null, null); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropMin, value.Min, null, null); + writer.WriteProperty(options, PropMin, value.Min, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinAsString, value.MinAsString, null, null); - writer.WriteProperty(options, PropStdDeviation, value.StdDeviation, null, null); + writer.WriteProperty(options, PropStdDeviation, value.StdDeviation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStdDeviationAsString, value.StdDeviationAsString, null, null); writer.WriteProperty(options, PropStdDeviationBounds, value.StdDeviationBounds, null, null); writer.WriteProperty(options, PropStdDeviationBoundsAsString, value.StdDeviationBoundsAsString, null, null); - writer.WriteProperty(options, PropStdDeviationPopulation, value.StdDeviationPopulation, null, null); - writer.WriteProperty(options, PropStdDeviationSampling, value.StdDeviationSampling, null, null); + writer.WriteProperty(options, PropStdDeviationPopulation, value.StdDeviationPopulation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStdDeviationSampling, value.StdDeviationSampling, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSum, value.Sum, null, null); writer.WriteProperty(options, PropSumAsString, value.SumAsString, null, null); - writer.WriteProperty(options, PropSumOfSquares, value.SumOfSquares, null, null); + writer.WriteProperty(options, PropSumOfSquares, value.SumOfSquares, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSumOfSquaresAsString, value.SumOfSquaresAsString, null, null); - writer.WriteProperty(options, PropVariance, value.Variance, null, null); + writer.WriteProperty(options, PropVariance, value.Variance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVarianceAsString, value.VarianceAsString, null, null); - writer.WriteProperty(options, PropVariancePopulation, value.VariancePopulation, null, null); + writer.WriteProperty(options, PropVariancePopulation, value.VariancePopulation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVariancePopulationAsString, value.VariancePopulationAsString, null, null); - writer.WriteProperty(options, PropVarianceSampling, value.VarianceSampling, null, null); + writer.WriteProperty(options, PropVarianceSampling, value.VarianceSampling, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVarianceSamplingAsString, value.VarianceSamplingAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregation.g.cs index c60d93451e4..739830dc43b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsAggregation.g.cs @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsAggregat continue; } - if (propSigma.TryReadProperty(ref reader, options, PropSigma, null)) + if (propSigma.TryReadProperty(ref reader, options, PropSigma, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropSigma, value.Sigma, null, null); + writer.WriteProperty(options, PropSigma, value.Sigma, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregate.g.cs index bd13ebfb7af..f988d531624 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregate.g.cs @@ -79,7 +79,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg LocalJsonValue propVarianceSamplingAsString = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAvg.TryReadProperty(ref reader, options, PropAvg, null)) + if (propAvg.TryReadProperty(ref reader, options, PropAvg, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -94,7 +94,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propMax.TryReadProperty(ref reader, options, PropMax, null)) + if (propMax.TryReadProperty(ref reader, options, PropMax, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -109,7 +109,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propMin.TryReadProperty(ref reader, options, PropMin, null)) + if (propMin.TryReadProperty(ref reader, options, PropMin, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -119,7 +119,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propStdDeviation.TryReadProperty(ref reader, options, PropStdDeviation, null)) + if (propStdDeviation.TryReadProperty(ref reader, options, PropStdDeviation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -139,12 +139,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propStdDeviationPopulation.TryReadProperty(ref reader, options, PropStdDeviationPopulation, null)) + if (propStdDeviationPopulation.TryReadProperty(ref reader, options, PropStdDeviationPopulation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStdDeviationSampling.TryReadProperty(ref reader, options, PropStdDeviationSampling, null)) + if (propStdDeviationSampling.TryReadProperty(ref reader, options, PropStdDeviationSampling, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -159,7 +159,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propSumOfSquares.TryReadProperty(ref reader, options, PropSumOfSquares, null)) + if (propSumOfSquares.TryReadProperty(ref reader, options, PropSumOfSquares, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -169,7 +169,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propVariance.TryReadProperty(ref reader, options, PropVariance, null)) + if (propVariance.TryReadProperty(ref reader, options, PropVariance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -179,7 +179,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propVariancePopulation.TryReadProperty(ref reader, options, PropVariancePopulation, null)) + if (propVariancePopulation.TryReadProperty(ref reader, options, PropVariancePopulation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -189,7 +189,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propVarianceSampling.TryReadProperty(ref reader, options, PropVarianceSampling, null)) + if (propVarianceSampling.TryReadProperty(ref reader, options, PropVarianceSampling, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -241,29 +241,29 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAvg, value.Avg, null, null); + writer.WriteProperty(options, PropAvg, value.Avg, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAvgAsString, value.AvgAsString, null, null); writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropMax, value.Max, null, null); + writer.WriteProperty(options, PropMax, value.Max, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxAsString, value.MaxAsString, null, null); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropMin, value.Min, null, null); + writer.WriteProperty(options, PropMin, value.Min, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinAsString, value.MinAsString, null, null); - writer.WriteProperty(options, PropStdDeviation, value.StdDeviation, null, null); + writer.WriteProperty(options, PropStdDeviation, value.StdDeviation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStdDeviationAsString, value.StdDeviationAsString, null, null); writer.WriteProperty(options, PropStdDeviationBounds, value.StdDeviationBounds, null, null); writer.WriteProperty(options, PropStdDeviationBoundsAsString, value.StdDeviationBoundsAsString, null, null); - writer.WriteProperty(options, PropStdDeviationPopulation, value.StdDeviationPopulation, null, null); - writer.WriteProperty(options, PropStdDeviationSampling, value.StdDeviationSampling, null, null); + writer.WriteProperty(options, PropStdDeviationPopulation, value.StdDeviationPopulation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStdDeviationSampling, value.StdDeviationSampling, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSum, value.Sum, null, null); writer.WriteProperty(options, PropSumAsString, value.SumAsString, null, null); - writer.WriteProperty(options, PropSumOfSquares, value.SumOfSquares, null, null); + writer.WriteProperty(options, PropSumOfSquares, value.SumOfSquares, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSumOfSquaresAsString, value.SumOfSquaresAsString, null, null); - writer.WriteProperty(options, PropVariance, value.Variance, null, null); + writer.WriteProperty(options, PropVariance, value.Variance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVarianceAsString, value.VarianceAsString, null, null); - writer.WriteProperty(options, PropVariancePopulation, value.VariancePopulation, null, null); + writer.WriteProperty(options, PropVariancePopulation, value.VariancePopulation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVariancePopulationAsString, value.VariancePopulationAsString, null, null); - writer.WriteProperty(options, PropVarianceSampling, value.VarianceSampling, null, null); + writer.WriteProperty(options, PropVarianceSampling, value.VarianceSampling, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVarianceSamplingAsString, value.VarianceSamplingAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs index 5dfd076bdd2..4758f4d1bcc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ExtendedStatsBucketAggregation.g.cs @@ -33,7 +33,7 @@ internal sealed partial class ExtendedStatsBucketAggregationConverter : System.T public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; LocalJsonValue propSigma = default; @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAg continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSigma.TryReadProperty(ref reader, options, PropSigma, null)) + if (propSigma.TryReadProperty(ref reader, options, PropSigma, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,8 +83,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); - writer.WriteProperty(options, PropSigma, value.Sigma, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSigma, value.Sigma, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -113,7 +113,7 @@ internal ExtendedStatsBucketAggregation(Elastic.Clients.Elasticsearch.Serializat /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -162,7 +162,7 @@ public ExtendedStatsBucketAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.ExtendedStatsBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregation.g.cs index fe35f4aa215..9b3ed24ccd7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FiltersAggregation.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.FiltersAggregation Re continue; } - if (propOtherBucket.TryReadProperty(ref reader, options, PropOtherBucket, null)) + if (propOtherBucket.TryReadProperty(ref reader, options, PropOtherBucket, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFilters, value.Filters, null, null); - writer.WriteProperty(options, PropOtherBucket, value.OtherBucket, null, null); + writer.WriteProperty(options, PropOtherBucket, value.OtherBucket, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOtherBucketKey, value.OtherBucketKey, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FrequentItemSetsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FrequentItemSetsAggregation.g.cs index 8f9f9b0960a..92835521685 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FrequentItemSetsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/FrequentItemSetsAggregation.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.FrequentItemSetsAggre continue; } - if (propMinimumSetSize.TryReadProperty(ref reader, options, PropMinimumSetSize, null)) + if (propMinimumSetSize.TryReadProperty(ref reader, options, PropMinimumSetSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinimumSupport.TryReadProperty(ref reader, options, PropMinimumSupport, null)) + if (propMinimumSupport.TryReadProperty(ref reader, options, PropMinimumSupport, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFields, value.Fields, 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, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropMinimumSetSize, value.MinimumSetSize, null, null); - writer.WriteProperty(options, PropMinimumSupport, value.MinimumSupport, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropMinimumSetSize, value.MinimumSetSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinimumSupport, value.MinimumSupport, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoBoundsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoBoundsAggregation.g.cs index 703d4b29abd..792ceb67c9e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoBoundsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoBoundsAggregation.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoBoundsAggregation continue; } - if (propWrapLongitude.TryReadProperty(ref reader, options, PropWrapLongitude, null)) + if (propWrapLongitude.TryReadProperty(ref reader, options, PropWrapLongitude, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropWrapLongitude, value.WrapLongitude, null, null); + writer.WriteProperty(options, PropWrapLongitude, value.WrapLongitude, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoCentroidAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoCentroidAggregation.g.cs index d42e4e4e785..abcdc4b48bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoCentroidAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoCentroidAggregation.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoCentroidAggregatio LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoCentroidAggregatio public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.GeoCentroidAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCount, value.Count, null, null); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropLocation, value.Location, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs index 165a495ee95..fe58dfd2cd5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoDistanceAggregation.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoDistanceAggregatio LocalJsonValue propUnit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDistanceType.TryReadProperty(ref reader, options, PropDistanceType, null)) + if (propDistanceType.TryReadProperty(ref reader, options, PropDistanceType, static Elastic.Clients.Elasticsearch.GeoDistanceType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoDistanceAggregatio continue; } - if (propUnit.TryReadProperty(ref reader, options, PropUnit, null)) + if (propUnit.TryReadProperty(ref reader, options, PropUnit, static Elastic.Clients.Elasticsearch.DistanceUnit? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoDistanceAggregatio public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.GeoDistanceAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDistanceType, value.DistanceType, null, null); + writer.WriteProperty(options, PropDistanceType, value.DistanceType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.GeoDistanceType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropOrigin, value.Origin, null, null); writer.WriteProperty(options, PropRanges, value.Ranges, 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, PropUnit, value.Unit, null, null); + writer.WriteProperty(options, PropUnit, value.Unit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.DistanceUnit? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.g.cs index b59c3273dcb..c6bb8dd7e17 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeoLineAggregation.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregation Re LocalJsonValue propSortOrder = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propIncludeSort.TryReadProperty(ref reader, options, PropIncludeSort, null)) + if (propIncludeSort.TryReadProperty(ref reader, options, PropIncludeSort, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregation Re continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregation Re continue; } - if (propSortOrder.TryReadProperty(ref reader, options, PropSortOrder, null)) + if (propSortOrder.TryReadProperty(ref reader, options, PropSortOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregation Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.GeoLineAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropIncludeSort, value.IncludeSort, null, null); + writer.WriteProperty(options, PropIncludeSort, value.IncludeSort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPoint, value.Point, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSort, value.Sort, null, null); - writer.WriteProperty(options, PropSortOrder, value.SortOrder, null, null); + writer.WriteProperty(options, PropSortOrder, value.SortOrder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs index 61d2b52be47..9f3599ad592 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohashGridAggregation.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeohashGridAggregatio continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,8 +92,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropBounds, value.Bounds, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropPrecision, value.Precision, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs index dc2e8ba8b11..51303ba9264 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeohexGridAggregation.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeohexGridAggregation continue; } - if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, null)) + if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBounds, value.Bounds, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropPrecision, value.Precision, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropPrecision, value.Precision, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs index 881857a6e3f..0ef4f073622 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GeotileGridAggregation.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GeotileGridAggregatio continue; } - if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, null)) + if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBounds, value.Bounds, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropPrecision, value.Precision, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropPrecision, value.Precision, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GoogleNormalizedDistanceHeuristic.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GoogleNormalizedDistanceHeuristic.g.cs index ea67b4e4ec0..d88c435c532 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GoogleNormalizedDistanceHeuristic.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/GoogleNormalizedDistanceHeuristic.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GoogleNormalizedDista LocalJsonValue propBackgroundIsSuperset = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBackgroundIsSuperset.TryReadProperty(ref reader, options, PropBackgroundIsSuperset, null)) + if (propBackgroundIsSuperset.TryReadProperty(ref reader, options, PropBackgroundIsSuperset, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.GoogleNormalizedDista public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.GoogleNormalizedDistanceHeuristic value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBackgroundIsSuperset, value.BackgroundIsSuperset, null, null); + writer.WriteProperty(options, PropBackgroundIsSuperset, value.BackgroundIsSuperset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HdrMethod.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HdrMethod.g.cs index 7fff3e6df6d..b671c1629c8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HdrMethod.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HdrMethod.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.HdrMethod Read(ref Sy LocalJsonValue propNumberOfSignificantValueDigits = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNumberOfSignificantValueDigits.TryReadProperty(ref reader, options, PropNumberOfSignificantValueDigits, null)) + if (propNumberOfSignificantValueDigits.TryReadProperty(ref reader, options, PropNumberOfSignificantValueDigits, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.HdrMethod Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.HdrMethod value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNumberOfSignificantValueDigits, value.NumberOfSignificantValueDigits, null, null); + writer.WriteProperty(options, PropNumberOfSignificantValueDigits, value.NumberOfSignificantValueDigits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregation.g.cs index c59456e93fb..4ee48d07f34 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/HistogramAggregation.g.cs @@ -71,22 +71,22 @@ public override Elastic.Clients.Elasticsearch.Aggregations.HistogramAggregation continue; } - if (propInterval.TryReadProperty(ref reader, options, PropInterval, null)) + if (propInterval.TryReadProperty(ref reader, options, PropInterval, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissing.TryReadProperty(ref reader, options, PropMissing, null)) + if (propMissing.TryReadProperty(ref reader, options, PropMissing, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOffset.TryReadProperty(ref reader, options, PropOffset, null)) + if (propOffset.TryReadProperty(ref reader, options, PropOffset, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -133,10 +133,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropHardBounds, value.HardBounds, null, null); - writer.WriteProperty(options, PropInterval, value.Interval, null, null); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); - writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropOffset, value.Offset, null, null); + writer.WriteProperty(options, PropInterval, value.Interval, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOffset, value.Offset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteSingleOrManyCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregate.g.cs index fd97ac81cfb..0b2ca0f523e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregate.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregate Re } propData ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out object value, null, null); + reader.ReadProperty(options, out string key, out object value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propData[key] = value; } @@ -96,7 +96,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.Data) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs index 0c3b9ec1430..fabc87ffba9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceAggregation.g.cs @@ -34,7 +34,7 @@ internal sealed partial class InferenceAggregationConverter : System.Text.Json.S public override Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; LocalJsonValue propInferenceConfig = default; @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregation continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInferenceConfig, value.InferenceConfig, null, null); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteEndObject(); @@ -128,7 +128,7 @@ internal InferenceAggregation(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -188,7 +188,7 @@ public InferenceAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; @@ -283,7 +283,7 @@ public InferenceAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.InferenceAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceFeatureImportance.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceFeatureImportance.g.cs index 4da7a1ee62e..785d79418f6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceFeatureImportance.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/InferenceFeatureImportance.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.InferenceFeatureImpor continue; } - if (propImportance.TryReadProperty(ref reader, options, PropImportance, null)) + if (propImportance.TryReadProperty(ref reader, options, PropImportance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropClasses, value.Classes, 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, PropFeatureName, value.FeatureName, null, null); - writer.WriteProperty(options, PropImportance, value.Importance, null, null); + writer.WriteProperty(options, PropImportance, value.Importance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs index cbda2f9e72b..9abc4716ff1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/IpPrefixAggregation.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.IpPrefixAggregation R LocalJsonValue propPrefixLength = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAppendPrefixLength.TryReadProperty(ref reader, options, PropAppendPrefixLength, null)) + if (propAppendPrefixLength.TryReadProperty(ref reader, options, PropAppendPrefixLength, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,12 +51,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.IpPrefixAggregation R continue; } - if (propIsIpv6.TryReadProperty(ref reader, options, PropIsIpv6, null)) + if (propIsIpv6.TryReadProperty(ref reader, options, PropIsIpv6, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,10 +89,10 @@ public override Elastic.Clients.Elasticsearch.Aggregations.IpPrefixAggregation R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.IpPrefixAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAppendPrefixLength, value.AppendPrefixLength, null, null); + writer.WriteProperty(options, PropAppendPrefixLength, value.AppendPrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropIsIpv6, value.IsIpv6, null, null); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); + writer.WriteProperty(options, PropIsIpv6, value.IsIpv6, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsAggregate.g.cs index 313a9b91b87..ba77bf0d04e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsAggregate.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.LongTermsAggregate Re continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.LongTermsAggregate Re continue; } - if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, null)) + if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBuckets, value.Buckets, 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, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropSumOtherDocCount, value.SumOtherDocCount, null, null); + writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsBucket.g.cs index 8836b49b422..46ee6ad1505 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/LongTermsBucket.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.LongTermsBucket Read( continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDocCount, value.DocCount, null, null); - writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKey, value.Key, null, null); writer.WriteProperty(options, PropKeyAsString, value.KeyAsString, null, null); if (value.Aggregations is not null) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs index 0624629e879..d28c57ffd0c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MatrixStatsAggregatio continue; } - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.SortMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropMissing, value.Missing, 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, PropMode, value.Mode, null, null); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortMode? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxAggregate.g.cs index 9ca7a864512..e2c337f0ede 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MaxAggregate Read(ref continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs index b3c8d5d2853..8aaebee83de 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MaxBucketAggregation.g.cs @@ -32,7 +32,7 @@ internal sealed partial class MaxBucketAggregationConverter : System.Text.Json.S public override Elastic.Clients.Elasticsearch.Aggregations.MaxBucketAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MaxBucketAggregation continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -104,7 +104,7 @@ internal MaxBucketAggregation(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -146,7 +146,7 @@ public MaxBucketAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.MaxBucketAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.MaxBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregate.g.cs index 1ddd002069f..0dd02c95fc7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviati continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregation.g.cs index 6e68108980c..2dda05469f8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MedianAbsoluteDeviationAggregation.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviati LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompression.TryReadProperty(ref reader, options, PropCompression, null)) + if (propCompression.TryReadProperty(ref reader, options, PropCompression, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviati public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.MedianAbsoluteDeviationAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompression, value.Compression, null, null); + writer.WriteProperty(options, PropCompression, value.Compression, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinAggregate.g.cs index 3d595003d2b..34d4b914faf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MinAggregate Read(ref continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinBucketAggregation.g.cs index d0f72b4a683..89e00fe3777 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MinBucketAggregation.g.cs @@ -32,7 +32,7 @@ internal sealed partial class MinBucketAggregationConverter : System.Text.Json.S public override Elastic.Clients.Elasticsearch.Aggregations.MinBucketAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MinBucketAggregation continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -104,7 +104,7 @@ internal MinBucketAggregation(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -146,7 +146,7 @@ public MinBucketAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.MinBucketAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.MinBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs index 324449678c8..81a6036f0ff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingFunctionAggregation.g.cs @@ -35,7 +35,7 @@ internal sealed partial class MovingFunctionAggregationConverter : System.Text.J public override Elastic.Clients.Elasticsearch.Aggregations.MovingFunctionAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; LocalJsonValue propScript = default; @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MovingFunctionAggrega continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -63,12 +63,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MovingFunctionAggrega continue; } - if (propShift.TryReadProperty(ref reader, options, PropShift, null)) + if (propShift.TryReadProperty(ref reader, options, PropShift, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWindow.TryReadProperty(ref reader, options, PropWindow, null)) + if (propWindow.TryReadProperty(ref reader, options, PropWindow, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,10 +99,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropShift, value.Shift, null, null); - writer.WriteProperty(options, PropWindow, value.Window, null, null); + writer.WriteProperty(options, PropShift, value.Shift, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWindow, value.Window, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -131,7 +131,7 @@ internal MovingFunctionAggregation(Elastic.Clients.Elasticsearch.Serialization.J /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -195,7 +195,7 @@ public MovingFunctionAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.MovingFunctionAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.MovingFunctionAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs index 3772feb36de..d88928852bb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MovingPercentilesAggregation.g.cs @@ -34,7 +34,7 @@ internal sealed partial class MovingPercentilesAggregationConverter : System.Tex public override Elastic.Clients.Elasticsearch.Aggregations.MovingPercentilesAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; LocalJsonValue propShift = default; @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MovingPercentilesAggr continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShift.TryReadProperty(ref reader, options, PropShift, null)) + if (propShift.TryReadProperty(ref reader, options, PropShift, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWindow.TryReadProperty(ref reader, options, PropWindow, null)) + if (propWindow.TryReadProperty(ref reader, options, PropWindow, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); - writer.WriteProperty(options, PropShift, value.Shift, null, null); - writer.WriteProperty(options, PropWindow, value.Window, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShift, value.Shift, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWindow, value.Window, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -122,7 +122,7 @@ internal MovingPercentilesAggregation(Elastic.Clients.Elasticsearch.Serializatio /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -179,7 +179,7 @@ public MovingPercentilesAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.MovingPercentilesAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.MovingPercentilesAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregate.g.cs index 0ff2c7d649d..3d801279ceb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregate.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregate R continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregate R continue; } - if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, null)) + if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBuckets, value.Buckets, 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, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropSumOtherDocCount, value.SumOtherDocCount, null, null); + writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs index 6b96880d778..11ee589eb32 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsAggregation.g.cs @@ -47,12 +47,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregation LocalJsonValue> propTerms = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCollectMode.TryReadProperty(ref reader, options, PropCollectMode, null)) + if (propCollectMode.TryReadProperty(ref reader, options, PropCollectMode, static Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -62,22 +62,22 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregation continue; } - if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, null)) + if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShowTermDocCountError.TryReadProperty(ref reader, options, PropShowTermDocCountError, null)) + if (propShowTermDocCountError.TryReadProperty(ref reader, options, PropShowTermDocCountError, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,13 +113,13 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregation public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.MultiTermsAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCollectMode, value.CollectMode, null, null); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); + writer.WriteProperty(options, PropCollectMode, value.CollectMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteSingleOrManyCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); - writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropShowTermDocCountError, value.ShowTermDocCountError, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShowTermDocCountError, value.ShowTermDocCountError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsBucket.g.cs index 28a6415e5c8..2c0c41f16a4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MultiTermsBucket.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MultiTermsBucket Read continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDocCount, value.DocCount, null, null); - writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKey, value.Key, 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, PropKeyAsString, value.KeyAsString, null, null); if (value.Aggregations is not null) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MutualInformationHeuristic.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MutualInformationHeuristic.g.cs index 187ef56cf89..b996de763b0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MutualInformationHeuristic.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/MutualInformationHeuristic.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeur LocalJsonValue propIncludeNegatives = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBackgroundIsSuperset.TryReadProperty(ref reader, options, PropBackgroundIsSuperset, null)) + if (propBackgroundIsSuperset.TryReadProperty(ref reader, options, PropBackgroundIsSuperset, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncludeNegatives.TryReadProperty(ref reader, options, PropIncludeNegatives, null)) + if (propIncludeNegatives.TryReadProperty(ref reader, options, PropIncludeNegatives, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeur public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.MutualInformationHeuristic value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBackgroundIsSuperset, value.BackgroundIsSuperset, null, null); - writer.WriteProperty(options, PropIncludeNegatives, value.IncludeNegatives, null, null); + writer.WriteProperty(options, PropBackgroundIsSuperset, value.BackgroundIsSuperset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncludeNegatives, value.IncludeNegatives, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NormalizeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NormalizeAggregation.g.cs index c68734fa656..92ff657b603 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NormalizeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/NormalizeAggregation.g.cs @@ -33,7 +33,7 @@ internal sealed partial class NormalizeAggregationConverter : System.Text.Json.S public override Elastic.Clients.Elasticsearch.Aggregations.NormalizeAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; LocalJsonValue propMethod = default; @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.NormalizeAggregation continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMethod.TryReadProperty(ref reader, options, PropMethod, null)) + if (propMethod.TryReadProperty(ref reader, options, PropMethod, static Elastic.Clients.Elasticsearch.Aggregations.NormalizeMethod? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,8 +83,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); - writer.WriteProperty(options, PropMethod, value.Method, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMethod, value.Method, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.NormalizeMethod? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -113,7 +113,7 @@ internal NormalizeAggregation(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -162,7 +162,7 @@ public NormalizeAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.NormalizeAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.NormalizeAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs index 42531e3ec0e..6824db8445a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/PercentilesBucketAggregation.g.cs @@ -33,7 +33,7 @@ internal sealed partial class PercentilesBucketAggregationConverter : System.Tex public override Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; LocalJsonValue?> propPercents = default; @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggr continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPercents, value.Percents, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); } @@ -113,7 +113,7 @@ internal PercentilesBucketAggregation(Elastic.Clients.Elasticsearch.Serializatio /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -162,7 +162,7 @@ public PercentilesBucketAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.PercentilesBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RandomSamplerAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RandomSamplerAggregation.g.cs index 8a56f7b2540..cbc28c8eccb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RandomSamplerAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RandomSamplerAggregation.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RandomSamplerAggregat continue; } - if (propSeed.TryReadProperty(ref reader, options, PropSeed, null)) + if (propSeed.TryReadProperty(ref reader, options, PropSeed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSeed.TryReadProperty(ref reader, options, PropShardSeed, null)) + if (propShardSeed.TryReadProperty(ref reader, options, PropShardSeed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,8 +74,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropProbability, value.Probability, null, null); - writer.WriteProperty(options, PropSeed, value.Seed, null, null); - writer.WriteProperty(options, PropShardSeed, value.ShardSeed, null, null); + writer.WriteProperty(options, PropSeed, value.Seed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSeed, value.ShardSeed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregation.g.cs index eb03127a930..74ce51b86d6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeAggregation.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RangeAggregation Read continue; } - if (propMissing.TryReadProperty(ref reader, options, PropMissing, null)) + if (propMissing.TryReadProperty(ref reader, options, PropMissing, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropMissing, value.Missing, null, null); + writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRanges, value.Ranges, 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, PropScript, value.Script, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeBucket.g.cs index 5136e060324..4e398981a50 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RangeBucket.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RangeBucket Read(ref continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RangeBucket Read(ref continue; } - if (propTo.TryReadProperty(ref reader, options, PropTo, null)) + if (propTo.TryReadProperty(ref reader, options, PropTo, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,10 +96,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDocCount, value.DocCount, null, null); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFromAsString, value.FromAsString, null, null); writer.WriteProperty(options, PropKey, value.Key, null, null); - writer.WriteProperty(options, PropTo, value.To, null, null); + writer.WriteProperty(options, PropTo, value.To, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropToAsString, value.ToAsString, null, null); if (value.Aggregations is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RareTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RareTermsAggregation.g.cs index ee863e37828..e8dc4bc1655 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RareTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RareTermsAggregation.g.cs @@ -60,7 +60,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RareTermsAggregation continue; } - if (propMaxDocCount.TryReadProperty(ref reader, options, PropMaxDocCount, null)) + if (propMaxDocCount.TryReadProperty(ref reader, options, PropMaxDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RareTermsAggregation continue; } - if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, null)) + if (propPrecision.TryReadProperty(ref reader, options, PropPrecision, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,9 +108,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropExclude, value.Exclude, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropInclude, value.Include, null, null); - writer.WriteProperty(options, PropMaxDocCount, value.MaxDocCount, null, null); + writer.WriteProperty(options, PropMaxDocCount, value.MaxDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropPrecision, value.Precision, null, null); + writer.WriteProperty(options, PropPrecision, value.Precision, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueType, value.ValueType, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RateAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RateAggregation.g.cs index 3cfa8419e4b..7a244d5b769 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RateAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/RateAggregation.g.cs @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RateAggregation Read( continue; } - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.Aggregations.RateMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.RateAggregation Read( continue; } - if (propUnit.TryReadProperty(ref reader, options, PropUnit, null)) + if (propUnit.TryReadProperty(ref reader, options, PropUnit, static Elastic.Clients.Elasticsearch.Aggregations.CalendarInterval? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,9 +100,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropMode, value.Mode, null, null); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.RateMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropUnit, value.Unit, null, null); + writer.WriteProperty(options, PropUnit, value.Unit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.CalendarInterval? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SamplerAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SamplerAggregation.g.cs index b500b619b60..a80c50cca2d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SamplerAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SamplerAggregation.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregation Re LocalJsonValue propShardSize = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregation Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.SamplerAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs index d1efae4908b..19b6d628615 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SerialDifferencingAggregation.g.cs @@ -33,7 +33,7 @@ internal sealed partial class SerialDifferencingAggregationConverter : System.Te public override Elastic.Clients.Elasticsearch.Aggregations.SerialDifferencingAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; LocalJsonValue propLag = default; @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SerialDifferencingAgg continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLag.TryReadProperty(ref reader, options, PropLag, null)) + if (propLag.TryReadProperty(ref reader, options, PropLag, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,8 +83,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); - writer.WriteProperty(options, PropLag, value.Lag, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLag, value.Lag, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -113,7 +113,7 @@ internal SerialDifferencingAggregation(Elastic.Clients.Elasticsearch.Serializati /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -163,7 +163,7 @@ public SerialDifferencingAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.SerialDifferencingAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.SerialDifferencingAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantLongTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantLongTermsAggregate.g.cs index f768fc35906..ddc9f9e93fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantLongTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantLongTermsAggregate.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantLongTermsA LocalJsonValue?> propMeta = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBgCount.TryReadProperty(ref reader, options, PropBgCount, null)) + if (propBgCount.TryReadProperty(ref reader, options, PropBgCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantLongTermsA continue; } - if (propDocCount.TryReadProperty(ref reader, options, PropDocCount, null)) + if (propDocCount.TryReadProperty(ref reader, options, PropDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantLongTermsA public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.SignificantLongTermsAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBgCount, value.BgCount, null, null); + writer.WriteProperty(options, PropBgCount, value.BgCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropBuckets, value.Buckets, 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, PropDocCount, value.DocCount, null, null); + writer.WriteProperty(options, PropDocCount, value.DocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantStringTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantStringTermsAggregate.g.cs index 9b3cd774d6d..c684d6c87a3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantStringTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantStringTermsAggregate.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantStringTerm LocalJsonValue?> propMeta = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBgCount.TryReadProperty(ref reader, options, PropBgCount, null)) + if (propBgCount.TryReadProperty(ref reader, options, PropBgCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantStringTerm continue; } - if (propDocCount.TryReadProperty(ref reader, options, PropDocCount, null)) + if (propDocCount.TryReadProperty(ref reader, options, PropDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantStringTerm public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.SignificantStringTermsAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBgCount, value.BgCount, null, null); + writer.WriteProperty(options, PropBgCount, value.BgCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropBuckets, value.Buckets, 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, PropDocCount, value.DocCount, null, null); + writer.WriteProperty(options, PropDocCount, value.DocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs index edb944fbeaa..6f3bc516c9c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTermsAggregation.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantTermsAggre continue; } - if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, null)) + if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, static Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationExecutionHint? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -101,7 +101,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantTermsAggre continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,17 +121,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantTermsAggre continue; } - if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, null)) + if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -172,18 +172,18 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropBackgroundFilter, value.BackgroundFilter, null, null); writer.WriteProperty(options, PropChiSquare, value.ChiSquare, null, null); writer.WriteProperty(options, PropExclude, value.Exclude, null, null); - writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, null); + writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationExecutionHint? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropGnd, value.Gnd, null, null); writer.WriteProperty(options, PropInclude, value.Include, null, null); writer.WriteProperty(options, PropJlh, value.Jlh, null, null); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMutualInformation, value.MutualInformation, null, null); writer.WriteProperty(options, PropPercentage, value.Percentage, null, null); writer.WriteProperty(options, PropScriptHeuristic, value.ScriptHeuristic, null, null); - writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs index 153ea9b2791..270b5938c61 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantTextAggreg continue; } - if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, null)) + if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, static Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationExecutionHint? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,7 +90,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantTextAggreg continue; } - if (propFilterDuplicateText.TryReadProperty(ref reader, options, PropFilterDuplicateText, null)) + if (propFilterDuplicateText.TryReadProperty(ref reader, options, PropFilterDuplicateText, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,7 +110,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantTextAggreg continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,17 +130,17 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SignificantTextAggreg continue; } - if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, null)) + if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -188,19 +188,19 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropBackgroundFilter, value.BackgroundFilter, null, null); writer.WriteProperty(options, PropChiSquare, value.ChiSquare, null, null); writer.WriteProperty(options, PropExclude, value.Exclude, null, null); - writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, null); + writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationExecutionHint? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropFilterDuplicateText, value.FilterDuplicateText, null, null); + writer.WriteProperty(options, PropFilterDuplicateText, value.FilterDuplicateText, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropGnd, value.Gnd, null, null); writer.WriteProperty(options, PropInclude, value.Include, null, null); writer.WriteProperty(options, PropJlh, value.Jlh, null, null); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMutualInformation, value.MutualInformation, null, null); writer.WriteProperty(options, PropPercentage, value.Percentage, null, null); writer.WriteProperty(options, PropScriptHeuristic, value.ScriptHeuristic, null, null); - writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSourceFields, value.SourceFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SimpleValueAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SimpleValueAggregate.g.cs index c8e7c1f45bb..279378b296e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SimpleValueAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SimpleValueAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SimpleValueAggregate continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StandardDeviationBounds.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StandardDeviationBounds.g.cs index b4d8a6a8451..92b68ff1ac6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StandardDeviationBounds.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StandardDeviationBounds.g.cs @@ -43,32 +43,32 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StandardDeviationBoun LocalJsonValue propUpperSampling = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLower.TryReadProperty(ref reader, options, PropLower, null)) + if (propLower.TryReadProperty(ref reader, options, PropLower, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLowerPopulation.TryReadProperty(ref reader, options, PropLowerPopulation, null)) + if (propLowerPopulation.TryReadProperty(ref reader, options, PropLowerPopulation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLowerSampling.TryReadProperty(ref reader, options, PropLowerSampling, null)) + if (propLowerSampling.TryReadProperty(ref reader, options, PropLowerSampling, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUpper.TryReadProperty(ref reader, options, PropUpper, null)) + if (propUpper.TryReadProperty(ref reader, options, PropUpper, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUpperPopulation.TryReadProperty(ref reader, options, PropUpperPopulation, null)) + if (propUpperPopulation.TryReadProperty(ref reader, options, PropUpperPopulation, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUpperSampling.TryReadProperty(ref reader, options, PropUpperSampling, null)) + if (propUpperSampling.TryReadProperty(ref reader, options, PropUpperSampling, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StandardDeviationBoun public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.StandardDeviationBounds value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLower, value.Lower, null, null); - writer.WriteProperty(options, PropLowerPopulation, value.LowerPopulation, null, null); - writer.WriteProperty(options, PropLowerSampling, value.LowerSampling, null, null); - writer.WriteProperty(options, PropUpper, value.Upper, null, null); - writer.WriteProperty(options, PropUpperPopulation, value.UpperPopulation, null, null); - writer.WriteProperty(options, PropUpperSampling, value.UpperSampling, null, null); + writer.WriteProperty(options, PropLower, value.Lower, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLowerPopulation, value.LowerPopulation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLowerSampling, value.LowerSampling, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUpper, value.Upper, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUpperPopulation, value.UpperPopulation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUpperSampling, value.UpperSampling, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsAggregate.g.cs index 1d649b3fc0d..17a479ce70f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsAggregate.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate Read(r LocalJsonValue propSumAsString = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAvg.TryReadProperty(ref reader, options, PropAvg, null)) + if (propAvg.TryReadProperty(ref reader, options, PropAvg, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate Read(r continue; } - if (propMax.TryReadProperty(ref reader, options, PropMax, null)) + if (propMax.TryReadProperty(ref reader, options, PropMax, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate Read(r continue; } - if (propMin.TryReadProperty(ref reader, options, PropMin, null)) + if (propMin.TryReadProperty(ref reader, options, PropMin, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,13 +129,13 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.StatsAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAvg, value.Avg, null, null); + writer.WriteProperty(options, PropAvg, value.Avg, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAvgAsString, value.AvgAsString, null, null); writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropMax, value.Max, null, null); + writer.WriteProperty(options, PropMax, value.Max, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxAsString, value.MaxAsString, null, null); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropMin, value.Min, null, null); + writer.WriteProperty(options, PropMin, value.Min, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinAsString, value.MinAsString, null, null); writer.WriteProperty(options, PropSum, value.Sum, null, null); writer.WriteProperty(options, PropSumAsString, value.SumAsString, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregate.g.cs index 348e97fbe28..a531270d864 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregate.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregate LocalJsonValue propSumAsString = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAvg.TryReadProperty(ref reader, options, PropAvg, null)) + if (propAvg.TryReadProperty(ref reader, options, PropAvg, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregate continue; } - if (propMax.TryReadProperty(ref reader, options, PropMax, null)) + if (propMax.TryReadProperty(ref reader, options, PropMax, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregate continue; } - if (propMin.TryReadProperty(ref reader, options, PropMin, null)) + if (propMin.TryReadProperty(ref reader, options, PropMin, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,13 +129,13 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregate public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAvg, value.Avg, null, null); + writer.WriteProperty(options, PropAvg, value.Avg, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAvgAsString, value.AvgAsString, null, null); writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropMax, value.Max, null, null); + writer.WriteProperty(options, PropMax, value.Max, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxAsString, value.MaxAsString, null, null); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropMin, value.Min, null, null); + writer.WriteProperty(options, PropMin, value.Min, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinAsString, value.MinAsString, null, null); writer.WriteProperty(options, PropSum, value.Sum, null, null); writer.WriteProperty(options, PropSumAsString, value.SumAsString, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs index 9541dc640e6..3f0d4e4d486 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StatsBucketAggregation.g.cs @@ -32,7 +32,7 @@ internal sealed partial class StatsBucketAggregationConverter : System.Text.Json public override Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregatio continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -104,7 +104,7 @@ internal StatsBucketAggregation(Elastic.Clients.Elasticsearch.Serialization.Json /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -146,7 +146,7 @@ public StatsBucketAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.StatsBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregate.g.cs index c1c01b94717..fe08ffad6a4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregate.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate LocalJsonValue propMinLengthAsString = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAvgLength.TryReadProperty(ref reader, options, PropAvgLength, null)) + if (propAvgLength.TryReadProperty(ref reader, options, PropAvgLength, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate continue; } - if (propEntropy.TryReadProperty(ref reader, options, PropEntropy, null)) + if (propEntropy.TryReadProperty(ref reader, options, PropEntropy, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxLength.TryReadProperty(ref reader, options, PropMaxLength, null)) + if (propMaxLength.TryReadProperty(ref reader, options, PropMaxLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate continue; } - if (propMinLength.TryReadProperty(ref reader, options, PropMinLength, null)) + if (propMinLength.TryReadProperty(ref reader, options, PropMinLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,15 +129,15 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAvgLength, value.AvgLength, null, null); + writer.WriteProperty(options, PropAvgLength, value.AvgLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAvgLengthAsString, value.AvgLengthAsString, null, null); writer.WriteProperty(options, PropCount, value.Count, null, null); writer.WriteProperty(options, PropDistribution, value.Distribution, 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, PropEntropy, value.Entropy, null, null); - writer.WriteProperty(options, PropMaxLength, value.MaxLength, null, null); + writer.WriteProperty(options, PropEntropy, value.Entropy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxLength, value.MaxLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxLengthAsString, value.MaxLengthAsString, null, null); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropMinLength, value.MinLength, null, null); + writer.WriteProperty(options, PropMinLength, value.MinLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinLengthAsString, value.MinLengthAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregation.g.cs index 58f76c3c612..6083804d97c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringStatsAggregation.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringStatsAggregatio continue; } - if (propShowDistribution.TryReadProperty(ref reader, options, PropShowDistribution, null)) + if (propShowDistribution.TryReadProperty(ref reader, options, PropShowDistribution, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropShowDistribution, value.ShowDistribution, null, null); + writer.WriteProperty(options, PropShowDistribution, value.ShowDistribution, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsAggregate.g.cs index 9934bbdd068..7be3786d21a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsAggregate.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringTermsAggregate continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringTermsAggregate continue; } - if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, null)) + if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBuckets, value.Buckets, 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, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropSumOtherDocCount, value.SumOtherDocCount, null, null); + writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsBucket.g.cs index 6a0f92a8364..ea1a0f5470d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/StringTermsBucket.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.StringTermsBucket Rea continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDocCount, value.DocCount, null, null); - writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKey, value.Key, null, null); if (value.Aggregations is not null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumAggregate.g.cs index 750014f9735..ce58b10096c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SumAggregate Read(ref continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumBucketAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumBucketAggregation.g.cs index fc7136321e6..53f2d0da912 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumBucketAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/SumBucketAggregation.g.cs @@ -32,7 +32,7 @@ internal sealed partial class SumBucketAggregationConverter : System.Text.Json.S public override Elastic.Clients.Elasticsearch.Aggregations.SumBucketAggregation Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); - LocalJsonValue propBucketsPath = default; + LocalJsonValue propBucketsPath = default; LocalJsonValue propFormat = default; LocalJsonValue propGapPolicy = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.SumBucketAggregation continue; } - if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, null)) + if (propGapPolicy.TryReadProperty(ref reader, options, PropGapPolicy, static Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBucketsPath, value.BucketsPath, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, null); + writer.WriteProperty(options, PropGapPolicy, value.GapPolicy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.GapPolicy? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -104,7 +104,7 @@ internal SumBucketAggregation(Elastic.Clients.Elasticsearch.Serialization.JsonCo /// Path to the buckets that contain one set of values to correlate. /// /// - public object? BucketsPath { get; set; } + public Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? BucketsPath { get; set; } /// /// @@ -146,7 +146,7 @@ public SumBucketAggregationDescriptor() /// Path to the buckets that contain one set of values to correlate. /// /// - public Elastic.Clients.Elasticsearch.Aggregations.SumBucketAggregationDescriptor BucketsPath(object? value) + public Elastic.Clients.Elasticsearch.Aggregations.SumBucketAggregationDescriptor BucketsPath(Elastic.Clients.Elasticsearch.Aggregations.BucketsPath? value) { Instance.BucketsPath = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigest.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigest.g.cs index fbe7dbe1e69..6bae4e921f8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigest.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TDigest.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TDigest Read(ref Syst LocalJsonValue propCompression = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompression.TryReadProperty(ref reader, options, PropCompression, null)) + if (propCompression.TryReadProperty(ref reader, options, PropCompression, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TDigest Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.TDigest value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompression, value.Compression, null, null); + writer.WriteProperty(options, PropCompression, value.Compression, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregate.g.cs index 0b2b1099dab..d44677be5e7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TTestAggregate Read(r continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregation.g.cs index ea0938c82e8..f32a7e688fb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TTestAggregation.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TTestAggregation Read continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.Aggregations.TTestType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropA, value.A, null, null); writer.WriteProperty(options, PropB, value.B, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TTestType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs index 8983bba4649..0afa09eb5ca 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TermsAggregation.g.cs @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation Read LocalJsonValue propValueType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCollectMode.TryReadProperty(ref reader, options, PropCollectMode, null)) + if (propCollectMode.TryReadProperty(ref reader, options, PropCollectMode, static Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation Read continue; } - if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, null)) + if (propExecutionHint.TryReadProperty(ref reader, options, PropExecutionHint, static Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationExecutionHint? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -95,7 +95,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation Read continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,12 +105,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation Read continue; } - if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, null)) + if (propMissingBucket.TryReadProperty(ref reader, options, PropMissingBucket, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, null)) + if (propMissingOrder.TryReadProperty(ref reader, options, PropMissingOrder, static Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -125,22 +125,22 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation Read continue; } - if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, null)) + if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShowTermDocCountError.TryReadProperty(ref reader, options, PropShowTermDocCountError, null)) + if (propShowTermDocCountError.TryReadProperty(ref reader, options, PropShowTermDocCountError, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -185,22 +185,22 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.TermsAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCollectMode, value.CollectMode, null, null); + writer.WriteProperty(options, PropCollectMode, value.CollectMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationCollectMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExclude, value.Exclude, null, null); - writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, null); + writer.WriteProperty(options, PropExecutionHint, value.ExecutionHint, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.TermsAggregationExecutionHint? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropInclude, value.Include, null, null); - writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, null); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, null); - writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, null); + writer.WriteProperty(options, PropMissingBucket, value.MissingBucket, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMissingOrder, value.MissingOrder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.MissingOrder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteSingleOrManyCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropShowTermDocCountError, value.ShowTermDocCountError, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShowTermDocCountError, value.ShowTermDocCountError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueType, value.ValueType, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregation.g.cs index f3928f4f05a..16c6bf6addb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TimeSeriesAggregation.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregation LocalJsonValue propSize = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propKeyed.TryReadProperty(ref reader, options, PropKeyed, null)) + if (propKeyed.TryReadProperty(ref reader, options, PropKeyed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregation public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.TimeSeriesAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropKeyed, value.Keyed, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropKeyed, value.Keyed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs index 7f7e03ee0f5..99caeb897eb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopHitsAggregation.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregation Re continue; } - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregation Re continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,12 +108,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregation Re continue; } - if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, null)) + if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -133,12 +133,12 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TopHitsAggregation Re continue; } - if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, null)) + if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -178,21 +178,21 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDocvalueFields, value.DocvalueFields, 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, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFields, value.Fields, 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, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlight, value.Highlight, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); writer.WriteProperty(options, PropScript, value.Script, 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, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs index 4a01cbeb7b4..42a9e7bbfba 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/TopMetricsAggregation.g.cs @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.TopMetricsAggregation continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -101,7 +101,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropMetrics, value.Metrics, 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, PropMissing, value.Missing, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedSignificantTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedSignificantTermsAggregate.g.cs index c059d2a9f39..1056e981732 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedSignificantTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedSignificantTermsAggregate.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.UnmappedSignificantTe LocalJsonValue?> propMeta = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBgCount.TryReadProperty(ref reader, options, PropBgCount, null)) + if (propBgCount.TryReadProperty(ref reader, options, PropBgCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.UnmappedSignificantTe continue; } - if (propDocCount.TryReadProperty(ref reader, options, PropDocCount, null)) + if (propDocCount.TryReadProperty(ref reader, options, PropDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Aggregations.UnmappedSignificantTe public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.UnmappedSignificantTermsAggregate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBgCount, value.BgCount, null, null); + writer.WriteProperty(options, PropBgCount, value.BgCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropBuckets, value.Buckets, 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, PropDocCount, value.DocCount, null, null); + writer.WriteProperty(options, PropDocCount, value.DocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedTermsAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedTermsAggregate.g.cs index f6079f61c85..f9497054aeb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedTermsAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/UnmappedTermsAggregate.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.UnmappedTermsAggregat continue; } - if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, null)) + if (propDocCountErrorUpperBound.TryReadProperty(ref reader, options, PropDocCountErrorUpperBound, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.UnmappedTermsAggregat continue; } - if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, null)) + if (propSumOtherDocCount.TryReadProperty(ref reader, options, PropSumOtherDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBuckets, value.Buckets, 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, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, null); + writer.WriteProperty(options, PropDocCountErrorUpperBound, value.DocCountErrorUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropSumOtherDocCount, value.SumOtherDocCount, null, null); + writer.WriteProperty(options, PropSumOtherDocCount, value.SumOtherDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ValueCountAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ValueCountAggregate.g.cs index 5cacebd5205..faf7320ba36 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ValueCountAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/ValueCountAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.ValueCountAggregate R continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs index 0f96e0ebdd5..27f367ade40 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/VariableWidthHistogramAggregation.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.VariableWidthHistogra LocalJsonValue propShardSize = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBuckets.TryReadProperty(ref reader, options, PropBuckets, null)) + if (propBuckets.TryReadProperty(ref reader, options, PropBuckets, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.VariableWidthHistogra continue; } - if (propInitialBuffer.TryReadProperty(ref reader, options, PropInitialBuffer, null)) + if (propInitialBuffer.TryReadProperty(ref reader, options, PropInitialBuffer, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.VariableWidthHistogra continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.Aggregations.VariableWidthHistogra public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Aggregations.VariableWidthHistogramAggregation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBuckets, value.Buckets, null, null); + writer.WriteProperty(options, PropBuckets, value.Buckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropInitialBuffer, value.InitialBuffer, null, null); + writer.WriteProperty(options, PropInitialBuffer, value.InitialBuffer, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregate.g.cs index 90fb45ef393..04e3979a84d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageAggreg continue; } - if (propValue.TryReadProperty(ref reader, options, PropValue, null)) + if (propValue.TryReadProperty(ref reader, options, PropValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropValue, value.Value, null, null); + writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValueAsString, value.ValueAsString, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs index c2c0fbcbbf6..40cb5cc7971 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageAggregation.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageAggreg continue; } - if (propValueType.TryReadProperty(ref reader, options, PropValueType, null)) + if (propValueType.TryReadProperty(ref reader, options, PropValueType, static Elastic.Clients.Elasticsearch.Aggregations.ValueType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); - writer.WriteProperty(options, PropValueType, value.ValueType, null, null); + writer.WriteProperty(options, PropValueType, value.ValueType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Aggregations.ValueType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropWeight, value.Weight, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageValue.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageValue.g.cs index deec4500073..68fa603270f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageValue.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Aggregations/WeightedAverageValue.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Aggregations.WeightedAverageValue continue; } - if (propMissing.TryReadProperty(ref reader, options, PropMissing, null)) + if (propMissing.TryReadProperty(ref reader, options, PropMissing, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropMissing, value.Missing, null, null); + writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); } 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/AsciiFoldingTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs index 4104660af75..418cd1bf828 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/AsciiFoldingTokenFilter.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.AsciiFoldingTokenFilter R LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.AsciiFoldingTokenFilter R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.AsciiFoldingTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, null); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharGroupTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharGroupTokenizer.g.cs index aab19049dda..23bfd4ec5b2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharGroupTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CharGroupTokenizer.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.CharGroupTokenizer Read(r LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, null)) + if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.CharGroupTokenizer Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.CharGroupTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, null); + writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTokenizeOnChars, value.TokenizeOnChars, 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, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CjkBigramTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CjkBigramTokenFilter.g.cs index b7d828d7e5f..344a5d87c52 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CjkBigramTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CjkBigramTokenFilter.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.CjkBigramTokenFilter Read continue; } - if (propOutputUnigrams.TryReadProperty(ref reader, options, PropOutputUnigrams, null)) + if (propOutputUnigrams.TryReadProperty(ref reader, options, PropOutputUnigrams, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropIgnoredScripts, value.IgnoredScripts, 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, PropOutputUnigrams, value.OutputUnigrams, null, null); + writer.WriteProperty(options, PropOutputUnigrams, value.OutputUnigrams, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ClassicTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ClassicTokenizer.g.cs index 218c6e26ca8..353bce02eb3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ClassicTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ClassicTokenizer.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.ClassicTokenizer Read(ref LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, null)) + if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.ClassicTokenizer Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.ClassicTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, null); + writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs index 60ce0f99e5c..1acc3186394 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CommonGramsTokenFilter.g.cs @@ -52,12 +52,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.CommonGramsTokenFilter Re continue; } - if (propIgnoreCase.TryReadProperty(ref reader, options, PropIgnoreCase, null)) + if (propIgnoreCase.TryReadProperty(ref reader, options, PropIgnoreCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propQueryMode.TryReadProperty(ref reader, options, PropQueryMode, null)) + if (propQueryMode.TryReadProperty(ref reader, options, PropQueryMode, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,8 +98,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCommonWords, value.CommonWords, 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, PropCommonWordsPath, value.CommonWordsPath, null, null); - writer.WriteProperty(options, PropIgnoreCase, value.IgnoreCase, null, null); - writer.WriteProperty(options, PropQueryMode, value.QueryMode, null, null); + writer.WriteProperty(options, PropIgnoreCase, value.IgnoreCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropQueryMode, value.QueryMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomAnalyzer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomAnalyzer.g.cs index 372ce00bf71..38292b123cf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/CustomAnalyzer.g.cs @@ -52,12 +52,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.CustomAnalyzer Read(ref S continue; } - if (propPositionIncrementGap.TryReadProperty(ref reader, options, PropPositionIncrementGap, null)) + if (propPositionIncrementGap.TryReadProperty(ref reader, options, PropPositionIncrementGap, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPositionOffsetGap.TryReadProperty(ref reader, options, PropPositionOffsetGap, null)) + if (propPositionOffsetGap.TryReadProperty(ref reader, options, PropPositionOffsetGap, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,8 +98,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCharFilter, value.CharFilter, 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, PropFilter, value.Filter, 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, PropPositionIncrementGap, value.PositionIncrementGap, null, null); - writer.WriteProperty(options, PropPositionOffsetGap, value.PositionOffsetGap, null, null); + writer.WriteProperty(options, PropPositionIncrementGap, value.PositionIncrementGap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPositionOffsetGap, value.PositionOffsetGap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTokenizer, value.Tokenizer, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs index 95f3c8ac0cb..d6be2f9523c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DelimitedPayloadTokenFilter.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.DelimitedPayloadTokenFilt continue; } - if (propEncoding.TryReadProperty(ref reader, options, PropEncoding, null)) + if (propEncoding.TryReadProperty(ref reader, options, PropEncoding, static Elastic.Clients.Elasticsearch.Analysis.DelimitedPayloadEncoding? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDelimiter, value.Delimiter, null, null); - writer.WriteProperty(options, PropEncoding, value.Encoding, null, null); + writer.WriteProperty(options, PropEncoding, value.Encoding, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.DelimitedPayloadEncoding? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs index 9f925f0a190..8060f3042ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/DictionaryDecompounderTokenFilter.g.cs @@ -46,22 +46,22 @@ public override Elastic.Clients.Elasticsearch.Analysis.DictionaryDecompounderTok LocalJsonValue propWordListPath = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxSubwordSize.TryReadProperty(ref reader, options, PropMaxSubwordSize, null)) + if (propMaxSubwordSize.TryReadProperty(ref reader, options, PropMaxSubwordSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinSubwordSize.TryReadProperty(ref reader, options, PropMinSubwordSize, null)) + if (propMinSubwordSize.TryReadProperty(ref reader, options, PropMinSubwordSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinWordSize.TryReadProperty(ref reader, options, PropMinWordSize, null)) + if (propMinWordSize.TryReadProperty(ref reader, options, PropMinWordSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnlyLongestMatch.TryReadProperty(ref reader, options, PropOnlyLongestMatch, null)) + if (propOnlyLongestMatch.TryReadProperty(ref reader, options, PropOnlyLongestMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,10 +112,10 @@ public override Elastic.Clients.Elasticsearch.Analysis.DictionaryDecompounderTok public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.DictionaryDecompounderTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxSubwordSize, value.MaxSubwordSize, null, null); - writer.WriteProperty(options, PropMinSubwordSize, value.MinSubwordSize, null, null); - writer.WriteProperty(options, PropMinWordSize, value.MinWordSize, null, null); - writer.WriteProperty(options, PropOnlyLongestMatch, value.OnlyLongestMatch, null, null); + writer.WriteProperty(options, PropMaxSubwordSize, value.MaxSubwordSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinSubwordSize, value.MinSubwordSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinWordSize, value.MinWordSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnlyLongestMatch, value.OnlyLongestMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteProperty(options, PropWordList, value.WordList, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs index a5f8178063e..a4004af4c26 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenFilter.g.cs @@ -42,22 +42,22 @@ public override Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenFilter Read LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, null)) + if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, null)) + if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSide.TryReadProperty(ref reader, options, PropSide, null)) + if (propSide.TryReadProperty(ref reader, options, PropSide, static Elastic.Clients.Elasticsearch.Analysis.EdgeNGramSide? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,10 +96,10 @@ public override Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenFilter Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, null); - writer.WriteProperty(options, PropMinGram, value.MinGram, null, null); - writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, null); - writer.WriteProperty(options, PropSide, value.Side, null, null); + writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinGram, value.MinGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSide, value.Side, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.EdgeNGramSide? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs index 376950e13b7..848f134f92c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/EdgeNGramTokenizer.g.cs @@ -47,12 +47,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.EdgeNGramTokenizer Read(r continue; } - if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, null)) + if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, null)) + if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,8 +97,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCustomTokenChars, value.CustomTokenChars, null, null); - writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, null); - writer.WriteProperty(options, PropMinGram, value.MinGram, null, null); + writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinGram, value.MinGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTokenChars, value.TokenChars, 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, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ElisionTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ElisionTokenFilter.g.cs index 6ec88f8f689..e9c2b257854 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ElisionTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ElisionTokenFilter.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.ElisionTokenFilter Read(r continue; } - if (propArticlesCase.TryReadProperty(ref reader, options, PropArticlesCase, null)) + if (propArticlesCase.TryReadProperty(ref reader, options, PropArticlesCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropArticles, value.Articles, 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, PropArticlesCase, value.ArticlesCase, null, null); + writer.WriteProperty(options, PropArticlesCase, value.ArticlesCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropArticlesPath, value.ArticlesPath, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); 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/FingerprintTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs index 4d34473760d..00ab377a34c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/FingerprintTokenFilter.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.FingerprintTokenFilter Re LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxOutputSize.TryReadProperty(ref reader, options, PropMaxOutputSize, null)) + if (propMaxOutputSize.TryReadProperty(ref reader, options, PropMaxOutputSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.FingerprintTokenFilter Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.FingerprintTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxOutputSize, value.MaxOutputSize, null, null); + writer.WriteProperty(options, PropMaxOutputSize, value.MaxOutputSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSeparator, value.Separator, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HunspellTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HunspellTokenFilter.g.cs index 91dac422e7f..6bea2b928d4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HunspellTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HunspellTokenFilter.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.HunspellTokenFilter Read( LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDedup.TryReadProperty(ref reader, options, PropDedup, null)) + if (propDedup.TryReadProperty(ref reader, options, PropDedup, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -59,7 +59,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.HunspellTokenFilter Read( continue; } - if (propLongestOnly.TryReadProperty(ref reader, options, PropLongestOnly, null)) + if (propLongestOnly.TryReadProperty(ref reader, options, PropLongestOnly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,10 +98,10 @@ public override Elastic.Clients.Elasticsearch.Analysis.HunspellTokenFilter Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.HunspellTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDedup, value.Dedup, null, null); + writer.WriteProperty(options, PropDedup, value.Dedup, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDictionary, value.Dictionary, null, null); writer.WriteProperty(options, PropLocale, value.Locale, null, null); - writer.WriteProperty(options, PropLongestOnly, value.LongestOnly, null, null); + writer.WriteProperty(options, PropLongestOnly, value.LongestOnly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs index 3e367e2d74f..8b58e336627 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/HyphenationDecompounderTokenFilter.g.cs @@ -57,32 +57,32 @@ public override Elastic.Clients.Elasticsearch.Analysis.HyphenationDecompounderTo continue; } - if (propMaxSubwordSize.TryReadProperty(ref reader, options, PropMaxSubwordSize, null)) + if (propMaxSubwordSize.TryReadProperty(ref reader, options, PropMaxSubwordSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinSubwordSize.TryReadProperty(ref reader, options, PropMinSubwordSize, null)) + if (propMinSubwordSize.TryReadProperty(ref reader, options, PropMinSubwordSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinWordSize.TryReadProperty(ref reader, options, PropMinWordSize, null)) + if (propMinWordSize.TryReadProperty(ref reader, options, PropMinWordSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNoOverlappingMatches.TryReadProperty(ref reader, options, PropNoOverlappingMatches, null)) + if (propNoOverlappingMatches.TryReadProperty(ref reader, options, PropNoOverlappingMatches, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNoSubMatches.TryReadProperty(ref reader, options, PropNoSubMatches, null)) + if (propNoSubMatches.TryReadProperty(ref reader, options, PropNoSubMatches, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnlyLongestMatch.TryReadProperty(ref reader, options, PropOnlyLongestMatch, null)) + if (propOnlyLongestMatch.TryReadProperty(ref reader, options, PropOnlyLongestMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,12 +137,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropHyphenationPatternsPath, value.HyphenationPatternsPath, null, null); - writer.WriteProperty(options, PropMaxSubwordSize, value.MaxSubwordSize, null, null); - writer.WriteProperty(options, PropMinSubwordSize, value.MinSubwordSize, null, null); - writer.WriteProperty(options, PropMinWordSize, value.MinWordSize, null, null); - writer.WriteProperty(options, PropNoOverlappingMatches, value.NoOverlappingMatches, null, null); - writer.WriteProperty(options, PropNoSubMatches, value.NoSubMatches, null, null); - writer.WriteProperty(options, PropOnlyLongestMatch, value.OnlyLongestMatch, null, null); + writer.WriteProperty(options, PropMaxSubwordSize, value.MaxSubwordSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinSubwordSize, value.MinSubwordSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinWordSize, value.MinWordSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNoOverlappingMatches, value.NoOverlappingMatches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNoSubMatches, value.NoSubMatches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnlyLongestMatch, value.OnlyLongestMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteProperty(options, PropWordList, value.WordList, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs index 41b7f039ca1..060a4d00d57 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuCollationTokenFilter.g.cs @@ -58,17 +58,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuCollationTokenFilter R LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAlternate.TryReadProperty(ref reader, options, PropAlternate, null)) + if (propAlternate.TryReadProperty(ref reader, options, PropAlternate, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseFirst.TryReadProperty(ref reader, options, PropCaseFirst, null)) + if (propCaseFirst.TryReadProperty(ref reader, options, PropCaseFirst, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseLevel.TryReadProperty(ref reader, options, PropCaseLevel, null)) + if (propCaseLevel.TryReadProperty(ref reader, options, PropCaseLevel, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -78,12 +78,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuCollationTokenFilter R continue; } - if (propDecomposition.TryReadProperty(ref reader, options, PropDecomposition, null)) + if (propDecomposition.TryReadProperty(ref reader, options, PropDecomposition, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHiraganaQuaternaryMode.TryReadProperty(ref reader, options, PropHiraganaQuaternaryMode, null)) + if (propHiraganaQuaternaryMode.TryReadProperty(ref reader, options, PropHiraganaQuaternaryMode, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuCollationTokenFilter R continue; } - if (propNumeric.TryReadProperty(ref reader, options, PropNumeric, null)) + if (propNumeric.TryReadProperty(ref reader, options, PropNumeric, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuCollationTokenFilter R continue; } - if (propStrength.TryReadProperty(ref reader, options, PropStrength, null)) + if (propStrength.TryReadProperty(ref reader, options, PropStrength, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -160,16 +160,16 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuCollationTokenFilter R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.IcuCollationTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAlternate, value.Alternate, null, null); - writer.WriteProperty(options, PropCaseFirst, value.CaseFirst, null, null); - writer.WriteProperty(options, PropCaseLevel, value.CaseLevel, null, null); + writer.WriteProperty(options, PropAlternate, value.Alternate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseFirst, value.CaseFirst, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseLevel, value.CaseLevel, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCountry, value.Country, null, null); - writer.WriteProperty(options, PropDecomposition, value.Decomposition, null, null); - writer.WriteProperty(options, PropHiraganaQuaternaryMode, value.HiraganaQuaternaryMode, null, null); + writer.WriteProperty(options, PropDecomposition, value.Decomposition, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHiraganaQuaternaryMode, value.HiraganaQuaternaryMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLanguage, value.Language, null, null); - writer.WriteProperty(options, PropNumeric, value.Numeric, null, null); + writer.WriteProperty(options, PropNumeric, value.Numeric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRules, value.Rules, null, null); - writer.WriteProperty(options, PropStrength, value.Strength, null, null); + writer.WriteProperty(options, PropStrength, value.Strength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVariableTop, value.VariableTop, null, null); writer.WriteProperty(options, PropVariant, value.Variant, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs index bfbc16f9829..81e7ca447b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuNormalizationCharFilter.g.cs @@ -40,12 +40,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationCharFilte LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propName.TryReadProperty(ref reader, options, PropName, null)) + if (propName.TryReadProperty(ref reader, options, PropName, static Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,8 +88,8 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationCharFilte public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationCharFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMode, value.Mode, null, null); - writer.WriteProperty(options, PropName, value.Name, null, null); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationMode? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuNormalizationType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropUnicodeSetFilter, value.UnicodeSetFilter, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs index daef0565872..32db6ce2ee7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/IcuTransformTokenFilter.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuTransformTokenFilter R LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDir.TryReadProperty(ref reader, options, PropDir, null)) + if (propDir.TryReadProperty(ref reader, options, PropDir, static Elastic.Clients.Elasticsearch.Analysis.IcuTransformDirection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.IcuTransformTokenFilter R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.IcuTransformTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDir, value.Dir, null, null); + writer.WriteProperty(options, PropDir, value.Dir, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuTransformDirection? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs index 4fb527194f6..48cab5a8cc1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepTypesTokenFilter.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeepTypesTokenFilter Read LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.Analysis.KeepTypesMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeepTypesTokenFilter Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.KeepTypesTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMode, value.Mode, null, null); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.KeepTypesMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropTypes, value.Types, 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, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs index aacbee3b49f..f9b74b24d97 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeepWordsTokenFilter.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeepWordsTokenFilter Read continue; } - if (propKeepWordsCase.TryReadProperty(ref reader, options, PropKeepWordsCase, null)) + if (propKeepWordsCase.TryReadProperty(ref reader, options, PropKeepWordsCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropKeepWords, value.KeepWords, 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, PropKeepWordsCase, value.KeepWordsCase, null, null); + writer.WriteProperty(options, PropKeepWordsCase, value.KeepWordsCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKeepWordsPath, value.KeepWordsPath, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); 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/KeywordMarkerTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs index 1835a46007f..7d55986d52f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordMarkerTokenFilter.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeywordMarkerTokenFilter LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propIgnoreCase.TryReadProperty(ref reader, options, PropIgnoreCase, null)) + if (propIgnoreCase.TryReadProperty(ref reader, options, PropIgnoreCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeywordMarkerTokenFilter public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.KeywordMarkerTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropIgnoreCase, value.IgnoreCase, null, null); + writer.WriteProperty(options, PropIgnoreCase, value.IgnoreCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKeywords, value.Keywords, 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, PropKeywordsPath, value.KeywordsPath, null, null); writer.WriteProperty(options, PropKeywordsPattern, value.KeywordsPattern, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordTokenizer.g.cs index f954091da8d..8851792af46 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KeywordTokenizer.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeywordTokenizer Read(ref LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBufferSize.TryReadProperty(ref reader, options, PropBufferSize, null)) + if (propBufferSize.TryReadProperty(ref reader, options, PropBufferSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KeywordTokenizer Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.KeywordTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBufferSize, value.BufferSize, null, null); + writer.WriteProperty(options, PropBufferSize, value.BufferSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiTokenizer.g.cs index fac6adad29b..98461adc384 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/KuromojiTokenizer.g.cs @@ -48,12 +48,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.KuromojiTokenizer Read(re LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDiscardCompoundToken.TryReadProperty(ref reader, options, PropDiscardCompoundToken, null)) + if (propDiscardCompoundToken.TryReadProperty(ref reader, options, PropDiscardCompoundToken, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDiscardPunctuation.TryReadProperty(ref reader, options, PropDiscardPunctuation, null)) + if (propDiscardPunctuation.TryReadProperty(ref reader, options, PropDiscardPunctuation, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.KuromojiTokenizer Read(re continue; } - if (propNbestCost.TryReadProperty(ref reader, options, PropNbestCost, null)) + if (propNbestCost.TryReadProperty(ref reader, options, PropNbestCost, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -120,10 +120,10 @@ public override Elastic.Clients.Elasticsearch.Analysis.KuromojiTokenizer Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.KuromojiTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDiscardCompoundToken, value.DiscardCompoundToken, null, null); - writer.WriteProperty(options, PropDiscardPunctuation, value.DiscardPunctuation, null, null); + writer.WriteProperty(options, PropDiscardCompoundToken, value.DiscardCompoundToken, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDiscardPunctuation, value.DiscardPunctuation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMode, value.Mode, null, null); - writer.WriteProperty(options, PropNbestCost, value.NbestCost, null, null); + writer.WriteProperty(options, PropNbestCost, value.NbestCost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNbestExamples, value.NbestExamples, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropUserDictionary, value.UserDictionary, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LengthTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LengthTokenFilter.g.cs index f275e71939f..85a00529de4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LengthTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LengthTokenFilter.g.cs @@ -38,12 +38,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.LengthTokenFilter Read(re LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMax.TryReadProperty(ref reader, options, PropMax, null)) + if (propMax.TryReadProperty(ref reader, options, PropMax, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMin.TryReadProperty(ref reader, options, PropMin, null)) + if (propMin.TryReadProperty(ref reader, options, PropMin, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,8 +80,8 @@ public override Elastic.Clients.Elasticsearch.Analysis.LengthTokenFilter Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.LengthTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMax, value.Max, null, null); - writer.WriteProperty(options, PropMin, value.Min, null, null); + writer.WriteProperty(options, PropMax, value.Max, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMin, value.Min, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs index 16f554c3d17..0ffbb5a1b2e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LimitTokenCountTokenFilter.g.cs @@ -38,12 +38,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.LimitTokenCountTokenFilte LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propConsumeAllTokens.TryReadProperty(ref reader, options, PropConsumeAllTokens, null)) + if (propConsumeAllTokens.TryReadProperty(ref reader, options, PropConsumeAllTokens, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxTokenCount.TryReadProperty(ref reader, options, PropMaxTokenCount, null)) + if (propMaxTokenCount.TryReadProperty(ref reader, options, PropMaxTokenCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,8 +80,8 @@ public override Elastic.Clients.Elasticsearch.Analysis.LimitTokenCountTokenFilte public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.LimitTokenCountTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropConsumeAllTokens, value.ConsumeAllTokens, null, null); - writer.WriteProperty(options, PropMaxTokenCount, value.MaxTokenCount, null, null); + writer.WriteProperty(options, PropConsumeAllTokens, value.ConsumeAllTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxTokenCount, value.MaxTokenCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs index 3a45e7bd8ca..90625895839 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/LowercaseTokenFilter.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.LowercaseTokenFilter Read LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLanguage.TryReadProperty(ref reader, options, PropLanguage, null)) + if (propLanguage.TryReadProperty(ref reader, options, PropLanguage, static Elastic.Clients.Elasticsearch.Analysis.LowercaseTokenFilterLanguages? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.LowercaseTokenFilter Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.LowercaseTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLanguage, value.Language, null, null); + writer.WriteProperty(options, PropLanguage, value.Language, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.LowercaseTokenFilterLanguages? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MinHashTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MinHashTokenFilter.g.cs index 84d3f114e6c..71c87bdca19 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MinHashTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MinHashTokenFilter.g.cs @@ -42,17 +42,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.MinHashTokenFilter Read(r LocalJsonValue propWithRotation = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBucketCount.TryReadProperty(ref reader, options, PropBucketCount, null)) + if (propBucketCount.TryReadProperty(ref reader, options, PropBucketCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHashCount.TryReadProperty(ref reader, options, PropHashCount, null)) + if (propHashCount.TryReadProperty(ref reader, options, PropHashCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHashSetSize.TryReadProperty(ref reader, options, PropHashSetSize, null)) + if (propHashSetSize.TryReadProperty(ref reader, options, PropHashSetSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.MinHashTokenFilter Read(r continue; } - if (propWithRotation.TryReadProperty(ref reader, options, PropWithRotation, null)) + if (propWithRotation.TryReadProperty(ref reader, options, PropWithRotation, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,12 +96,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.MinHashTokenFilter Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.MinHashTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBucketCount, value.BucketCount, null, null); - writer.WriteProperty(options, PropHashCount, value.HashCount, null, null); - writer.WriteProperty(options, PropHashSetSize, value.HashSetSize, null, null); + writer.WriteProperty(options, PropBucketCount, value.BucketCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHashCount, value.HashCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHashSetSize, value.HashSetSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropWithRotation, value.WithRotation, null, null); + writer.WriteProperty(options, PropWithRotation, value.WithRotation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs index f6de941751a..8912a81dc0e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/MultiplexerTokenFilter.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.MultiplexerTokenFilter Re continue; } - if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFilters, value.Filters, 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, PropPreserveOriginal, value.PreserveOriginal, null, null); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenFilter.g.cs index 3d096520d2d..b6888c851aa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenFilter.g.cs @@ -40,17 +40,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.NGramTokenFilter Read(ref LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, null)) + if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, null)) + if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,9 +88,9 @@ public override Elastic.Clients.Elasticsearch.Analysis.NGramTokenFilter Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.NGramTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, null); - writer.WriteProperty(options, PropMinGram, value.MinGram, null, null); - writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, null); + writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinGram, value.MinGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenizer.g.cs index d70b4232e69..f13a810e4bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NGramTokenizer.g.cs @@ -47,12 +47,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.NGramTokenizer Read(ref S continue; } - if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, null)) + if (propMaxGram.TryReadProperty(ref reader, options, PropMaxGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, null)) + if (propMinGram.TryReadProperty(ref reader, options, PropMinGram, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,8 +97,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCustomTokenChars, value.CustomTokenChars, null, null); - writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, null); - writer.WriteProperty(options, PropMinGram, value.MinGram, null, null); + writer.WriteProperty(options, PropMaxGram, value.MaxGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinGram, value.MinGram, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTokenChars, value.TokenChars, 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, PropVersion, value.Version, null, null); 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..c6fb11abfdf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriAnalyzer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriAnalyzer.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.NoriAnalyzer Read(ref Sys LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDecompoundMode.TryReadProperty(ref reader, options, PropDecompoundMode, null)) + if (propDecompoundMode.TryReadProperty(ref reader, options, PropDecompoundMode, static Elastic.Clients.Elasticsearch.Analysis.NoriDecompoundMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,23 +81,18 @@ 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 }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.NoriAnalyzer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDecompoundMode, value.DecompoundMode, null, null); + writer.WriteProperty(options, PropDecompoundMode, value.DecompoundMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.NoriDecompoundMode? v) => w.WriteNullableValue(o, v)); 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/NoriTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriTokenizer.g.cs index 57a94474a3b..940e7a560be 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/NoriTokenizer.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.NoriTokenizer Read(ref Sy LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDecompoundMode.TryReadProperty(ref reader, options, PropDecompoundMode, null)) + if (propDecompoundMode.TryReadProperty(ref reader, options, PropDecompoundMode, static Elastic.Clients.Elasticsearch.Analysis.NoriDecompoundMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDiscardPunctuation.TryReadProperty(ref reader, options, PropDiscardPunctuation, null)) + if (propDiscardPunctuation.TryReadProperty(ref reader, options, PropDiscardPunctuation, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,8 +96,8 @@ public override Elastic.Clients.Elasticsearch.Analysis.NoriTokenizer Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.NoriTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDecompoundMode, value.DecompoundMode, null, null); - writer.WriteProperty(options, PropDiscardPunctuation, value.DiscardPunctuation, null, null); + writer.WriteProperty(options, PropDecompoundMode, value.DecompoundMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.NoriDecompoundMode? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDiscardPunctuation, value.DiscardPunctuation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropUserDictionary, value.UserDictionary, null, null); writer.WriteProperty(options, PropUserDictionaryRules, value.UserDictionaryRules, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs index 2c714b37347..1cbc043ca87 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PathHierarchyTokenizer.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.PathHierarchyTokenizer Re LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBufferSize.TryReadProperty(ref reader, options, PropBufferSize, null)) + if (propBufferSize.TryReadProperty(ref reader, options, PropBufferSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -59,12 +59,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.PathHierarchyTokenizer Re continue; } - if (propReverse.TryReadProperty(ref reader, options, PropReverse, null)) + if (propReverse.TryReadProperty(ref reader, options, PropReverse, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSkip.TryReadProperty(ref reader, options, PropSkip, null)) + if (propSkip.TryReadProperty(ref reader, options, PropSkip, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,11 +104,11 @@ public override Elastic.Clients.Elasticsearch.Analysis.PathHierarchyTokenizer Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.PathHierarchyTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBufferSize, value.BufferSize, null, null); + writer.WriteProperty(options, PropBufferSize, value.BufferSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDelimiter, value.Delimiter, null, null); writer.WriteProperty(options, PropReplacement, value.Replacement, null, null); - writer.WriteProperty(options, PropReverse, value.Reverse, null, null); - writer.WriteProperty(options, PropSkip, value.Skip, null, null); + writer.WriteProperty(options, PropReverse, value.Reverse, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSkip, value.Skip, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); 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..ae7caf12013 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) { @@ -49,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.PatternAnalyzer Read(ref continue; } - if (propLowercase.TryReadProperty(ref reader, options, PropLowercase, null)) + if (propLowercase.TryReadProperty(ref reader, options, PropLowercase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -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 }; } @@ -107,15 +97,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFlags, value.Flags, null, null); - writer.WriteProperty(options, PropLowercase, value.Lowercase, null, null); + writer.WriteProperty(options, PropLowercase, value.Lowercase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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/PatternCaptureTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs index 37b76d43184..273c531a964 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternCaptureTokenFilter.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.PatternCaptureTokenFilter continue; } - if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropPatterns, value.Patterns, 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, PropPreserveOriginal, value.PreserveOriginal, null, null); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs index 8ce0db56621..7b9ec73a60b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternReplaceTokenFilter.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.PatternReplaceTokenFilter LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAll.TryReadProperty(ref reader, options, PropAll, null)) + if (propAll.TryReadProperty(ref reader, options, PropAll, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,7 +88,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.PatternReplaceTokenFilter public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.PatternReplaceTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAll, value.All, null, null); + writer.WriteProperty(options, PropAll, value.All, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPattern, value.Pattern, null, null); writer.WriteProperty(options, PropReplacement, value.Replacement, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternTokenizer.g.cs index 4a0d0254b00..0801a33e1db 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PatternTokenizer.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.PatternTokenizer Read(ref continue; } - if (propGroup.TryReadProperty(ref reader, options, PropGroup, null)) + if (propGroup.TryReadProperty(ref reader, options, PropGroup, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFlags, value.Flags, null, null); - writer.WriteProperty(options, PropGroup, value.Group, null, null); + writer.WriteProperty(options, PropGroup, value.Group, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPattern, value.Pattern, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs index e46faac9f54..9b2f95430dd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/PhoneticTokenFilter.g.cs @@ -56,22 +56,22 @@ public override Elastic.Clients.Elasticsearch.Analysis.PhoneticTokenFilter Read( continue; } - if (propMaxCodeLen.TryReadProperty(ref reader, options, PropMaxCodeLen, null)) + if (propMaxCodeLen.TryReadProperty(ref reader, options, PropMaxCodeLen, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNameType.TryReadProperty(ref reader, options, PropNameType, null)) + if (propNameType.TryReadProperty(ref reader, options, PropNameType, static Elastic.Clients.Elasticsearch.Analysis.PhoneticNameType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReplace.TryReadProperty(ref reader, options, PropReplace, null)) + if (propReplace.TryReadProperty(ref reader, options, PropReplace, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRuleType.TryReadProperty(ref reader, options, PropRuleType, null)) + if (propRuleType.TryReadProperty(ref reader, options, PropRuleType, static Elastic.Clients.Elasticsearch.Analysis.PhoneticRuleType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,10 +114,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropEncoder, value.Encoder, null, null); writer.WriteProperty(options, PropLanguageset, value.Languageset, 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, PropMaxCodeLen, value.MaxCodeLen, null, null); - writer.WriteProperty(options, PropNameType, value.NameType, null, null); - writer.WriteProperty(options, PropReplace, value.Replace, null, null); - writer.WriteProperty(options, PropRuleType, value.RuleType, null, null); + writer.WriteProperty(options, PropMaxCodeLen, value.MaxCodeLen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNameType, value.NameType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.PhoneticNameType? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReplace, value.Replace, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRuleType, value.RuleType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.PhoneticRuleType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ShingleTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ShingleTokenFilter.g.cs index 5ce685f053d..d647e119aff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ShingleTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/ShingleTokenFilter.g.cs @@ -51,22 +51,22 @@ public override Elastic.Clients.Elasticsearch.Analysis.ShingleTokenFilter Read(r continue; } - if (propMaxShingleSize.TryReadProperty(ref reader, options, PropMaxShingleSize, null)) + if (propMaxShingleSize.TryReadProperty(ref reader, options, PropMaxShingleSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinShingleSize.TryReadProperty(ref reader, options, PropMinShingleSize, null)) + if (propMinShingleSize.TryReadProperty(ref reader, options, PropMinShingleSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOutputUnigrams.TryReadProperty(ref reader, options, PropOutputUnigrams, null)) + if (propOutputUnigrams.TryReadProperty(ref reader, options, PropOutputUnigrams, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOutputUnigramsIfNoShingles.TryReadProperty(ref reader, options, PropOutputUnigramsIfNoShingles, null)) + if (propOutputUnigramsIfNoShingles.TryReadProperty(ref reader, options, PropOutputUnigramsIfNoShingles, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,10 +113,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFillerToken, value.FillerToken, null, null); - writer.WriteProperty(options, PropMaxShingleSize, value.MaxShingleSize, null, null); - writer.WriteProperty(options, PropMinShingleSize, value.MinShingleSize, null, null); - writer.WriteProperty(options, PropOutputUnigrams, value.OutputUnigrams, null, null); - writer.WriteProperty(options, PropOutputUnigramsIfNoShingles, value.OutputUnigramsIfNoShingles, null, null); + writer.WriteProperty(options, PropMaxShingleSize, value.MaxShingleSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinShingleSize, value.MinShingleSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOutputUnigrams, value.OutputUnigrams, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOutputUnigramsIfNoShingles, value.OutputUnigramsIfNoShingles, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTokenSeparator, value.TokenSeparator, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); 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/SnowballTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballTokenFilter.g.cs index be3361dda58..00389a91b6f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SnowballTokenFilter.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.SnowballTokenFilter Read( LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLanguage.TryReadProperty(ref reader, options, PropLanguage, null)) + if (propLanguage.TryReadProperty(ref reader, options, PropLanguage, static Elastic.Clients.Elasticsearch.Analysis.SnowballLanguage? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.SnowballTokenFilter Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.SnowballTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLanguage, value.Language, null, null); + writer.WriteProperty(options, PropLanguage, value.Language, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.SnowballLanguage? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); 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..8d1214f49bb 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,10 +34,9 @@ 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)) + if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -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,17 +65,15 @@ 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 }; } public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.StandardAnalyzer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, null); + writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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/StandardTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardTokenizer.g.cs index 383d253a829..8a33f3ef0d2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StandardTokenizer.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.StandardTokenizer Read(re LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, null)) + if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.StandardTokenizer Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.StandardTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, null); + writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); 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/StopTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopTokenFilter.g.cs index 1343e571dd3..bbfc607674e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/StopTokenFilter.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.Analysis.StopTokenFilter Read(ref LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propIgnoreCase.TryReadProperty(ref reader, options, PropIgnoreCase, null)) + if (propIgnoreCase.TryReadProperty(ref reader, options, PropIgnoreCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRemoveTrailing.TryReadProperty(ref reader, options, PropRemoveTrailing, null)) + if (propRemoveTrailing.TryReadProperty(ref reader, options, PropRemoveTrailing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,8 +96,8 @@ public override Elastic.Clients.Elasticsearch.Analysis.StopTokenFilter Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.StopTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropIgnoreCase, value.IgnoreCase, null, null); - writer.WriteProperty(options, PropRemoveTrailing, value.RemoveTrailing, null, null); + writer.WriteProperty(options, PropIgnoreCase, value.IgnoreCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRemoveTrailing, value.RemoveTrailing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs index 3a3635455df..8d6a594e7a2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymGraphTokenFilter.g.cs @@ -50,17 +50,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.SynonymGraphTokenFilter R LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExpand.TryReadProperty(ref reader, options, PropExpand, null)) + if (propExpand.TryReadProperty(ref reader, options, PropExpand, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFormat.TryReadProperty(ref reader, options, PropFormat, null)) + if (propFormat.TryReadProperty(ref reader, options, PropFormat, static Elastic.Clients.Elasticsearch.Analysis.SynonymFormat? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLenient.TryReadProperty(ref reader, options, PropLenient, null)) + if (propLenient.TryReadProperty(ref reader, options, PropLenient, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.SynonymGraphTokenFilter R continue; } - if (propUpdateable.TryReadProperty(ref reader, options, PropUpdateable, null)) + if (propUpdateable.TryReadProperty(ref reader, options, PropUpdateable, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -128,15 +128,15 @@ public override Elastic.Clients.Elasticsearch.Analysis.SynonymGraphTokenFilter R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.SynonymGraphTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExpand, value.Expand, null, null); - writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropLenient, value.Lenient, null, null); + writer.WriteProperty(options, PropExpand, value.Expand, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFormat, value.Format, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.SynonymFormat? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLenient, value.Lenient, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSynonyms, value.Synonyms, 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, PropSynonymsPath, value.SynonymsPath, null, null); writer.WriteProperty(options, PropSynonymsSet, value.SynonymsSet, null, null); writer.WriteProperty(options, PropTokenizer, value.Tokenizer, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); - writer.WriteProperty(options, PropUpdateable, value.Updateable, null, null); + writer.WriteProperty(options, PropUpdateable, value.Updateable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs index 39a058feec4..5efef1a0ded 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/SynonymTokenFilter.g.cs @@ -50,17 +50,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.SynonymTokenFilter Read(r LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExpand.TryReadProperty(ref reader, options, PropExpand, null)) + if (propExpand.TryReadProperty(ref reader, options, PropExpand, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFormat.TryReadProperty(ref reader, options, PropFormat, null)) + if (propFormat.TryReadProperty(ref reader, options, PropFormat, static Elastic.Clients.Elasticsearch.Analysis.SynonymFormat? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLenient.TryReadProperty(ref reader, options, PropLenient, null)) + if (propLenient.TryReadProperty(ref reader, options, PropLenient, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.SynonymTokenFilter Read(r continue; } - if (propUpdateable.TryReadProperty(ref reader, options, PropUpdateable, null)) + if (propUpdateable.TryReadProperty(ref reader, options, PropUpdateable, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -128,15 +128,15 @@ public override Elastic.Clients.Elasticsearch.Analysis.SynonymTokenFilter Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.SynonymTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExpand, value.Expand, null, null); - writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropLenient, value.Lenient, null, null); + writer.WriteProperty(options, PropExpand, value.Expand, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFormat, value.Format, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.SynonymFormat? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLenient, value.Lenient, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSynonyms, value.Synonyms, 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, PropSynonymsPath, value.SynonymsPath, null, null); writer.WriteProperty(options, PropSynonymsSet, value.SynonymsSet, null, null); writer.WriteProperty(options, PropTokenizer, value.Tokenizer, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); - writer.WriteProperty(options, PropUpdateable, value.Updateable, null, null); + writer.WriteProperty(options, PropUpdateable, value.Updateable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TruncateTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TruncateTokenFilter.g.cs index d447d1a6fdb..55e7986321a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TruncateTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/TruncateTokenFilter.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.TruncateTokenFilter Read( LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLength.TryReadProperty(ref reader, options, PropLength, null)) + if (propLength.TryReadProperty(ref reader, options, PropLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.TruncateTokenFilter Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.TruncateTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLength, value.Length, null, null); + writer.WriteProperty(options, PropLength, value.Length, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs index 5d37807ef6c..43738a2ed69 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UaxEmailUrlTokenizer.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.UaxEmailUrlTokenizer Read LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, null)) + if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.UaxEmailUrlTokenizer Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.UaxEmailUrlTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, null); + writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UniqueTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UniqueTokenFilter.g.cs index 9aef22b2309..dae6f360301 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UniqueTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/UniqueTokenFilter.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.UniqueTokenFilter Read(re LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propOnlyOnSamePosition.TryReadProperty(ref reader, options, PropOnlyOnSamePosition, null)) + if (propOnlyOnSamePosition.TryReadProperty(ref reader, options, PropOnlyOnSamePosition, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.UniqueTokenFilter Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.UniqueTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropOnlyOnSamePosition, value.OnlyOnSamePosition, null, null); + writer.WriteProperty(options, PropOnlyOnSamePosition, value.OnlyOnSamePosition, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); 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/Analysis/WhitespaceTokenizer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs index 40a72cbc562..033b4bf176a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WhitespaceTokenizer.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.WhitespaceTokenizer Read( LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, null)) + if (propMaxTokenLength.TryReadProperty(ref reader, options, PropMaxTokenLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Analysis.WhitespaceTokenizer Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.WhitespaceTokenizer value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, null); + writer.WriteProperty(options, PropMaxTokenLength, value.MaxTokenLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs index 542fdb6341d..006eb44787d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterGraphTokenFilter.g.cs @@ -64,42 +64,42 @@ public override Elastic.Clients.Elasticsearch.Analysis.WordDelimiterGraphTokenFi LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAdjustOffsets.TryReadProperty(ref reader, options, PropAdjustOffsets, null)) + if (propAdjustOffsets.TryReadProperty(ref reader, options, PropAdjustOffsets, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCatenateAll.TryReadProperty(ref reader, options, PropCatenateAll, null)) + if (propCatenateAll.TryReadProperty(ref reader, options, PropCatenateAll, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCatenateNumbers.TryReadProperty(ref reader, options, PropCatenateNumbers, null)) + if (propCatenateNumbers.TryReadProperty(ref reader, options, PropCatenateNumbers, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCatenateWords.TryReadProperty(ref reader, options, PropCatenateWords, null)) + if (propCatenateWords.TryReadProperty(ref reader, options, PropCatenateWords, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGenerateNumberParts.TryReadProperty(ref reader, options, PropGenerateNumberParts, null)) + if (propGenerateNumberParts.TryReadProperty(ref reader, options, PropGenerateNumberParts, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGenerateWordParts.TryReadProperty(ref reader, options, PropGenerateWordParts, null)) + if (propGenerateWordParts.TryReadProperty(ref reader, options, PropGenerateWordParts, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreKeywords.TryReadProperty(ref reader, options, PropIgnoreKeywords, null)) + if (propIgnoreKeywords.TryReadProperty(ref reader, options, PropIgnoreKeywords, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,17 +114,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.WordDelimiterGraphTokenFi continue; } - if (propSplitOnCaseChange.TryReadProperty(ref reader, options, PropSplitOnCaseChange, null)) + if (propSplitOnCaseChange.TryReadProperty(ref reader, options, PropSplitOnCaseChange, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSplitOnNumerics.TryReadProperty(ref reader, options, PropSplitOnNumerics, null)) + if (propSplitOnNumerics.TryReadProperty(ref reader, options, PropSplitOnNumerics, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStemEnglishPossessive.TryReadProperty(ref reader, options, PropStemEnglishPossessive, null)) + if (propStemEnglishPossessive.TryReadProperty(ref reader, options, PropStemEnglishPossessive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -184,19 +184,19 @@ public override Elastic.Clients.Elasticsearch.Analysis.WordDelimiterGraphTokenFi public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.WordDelimiterGraphTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAdjustOffsets, value.AdjustOffsets, null, null); - writer.WriteProperty(options, PropCatenateAll, value.CatenateAll, null, null); - writer.WriteProperty(options, PropCatenateNumbers, value.CatenateNumbers, null, null); - writer.WriteProperty(options, PropCatenateWords, value.CatenateWords, null, null); - writer.WriteProperty(options, PropGenerateNumberParts, value.GenerateNumberParts, null, null); - writer.WriteProperty(options, PropGenerateWordParts, value.GenerateWordParts, null, null); - writer.WriteProperty(options, PropIgnoreKeywords, value.IgnoreKeywords, null, null); - writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, null); + writer.WriteProperty(options, PropAdjustOffsets, value.AdjustOffsets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCatenateAll, value.CatenateAll, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCatenateNumbers, value.CatenateNumbers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCatenateWords, value.CatenateWords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGenerateNumberParts, value.GenerateNumberParts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGenerateWordParts, value.GenerateWordParts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreKeywords, value.IgnoreKeywords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProtectedWords, value.ProtectedWords, 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, PropProtectedWordsPath, value.ProtectedWordsPath, null, null); - writer.WriteProperty(options, PropSplitOnCaseChange, value.SplitOnCaseChange, null, null); - writer.WriteProperty(options, PropSplitOnNumerics, value.SplitOnNumerics, null, null); - writer.WriteProperty(options, PropStemEnglishPossessive, value.StemEnglishPossessive, null, null); + writer.WriteProperty(options, PropSplitOnCaseChange, value.SplitOnCaseChange, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSplitOnNumerics, value.SplitOnNumerics, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStemEnglishPossessive, value.StemEnglishPossessive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropTypeTable, value.TypeTable, 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, PropTypeTablePath, value.TypeTablePath, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs index 0cad9dcd3f1..c589af17379 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Analysis/WordDelimiterTokenFilter.g.cs @@ -60,32 +60,32 @@ public override Elastic.Clients.Elasticsearch.Analysis.WordDelimiterTokenFilter LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCatenateAll.TryReadProperty(ref reader, options, PropCatenateAll, null)) + if (propCatenateAll.TryReadProperty(ref reader, options, PropCatenateAll, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCatenateNumbers.TryReadProperty(ref reader, options, PropCatenateNumbers, null)) + if (propCatenateNumbers.TryReadProperty(ref reader, options, PropCatenateNumbers, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCatenateWords.TryReadProperty(ref reader, options, PropCatenateWords, null)) + if (propCatenateWords.TryReadProperty(ref reader, options, PropCatenateWords, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGenerateNumberParts.TryReadProperty(ref reader, options, PropGenerateNumberParts, null)) + if (propGenerateNumberParts.TryReadProperty(ref reader, options, PropGenerateNumberParts, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGenerateWordParts.TryReadProperty(ref reader, options, PropGenerateWordParts, null)) + if (propGenerateWordParts.TryReadProperty(ref reader, options, PropGenerateWordParts, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, null)) + if (propPreserveOriginal.TryReadProperty(ref reader, options, PropPreserveOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,17 +100,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.WordDelimiterTokenFilter continue; } - if (propSplitOnCaseChange.TryReadProperty(ref reader, options, PropSplitOnCaseChange, null)) + if (propSplitOnCaseChange.TryReadProperty(ref reader, options, PropSplitOnCaseChange, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSplitOnNumerics.TryReadProperty(ref reader, options, PropSplitOnNumerics, null)) + if (propSplitOnNumerics.TryReadProperty(ref reader, options, PropSplitOnNumerics, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStemEnglishPossessive.TryReadProperty(ref reader, options, PropStemEnglishPossessive, null)) + if (propStemEnglishPossessive.TryReadProperty(ref reader, options, PropStemEnglishPossessive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -168,17 +168,17 @@ public override Elastic.Clients.Elasticsearch.Analysis.WordDelimiterTokenFilter public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Analysis.WordDelimiterTokenFilter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCatenateAll, value.CatenateAll, null, null); - writer.WriteProperty(options, PropCatenateNumbers, value.CatenateNumbers, null, null); - writer.WriteProperty(options, PropCatenateWords, value.CatenateWords, null, null); - writer.WriteProperty(options, PropGenerateNumberParts, value.GenerateNumberParts, null, null); - writer.WriteProperty(options, PropGenerateWordParts, value.GenerateWordParts, null, null); - writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, null); + writer.WriteProperty(options, PropCatenateAll, value.CatenateAll, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCatenateNumbers, value.CatenateNumbers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCatenateWords, value.CatenateWords, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGenerateNumberParts, value.GenerateNumberParts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGenerateWordParts, value.GenerateWordParts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPreserveOriginal, value.PreserveOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProtectedWords, value.ProtectedWords, 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, PropProtectedWordsPath, value.ProtectedWordsPath, null, null); - writer.WriteProperty(options, PropSplitOnCaseChange, value.SplitOnCaseChange, null, null); - writer.WriteProperty(options, PropSplitOnNumerics, value.SplitOnNumerics, null, null); - writer.WriteProperty(options, PropStemEnglishPossessive, value.StemEnglishPossessive, null, null); + writer.WriteProperty(options, PropSplitOnCaseChange, value.SplitOnCaseChange, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSplitOnNumerics, value.SplitOnNumerics, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStemEnglishPossessive, value.StemEnglishPossessive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropTypeTable, value.TypeTable, 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, PropTypeTablePath, value.TypeTablePath, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearch.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearch.g.cs index 66df445da1d..48b6e1218b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearch.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearch.g.cs @@ -79,12 +79,12 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.AsyncSearch continue; } - if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, null)) + if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, null)) + if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.AsyncSearch.AsyncSearch continue; } - if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, null)) + if (propTerminatedEarly.TryReadProperty(ref reader, options, PropTerminatedEarly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,14 +165,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClusters, value.Clusters, null, null); writer.WriteProperty(options, PropFields, value.Fields, 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, PropHitsMetadata, value.HitsMetadata, null, null); - writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, null); - writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, null); + writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPitId, value.PitId, null, null); writer.WriteProperty(options, PropProfile, value.Profile, null, null); writer.WriteProperty(options, PropScrollId, value.ScrollId, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, null); + writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); 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/Cluster/ClusterIndicesShards.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterIndicesShards.g.cs index 25d72abc080..7ddd0ec3bde 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterIndicesShards.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterIndicesShards.g.cs @@ -44,17 +44,17 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterIndicesShards Read( continue; } - if (propPrimaries.TryReadProperty(ref reader, options, PropPrimaries, null)) + if (propPrimaries.TryReadProperty(ref reader, options, PropPrimaries, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReplication.TryReadProperty(ref reader, options, PropReplication, null)) + if (propReplication.TryReadProperty(ref reader, options, PropReplication, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + if (propTotal.TryReadProperty(ref reader, options, PropTotal, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimaries, value.Primaries, null, null); - writer.WriteProperty(options, PropReplication, value.Replication, null, null); - writer.WriteProperty(options, PropTotal, value.Total, null, null); + writer.WriteProperty(options, PropPrimaries, value.Primaries, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReplication, value.Replication, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotal, value.Total, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterNodeCount.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterNodeCount.g.cs index 92a12760b8d..8460abf3bae 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterNodeCount.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ClusterNodeCount.g.cs @@ -79,7 +79,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.ClusterNodeCount Read(ref continue; } - if (propDataFrozen.TryReadProperty(ref reader, options, PropDataFrozen, null)) + if (propDataFrozen.TryReadProperty(ref reader, options, PropDataFrozen, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,7 +165,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropData, value.Data, null, null); writer.WriteProperty(options, PropDataCold, value.DataCold, null, null); writer.WriteProperty(options, PropDataContent, value.DataContent, null, null); - writer.WriteProperty(options, PropDataFrozen, value.DataFrozen, null, null); + writer.WriteProperty(options, PropDataFrozen, value.DataFrozen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDataHot, value.DataHot, null, null); writer.WriteProperty(options, PropDataWarm, value.DataWarm, null, null); writer.WriteProperty(options, PropIngest, value.Ingest, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateNode.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateNode.g.cs index de6b1400223..e8d29b9682e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateNode.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateNode.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateNode Read LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, null)) + if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateNode Read continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateNode Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateNode value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, null); + writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropTemplate, value.Template, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs index 34f5e3a29be..7891986450d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/ComponentTemplateSummary.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.ComponentTemplateSummary R continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -102,7 +102,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropMappings, value.Mappings, 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, PropSettings, value.Settings, 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, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypes.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypes.g.cs index ca78a596678..3435aca8c4e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypes.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypes.g.cs @@ -55,17 +55,17 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypes Read(ref System continue; } - if (propIndexedVectorCount.TryReadProperty(ref reader, options, PropIndexedVectorCount, null)) + if (propIndexedVectorCount.TryReadProperty(ref reader, options, PropIndexedVectorCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexedVectorDimMax.TryReadProperty(ref reader, options, PropIndexedVectorDimMax, null)) + if (propIndexedVectorDimMax.TryReadProperty(ref reader, options, PropIndexedVectorDimMax, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexedVectorDimMin.TryReadProperty(ref reader, options, PropIndexedVectorDimMin, null)) + if (propIndexedVectorDimMin.TryReadProperty(ref reader, options, PropIndexedVectorDimMin, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypes Read(ref System continue; } - if (propScriptCount.TryReadProperty(ref reader, options, PropScriptCount, null)) + if (propScriptCount.TryReadProperty(ref reader, options, PropScriptCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,11 +107,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCount, value.Count, null, null); writer.WriteProperty(options, PropIndexCount, value.IndexCount, null, null); - writer.WriteProperty(options, PropIndexedVectorCount, value.IndexedVectorCount, null, null); - writer.WriteProperty(options, PropIndexedVectorDimMax, value.IndexedVectorDimMax, null, null); - writer.WriteProperty(options, PropIndexedVectorDimMin, value.IndexedVectorDimMin, null, null); + writer.WriteProperty(options, PropIndexedVectorCount, value.IndexedVectorCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexedVectorDimMax, value.IndexedVectorDimMax, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexedVectorDimMin, value.IndexedVectorDimMin, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropName, value.Name, null, null); - writer.WriteProperty(options, PropScriptCount, value.ScriptCount, null, null); + writer.WriteProperty(options, PropScriptCount, value.ScriptCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypesMappings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypesMappings.g.cs index 7048b04cb1b..cc2b8405a25 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypesMappings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/FieldTypesMappings.g.cs @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypesMappings Read(re continue; } - if (propTotalDeduplicatedFieldCount.TryReadProperty(ref reader, options, PropTotalDeduplicatedFieldCount, null)) + if (propTotalDeduplicatedFieldCount.TryReadProperty(ref reader, options, PropTotalDeduplicatedFieldCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -63,12 +63,12 @@ public override Elastic.Clients.Elasticsearch.Cluster.FieldTypesMappings Read(re continue; } - if (propTotalDeduplicatedMappingSizeInBytes.TryReadProperty(ref reader, options, PropTotalDeduplicatedMappingSizeInBytes, null)) + if (propTotalDeduplicatedMappingSizeInBytes.TryReadProperty(ref reader, options, PropTotalDeduplicatedMappingSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalFieldCount.TryReadProperty(ref reader, options, PropTotalFieldCount, null)) + if (propTotalFieldCount.TryReadProperty(ref reader, options, PropTotalFieldCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,10 +99,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFieldTypes, value.FieldTypes, 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, PropRuntimeFieldTypes, value.RuntimeFieldTypes, 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, PropTotalDeduplicatedFieldCount, value.TotalDeduplicatedFieldCount, null, null); + writer.WriteProperty(options, PropTotalDeduplicatedFieldCount, value.TotalDeduplicatedFieldCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalDeduplicatedMappingSize, value.TotalDeduplicatedMappingSize, null, null); - writer.WriteProperty(options, PropTotalDeduplicatedMappingSizeInBytes, value.TotalDeduplicatedMappingSizeInBytes, null, null); - writer.WriteProperty(options, PropTotalFieldCount, value.TotalFieldCount, null, null); + writer.WriteProperty(options, PropTotalDeduplicatedMappingSizeInBytes, value.TotalDeduplicatedMappingSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalFieldCount, value.TotalFieldCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs index 70050ad66b4..4cb765e7b0b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/IndexingPressureMemorySummary.g.cs @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemorySumm continue; } - if (propCoordinatingRejections.TryReadProperty(ref reader, options, PropCoordinatingRejections, null)) + if (propCoordinatingRejections.TryReadProperty(ref reader, options, PropCoordinatingRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemorySumm continue; } - if (propPrimaryRejections.TryReadProperty(ref reader, options, PropPrimaryRejections, null)) + if (propPrimaryRejections.TryReadProperty(ref reader, options, PropPrimaryRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.IndexingPressureMemorySumm continue; } - if (propReplicaRejections.TryReadProperty(ref reader, options, PropReplicaRejections, null)) + if (propReplicaRejections.TryReadProperty(ref reader, options, PropReplicaRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,11 +116,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAllInBytes, value.AllInBytes, null, null); writer.WriteProperty(options, PropCombinedCoordinatingAndPrimaryInBytes, value.CombinedCoordinatingAndPrimaryInBytes, null, null); writer.WriteProperty(options, PropCoordinatingInBytes, value.CoordinatingInBytes, null, null); - writer.WriteProperty(options, PropCoordinatingRejections, value.CoordinatingRejections, null, null); + writer.WriteProperty(options, PropCoordinatingRejections, value.CoordinatingRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPrimaryInBytes, value.PrimaryInBytes, null, null); - writer.WriteProperty(options, PropPrimaryRejections, value.PrimaryRejections, null, null); + writer.WriteProperty(options, PropPrimaryRejections, value.PrimaryRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropReplicaInBytes, value.ReplicaInBytes, null, null); - writer.WriteProperty(options, PropReplicaRejections, value.ReplicaRejections, null, null); + writer.WriteProperty(options, PropReplicaRejections, value.ReplicaRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs index a4db1ad0c53..064097051c6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/OperatingSystemMemoryInfo.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.OperatingSystemMemoryInfo LocalJsonValue propUsedPercent = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAdjustedTotalInBytes.TryReadProperty(ref reader, options, PropAdjustedTotalInBytes, null)) + if (propAdjustedTotalInBytes.TryReadProperty(ref reader, options, PropAdjustedTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,7 +97,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.OperatingSystemMemoryInfo public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Cluster.OperatingSystemMemoryInfo value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAdjustedTotalInBytes, value.AdjustedTotalInBytes, null, null); + writer.WriteProperty(options, PropAdjustedTotalInBytes, value.AdjustedTotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, null); writer.WriteProperty(options, PropFreePercent, value.FreePercent, null, null); writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/UnassignedInformation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/UnassignedInformation.g.cs index f6008a9036d..2025f641819 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/UnassignedInformation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Cluster/UnassignedInformation.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.UnassignedInformation Read continue; } - if (propDelayed.TryReadProperty(ref reader, options, PropDelayed, null)) + if (propDelayed.TryReadProperty(ref reader, options, PropDelayed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Cluster.UnassignedInformation Read continue; } - if (propFailedAllocationAttempts.TryReadProperty(ref reader, options, PropFailedAllocationAttempts, null)) + if (propFailedAllocationAttempts.TryReadProperty(ref reader, options, PropFailedAllocationAttempts, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,9 +107,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAllocationStatus, value.AllocationStatus, null, null); writer.WriteProperty(options, PropAt, value.At, 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, PropDelayed, value.Delayed, null, null); + writer.WriteProperty(options, PropDelayed, value.Delayed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDetails, value.Details, null, null); - writer.WriteProperty(options, PropFailedAllocationAttempts, value.FailedAllocationAttempts, null, null); + writer.WriteProperty(options, PropFailedAllocationAttempts, value.FailedAllocationAttempts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLastAllocationStatus, value.LastAllocationStatus, null, null); writer.WriteProperty(options, PropReason, value.Reason, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterDetails.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterDetails.g.cs index e4f47968f37..a792384130b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterDetails.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ClusterDetails.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.ClusterDetails Read(ref System.Tex continue; } - if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTook.TryReadProperty(ref reader, options, PropTook, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -102,7 +102,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropStatus, value.Status, null, null); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); - writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } 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/FieldCaps/FieldCapability.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldCaps/FieldCapability.g.cs index 9d80fbd9b9e..3596c060443 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldCaps/FieldCapability.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/FieldCaps/FieldCapability.g.cs @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Core.FieldCaps.FieldCapability Rea continue; } - if (propMetadataField.TryReadProperty(ref reader, options, PropMetadataField, null)) + if (propMetadataField.TryReadProperty(ref reader, options, PropMetadataField, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,12 +100,12 @@ public override Elastic.Clients.Elasticsearch.Core.FieldCaps.FieldCapability Rea continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -148,14 +148,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAggregatable, value.Aggregatable, null, null); writer.WriteProperty(options, PropIndices, value.Indices, 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, PropMeta, value.Meta, 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, PropMetadataField, value.MetadataField, null, null); + writer.WriteProperty(options, PropMetadataField, value.MetadataField, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMetricConflictsIndices, value.MetricConflictsIndices, 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, PropNonAggregatableIndices, value.NonAggregatableIndices, 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, PropNonDimensionIndices, value.NonDimensionIndices, 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, PropNonSearchableIndices, value.NonSearchableIndices, 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, PropSearchable, value.Searchable, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Get/GetResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Get/GetResult.g.cs index d43e5fb3b70..ce4b87b9c51 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Get/GetResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Get/GetResult.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Core.Get.GetResult Read continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.Core.Get.GetResult Read continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.Core.Get.GetResult Read continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -134,11 +134,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien 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, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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/HealthReport/RepositoryIntegrityIndicatorDetails.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicatorDetails.g.cs index 89312c2418d..e75aaba1ebe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicatorDetails.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/RepositoryIntegrityIndicatorDetails.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.Core.HealthReport.RepositoryIntegr continue; } - if (propCorruptedRepositories.TryReadProperty(ref reader, options, PropCorruptedRepositories, null)) + if (propCorruptedRepositories.TryReadProperty(ref reader, options, PropCorruptedRepositories, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalRepositories.TryReadProperty(ref reader, options, PropTotalRepositories, null)) + if (propTotalRepositories.TryReadProperty(ref reader, options, PropTotalRepositories, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,8 +74,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCorrupted, value.Corrupted, 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, PropCorruptedRepositories, value.CorruptedRepositories, null, null); - writer.WriteProperty(options, PropTotalRepositories, value.TotalRepositories, null, null); + writer.WriteProperty(options, PropCorruptedRepositories, value.CorruptedRepositories, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalRepositories, value.TotalRepositories, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorTierDetail.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorTierDetail.g.cs index c35e9f0ff7c..4a176bec4ee 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorTierDetail.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/HealthReport/ShardsCapacityIndicatorTierDetail.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Core.HealthReport.ShardsCapacityIn LocalJsonValue propMaxShardsInCluster = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCurrentUsedShards.TryReadProperty(ref reader, options, PropCurrentUsedShards, null)) + if (propCurrentUsedShards.TryReadProperty(ref reader, options, PropCurrentUsedShards, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Core.HealthReport.ShardsCapacityIn public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.HealthReport.ShardsCapacityIndicatorTierDetail value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCurrentUsedShards, value.CurrentUsedShards, null, null); + writer.WriteProperty(options, PropCurrentUsedShards, value.CurrentUsedShards, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxShardsInCluster, value.MaxShardsInCluster, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MGet/MultiGetOperation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MGet/MultiGetOperation.g.cs index a5f1257e3ad..6d27bc7bb5c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MGet/MultiGetOperation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MGet/MultiGetOperation.g.cs @@ -70,12 +70,12 @@ public override Elastic.Clients.Elasticsearch.Core.MGet.MultiGetOperation Read(r continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, null)) + if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, static Elastic.Clients.Elasticsearch.VersionType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,8 +110,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteProperty(options, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropVersionType, value.VersionType, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionType, value.VersionType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.VersionType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs index ba593c3a093..7c226e521d3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultiSearchItem.g.cs @@ -81,12 +81,12 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultiSearchItem r.ReadNullableValue(o))) { continue; } - if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, null)) + if (propNumReducePhases.TryReadProperty(ref reader, options, PropNumReducePhases, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -111,7 +111,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultiSearchItem r.ReadNullableValue(o))) { continue; } @@ -121,7 +121,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultiSearchItem r.ReadNullableValue(o))) { continue; } @@ -173,15 +173,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClusters, value.Clusters, null, null); writer.WriteProperty(options, PropFields, value.Fields, 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, PropHitsMetadata, value.HitsMetadata, null, null); - writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, null); - writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, null); + writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumReducePhases, value.NumReducePhases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPitId, value.PitId, null, null); writer.WriteProperty(options, PropProfile, value.Profile, null, null); writer.WriteProperty(options, PropScrollId, value.ScrollId, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); - writer.WriteProperty(options, PropStatus, value.Status, null, null); + writer.WriteProperty(options, PropStatus, value.Status, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, null); + writer.WriteProperty(options, PropTerminatedEarly, value.TerminatedEarly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimedOut, value.TimedOut, null, null); writer.WriteProperty(options, PropTook, value.Took, null, null); writer.WriteEndObject(); 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..5f3e3f1f33b 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; @@ -115,7 +109,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,7 +124,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -150,7 +144,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,7 +159,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propProfile.TryReadProperty(ref reader, options, PropProfile, null)) + if (propProfile.TryReadProperty(ref reader, options, PropProfile, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -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; @@ -205,17 +189,12 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, null)) - { - continue; - } - - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSlice.TryReadProperty(ref reader, options, PropSlice, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -245,7 +224,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, null)) + if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -255,7 +234,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, null)) + if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -265,7 +244,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchBody Read( continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { 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, @@ -325,37 +301,34 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAggregations, value.Aggregations, 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, PropCollapse, value.Collapse, null, null); writer.WriteProperty(options, PropDocvalueFields, value.DocvalueFields, 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, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExt, value.Ext, 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, PropFields, value.Fields, 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, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlight, value.Highlight, null, null); writer.WriteProperty(options, PropIndicesBoost, value.IndicesBoost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); writer.WriteProperty(options, PropKnn, value.Knn, 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, PropMinScore, value.MinScore, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPit, value.Pit, null, null); writer.WriteProperty(options, PropPostFilter, value.PostFilter, null, null); - writer.WriteProperty(options, PropProfile, value.Profile, null, null); + writer.WriteProperty(options, PropProfile, value.Profile, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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)); writer.WriteProperty(options, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropSuggest, value.Suggest, null, null); - writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, null); + writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); - writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, null); + writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTrackTotalHits, value.TrackTotalHits, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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/MSearch/MultisearchHeader.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs index 0e9a1ccda52..8ee573c000a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearch/MultisearchHeader.g.cs @@ -53,17 +53,17 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Rea LocalJsonValue propSearchType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowNoIndices.TryReadProperty(ref reader, options, PropAllowNoIndices, null)) + if (propAllowNoIndices.TryReadProperty(ref reader, options, PropAllowNoIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propAllowPartialSearchResults.TryReadProperty(ref reader, options, PropAllowPartialSearchResults, null)) + if (propAllowPartialSearchResults.TryReadProperty(ref reader, options, PropAllowPartialSearchResults, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCcsMinimizeRoundtrips.TryReadProperty(ref reader, options, PropCcsMinimizeRoundtrips, null)) + if (propCcsMinimizeRoundtrips.TryReadProperty(ref reader, options, PropCcsMinimizeRoundtrips, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Rea continue; } - if (propIgnoreThrottled.TryReadProperty(ref reader, options, PropIgnoreThrottled, null)) + if (propIgnoreThrottled.TryReadProperty(ref reader, options, PropIgnoreThrottled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, null)) + if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Rea continue; } - if (propRequestCache.TryReadProperty(ref reader, options, PropRequestCache, null)) + if (propRequestCache.TryReadProperty(ref reader, options, PropRequestCache, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Rea continue; } - if (propSearchType.TryReadProperty(ref reader, options, PropSearchType, null)) + if (propSearchType.TryReadProperty(ref reader, options, PropSearchType, static Elastic.Clients.Elasticsearch.SearchType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,17 +137,17 @@ public override Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.MSearch.MultisearchHeader value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowNoIndices, value.AllowNoIndices, null, null); - writer.WriteProperty(options, PropAllowPartialSearchResults, value.AllowPartialSearchResults, null, null); - writer.WriteProperty(options, PropCcsMinimizeRoundtrips, value.CcsMinimizeRoundtrips, null, null); + writer.WriteProperty(options, PropAllowNoIndices, value.AllowNoIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropAllowPartialSearchResults, value.AllowPartialSearchResults, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCcsMinimizeRoundtrips, value.CcsMinimizeRoundtrips, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropIgnoreThrottled, value.IgnoreThrottled, null, null); - writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, null); + writer.WriteProperty(options, PropIgnoreThrottled, value.IgnoreThrottled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndices, value.Indices, null, null); writer.WriteProperty(options, PropPreference, value.Preference, null, null); - writer.WriteProperty(options, PropRequestCache, value.RequestCache, null, null); + writer.WriteProperty(options, PropRequestCache, value.RequestCache, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropSearchType, value.SearchType, null, null); + writer.WriteProperty(options, PropSearchType, value.SearchType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SearchType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs index ebcf76eefc1..8570694502d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/MSearchTemplate/TemplateConfig.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearchTemplate.TemplateConfi LocalJsonValue propSource = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Core.MSearchTemplate.TemplateConfi continue; } - if (propProfile.TryReadProperty(ref reader, options, PropProfile, null)) + if (propProfile.TryReadProperty(ref reader, options, PropProfile, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,10 +89,10 @@ public override Elastic.Clients.Elasticsearch.Core.MSearchTemplate.TemplateConfi public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.MSearchTemplate.TemplateConfig value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropParams, value.Params, 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, PropProfile, value.Profile, null, null); + writer.WriteProperty(options, PropProfile, value.Profile, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs index 0917bfb79dc..2ab4b1d3f79 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Core.Mtermvectors.MultiTermVectors continue; } - if (propFieldStatistics.TryReadProperty(ref reader, options, PropFieldStatistics, null)) + if (propFieldStatistics.TryReadProperty(ref reader, options, PropFieldStatistics, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,17 +87,17 @@ public override Elastic.Clients.Elasticsearch.Core.Mtermvectors.MultiTermVectors continue; } - if (propOffsets.TryReadProperty(ref reader, options, PropOffsets, null)) + if (propOffsets.TryReadProperty(ref reader, options, PropOffsets, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPayloads.TryReadProperty(ref reader, options, PropPayloads, null)) + if (propPayloads.TryReadProperty(ref reader, options, PropPayloads, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPositions.TryReadProperty(ref reader, options, PropPositions, null)) + if (propPositions.TryReadProperty(ref reader, options, PropPositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,17 +107,17 @@ public override Elastic.Clients.Elasticsearch.Core.Mtermvectors.MultiTermVectors continue; } - if (propTermStatistics.TryReadProperty(ref reader, options, PropTermStatistics, null)) + if (propTermStatistics.TryReadProperty(ref reader, options, PropTermStatistics, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, null)) + if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, static Elastic.Clients.Elasticsearch.VersionType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -155,17 +155,17 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDoc, value.Doc, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropFieldStatistics, value.FieldStatistics, null, null); + writer.WriteProperty(options, PropFieldStatistics, value.FieldStatistics, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropOffsets, value.Offsets, null, null); - writer.WriteProperty(options, PropPayloads, value.Payloads, null, null); - writer.WriteProperty(options, PropPositions, value.Positions, null, null); + writer.WriteProperty(options, PropOffsets, value.Offsets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPayloads, value.Payloads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPositions, value.Positions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropTermStatistics, value.TermStatistics, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropVersionType, value.VersionType, null, null); + writer.WriteProperty(options, PropTermStatistics, value.TermStatistics, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionType, value.VersionType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.VersionType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsResult.g.cs index 4ccb316b6a3..d9c065d07d3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Mtermvectors/MultiTermVectorsResult.g.cs @@ -50,7 +50,7 @@ public override Elastic.Clients.Elasticsearch.Core.Mtermvectors.MultiTermVectors continue; } - if (propFound.TryReadProperty(ref reader, options, PropFound, null)) + if (propFound.TryReadProperty(ref reader, options, PropFound, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,12 +70,12 @@ public override Elastic.Clients.Elasticsearch.Core.Mtermvectors.MultiTermVectors continue; } - if (propTook.TryReadProperty(ref reader, options, PropTook, null)) + if (propTook.TryReadProperty(ref reader, options, PropTook, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropError, value.Error, null, null); - writer.WriteProperty(options, PropFound, value.Found, null, null); + writer.WriteProperty(options, PropFound, value.Found, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); writer.WriteProperty(options, PropTermVectors, value.TermVectors, 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, PropTook, value.Took, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropTook, value.Took, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalHitItem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalHitItem.g.cs index fd979b3cd90..82061a62867 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalHitItem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalHitItem.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalHitItem Read continue; } - if (propRating.TryReadProperty(ref reader, options, PropRating, null)) + if (propRating.TryReadProperty(ref reader, options, PropRating, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropHit, value.Hit, null, null); - writer.WriteProperty(options, PropRating, value.Rating, null, null); + writer.WriteProperty(options, PropRating, value.Rating, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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..c6b96ec250b 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 @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricDiscou LocalJsonValue propNormalize = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propK.TryReadProperty(ref reader, options, PropK, null)) + if (propK.TryReadProperty(ref reader, options, PropK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNormalize.TryReadProperty(ref reader, options, PropNormalize, null)) + if (propNormalize.TryReadProperty(ref reader, options, PropNormalize, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricDiscou public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricDiscountedCumulativeGain value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropK, value.K, null, null); - writer.WriteProperty(options, PropNormalize, value.Normalize, null, null); + writer.WriteProperty(options, PropK, value.K, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNormalize, value.Normalize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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..e489d5907f8 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 @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricExpect LocalJsonValue propMaximumRelevance = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propK.TryReadProperty(ref reader, options, PropK, null)) + if (propK.TryReadProperty(ref reader, options, PropK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricExpect public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricExpectedReciprocalRank value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropK, value.K, null, null); + writer.WriteProperty(options, PropK, value.K, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaximumRelevance, value.MaximumRelevance, null, null); writer.WriteEndObject(); } @@ -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..b5e3a1ab071 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 @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricMeanRe LocalJsonValue propRelevantRatingThreshold = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propK.TryReadProperty(ref reader, options, PropK, null)) + if (propK.TryReadProperty(ref reader, options, PropK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRelevantRatingThreshold.TryReadProperty(ref reader, options, PropRelevantRatingThreshold, null)) + if (propRelevantRatingThreshold.TryReadProperty(ref reader, options, PropRelevantRatingThreshold, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricMeanRe public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricMeanReciprocalRank value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropK, value.K, null, null); - writer.WriteProperty(options, PropRelevantRatingThreshold, value.RelevantRatingThreshold, null, null); + writer.WriteProperty(options, PropK, value.K, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRelevantRatingThreshold, value.RelevantRatingThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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..e83a16c740e 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 @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricPrecis LocalJsonValue propRelevantRatingThreshold = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propIgnoreUnlabeled.TryReadProperty(ref reader, options, PropIgnoreUnlabeled, null)) + if (propIgnoreUnlabeled.TryReadProperty(ref reader, options, PropIgnoreUnlabeled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propK.TryReadProperty(ref reader, options, PropK, null)) + if (propK.TryReadProperty(ref reader, options, PropK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRelevantRatingThreshold.TryReadProperty(ref reader, options, PropRelevantRatingThreshold, null)) + if (propRelevantRatingThreshold.TryReadProperty(ref reader, options, PropRelevantRatingThreshold, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricPrecis public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricPrecision value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropIgnoreUnlabeled, value.IgnoreUnlabeled, null, null); - writer.WriteProperty(options, PropK, value.K, null, null); - writer.WriteProperty(options, PropRelevantRatingThreshold, value.RelevantRatingThreshold, null, null); + writer.WriteProperty(options, PropIgnoreUnlabeled, value.IgnoreUnlabeled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropK, value.K, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRelevantRatingThreshold, value.RelevantRatingThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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..4deae150107 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 @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricRecall LocalJsonValue propRelevantRatingThreshold = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propK.TryReadProperty(ref reader, options, PropK, null)) + if (propK.TryReadProperty(ref reader, options, PropK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRelevantRatingThreshold.TryReadProperty(ref reader, options, PropRelevantRatingThreshold, null)) + if (propRelevantRatingThreshold.TryReadProperty(ref reader, options, PropRelevantRatingThreshold, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricRecall public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalMetricRecall value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropK, value.K, null, null); - writer.WriteProperty(options, PropRelevantRatingThreshold, value.RelevantRatingThreshold, null, null); + writer.WriteProperty(options, PropK, value.K, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRelevantRatingThreshold, value.RelevantRatingThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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/RankEval/RankEvalQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalQuery.g.cs index 39be9a9d039..afeaaaf0b46 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/RankEval/RankEvalQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Core.RankEval.RankEvalQuery Read(r continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropQuery, value.Query, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Destination.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Destination.g.cs index 69c0c3cc392..9d22f8a6aa4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Destination.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Destination.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Core.Reindex.Destination Read(ref continue; } - if (propOpType.TryReadProperty(ref reader, options, PropOpType, null)) + if (propOpType.TryReadProperty(ref reader, options, PropOpType, static Elastic.Clients.Elasticsearch.OpType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Core.Reindex.Destination Read(ref continue; } - if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, null)) + if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, static Elastic.Clients.Elasticsearch.VersionType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,10 +90,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropOpType, value.OpType, null, null); + writer.WriteProperty(options, PropOpType, value.OpType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.OpType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPipeline, value.Pipeline, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropVersionType, value.VersionType, null, null); + writer.WriteProperty(options, PropVersionType, value.VersionType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.VersionType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs index 383e742de8a..63ce9dfcf53 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Reindex/Source.g.cs @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Core.Reindex.Source Read(ref Syste continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -120,7 +120,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropRemote, value.Remote, 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, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSlice, value.Slice, null, null); #pragma warning disable CS0618 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)) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationBreakdown.g.cs index 96e3c3618f7..68eb485f23b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationBreakdown.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationBreakdown.g.cs @@ -95,12 +95,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationBreakdown R continue; } - if (propPostCollection.TryReadProperty(ref reader, options, PropPostCollection, null)) + if (propPostCollection.TryReadProperty(ref reader, options, PropPostCollection, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPostCollectionCount.TryReadProperty(ref reader, options, PropPostCollectionCount, null)) + if (propPostCollectionCount.TryReadProperty(ref reader, options, PropPostCollectionCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -153,8 +153,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCollectCount, value.CollectCount, null, null); writer.WriteProperty(options, PropInitialize, value.Initialize, null, null); writer.WriteProperty(options, PropInitializeCount, value.InitializeCount, null, null); - writer.WriteProperty(options, PropPostCollection, value.PostCollection, null, null); - writer.WriteProperty(options, PropPostCollectionCount, value.PostCollectionCount, null, null); + writer.WriteProperty(options, PropPostCollection, value.PostCollection, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPostCollectionCount, value.PostCollectionCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropReduce, value.Reduce, null, null); writer.WriteProperty(options, PropReduceCount, value.ReduceCount, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs index 6b09b252bd4..ceacda699e1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDebug.g.cs @@ -95,27 +95,27 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebu LocalJsonValue propValuesFetched = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBruteForceUsed.TryReadProperty(ref reader, options, PropBruteForceUsed, null)) + if (propBruteForceUsed.TryReadProperty(ref reader, options, PropBruteForceUsed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBuiltBuckets.TryReadProperty(ref reader, options, PropBuiltBuckets, null)) + if (propBuiltBuckets.TryReadProperty(ref reader, options, PropBuiltBuckets, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCharsFetched.TryReadProperty(ref reader, options, PropCharsFetched, null)) + if (propCharsFetched.TryReadProperty(ref reader, options, PropCharsFetched, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCollectAnalyzedCount.TryReadProperty(ref reader, options, PropCollectAnalyzedCount, null)) + if (propCollectAnalyzedCount.TryReadProperty(ref reader, options, PropCollectAnalyzedCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCollectAnalyzedNs.TryReadProperty(ref reader, options, PropCollectAnalyzedNs, null)) + if (propCollectAnalyzedNs.TryReadProperty(ref reader, options, PropCollectAnalyzedNs, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -140,27 +140,27 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebu continue; } - if (propDynamicPruningAttempted.TryReadProperty(ref reader, options, PropDynamicPruningAttempted, null)) + if (propDynamicPruningAttempted.TryReadProperty(ref reader, options, PropDynamicPruningAttempted, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamicPruningUsed.TryReadProperty(ref reader, options, PropDynamicPruningUsed, null)) + if (propDynamicPruningUsed.TryReadProperty(ref reader, options, PropDynamicPruningUsed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEmptyCollectorsUsed.TryReadProperty(ref reader, options, PropEmptyCollectorsUsed, null)) + if (propEmptyCollectorsUsed.TryReadProperty(ref reader, options, PropEmptyCollectorsUsed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExtractCount.TryReadProperty(ref reader, options, PropExtractCount, null)) + if (propExtractCount.TryReadProperty(ref reader, options, PropExtractCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExtractNs.TryReadProperty(ref reader, options, PropExtractNs, null)) + if (propExtractNs.TryReadProperty(ref reader, options, PropExtractNs, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -170,7 +170,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebu continue; } - if (propHasFilter.TryReadProperty(ref reader, options, PropHasFilter, null)) + if (propHasFilter.TryReadProperty(ref reader, options, PropHasFilter, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -180,17 +180,17 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebu continue; } - if (propNumericCollectorsUsed.TryReadProperty(ref reader, options, PropNumericCollectorsUsed, null)) + if (propNumericCollectorsUsed.TryReadProperty(ref reader, options, PropNumericCollectorsUsed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrdinalsCollectorsOverheadTooHigh.TryReadProperty(ref reader, options, PropOrdinalsCollectorsOverheadTooHigh, null)) + if (propOrdinalsCollectorsOverheadTooHigh.TryReadProperty(ref reader, options, PropOrdinalsCollectorsOverheadTooHigh, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrdinalsCollectorsUsed.TryReadProperty(ref reader, options, PropOrdinalsCollectorsUsed, null)) + if (propOrdinalsCollectorsUsed.TryReadProperty(ref reader, options, PropOrdinalsCollectorsUsed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,57 +200,57 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebu continue; } - if (propSegmentsCollected.TryReadProperty(ref reader, options, PropSegmentsCollected, null)) + if (propSegmentsCollected.TryReadProperty(ref reader, options, PropSegmentsCollected, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSegmentsCounted.TryReadProperty(ref reader, options, PropSegmentsCounted, null)) + if (propSegmentsCounted.TryReadProperty(ref reader, options, PropSegmentsCounted, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSegmentsWithDeletedDocs.TryReadProperty(ref reader, options, PropSegmentsWithDeletedDocs, null)) + if (propSegmentsWithDeletedDocs.TryReadProperty(ref reader, options, PropSegmentsWithDeletedDocs, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSegmentsWithDocCountField.TryReadProperty(ref reader, options, PropSegmentsWithDocCountField, null)) + if (propSegmentsWithDocCountField.TryReadProperty(ref reader, options, PropSegmentsWithDocCountField, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSegmentsWithMultiValuedOrds.TryReadProperty(ref reader, options, PropSegmentsWithMultiValuedOrds, null)) + if (propSegmentsWithMultiValuedOrds.TryReadProperty(ref reader, options, PropSegmentsWithMultiValuedOrds, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSegmentsWithSingleValuedOrds.TryReadProperty(ref reader, options, PropSegmentsWithSingleValuedOrds, null)) + if (propSegmentsWithSingleValuedOrds.TryReadProperty(ref reader, options, PropSegmentsWithSingleValuedOrds, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSkippedDueToNoData.TryReadProperty(ref reader, options, PropSkippedDueToNoData, null)) + if (propSkippedDueToNoData.TryReadProperty(ref reader, options, PropSkippedDueToNoData, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStringHashingCollectorsUsed.TryReadProperty(ref reader, options, PropStringHashingCollectorsUsed, null)) + if (propStringHashingCollectorsUsed.TryReadProperty(ref reader, options, PropStringHashingCollectorsUsed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSurvivingBuckets.TryReadProperty(ref reader, options, PropSurvivingBuckets, null)) + if (propSurvivingBuckets.TryReadProperty(ref reader, options, PropSurvivingBuckets, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalBuckets.TryReadProperty(ref reader, options, PropTotalBuckets, null)) + if (propTotalBuckets.TryReadProperty(ref reader, options, PropTotalBuckets, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propValuesFetched.TryReadProperty(ref reader, options, PropValuesFetched, null)) + if (propValuesFetched.TryReadProperty(ref reader, options, PropValuesFetched, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -305,38 +305,38 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebu public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDebug value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBruteForceUsed, value.BruteForceUsed, null, null); - writer.WriteProperty(options, PropBuiltBuckets, value.BuiltBuckets, null, null); - writer.WriteProperty(options, PropCharsFetched, value.CharsFetched, null, null); - writer.WriteProperty(options, PropCollectAnalyzedCount, value.CollectAnalyzedCount, null, null); - writer.WriteProperty(options, PropCollectAnalyzedNs, value.CollectAnalyzedNs, null, null); + writer.WriteProperty(options, PropBruteForceUsed, value.BruteForceUsed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBuiltBuckets, value.BuiltBuckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCharsFetched, value.CharsFetched, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCollectAnalyzedCount, value.CollectAnalyzedCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCollectAnalyzedNs, value.CollectAnalyzedNs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCollectionStrategy, value.CollectionStrategy, null, null); writer.WriteProperty(options, PropDeferredAggregators, value.DeferredAggregators, 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, PropDelegate, value.Delegate, null, null); writer.WriteProperty(options, PropDelegateDebug, value.DelegateDebug, null, null); - writer.WriteProperty(options, PropDynamicPruningAttempted, value.DynamicPruningAttempted, null, null); - writer.WriteProperty(options, PropDynamicPruningUsed, value.DynamicPruningUsed, null, null); - writer.WriteProperty(options, PropEmptyCollectorsUsed, value.EmptyCollectorsUsed, null, null); - writer.WriteProperty(options, PropExtractCount, value.ExtractCount, null, null); - writer.WriteProperty(options, PropExtractNs, value.ExtractNs, null, null); + writer.WriteProperty(options, PropDynamicPruningAttempted, value.DynamicPruningAttempted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamicPruningUsed, value.DynamicPruningUsed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEmptyCollectorsUsed, value.EmptyCollectorsUsed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExtractCount, value.ExtractCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExtractNs, value.ExtractNs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilters, value.Filters, 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, PropHasFilter, value.HasFilter, null, null); + writer.WriteProperty(options, PropHasFilter, value.HasFilter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMapReducer, value.MapReducer, null, null); - writer.WriteProperty(options, PropNumericCollectorsUsed, value.NumericCollectorsUsed, null, null); - writer.WriteProperty(options, PropOrdinalsCollectorsOverheadTooHigh, value.OrdinalsCollectorsOverheadTooHigh, null, null); - writer.WriteProperty(options, PropOrdinalsCollectorsUsed, value.OrdinalsCollectorsUsed, null, null); + writer.WriteProperty(options, PropNumericCollectorsUsed, value.NumericCollectorsUsed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrdinalsCollectorsOverheadTooHigh, value.OrdinalsCollectorsOverheadTooHigh, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrdinalsCollectorsUsed, value.OrdinalsCollectorsUsed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultStrategy, value.ResultStrategy, null, null); - writer.WriteProperty(options, PropSegmentsCollected, value.SegmentsCollected, null, null); - writer.WriteProperty(options, PropSegmentsCounted, value.SegmentsCounted, null, null); - writer.WriteProperty(options, PropSegmentsWithDeletedDocs, value.SegmentsWithDeletedDocs, null, null); - writer.WriteProperty(options, PropSegmentsWithDocCountField, value.SegmentsWithDocCountField, null, null); - writer.WriteProperty(options, PropSegmentsWithMultiValuedOrds, value.SegmentsWithMultiValuedOrds, null, null); - writer.WriteProperty(options, PropSegmentsWithSingleValuedOrds, value.SegmentsWithSingleValuedOrds, null, null); - writer.WriteProperty(options, PropSkippedDueToNoData, value.SkippedDueToNoData, null, null); - writer.WriteProperty(options, PropStringHashingCollectorsUsed, value.StringHashingCollectorsUsed, null, null); - writer.WriteProperty(options, PropSurvivingBuckets, value.SurvivingBuckets, null, null); - writer.WriteProperty(options, PropTotalBuckets, value.TotalBuckets, null, null); - writer.WriteProperty(options, PropValuesFetched, value.ValuesFetched, null, null); + writer.WriteProperty(options, PropSegmentsCollected, value.SegmentsCollected, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSegmentsCounted, value.SegmentsCounted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSegmentsWithDeletedDocs, value.SegmentsWithDeletedDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSegmentsWithDocCountField, value.SegmentsWithDocCountField, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSegmentsWithMultiValuedOrds, value.SegmentsWithMultiValuedOrds, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSegmentsWithSingleValuedOrds, value.SegmentsWithSingleValuedOrds, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSkippedDueToNoData, value.SkippedDueToNoData, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStringHashingCollectorsUsed, value.StringHashingCollectorsUsed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSurvivingBuckets, value.SurvivingBuckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalBuckets, value.TotalBuckets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropValuesFetched, value.ValuesFetched, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDelegateDebugFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDelegateDebugFilter.g.cs index 52d127c45b9..eca4a328f46 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDelegateDebugFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/AggregationProfileDelegateDebugFilter.g.cs @@ -44,12 +44,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.AggregationProfileDele continue; } - if (propResultsFromMetadata.TryReadProperty(ref reader, options, PropResultsFromMetadata, null)) + if (propResultsFromMetadata.TryReadProperty(ref reader, options, PropResultsFromMetadata, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSegmentsCountedInConstantTime.TryReadProperty(ref reader, options, PropSegmentsCountedInConstantTime, null)) + if (propSegmentsCountedInConstantTime.TryReadProperty(ref reader, options, PropSegmentsCountedInConstantTime, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,8 +82,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropQuery, value.Query, null, null); - writer.WriteProperty(options, PropResultsFromMetadata, value.ResultsFromMetadata, null, null); - writer.WriteProperty(options, PropSegmentsCountedInConstantTime, value.SegmentsCountedInConstantTime, null, null); + writer.WriteProperty(options, PropResultsFromMetadata, value.ResultsFromMetadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSegmentsCountedInConstantTime, value.SegmentsCountedInConstantTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSpecializedFor, value.SpecializedFor, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionContext.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionContext.g.cs index 57cb8792277..87660df4b1a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionContext.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionContext.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.CompletionContext Read LocalJsonValue propPrefix = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.CompletionContext Read continue; } - if (propPrefix.TryReadProperty(ref reader, options, PropPrefix, null)) + if (propPrefix.TryReadProperty(ref reader, options, PropPrefix, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,11 +96,11 @@ public override Elastic.Clients.Elasticsearch.Core.Search.CompletionContext Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.CompletionContext value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropContext, value.Context, null, null); writer.WriteProperty(options, PropNeighbours, value.Neighbours, 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, PropPrecision, value.Precision, null, null); - writer.WriteProperty(options, PropPrefix, value.Prefix, null, null); + writer.WriteProperty(options, PropPrefix, value.Prefix, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggestOption.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggestOption.g.cs index 919524e31b5..14b197ee0b1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggestOption.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggestOption.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.CompletionSuggestOptio LocalJsonValue propText = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCollateMatch.TryReadProperty(ref reader, options, PropCollateMatch, null)) + if (propCollateMatch.TryReadProperty(ref reader, options, PropCollateMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,12 +81,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.CompletionSuggestOptio continue; } - if (propScore.TryReadProperty(ref reader, options, PropScore, null)) + if (propScore.TryReadProperty(ref reader, options, PropScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propScore0.TryReadProperty(ref reader, options, PropScore0, null)) + if (propScore0.TryReadProperty(ref reader, options, PropScore0, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,14 +129,14 @@ public override Elastic.Clients.Elasticsearch.Core.Search.CompletionSuggestOptio public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.CompletionSuggestOption value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCollateMatch, value.CollateMatch, null, null); + writer.WriteProperty(options, PropCollateMatch, value.CollateMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropContexts, value.Contexts, 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, PropFields, value.Fields, 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, PropId, value.Id, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropScore, value.Score, null, null); - writer.WriteProperty(options, PropScore0, value.Score0, null, null); + writer.WriteProperty(options, PropScore, value.Score, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropScore0, value.Score0, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); writer.WriteProperty(options, PropText, value.Text, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggester.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggester.g.cs index 93b8de200ca..21a96c90c5d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/CompletionSuggester.g.cs @@ -70,12 +70,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.CompletionSuggester Re continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSkipDuplicates.TryReadProperty(ref reader, options, PropSkipDuplicates, null)) + if (propSkipDuplicates.TryReadProperty(ref reader, options, PropSkipDuplicates, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,8 +110,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFuzzy, value.Fuzzy, null, null); writer.WriteProperty(options, PropRegex, value.Regex, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); - writer.WriteProperty(options, PropSkipDuplicates, value.SkipDuplicates, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSkipDuplicates, value.SkipDuplicates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsKnnProfile.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsKnnProfile.g.cs index 1a20530b998..644ae198695 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsKnnProfile.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DfsKnnProfile.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.DfsKnnProfile Read(ref continue; } - if (propVectorOperationsCount.TryReadProperty(ref reader, options, PropVectorOperationsCount, null)) + if (propVectorOperationsCount.TryReadProperty(ref reader, options, PropVectorOperationsCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCollector, value.Collector, 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, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteProperty(options, PropRewriteTime, value.RewriteTime, null, null); - writer.WriteProperty(options, PropVectorOperationsCount, value.VectorOperationsCount, null, null); + writer.WriteProperty(options, PropVectorOperationsCount, value.VectorOperationsCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DirectGenerator.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DirectGenerator.g.cs index 1ecf5b8fbd4..3802eb2e584 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DirectGenerator.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/DirectGenerator.g.cs @@ -58,27 +58,27 @@ public override Elastic.Clients.Elasticsearch.Core.Search.DirectGenerator Read(r continue; } - if (propMaxEdits.TryReadProperty(ref reader, options, PropMaxEdits, null)) + if (propMaxEdits.TryReadProperty(ref reader, options, PropMaxEdits, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxInspections.TryReadProperty(ref reader, options, PropMaxInspections, null)) + if (propMaxInspections.TryReadProperty(ref reader, options, PropMaxInspections, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxTermFreq.TryReadProperty(ref reader, options, PropMaxTermFreq, null)) + if (propMaxTermFreq.TryReadProperty(ref reader, options, PropMaxTermFreq, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, null)) + if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, null)) + if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,17 +93,17 @@ public override Elastic.Clients.Elasticsearch.Core.Search.DirectGenerator Read(r continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSuggestMode.TryReadProperty(ref reader, options, PropSuggestMode, null)) + if (propSuggestMode.TryReadProperty(ref reader, options, PropSuggestMode, static Elastic.Clients.Elasticsearch.SuggestMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,16 +138,16 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropMaxEdits, value.MaxEdits, null, null); - writer.WriteProperty(options, PropMaxInspections, value.MaxInspections, null, null); - writer.WriteProperty(options, PropMaxTermFreq, value.MaxTermFreq, null, null); - writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, null); - writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, null); + writer.WriteProperty(options, PropMaxEdits, value.MaxEdits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxInspections, value.MaxInspections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxTermFreq, value.MaxTermFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPostFilter, value.PostFilter, null, null); writer.WriteProperty(options, PropPreFilter, value.PreFilter, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); - writer.WriteProperty(options, PropSuggestMode, value.SuggestMode, null, null); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSuggestMode, value.SuggestMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SuggestMode? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileBreakdown.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileBreakdown.g.cs index 428d1e51bea..1261078e7d7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileBreakdown.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileBreakdown.g.cs @@ -47,42 +47,42 @@ public override Elastic.Clients.Elasticsearch.Core.Search.FetchProfileBreakdown LocalJsonValue propProcessCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLoadSource.TryReadProperty(ref reader, options, PropLoadSource, null)) + if (propLoadSource.TryReadProperty(ref reader, options, PropLoadSource, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLoadSourceCount.TryReadProperty(ref reader, options, PropLoadSourceCount, null)) + if (propLoadSourceCount.TryReadProperty(ref reader, options, PropLoadSourceCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLoadStoredFields.TryReadProperty(ref reader, options, PropLoadStoredFields, null)) + if (propLoadStoredFields.TryReadProperty(ref reader, options, PropLoadStoredFields, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLoadStoredFieldsCount.TryReadProperty(ref reader, options, PropLoadStoredFieldsCount, null)) + if (propLoadStoredFieldsCount.TryReadProperty(ref reader, options, PropLoadStoredFieldsCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNextReader.TryReadProperty(ref reader, options, PropNextReader, null)) + if (propNextReader.TryReadProperty(ref reader, options, PropNextReader, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNextReaderCount.TryReadProperty(ref reader, options, PropNextReaderCount, null)) + if (propNextReaderCount.TryReadProperty(ref reader, options, PropNextReaderCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propProcess.TryReadProperty(ref reader, options, PropProcess, null)) + if (propProcess.TryReadProperty(ref reader, options, PropProcess, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propProcessCount.TryReadProperty(ref reader, options, PropProcessCount, null)) + if (propProcessCount.TryReadProperty(ref reader, options, PropProcessCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,14 +113,14 @@ public override Elastic.Clients.Elasticsearch.Core.Search.FetchProfileBreakdown public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.FetchProfileBreakdown value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLoadSource, value.LoadSource, null, null); - writer.WriteProperty(options, PropLoadSourceCount, value.LoadSourceCount, null, null); - writer.WriteProperty(options, PropLoadStoredFields, value.LoadStoredFields, null, null); - writer.WriteProperty(options, PropLoadStoredFieldsCount, value.LoadStoredFieldsCount, null, null); - writer.WriteProperty(options, PropNextReader, value.NextReader, null, null); - writer.WriteProperty(options, PropNextReaderCount, value.NextReaderCount, null, null); - writer.WriteProperty(options, PropProcess, value.Process, null, null); - writer.WriteProperty(options, PropProcessCount, value.ProcessCount, null, null); + writer.WriteProperty(options, PropLoadSource, value.LoadSource, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLoadSourceCount, value.LoadSourceCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLoadStoredFields, value.LoadStoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLoadStoredFieldsCount, value.LoadStoredFieldsCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNextReader, value.NextReader, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNextReaderCount, value.NextReaderCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropProcess, value.Process, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropProcessCount, value.ProcessCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileDebug.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileDebug.g.cs index f0ca1413c2f..77976d0cb75 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileDebug.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FetchProfileDebug.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.FetchProfileDebug Read LocalJsonValue?> propStoredFields = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFastPath.TryReadProperty(ref reader, options, PropFastPath, null)) + if (propFastPath.TryReadProperty(ref reader, options, PropFastPath, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.FetchProfileDebug Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.FetchProfileDebug value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFastPath, value.FastPath, null, null); + writer.WriteProperty(options, PropFastPath, value.FastPath, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FieldCollapse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FieldCollapse.g.cs index 11d522b579f..d77769fa142 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FieldCollapse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/FieldCollapse.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.FieldCollapse Read(ref continue; } - if (propMaxConcurrentGroupSearches.TryReadProperty(ref reader, options, PropMaxConcurrentGroupSearches, null)) + if (propMaxConcurrentGroupSearches.TryReadProperty(ref reader, options, PropMaxConcurrentGroupSearches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCollapse, value.Collapse, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropInnerHits, value.InnerHits, 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, PropMaxConcurrentGroupSearches, value.MaxConcurrentGroupSearches, null, null); + writer.WriteProperty(options, PropMaxConcurrentGroupSearches, value.MaxConcurrentGroupSearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Highlight.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Highlight.g.cs index 65f958e0cf6..79a9c889bfc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Highlight.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Highlight.g.cs @@ -82,12 +82,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Highlight Read(ref Sys continue; } - if (propBoundaryMaxScan.TryReadProperty(ref reader, options, PropBoundaryMaxScan, null)) + if (propBoundaryMaxScan.TryReadProperty(ref reader, options, PropBoundaryMaxScan, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoundaryScanner.TryReadProperty(ref reader, options, PropBoundaryScanner, null)) + if (propBoundaryScanner.TryReadProperty(ref reader, options, PropBoundaryScanner, static Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,7 +97,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Highlight Read(ref Sys continue; } - if (propEncoder.TryReadProperty(ref reader, options, PropEncoder, null)) + if (propEncoder.TryReadProperty(ref reader, options, PropEncoder, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterEncoder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,22 +107,22 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Highlight Read(ref Sys continue; } - if (propForceSource.TryReadProperty(ref reader, options, PropForceSource, null)) + if (propForceSource.TryReadProperty(ref reader, options, PropForceSource, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFragmenter.TryReadProperty(ref reader, options, PropFragmenter, null)) + if (propFragmenter.TryReadProperty(ref reader, options, PropFragmenter, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFragmentSize.TryReadProperty(ref reader, options, PropFragmentSize, null)) + if (propFragmentSize.TryReadProperty(ref reader, options, PropFragmentSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHighlightFilter.TryReadProperty(ref reader, options, PropHighlightFilter, null)) + if (propHighlightFilter.TryReadProperty(ref reader, options, PropHighlightFilter, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,22 +132,22 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Highlight Read(ref Sys continue; } - if (propMaxAnalyzedOffset.TryReadProperty(ref reader, options, PropMaxAnalyzedOffset, null)) + if (propMaxAnalyzedOffset.TryReadProperty(ref reader, options, PropMaxAnalyzedOffset, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxFragmentLength.TryReadProperty(ref reader, options, PropMaxFragmentLength, null)) + if (propMaxFragmentLength.TryReadProperty(ref reader, options, PropMaxFragmentLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNoMatchSize.TryReadProperty(ref reader, options, PropNoMatchSize, null)) + if (propNoMatchSize.TryReadProperty(ref reader, options, PropNoMatchSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumberOfFragments.TryReadProperty(ref reader, options, PropNumberOfFragments, null)) + if (propNumberOfFragments.TryReadProperty(ref reader, options, PropNumberOfFragments, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -157,12 +157,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Highlight Read(ref Sys continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPhraseLimit.TryReadProperty(ref reader, options, PropPhraseLimit, null)) + if (propPhraseLimit.TryReadProperty(ref reader, options, PropPhraseLimit, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -177,17 +177,17 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Highlight Read(ref Sys continue; } - if (propRequireFieldMatch.TryReadProperty(ref reader, options, PropRequireFieldMatch, null)) + if (propRequireFieldMatch.TryReadProperty(ref reader, options, PropRequireFieldMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTagsSchema.TryReadProperty(ref reader, options, PropTagsSchema, null)) + if (propTagsSchema.TryReadProperty(ref reader, options, PropTagsSchema, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -234,28 +234,28 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBoundaryChars, value.BoundaryChars, null, null); - writer.WriteProperty(options, PropBoundaryMaxScan, value.BoundaryMaxScan, null, null); - writer.WriteProperty(options, PropBoundaryScanner, value.BoundaryScanner, null, null); + writer.WriteProperty(options, PropBoundaryMaxScan, value.BoundaryMaxScan, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoundaryScanner, value.BoundaryScanner, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropBoundaryScannerLocale, value.BoundaryScannerLocale, null, null); - writer.WriteProperty(options, PropEncoder, value.Encoder, null, null); + writer.WriteProperty(options, PropEncoder, value.Encoder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterEncoder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, 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, PropForceSource, value.ForceSource, null, null); - writer.WriteProperty(options, PropFragmenter, value.Fragmenter, null, null); - writer.WriteProperty(options, PropFragmentSize, value.FragmentSize, null, null); - writer.WriteProperty(options, PropHighlightFilter, value.HighlightFilter, null, null); + writer.WriteProperty(options, PropForceSource, value.ForceSource, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFragmenter, value.Fragmenter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFragmentSize, value.FragmentSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHighlightFilter, value.HighlightFilter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlightQuery, value.HighlightQuery, null, null); - writer.WriteProperty(options, PropMaxAnalyzedOffset, value.MaxAnalyzedOffset, null, null); - writer.WriteProperty(options, PropMaxFragmentLength, value.MaxFragmentLength, null, null); - writer.WriteProperty(options, PropNoMatchSize, value.NoMatchSize, null, null); - writer.WriteProperty(options, PropNumberOfFragments, value.NumberOfFragments, null, null); + writer.WriteProperty(options, PropMaxAnalyzedOffset, value.MaxAnalyzedOffset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxFragmentLength, value.MaxFragmentLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNoMatchSize, value.NoMatchSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumberOfFragments, value.NumberOfFragments, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOptions, value.Options, 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, PropOrder, value.Order, null, null); - writer.WriteProperty(options, PropPhraseLimit, value.PhraseLimit, null, null); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPhraseLimit, value.PhraseLimit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPostTags, value.PostTags, 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, PropPreTags, value.PreTags, 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, PropRequireFieldMatch, value.RequireFieldMatch, null, null); - writer.WriteProperty(options, PropTagsSchema, value.TagsSchema, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteProperty(options, PropRequireFieldMatch, value.RequireFieldMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTagsSchema, value.TagsSchema, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HighlightField.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HighlightField.g.cs index 146e0da34d3..268edab395e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HighlightField.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HighlightField.g.cs @@ -82,12 +82,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.HighlightField Read(re continue; } - if (propBoundaryMaxScan.TryReadProperty(ref reader, options, PropBoundaryMaxScan, null)) + if (propBoundaryMaxScan.TryReadProperty(ref reader, options, PropBoundaryMaxScan, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoundaryScanner.TryReadProperty(ref reader, options, PropBoundaryScanner, null)) + if (propBoundaryScanner.TryReadProperty(ref reader, options, PropBoundaryScanner, static Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,27 +97,27 @@ public override Elastic.Clients.Elasticsearch.Core.Search.HighlightField Read(re continue; } - if (propForceSource.TryReadProperty(ref reader, options, PropForceSource, null)) + if (propForceSource.TryReadProperty(ref reader, options, PropForceSource, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFragmenter.TryReadProperty(ref reader, options, PropFragmenter, null)) + if (propFragmenter.TryReadProperty(ref reader, options, PropFragmenter, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFragmentOffset.TryReadProperty(ref reader, options, PropFragmentOffset, null)) + if (propFragmentOffset.TryReadProperty(ref reader, options, PropFragmentOffset, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFragmentSize.TryReadProperty(ref reader, options, PropFragmentSize, null)) + if (propFragmentSize.TryReadProperty(ref reader, options, PropFragmentSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHighlightFilter.TryReadProperty(ref reader, options, PropHighlightFilter, null)) + if (propHighlightFilter.TryReadProperty(ref reader, options, PropHighlightFilter, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,22 +132,22 @@ public override Elastic.Clients.Elasticsearch.Core.Search.HighlightField Read(re continue; } - if (propMaxAnalyzedOffset.TryReadProperty(ref reader, options, PropMaxAnalyzedOffset, null)) + if (propMaxAnalyzedOffset.TryReadProperty(ref reader, options, PropMaxAnalyzedOffset, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxFragmentLength.TryReadProperty(ref reader, options, PropMaxFragmentLength, null)) + if (propMaxFragmentLength.TryReadProperty(ref reader, options, PropMaxFragmentLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNoMatchSize.TryReadProperty(ref reader, options, PropNoMatchSize, null)) + if (propNoMatchSize.TryReadProperty(ref reader, options, PropNoMatchSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumberOfFragments.TryReadProperty(ref reader, options, PropNumberOfFragments, null)) + if (propNumberOfFragments.TryReadProperty(ref reader, options, PropNumberOfFragments, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -157,12 +157,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.HighlightField Read(re continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPhraseLimit.TryReadProperty(ref reader, options, PropPhraseLimit, null)) + if (propPhraseLimit.TryReadProperty(ref reader, options, PropPhraseLimit, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -177,17 +177,17 @@ public override Elastic.Clients.Elasticsearch.Core.Search.HighlightField Read(re continue; } - if (propRequireFieldMatch.TryReadProperty(ref reader, options, PropRequireFieldMatch, null)) + if (propRequireFieldMatch.TryReadProperty(ref reader, options, PropRequireFieldMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTagsSchema.TryReadProperty(ref reader, options, PropTagsSchema, null)) + if (propTagsSchema.TryReadProperty(ref reader, options, PropTagsSchema, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -234,28 +234,28 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBoundaryChars, value.BoundaryChars, null, null); - writer.WriteProperty(options, PropBoundaryMaxScan, value.BoundaryMaxScan, null, null); - writer.WriteProperty(options, PropBoundaryScanner, value.BoundaryScanner, null, null); + writer.WriteProperty(options, PropBoundaryMaxScan, value.BoundaryMaxScan, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoundaryScanner, value.BoundaryScanner, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.BoundaryScanner? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropBoundaryScannerLocale, value.BoundaryScannerLocale, null, null); - writer.WriteProperty(options, PropForceSource, value.ForceSource, null, null); - writer.WriteProperty(options, PropFragmenter, value.Fragmenter, null, null); - writer.WriteProperty(options, PropFragmentOffset, value.FragmentOffset, null, null); - writer.WriteProperty(options, PropFragmentSize, value.FragmentSize, null, null); - writer.WriteProperty(options, PropHighlightFilter, value.HighlightFilter, null, null); + writer.WriteProperty(options, PropForceSource, value.ForceSource, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFragmenter, value.Fragmenter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterFragmenter? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFragmentOffset, value.FragmentOffset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFragmentSize, value.FragmentSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHighlightFilter, value.HighlightFilter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlightQuery, value.HighlightQuery, null, null); writer.WriteProperty(options, PropMatchedFields, value.MatchedFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropMaxAnalyzedOffset, value.MaxAnalyzedOffset, null, null); - writer.WriteProperty(options, PropMaxFragmentLength, value.MaxFragmentLength, null, null); - writer.WriteProperty(options, PropNoMatchSize, value.NoMatchSize, null, null); - writer.WriteProperty(options, PropNumberOfFragments, value.NumberOfFragments, null, null); + writer.WriteProperty(options, PropMaxAnalyzedOffset, value.MaxAnalyzedOffset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxFragmentLength, value.MaxFragmentLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNoMatchSize, value.NoMatchSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumberOfFragments, value.NumberOfFragments, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOptions, value.Options, 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, PropOrder, value.Order, null, null); - writer.WriteProperty(options, PropPhraseLimit, value.PhraseLimit, null, null); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPhraseLimit, value.PhraseLimit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPostTags, value.PostTags, 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, PropPreTags, value.PreTags, 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, PropRequireFieldMatch, value.RequireFieldMatch, null, null); - writer.WriteProperty(options, PropTagsSchema, value.TagsSchema, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteProperty(options, PropRequireFieldMatch, value.RequireFieldMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTagsSchema, value.TagsSchema, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterTagsSchema? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.HighlighterType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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..9f8bbd7725a 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; } @@ -126,12 +126,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Hit Read(re continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRank.TryReadProperty(ref reader, options, PropRank, null)) + if (propRank.TryReadProperty(ref reader, options, PropRank, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,12 +141,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Hit Read(re continue; } - if (propScore.TryReadProperty(ref reader, options, PropScore, null)) + if (propScore.TryReadProperty(ref reader, options, PropScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -166,7 +166,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Hit Read(re continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -214,21 +214,21 @@ 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))); writer.WriteProperty(options, PropNested, value.Nested, null, null); writer.WriteProperty(options, PropNode, value.Node, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); - writer.WriteProperty(options, PropRank, value.Rank, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRank, value.Rank, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropScore, value.Score, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropScore, value.Score, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShard, value.Shard, null, null); writer.WriteProperty(options, PropSort, value.Sort, 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, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TDocument? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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/Core/Search/HitsMetadata.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HitsMetadata.g.cs index 15639f6112e..6db06ee6454 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HitsMetadata.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/HitsMetadata.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.HitsMetadata Read(r continue; } - if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, null)) + if (propMaxScore.TryReadProperty(ref reader, options, PropMaxScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropHits, value.Hits, 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, PropMaxScore, value.MaxScore, null, null); + writer.WriteProperty(options, PropMaxScore, value.MaxScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotal, value.Total, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/InnerHits.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/InnerHits.g.cs index 23b13466d91..c56272996a2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/InnerHits.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/InnerHits.g.cs @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.InnerHits Read(ref Sys continue; } - if (propExplain.TryReadProperty(ref reader, options, PropExplain, null)) + if (propExplain.TryReadProperty(ref reader, options, PropExplain, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.InnerHits Read(ref Sys continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.InnerHits Read(ref Sys continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,12 +108,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.InnerHits Read(ref Sys continue; } - if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, null)) + if (propSeqNoPrimaryTerm.TryReadProperty(ref reader, options, PropSeqNoPrimaryTerm, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -133,12 +133,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.InnerHits Read(ref Sys continue; } - if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, null)) + if (propTrackScores.TryReadProperty(ref reader, options, PropTrackScores, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -179,20 +179,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCollapse, value.Collapse, null, null); writer.WriteProperty(options, PropDocvalueFields, value.DocvalueFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); - writer.WriteProperty(options, PropExplain, value.Explain, null, null); + writer.WriteProperty(options, PropExplain, value.Explain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlight, value.Highlight, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropName, value.Name, 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, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSeqNoPrimaryTerm, value.SeqNoPrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropStoredFields, value.StoredFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropTrackScores, value.TrackScores, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestCollate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestCollate.g.cs index 685075eafef..974120d40aa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestCollate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestCollate.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestCollate R continue; } - if (propPrune.TryReadProperty(ref reader, options, PropPrune, null)) + if (propPrune.TryReadProperty(ref reader, options, PropPrune, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropParams, value.Params, 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, PropPrune, value.Prune, null, null); + writer.WriteProperty(options, PropPrune, value.Prune, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestOption.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestOption.g.cs index 52767abe1c6..dec291b86e1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestOption.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggestOption.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestOption Re LocalJsonValue propText = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCollateMatch.TryReadProperty(ref reader, options, PropCollateMatch, null)) + if (propCollateMatch.TryReadProperty(ref reader, options, PropCollateMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestOption Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggestOption value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCollateMatch, value.CollateMatch, null, null); + writer.WriteProperty(options, PropCollateMatch, value.CollateMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlighted, value.Highlighted, null, null); writer.WriteProperty(options, PropScore, value.Score, null, null); writer.WriteProperty(options, PropText, value.Text, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggester.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggester.g.cs index f67cd0fc8ff..622ac34e5b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/PhraseSuggester.g.cs @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggester Read(r continue; } - if (propConfidence.TryReadProperty(ref reader, options, PropConfidence, null)) + if (propConfidence.TryReadProperty(ref reader, options, PropConfidence, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,12 +88,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggester Read(r continue; } - if (propForceUnigrams.TryReadProperty(ref reader, options, PropForceUnigrams, null)) + if (propForceUnigrams.TryReadProperty(ref reader, options, PropForceUnigrams, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGramSize.TryReadProperty(ref reader, options, PropGramSize, null)) + if (propGramSize.TryReadProperty(ref reader, options, PropGramSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,12 +103,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggester Read(r continue; } - if (propMaxErrors.TryReadProperty(ref reader, options, PropMaxErrors, null)) + if (propMaxErrors.TryReadProperty(ref reader, options, PropMaxErrors, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRealWordErrorLikelihood.TryReadProperty(ref reader, options, PropRealWordErrorLikelihood, null)) + if (propRealWordErrorLikelihood.TryReadProperty(ref reader, options, PropRealWordErrorLikelihood, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggester Read(r continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,7 +138,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.PhraseSuggester Read(r continue; } - if (propTokenLimit.TryReadProperty(ref reader, options, PropTokenLimit, null)) + if (propTokenLimit.TryReadProperty(ref reader, options, PropTokenLimit, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -179,20 +179,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); writer.WriteProperty(options, PropCollate, value.Collate, null, null); - writer.WriteProperty(options, PropConfidence, value.Confidence, null, null); + writer.WriteProperty(options, PropConfidence, value.Confidence, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDirectGenerator, value.DirectGenerator, 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, PropField, value.Field, null, null); - writer.WriteProperty(options, PropForceUnigrams, value.ForceUnigrams, null, null); - writer.WriteProperty(options, PropGramSize, value.GramSize, null, null); + writer.WriteProperty(options, PropForceUnigrams, value.ForceUnigrams, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGramSize, value.GramSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHighlight, value.Highlight, null, null); - writer.WriteProperty(options, PropMaxErrors, value.MaxErrors, null, null); - writer.WriteProperty(options, PropRealWordErrorLikelihood, value.RealWordErrorLikelihood, null, null); + writer.WriteProperty(options, PropMaxErrors, value.MaxErrors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRealWordErrorLikelihood, value.RealWordErrorLikelihood, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSeparator, value.Separator, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSmoothing, value.Smoothing, null, null); writer.WriteProperty(options, PropText, value.Text, null, null); - writer.WriteProperty(options, PropTokenLimit, value.TokenLimit, null, null); + writer.WriteProperty(options, PropTokenLimit, value.TokenLimit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RegexOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RegexOptions.g.cs index 5682afa54e0..c292e65c5c6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RegexOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RegexOptions.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.RegexOptions Read(ref continue; } - if (propMaxDeterminizedStates.TryReadProperty(ref reader, options, PropMaxDeterminizedStates, null)) + if (propMaxDeterminizedStates.TryReadProperty(ref reader, options, PropMaxDeterminizedStates, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFlags, value.Flags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); - writer.WriteProperty(options, PropMaxDeterminizedStates, value.MaxDeterminizedStates, null, null); + writer.WriteProperty(options, PropMaxDeterminizedStates, value.MaxDeterminizedStates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.g.cs index b67e0ed8476..3ab7af2a240 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Rescore.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Rescore Read(ref Syste object? variant = null; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propWindowSize.TryReadProperty(ref reader, options, PropWindowSize, null)) + if (propWindowSize.TryReadProperty(ref reader, options, PropWindowSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.Core.Search.Rescore)}'."); } - writer.WriteProperty(options, PropWindowSize, value.WindowSize, null, null); + writer.WriteProperty(options, PropWindowSize, value.WindowSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RescoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RescoreQuery.g.cs index 1da332daa21..85f238a1a17 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RescoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/RescoreQuery.g.cs @@ -44,17 +44,17 @@ public override Elastic.Clients.Elasticsearch.Core.Search.RescoreQuery Read(ref continue; } - if (propQueryWeight.TryReadProperty(ref reader, options, PropQueryWeight, null)) + if (propQueryWeight.TryReadProperty(ref reader, options, PropQueryWeight, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRescoreQueryWeight.TryReadProperty(ref reader, options, PropRescoreQueryWeight, null)) + if (propRescoreQueryWeight.TryReadProperty(ref reader, options, PropRescoreQueryWeight, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, null)) + if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, static Elastic.Clients.Elasticsearch.Core.Search.ScoreMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropQuery, value.Query, null, null); - writer.WriteProperty(options, PropQueryWeight, value.QueryWeight, null, null); - writer.WriteProperty(options, PropRescoreQueryWeight, value.RescoreQueryWeight, null, null); - writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, null); + writer.WriteProperty(options, PropQueryWeight, value.QueryWeight, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRescoreQueryWeight, value.RescoreQueryWeight, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.ScoreMode? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SourceFilter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SourceFilter.g.cs index e43b7c8177f..c613c9e4a12 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SourceFilter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SourceFilter.g.cs @@ -27,6 +27,7 @@ internal sealed partial class SourceFilterConverter : System.Text.Json.Serializa { private static readonly System.Text.Json.JsonEncodedText PropExcludes = System.Text.Json.JsonEncodedText.Encode("excludes"); private static readonly System.Text.Json.JsonEncodedText PropExcludes1 = System.Text.Json.JsonEncodedText.Encode("exclude"); + private static readonly System.Text.Json.JsonEncodedText PropExcludeVectors = System.Text.Json.JsonEncodedText.Encode("exclude_vectors"); private static readonly System.Text.Json.JsonEncodedText PropIncludes = System.Text.Json.JsonEncodedText.Encode("includes"); private static readonly System.Text.Json.JsonEncodedText PropIncludes1 = System.Text.Json.JsonEncodedText.Encode("include"); @@ -43,6 +44,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.SourceFilter Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propExcludes = default; + LocalJsonValue propExcludeVectors = default; LocalJsonValue propIncludes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { @@ -51,6 +53,11 @@ public override Elastic.Clients.Elasticsearch.Core.Search.SourceFilter Read(ref continue; } + if (propExcludeVectors.TryReadProperty(ref reader, options, PropExcludeVectors, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + if (propIncludes.TryReadProperty(ref reader, options, PropIncludes, static Elastic.Clients.Elasticsearch.Fields? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))) || propIncludes.TryReadProperty(ref reader, options, PropIncludes1, static Elastic.Clients.Elasticsearch.Fields? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker)))) { continue; @@ -69,6 +76,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.SourceFilter Read(ref return new Elastic.Clients.Elasticsearch.Core.Search.SourceFilter(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { Excludes = propExcludes.Value, + ExcludeVectors = propExcludeVectors.Value, Includes = propIncludes.Value }; } @@ -77,6 +85,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropExcludes, value.Excludes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); + writer.WriteProperty(options, PropExcludeVectors, value.ExcludeVectors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIncludes, value.Includes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteEndObject(); } @@ -101,7 +110,29 @@ internal SourceFilter(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo _ = sentinel; } + /// + /// + /// A list of fields to exclude from the returned source. + /// + /// public Elastic.Clients.Elasticsearch.Fields? Excludes { get; set; } + + /// + /// + /// If true, vector fields are excluded from the returned source. + /// + /// + /// This option takes precedence over includes: any vector field will + /// remain excluded even if it matches an includes rule. + /// + /// + public bool? ExcludeVectors { get; set; } + + /// + /// + /// A list of fields to include in the returned source. + /// + /// public Elastic.Clients.Elasticsearch.Fields? Includes { get; set; } } @@ -124,24 +155,59 @@ public SourceFilterDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor(Elastic.Clients.Elasticsearch.Core.Search.SourceFilter instance) => new Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Core.Search.SourceFilter(Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor descriptor) => descriptor.Instance; + /// + /// + /// A list of fields to exclude from the returned source. + /// + /// public Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor Excludes(Elastic.Clients.Elasticsearch.Fields? value) { Instance.Excludes = value; return this; } + /// + /// + /// A list of fields to exclude from the returned source. + /// + /// public Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor Excludes(params System.Linq.Expressions.Expression>[] value) { Instance.Excludes = value; return this; } + /// + /// + /// If true, vector fields are excluded from the returned source. + /// + /// + /// This option takes precedence over includes: any vector field will + /// remain excluded even if it matches an includes rule. + /// + /// + public Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor ExcludeVectors(bool? value = true) + { + Instance.ExcludeVectors = value; + return this; + } + + /// + /// + /// A list of fields to include in the returned source. + /// + /// public Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor Includes(Elastic.Clients.Elasticsearch.Fields? value) { Instance.Includes = value; return this; } + /// + /// + /// A list of fields to include in the returned source. + /// + /// public Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor Includes(params System.Linq.Expressions.Expression>[] value) { Instance.Includes = value; @@ -181,24 +247,59 @@ public SourceFilterDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor(Elastic.Clients.Elasticsearch.Core.Search.SourceFilter instance) => new Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.Core.Search.SourceFilter(Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor descriptor) => descriptor.Instance; + /// + /// + /// A list of fields to exclude from the returned source. + /// + /// public Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor Excludes(Elastic.Clients.Elasticsearch.Fields? value) { Instance.Excludes = value; return this; } + /// + /// + /// A list of fields to exclude from the returned source. + /// + /// public Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor Excludes(params System.Linq.Expressions.Expression>[] value) { Instance.Excludes = value; return this; } + /// + /// + /// If true, vector fields are excluded from the returned source. + /// + /// + /// This option takes precedence over includes: any vector field will + /// remain excluded even if it matches an includes rule. + /// + /// + public Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor ExcludeVectors(bool? value = true) + { + Instance.ExcludeVectors = value; + return this; + } + + /// + /// + /// A list of fields to include in the returned source. + /// + /// public Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor Includes(Elastic.Clients.Elasticsearch.Fields? value) { Instance.Includes = value; return this; } + /// + /// + /// A list of fields to include in the returned source. + /// + /// public Elastic.Clients.Elasticsearch.Core.Search.SourceFilterDescriptor Includes(params System.Linq.Expressions.Expression>[] value) { Instance.Includes = value; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestDictionary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestDictionary.g.cs index bc6d63fe3c0..9f16ebc1a15 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestDictionary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestDictionary.g.cs @@ -52,7 +52,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien internal static void ReadItem(ref System.Text.Json.Utf8JsonReader reader, System.Text.Json.JsonSerializerOptions options, out string name, out System.Collections.Generic.IReadOnlyCollection value) { - var key = reader.ReadPropertyName(options, null); + var key = reader.ReadPropertyName(options, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); reader.Read(); var parts = key.Split('#'); if (parts.Length != 2) @@ -77,13 +77,13 @@ internal static void WriteItem(System.Text.Json.Utf8JsonWriter writer, System.Te switch (value) { case System.Collections.Generic.IReadOnlyCollection> v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection> v) => w.WritePropertyName>>(o, v)); break; case System.Collections.Generic.IReadOnlyCollection v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WritePropertyName>(o, v)); break; case System.Collections.Generic.IReadOnlyCollection v: - writer.WriteProperty(options, key, v, null, null); + writer.WriteProperty(options, key, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WritePropertyName>(o, v)); break; default: throw new System.Text.Json.JsonException($"Variant '{0}' is not supported for type '{nameof(System.Collections.Generic.IReadOnlyCollection)}'."); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestFuzziness.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestFuzziness.g.cs index 3f968bc64f5..fab2e1d0a40 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestFuzziness.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/SuggestFuzziness.g.cs @@ -46,22 +46,22 @@ public override Elastic.Clients.Elasticsearch.Core.Search.SuggestFuzziness Read( continue; } - if (propMinLength.TryReadProperty(ref reader, options, PropMinLength, null)) + if (propMinLength.TryReadProperty(ref reader, options, PropMinLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTranspositions.TryReadProperty(ref reader, options, PropTranspositions, null)) + if (propTranspositions.TryReadProperty(ref reader, options, PropTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUnicodeAware.TryReadProperty(ref reader, options, PropUnicodeAware, null)) + if (propUnicodeAware.TryReadProperty(ref reader, options, PropUnicodeAware, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,10 +90,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFuzziness, value.Fuzziness, null, null); - writer.WriteProperty(options, PropMinLength, value.MinLength, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); - writer.WriteProperty(options, PropTranspositions, value.Transpositions, null, null); - writer.WriteProperty(options, PropUnicodeAware, value.UnicodeAware, null, null); + writer.WriteProperty(options, PropMinLength, value.MinLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTranspositions, value.Transpositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUnicodeAware, value.UnicodeAware, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Suggester.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Suggester.g.cs index 1fd549dc6d2..e37fe4bed6a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Suggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/Suggester.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.Suggester Read(ref Sys } propSuggesters ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out Elastic.Clients.Elasticsearch.Core.Search.FieldSuggester value, null, null); + reader.ReadProperty(options, out string key, out Elastic.Clients.Elasticsearch.Core.Search.FieldSuggester value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static Elastic.Clients.Elasticsearch.Core.Search.FieldSuggester (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propSuggesters[key] = value; } @@ -60,7 +60,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.Suggesters) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggestOption.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggestOption.g.cs index 98576c01ebf..50d5bf7c1e5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggestOption.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggestOption.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.TermSuggestOption Read LocalJsonValue propText = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCollateMatch.TryReadProperty(ref reader, options, PropCollateMatch, null)) + if (propCollateMatch.TryReadProperty(ref reader, options, PropCollateMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Core.Search.TermSuggestOption Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.Search.TermSuggestOption value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCollateMatch, value.CollateMatch, null, null); + writer.WriteProperty(options, PropCollateMatch, value.CollateMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFreq, value.Freq, null, null); writer.WriteProperty(options, PropHighlighted, value.Highlighted, null, null); writer.WriteProperty(options, PropScore, value.Score, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggester.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggester.g.cs index 528ae5245bf..28a9ea1e572 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggester.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/Search/TermSuggester.g.cs @@ -71,62 +71,62 @@ public override Elastic.Clients.Elasticsearch.Core.Search.TermSuggester Read(ref continue; } - if (propLowercaseTerms.TryReadProperty(ref reader, options, PropLowercaseTerms, null)) + if (propLowercaseTerms.TryReadProperty(ref reader, options, PropLowercaseTerms, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxEdits.TryReadProperty(ref reader, options, PropMaxEdits, null)) + if (propMaxEdits.TryReadProperty(ref reader, options, PropMaxEdits, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxInspections.TryReadProperty(ref reader, options, PropMaxInspections, null)) + if (propMaxInspections.TryReadProperty(ref reader, options, PropMaxInspections, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxTermFreq.TryReadProperty(ref reader, options, PropMaxTermFreq, null)) + if (propMaxTermFreq.TryReadProperty(ref reader, options, PropMaxTermFreq, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, null)) + if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, null)) + if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, null)) + if (propShardSize.TryReadProperty(ref reader, options, PropShardSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSort.TryReadProperty(ref reader, options, PropSort, null)) + if (propSort.TryReadProperty(ref reader, options, PropSort, static Elastic.Clients.Elasticsearch.Core.Search.SuggestSort? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStringDistance.TryReadProperty(ref reader, options, PropStringDistance, null)) + if (propStringDistance.TryReadProperty(ref reader, options, PropStringDistance, static Elastic.Clients.Elasticsearch.Core.Search.StringDistance? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSuggestMode.TryReadProperty(ref reader, options, PropSuggestMode, null)) + if (propSuggestMode.TryReadProperty(ref reader, options, PropSuggestMode, static Elastic.Clients.Elasticsearch.SuggestMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -171,18 +171,18 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropLowercaseTerms, value.LowercaseTerms, null, null); - writer.WriteProperty(options, PropMaxEdits, value.MaxEdits, null, null); - writer.WriteProperty(options, PropMaxInspections, value.MaxInspections, null, null); - writer.WriteProperty(options, PropMaxTermFreq, value.MaxTermFreq, null, null); - writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, null); - writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); - writer.WriteProperty(options, PropShardSize, value.ShardSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); - writer.WriteProperty(options, PropSort, value.Sort, null, null); - writer.WriteProperty(options, PropStringDistance, value.StringDistance, null, null); - writer.WriteProperty(options, PropSuggestMode, value.SuggestMode, null, null); + writer.WriteProperty(options, PropLowercaseTerms, value.LowercaseTerms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxEdits, value.MaxEdits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxInspections, value.MaxInspections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxTermFreq, value.MaxTermFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardSize, value.ShardSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSort, value.Sort, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.SuggestSort? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStringDistance, value.StringDistance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Core.Search.StringDistance? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSuggestMode, value.SuggestMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SuggestMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropText, value.Text, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Filter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Filter.g.cs index 695aaf1bda5..21209034a96 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Filter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Filter.g.cs @@ -45,37 +45,37 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Filter Read(ref S LocalJsonValue propMinWordLength = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxDocFreq.TryReadProperty(ref reader, options, PropMaxDocFreq, null)) + if (propMaxDocFreq.TryReadProperty(ref reader, options, PropMaxDocFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxNumTerms.TryReadProperty(ref reader, options, PropMaxNumTerms, null)) + if (propMaxNumTerms.TryReadProperty(ref reader, options, PropMaxNumTerms, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxTermFreq.TryReadProperty(ref reader, options, PropMaxTermFreq, null)) + if (propMaxTermFreq.TryReadProperty(ref reader, options, PropMaxTermFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxWordLength.TryReadProperty(ref reader, options, PropMaxWordLength, null)) + if (propMaxWordLength.TryReadProperty(ref reader, options, PropMaxWordLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, null)) + if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinTermFreq.TryReadProperty(ref reader, options, PropMinTermFreq, null)) + if (propMinTermFreq.TryReadProperty(ref reader, options, PropMinTermFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, null)) + if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,13 +105,13 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Filter Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.TermVectors.Filter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxDocFreq, value.MaxDocFreq, null, null); - writer.WriteProperty(options, PropMaxNumTerms, value.MaxNumTerms, null, null); - writer.WriteProperty(options, PropMaxTermFreq, value.MaxTermFreq, null, null); - writer.WriteProperty(options, PropMaxWordLength, value.MaxWordLength, null, null); - writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, null); - writer.WriteProperty(options, PropMinTermFreq, value.MinTermFreq, null, null); - writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, null); + writer.WriteProperty(options, PropMaxDocFreq, value.MaxDocFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxNumTerms, value.MaxNumTerms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxTermFreq, value.MaxTermFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxWordLength, value.MaxWordLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinTermFreq, value.MinTermFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Term.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Term.g.cs index 4be99560451..46de34dbc32 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Term.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Term.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Term Read(ref Sys LocalJsonValue propTtf = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDocFreq.TryReadProperty(ref reader, options, PropDocFreq, null)) + if (propDocFreq.TryReadProperty(ref reader, options, PropDocFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propScore.TryReadProperty(ref reader, options, PropScore, null)) + if (propScore.TryReadProperty(ref reader, options, PropScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Term Read(ref Sys continue; } - if (propTtf.TryReadProperty(ref reader, options, PropTtf, null)) + if (propTtf.TryReadProperty(ref reader, options, PropTtf, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Term Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.TermVectors.Term value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDocFreq, value.DocFreq, null, null); - writer.WriteProperty(options, PropScore, value.Score, null, null); + writer.WriteProperty(options, PropDocFreq, value.DocFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropScore, value.Score, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTermFreq, value.TermFreq, null, null); writer.WriteProperty(options, PropTokens, value.Tokens, 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, PropTtf, value.Ttf, null, null); + writer.WriteProperty(options, PropTtf, value.Ttf, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Token.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Token.g.cs index 35928f47050..a66f833eb4a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Token.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Core/TermVectors/Token.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Token Read(ref Sy LocalJsonValue propStartOffset = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEndOffset.TryReadProperty(ref reader, options, PropEndOffset, null)) + if (propEndOffset.TryReadProperty(ref reader, options, PropEndOffset, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Token Read(ref Sy continue; } - if (propStartOffset.TryReadProperty(ref reader, options, PropStartOffset, null)) + if (propStartOffset.TryReadProperty(ref reader, options, PropStartOffset, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.Core.TermVectors.Token Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Core.TermVectors.Token value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEndOffset, value.EndOffset, null, null); + writer.WriteProperty(options, PropEndOffset, value.EndOffset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPayload, value.Payload, null, null); writer.WriteProperty(options, PropPosition, value.Position, null, null); - writer.WriteProperty(options, PropStartOffset, value.StartOffset, null, null); + writer.WriteProperty(options, PropStartOffset, value.StartOffset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/CrossClusterReplication/FollowerIndexParameters.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/CrossClusterReplication/FollowerIndexParameters.g.cs index e4ffa1efab7..2f5900256cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/CrossClusterReplication/FollowerIndexParameters.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/CrossClusterReplication/FollowerIndexParameters.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowerIn LocalJsonValue propReadPollTimeout = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, null)) + if (propMaxOutstandingReadRequests.TryReadProperty(ref reader, options, PropMaxOutstandingReadRequests, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, null)) + if (propMaxOutstandingWriteRequests.TryReadProperty(ref reader, options, PropMaxOutstandingWriteRequests, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, null)) + if (propMaxReadRequestOperationCount.TryReadProperty(ref reader, options, PropMaxReadRequestOperationCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowerIn continue; } - if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, null)) + if (propMaxWriteBufferCount.TryReadProperty(ref reader, options, PropMaxWriteBufferCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowerIn continue; } - if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, null)) + if (propMaxWriteRequestOperationCount.TryReadProperty(ref reader, options, PropMaxWriteRequestOperationCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,14 +129,14 @@ public override Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowerIn public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.CrossClusterReplication.FollowerIndexParameters value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, null); - writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, null); - writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxOutstandingReadRequests, value.MaxOutstandingReadRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxOutstandingWriteRequests, value.MaxOutstandingWriteRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxReadRequestOperationCount, value.MaxReadRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxReadRequestSize, value.MaxReadRequestSize, null, null); writer.WriteProperty(options, PropMaxRetryDelay, value.MaxRetryDelay, null, null); - writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, null); + writer.WriteProperty(options, PropMaxWriteBufferCount, value.MaxWriteBufferCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteBufferSize, value.MaxWriteBufferSize, null, null); - writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, null); + writer.WriteProperty(options, PropMaxWriteRequestOperationCount, value.MaxWriteRequestOperationCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxWriteRequestSize, value.MaxWriteRequestSize, null, null); writer.WriteProperty(options, PropReadPollTimeout, value.ReadPollTimeout, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocStats.g.cs index 69757020c5d..d8e4c8b14ff 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/DocStats.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.DocStats Read(ref System.Text.Json continue; } - if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, null)) + if (propDeleted.TryReadProperty(ref reader, options, PropDeleted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropDeleted, value.Deleted, null, null); + writer.WriteProperty(options, PropDeleted, value.Deleted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Inference.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Inference.g.cs index 9962b1d2183..d5009b17eee 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Inference.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.Inference.g.cs @@ -665,11 +665,23 @@ public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, internal sealed partial class GoogleVertexAITaskTypeConverter : System.Text.Json.Serialization.JsonConverter { + private static readonly System.Text.Json.JsonEncodedText MemberChatCompletion = System.Text.Json.JsonEncodedText.Encode("chat_completion"); + private static readonly System.Text.Json.JsonEncodedText MemberCompletion = System.Text.Json.JsonEncodedText.Encode("completion"); private static readonly System.Text.Json.JsonEncodedText MemberRerank = System.Text.Json.JsonEncodedText.Encode("rerank"); private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); public override Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskType Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { + if (reader.ValueTextEquals(MemberChatCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskType.ChatCompletion; + } + + if (reader.ValueTextEquals(MemberCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskType.Completion; + } + if (reader.ValueTextEquals(MemberRerank)) { return Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskType.Rerank; @@ -681,6 +693,16 @@ public override Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskType R } var value = reader.GetString()!; + if (string.Equals(value, MemberChatCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskType.ChatCompletion; + } + + if (string.Equals(value, MemberCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskType.Completion; + } + if (string.Equals(value, MemberRerank.Value, System.StringComparison.OrdinalIgnoreCase)) { return Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskType.Rerank; @@ -698,6 +720,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { switch (value) { + case Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskType.ChatCompletion: + writer.WriteStringValue(MemberChatCompletion); + break; + case Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskType.Completion: + writer.WriteStringValue(MemberCompletion); + break; case Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskType.Rerank: writer.WriteStringValue(MemberRerank); break; @@ -722,16 +750,49 @@ public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, internal sealed partial class HuggingFaceTaskTypeConverter : System.Text.Json.Serialization.JsonConverter { + private static readonly System.Text.Json.JsonEncodedText MemberChatCompletion = System.Text.Json.JsonEncodedText.Encode("chat_completion"); + private static readonly System.Text.Json.JsonEncodedText MemberCompletion = System.Text.Json.JsonEncodedText.Encode("completion"); + private static readonly System.Text.Json.JsonEncodedText MemberRerank = System.Text.Json.JsonEncodedText.Encode("rerank"); private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); public override Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskType Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { + if (reader.ValueTextEquals(MemberChatCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskType.ChatCompletion; + } + + if (reader.ValueTextEquals(MemberCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskType.Completion; + } + + if (reader.ValueTextEquals(MemberRerank)) + { + return Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskType.Rerank; + } + if (reader.ValueTextEquals(MemberTextEmbedding)) { return Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskType.TextEmbedding; } var value = reader.GetString()!; + if (string.Equals(value, MemberChatCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskType.ChatCompletion; + } + + if (string.Equals(value, MemberCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskType.Completion; + } + + if (string.Equals(value, MemberRerank.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskType.Rerank; + } + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) { return Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskType.TextEmbedding; @@ -744,6 +805,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { switch (value) { + case Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskType.ChatCompletion: + writer.WriteStringValue(MemberChatCompletion); + break; + case Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskType.Completion: + writer.WriteStringValue(MemberCompletion); + break; + case Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskType.Rerank: + writer.WriteStringValue(MemberRerank); + break; case Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskType.TextEmbedding: writer.WriteStringValue(MemberTextEmbedding); break; @@ -822,16 +892,38 @@ public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, internal sealed partial class MistralTaskTypeConverter : System.Text.Json.Serialization.JsonConverter { + private static readonly System.Text.Json.JsonEncodedText MemberChatCompletion = System.Text.Json.JsonEncodedText.Encode("chat_completion"); + private static readonly System.Text.Json.JsonEncodedText MemberCompletion = System.Text.Json.JsonEncodedText.Encode("completion"); private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); public override Elastic.Clients.Elasticsearch.Inference.MistralTaskType Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { + if (reader.ValueTextEquals(MemberChatCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.MistralTaskType.ChatCompletion; + } + + if (reader.ValueTextEquals(MemberCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.MistralTaskType.Completion; + } + if (reader.ValueTextEquals(MemberTextEmbedding)) { return Elastic.Clients.Elasticsearch.Inference.MistralTaskType.TextEmbedding; } var value = reader.GetString()!; + if (string.Equals(value, MemberChatCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.MistralTaskType.ChatCompletion; + } + + if (string.Equals(value, MemberCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.MistralTaskType.Completion; + } + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) { return Elastic.Clients.Elasticsearch.Inference.MistralTaskType.TextEmbedding; @@ -844,6 +936,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { switch (value) { + case Elastic.Clients.Elasticsearch.Inference.MistralTaskType.ChatCompletion: + writer.WriteStringValue(MemberChatCompletion); + break; + case Elastic.Clients.Elasticsearch.Inference.MistralTaskType.Completion: + writer.WriteStringValue(MemberCompletion); + break; case Elastic.Clients.Elasticsearch.Inference.MistralTaskType.TextEmbedding: writer.WriteStringValue(MemberTextEmbedding); break; @@ -1034,6 +1132,91 @@ public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, } } +internal sealed partial class TaskTypeAlibabaCloudAIConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberCompletion = System.Text.Json.JsonEncodedText.Encode("completion"); + private static readonly System.Text.Json.JsonEncodedText MemberRerank = System.Text.Json.JsonEncodedText.Encode("rerank"); + private static readonly System.Text.Json.JsonEncodedText MemberSparseEmbedding = System.Text.Json.JsonEncodedText.Encode("sparse_embedding"); + private static readonly System.Text.Json.JsonEncodedText MemberTextEmbedding = System.Text.Json.JsonEncodedText.Encode("text_embedding"); + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberCompletion)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI.Completion; + } + + if (reader.ValueTextEquals(MemberRerank)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI.Rerank; + } + + if (reader.ValueTextEquals(MemberSparseEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI.SparseEmbedding; + } + + if (reader.ValueTextEquals(MemberTextEmbedding)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI.TextEmbedding; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberCompletion.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI.Completion; + } + + if (string.Equals(value, MemberRerank.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI.Rerank; + } + + if (string.Equals(value, MemberSparseEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI.SparseEmbedding; + } + + if (string.Equals(value, MemberTextEmbedding.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI.TextEmbedding; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI.Completion: + writer.WriteStringValue(MemberCompletion); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI.Rerank: + writer.WriteStringValue(MemberRerank); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI.SparseEmbedding: + writer.WriteStringValue(MemberSparseEmbedding); + break; + case Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI.TextEmbedding: + writer.WriteStringValue(MemberTextEmbedding); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAI value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + internal sealed partial class TaskTypeJinaAiConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText MemberRerank = System.Text.Json.JsonEncodedText.Encode("rerank"); @@ -1093,12 +1276,24 @@ public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, internal sealed partial class CohereEmbeddingTypeConverter : System.Text.Json.Serialization.JsonConverter { + private static readonly System.Text.Json.JsonEncodedText MemberBinary = System.Text.Json.JsonEncodedText.Encode("binary"); + private static readonly System.Text.Json.JsonEncodedText MemberBit = System.Text.Json.JsonEncodedText.Encode("bit"); private static readonly System.Text.Json.JsonEncodedText MemberByte = System.Text.Json.JsonEncodedText.Encode("byte"); private static readonly System.Text.Json.JsonEncodedText MemberFloat = System.Text.Json.JsonEncodedText.Encode("float"); private static readonly System.Text.Json.JsonEncodedText MemberInt8 = System.Text.Json.JsonEncodedText.Encode("int8"); public override Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { + if (reader.ValueTextEquals(MemberBinary)) + { + return Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Binary; + } + + if (reader.ValueTextEquals(MemberBit)) + { + return Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Bit; + } + if (reader.ValueTextEquals(MemberByte)) { return Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Byte; @@ -1115,6 +1310,16 @@ public override Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType Read } var value = reader.GetString()!; + if (string.Equals(value, MemberBinary.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Binary; + } + + if (string.Equals(value, MemberBit.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Bit; + } + if (string.Equals(value, MemberByte.Value, System.StringComparison.OrdinalIgnoreCase)) { return Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Byte; @@ -1137,6 +1342,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { switch (value) { + case Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Binary: + writer.WriteStringValue(MemberBinary); + break; + case Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Bit: + writer.WriteStringValue(MemberBit); + break; case Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType.Byte: writer.WriteStringValue(MemberByte); break; @@ -1648,6 +1859,10 @@ public enum GoogleAiStudioTaskType [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskTypeConverter))] public enum GoogleVertexAITaskType { + [System.Runtime.Serialization.EnumMember(Value = "chat_completion")] + ChatCompletion, + [System.Runtime.Serialization.EnumMember(Value = "completion")] + Completion, [System.Runtime.Serialization.EnumMember(Value = "rerank")] Rerank, [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] @@ -1657,6 +1872,12 @@ public enum GoogleVertexAITaskType [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskTypeConverter))] public enum HuggingFaceTaskType { + [System.Runtime.Serialization.EnumMember(Value = "chat_completion")] + ChatCompletion, + [System.Runtime.Serialization.EnumMember(Value = "completion")] + Completion, + [System.Runtime.Serialization.EnumMember(Value = "rerank")] + Rerank, [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] TextEmbedding } @@ -1673,6 +1894,10 @@ public enum JinaAITaskType [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.MistralTaskTypeConverter))] public enum MistralTaskType { + [System.Runtime.Serialization.EnumMember(Value = "chat_completion")] + ChatCompletion, + [System.Runtime.Serialization.EnumMember(Value = "completion")] + Completion, [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] TextEmbedding } @@ -1704,6 +1929,19 @@ public enum WatsonxTaskType TextEmbedding } +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeAlibabaCloudAIConverter))] +public enum TaskTypeAlibabaCloudAI +{ + [System.Runtime.Serialization.EnumMember(Value = "completion")] + Completion, + [System.Runtime.Serialization.EnumMember(Value = "rerank")] + Rerank, + [System.Runtime.Serialization.EnumMember(Value = "sparse_embedding")] + SparseEmbedding, + [System.Runtime.Serialization.EnumMember(Value = "text_embedding")] + TextEmbedding +} + [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.TaskTypeJinaAiConverter))] public enum TaskTypeJinaAi { @@ -1716,6 +1954,10 @@ public enum TaskTypeJinaAi [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingTypeConverter))] public enum CohereEmbeddingType { + [System.Runtime.Serialization.EnumMember(Value = "binary")] + Binary, + [System.Runtime.Serialization.EnumMember(Value = "bit")] + Bit, [System.Runtime.Serialization.EnumMember(Value = "byte")] Byte, [System.Runtime.Serialization.EnumMember(Value = "float")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs index dd68e21e027..0ed5f74f839 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Enums/Enums.NoNamespace.g.cs @@ -2806,6 +2806,77 @@ public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, } } +internal sealed partial class ScoreNormalizerConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText MemberL2Norm = System.Text.Json.JsonEncodedText.Encode("l2_norm"); + private static readonly System.Text.Json.JsonEncodedText MemberMinmax = System.Text.Json.JsonEncodedText.Encode("minmax"); + private static readonly System.Text.Json.JsonEncodedText MemberNone = System.Text.Json.JsonEncodedText.Encode("none"); + + public override Elastic.Clients.Elasticsearch.ScoreNormalizer Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + if (reader.ValueTextEquals(MemberL2Norm)) + { + return Elastic.Clients.Elasticsearch.ScoreNormalizer.L2Norm; + } + + if (reader.ValueTextEquals(MemberMinmax)) + { + return Elastic.Clients.Elasticsearch.ScoreNormalizer.Minmax; + } + + if (reader.ValueTextEquals(MemberNone)) + { + return Elastic.Clients.Elasticsearch.ScoreNormalizer.None; + } + + var value = reader.GetString()!; + if (string.Equals(value, MemberL2Norm.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.ScoreNormalizer.L2Norm; + } + + if (string.Equals(value, MemberMinmax.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.ScoreNormalizer.Minmax; + } + + if (string.Equals(value, MemberNone.Value, System.StringComparison.OrdinalIgnoreCase)) + { + return Elastic.Clients.Elasticsearch.ScoreNormalizer.None; + } + + throw new System.Text.Json.JsonException($"Unknown member '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.ScoreNormalizer)}'."); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ScoreNormalizer value, System.Text.Json.JsonSerializerOptions options) + { + switch (value) + { + case Elastic.Clients.Elasticsearch.ScoreNormalizer.L2Norm: + writer.WriteStringValue(MemberL2Norm); + break; + case Elastic.Clients.Elasticsearch.ScoreNormalizer.Minmax: + writer.WriteStringValue(MemberMinmax); + break; + case Elastic.Clients.Elasticsearch.ScoreNormalizer.None: + writer.WriteStringValue(MemberNone); + break; + default: + throw new System.Text.Json.JsonException($"Invalid value '{value}' for enum '{nameof(Elastic.Clients.Elasticsearch.ScoreNormalizer)}'."); + } + } + + public override Elastic.Clients.Elasticsearch.ScoreNormalizer ReadAsPropertyName(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + return Read(ref reader, typeToConvert, options); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ScoreNormalizer value, System.Text.Json.JsonSerializerOptions options) + { + Write(writer, value, options); + } +} + [System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.TimeUnitConverter))] public enum TimeUnit { @@ -3431,4 +3502,15 @@ public enum FieldSortNumericType Double, [System.Runtime.Serialization.EnumMember(Value = "long")] Long +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.ScoreNormalizerConverter))] +public enum ScoreNormalizer +{ + [System.Runtime.Serialization.EnumMember(Value = "l2_norm")] + L2Norm, + [System.Runtime.Serialization.EnumMember(Value = "minmax")] + Minmax, + [System.Runtime.Serialization.EnumMember(Value = "none")] + None } \ No newline at end of file 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/Eql/HitsEvent.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/HitsEvent.g.cs index 736a9cdacb8..2c53cfb86d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/HitsEvent.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/HitsEvent.g.cs @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Eql.HitsEvent Read(ref Sys continue; } - if (propMissing.TryReadProperty(ref reader, options, PropMissing, null)) + if (propMissing.TryReadProperty(ref reader, options, PropMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,7 +92,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropFields, value.Fields, 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, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropMissing, value.Missing, null, null); + writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, TEvent v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SourceMarker))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs index f678c71a75f..42055e91bbf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ErrorCause.g.cs @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.ErrorCause Read(ref System.Text.Js } propMetadata ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out object value, null, null); + reader.ReadProperty(options, out string key, out object value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propMetadata[key] = value; } @@ -105,7 +105,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.Metadata) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSort.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSort.g.cs index f77da9ad7b2..11457b1f03e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FieldSort.g.cs @@ -38,11 +38,11 @@ public override Elastic.Clients.Elasticsearch.FieldSort Read(ref System.Text.Jso reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { - var value = reader.ReadValue(options, null); + var value = reader.ReadValue(options, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)); reader.Read(); return new Elastic.Clients.Elasticsearch.FieldSort(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { @@ -71,7 +71,7 @@ public override Elastic.Clients.Elasticsearch.FieldSort Read(ref System.Text.Jso continue; } - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.SortMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,17 +81,17 @@ public override Elastic.Clients.Elasticsearch.FieldSort Read(ref System.Text.Jso continue; } - if (propNumericType.TryReadProperty(ref reader, options, PropNumericType, null)) + if (propNumericType.TryReadProperty(ref reader, options, PropNumericType, static Elastic.Clients.Elasticsearch.FieldSortNumericType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUnmappedType.TryReadProperty(ref reader, options, PropUnmappedType, null)) + if (propUnmappedType.TryReadProperty(ref reader, options, PropUnmappedType, static Elastic.Clients.Elasticsearch.Mapping.FieldType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,15 +124,15 @@ public override Elastic.Clients.Elasticsearch.FieldSort Read(ref System.Text.Jso public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.FieldSort value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropMode, value.Mode, null, null); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNested, value.Nested, null, null); - writer.WriteProperty(options, PropNumericType, value.NumericType, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); - writer.WriteProperty(options, PropUnmappedType, value.UnmappedType, null, null); + writer.WriteProperty(options, PropNumericType, value.NumericType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.FieldSortNumericType? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUnmappedType, value.UnmappedType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.FieldType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs index bb9626e0409..c55141c52f4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/FielddataStats.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.FielddataStats Read(ref System.Tex LocalJsonValue propMemorySizeInBytes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEvictions.TryReadProperty(ref reader, options, PropEvictions, null)) + if (propEvictions.TryReadProperty(ref reader, options, PropEvictions, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.FielddataStats Read(ref System.Tex public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.FielddataStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEvictions, value.Evictions, null, null); + writer.WriteProperty(options, PropEvictions, value.Evictions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, 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, PropMemorySize, value.MemorySize, null, null); writer.WriteProperty(options, PropMemorySizeInBytes, value.MemorySizeInBytes, null, null); 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/GeoDistanceSort.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoDistanceSort.g.cs index 83455531eee..33d94d79178 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoDistanceSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/GeoDistanceSort.g.cs @@ -45,17 +45,17 @@ public override Elastic.Clients.Elasticsearch.GeoDistanceSort Read(ref System.Te LocalJsonValue propUnit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDistanceType.TryReadProperty(ref reader, options, PropDistanceType, null)) + if (propDistanceType.TryReadProperty(ref reader, options, PropDistanceType, static Elastic.Clients.Elasticsearch.GeoDistanceType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.SortMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,18 +65,18 @@ public override Elastic.Clients.Elasticsearch.GeoDistanceSort Read(ref System.Te continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUnit.TryReadProperty(ref reader, options, PropUnit, null)) + if (propUnit.TryReadProperty(ref reader, options, PropUnit, static Elastic.Clients.Elasticsearch.DistanceUnit? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propLocation.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propLocation.Value, null, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)!); + reader.ReadProperty(options, out propField.Value, out propLocation.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)!); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -96,13 +96,13 @@ public override Elastic.Clients.Elasticsearch.GeoDistanceSort Read(ref System.Te public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.GeoDistanceSort value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDistanceType, value.DistanceType, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); - writer.WriteProperty(options, PropMode, value.Mode, null, null); + writer.WriteProperty(options, PropDistanceType, value.DistanceType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.GeoDistanceType? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNested, value.Nested, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); - writer.WriteProperty(options, PropUnit, value.Unit, null, null); - writer.WriteProperty(options, value.Field, value.Location, 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, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUnit, value.Unit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.DistanceUnit? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.Location, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/ExploreControls.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/ExploreControls.g.cs index 5731543e7fd..a448ca08899 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/ExploreControls.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/ExploreControls.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Graph.ExploreControls Read(ref Sys continue; } - if (propSampleSize.TryReadProperty(ref reader, options, PropSampleSize, null)) + if (propSampleSize.TryReadProperty(ref reader, options, PropSampleSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropSampleDiversity, value.SampleDiversity, null, null); - writer.WriteProperty(options, PropSampleSize, value.SampleSize, null, null); + writer.WriteProperty(options, PropSampleSize, value.SampleSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeout, value.Timeout, null, null); writer.WriteProperty(options, PropUseSignificance, value.UseSignificance, null, null); writer.WriteEndObject(); 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/VertexDefinition.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexDefinition.g.cs index b04f48a12dd..428fe74552a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexDefinition.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Graph/VertexDefinition.g.cs @@ -58,17 +58,17 @@ public override Elastic.Clients.Elasticsearch.Graph.VertexDefinition Read(ref Sy continue; } - if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, null)) + if (propMinDocCount.TryReadProperty(ref reader, options, PropMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, null)) + if (propShardMinDocCount.TryReadProperty(ref reader, options, PropShardMinDocCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,9 +100,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropExclude, value.Exclude, 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, PropField, value.Field, null, null); writer.WriteProperty(options, PropInclude, value.Include, 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, PropMinDocCount, value.MinDocCount, null, null); - writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropMinDocCount, value.MinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropShardMinDocCount, value.ShardMinDocCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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/IndexLifecycleManagement/AllocateAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/AllocateAction.g.cs index 26c50b543b9..b7960569a41 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/AllocateAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/AllocateAction.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.AllocateA continue; } - if (propNumberOfReplicas.TryReadProperty(ref reader, options, PropNumberOfReplicas, null)) + if (propNumberOfReplicas.TryReadProperty(ref reader, options, PropNumberOfReplicas, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.AllocateA continue; } - if (propTotalShardsPerNode.TryReadProperty(ref reader, options, PropTotalShardsPerNode, null)) + if (propTotalShardsPerNode.TryReadProperty(ref reader, options, PropTotalShardsPerNode, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropExclude, value.Exclude, 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, PropInclude, value.Include, 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, PropNumberOfReplicas, value.NumberOfReplicas, null, null); + writer.WriteProperty(options, PropNumberOfReplicas, value.NumberOfReplicas, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRequire, value.Require, 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, PropTotalShardsPerNode, value.TotalShardsPerNode, null, null); + writer.WriteProperty(options, PropTotalShardsPerNode, value.TotalShardsPerNode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/DeleteAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/DeleteAction.g.cs index 713645d9ba1..e86feb0ec45 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/DeleteAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/DeleteAction.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.DeleteAct LocalJsonValue propDeleteSearchableSnapshot = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeleteSearchableSnapshot.TryReadProperty(ref reader, options, PropDeleteSearchableSnapshot, null)) + if (propDeleteSearchableSnapshot.TryReadProperty(ref reader, options, PropDeleteSearchableSnapshot, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.DeleteAct public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexLifecycleManagement.DeleteAction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeleteSearchableSnapshot, value.DeleteSearchableSnapshot, null, null); + writer.WriteProperty(options, PropDeleteSearchableSnapshot, value.DeleteSearchableSnapshot, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/MigrateAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/MigrateAction.g.cs index a0f44d46373..e38351f42ef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/MigrateAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/MigrateAction.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.MigrateAc LocalJsonValue propEnabled = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.MigrateAc public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexLifecycleManagement.MigrateAction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/RolloverAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/RolloverAction.g.cs index 4f9dda504be..c60d2268b13 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/RolloverAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/RolloverAction.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.RolloverA continue; } - if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, null)) + if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxPrimaryShardDocs.TryReadProperty(ref reader, options, PropMaxPrimaryShardDocs, null)) + if (propMaxPrimaryShardDocs.TryReadProperty(ref reader, options, PropMaxPrimaryShardDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,12 +81,12 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.RolloverA continue; } - if (propMinDocs.TryReadProperty(ref reader, options, PropMinDocs, null)) + if (propMinDocs.TryReadProperty(ref reader, options, PropMinDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinPrimaryShardDocs.TryReadProperty(ref reader, options, PropMinPrimaryShardDocs, null)) + if (propMinPrimaryShardDocs.TryReadProperty(ref reader, options, PropMinPrimaryShardDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,13 +130,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMaxAge, value.MaxAge, null, null); - writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, null); - writer.WriteProperty(options, PropMaxPrimaryShardDocs, value.MaxPrimaryShardDocs, null, null); + writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxPrimaryShardDocs, value.MaxPrimaryShardDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxPrimaryShardSize, value.MaxPrimaryShardSize, null, null); writer.WriteProperty(options, PropMaxSize, value.MaxSize, null, null); writer.WriteProperty(options, PropMinAge, value.MinAge, null, null); - writer.WriteProperty(options, PropMinDocs, value.MinDocs, null, null); - writer.WriteProperty(options, PropMinPrimaryShardDocs, value.MinPrimaryShardDocs, null, null); + writer.WriteProperty(options, PropMinDocs, value.MinDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinPrimaryShardDocs, value.MinPrimaryShardDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinPrimaryShardSize, value.MinPrimaryShardSize, null, null); writer.WriteProperty(options, PropMinSize, value.MinSize, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SearchableSnapshotAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SearchableSnapshotAction.g.cs index 7f7e4fd9187..f09b6164f1e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SearchableSnapshotAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SearchableSnapshotAction.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.Searchabl LocalJsonValue propSnapshotRepository = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propForceMergeIndex.TryReadProperty(ref reader, options, PropForceMergeIndex, null)) + if (propForceMergeIndex.TryReadProperty(ref reader, options, PropForceMergeIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.Searchabl public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexLifecycleManagement.SearchableSnapshotAction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropForceMergeIndex, value.ForceMergeIndex, null, null); + writer.WriteProperty(options, PropForceMergeIndex, value.ForceMergeIndex, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSnapshotRepository, value.SnapshotRepository, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SetPriorityAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SetPriorityAction.g.cs index 5e2a9248121..a964118d5a2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SetPriorityAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/SetPriorityAction.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.SetPriori LocalJsonValue propPriority = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.SetPriori public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexLifecycleManagement.SetPriorityAction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/ShrinkAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/ShrinkAction.g.cs index 44e4972740b..3e791668cf3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/ShrinkAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexLifecycleManagement/ShrinkAction.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.ShrinkAct LocalJsonValue propNumberOfShards = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowWriteAfterShrink.TryReadProperty(ref reader, options, PropAllowWriteAfterShrink, null)) + if (propAllowWriteAfterShrink.TryReadProperty(ref reader, options, PropAllowWriteAfterShrink, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.ShrinkAct continue; } - if (propNumberOfShards.TryReadProperty(ref reader, options, PropNumberOfShards, null)) + if (propNumberOfShards.TryReadProperty(ref reader, options, PropNumberOfShards, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.IndexLifecycleManagement.ShrinkAct public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexLifecycleManagement.ShrinkAction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowWriteAfterShrink, value.AllowWriteAfterShrink, null, null); + writer.WriteProperty(options, PropAllowWriteAfterShrink, value.AllowWriteAfterShrink, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxPrimaryShardSize, value.MaxPrimaryShardSize, null, null); - writer.WriteProperty(options, PropNumberOfShards, value.NumberOfShards, null, null); + writer.WriteProperty(options, PropNumberOfShards, value.NumberOfShards, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs index 57b54c751e0..3aac333479e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AddAction.g.cs @@ -83,17 +83,17 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.AddAction Read(ref continue; } - if (propIsHidden.TryReadProperty(ref reader, options, PropIsHidden, null)) + if (propIsHidden.TryReadProperty(ref reader, options, PropIsHidden, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, null)) + if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMustExist.TryReadProperty(ref reader, options, PropMustExist, null)) + if (propMustExist.TryReadProperty(ref reader, options, PropMustExist, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -143,9 +143,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndex, value.Index, null, null); writer.WriteProperty(options, PropIndexRouting, value.IndexRouting, null, null); writer.WriteProperty(options, PropIndices, value.Indices, null, null); - writer.WriteProperty(options, PropIsHidden, value.IsHidden, null, null); - writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, null); - writer.WriteProperty(options, PropMustExist, value.MustExist, null, null); + writer.WriteProperty(options, PropIsHidden, value.IsHidden, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMustExist, value.MustExist, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropSearchRouting, value.SearchRouting, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Alias.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Alias.g.cs index 504cdad4b59..d34e858cbf3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Alias.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Alias.g.cs @@ -53,12 +53,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.Alias Read(ref Sys continue; } - if (propIsHidden.TryReadProperty(ref reader, options, PropIsHidden, null)) + if (propIsHidden.TryReadProperty(ref reader, options, PropIsHidden, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, null)) + if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,8 +99,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFilter, value.Filter, null, null); writer.WriteProperty(options, PropIndexRouting, value.IndexRouting, null, null); - writer.WriteProperty(options, PropIsHidden, value.IsHidden, null, null); - writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, null); + writer.WriteProperty(options, PropIsHidden, value.IsHidden, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropSearchRouting, value.SearchRouting, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AliasDefinition.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AliasDefinition.g.cs index 7494cc70f40..3903ef8fe2f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AliasDefinition.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AliasDefinition.g.cs @@ -53,12 +53,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.AliasDefinition Re continue; } - if (propIsHidden.TryReadProperty(ref reader, options, PropIsHidden, null)) + if (propIsHidden.TryReadProperty(ref reader, options, PropIsHidden, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, null)) + if (propIsWriteIndex.TryReadProperty(ref reader, options, PropIsWriteIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,8 +99,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFilter, value.Filter, null, null); writer.WriteProperty(options, PropIndexRouting, value.IndexRouting, null, null); - writer.WriteProperty(options, PropIsHidden, value.IsHidden, null, null); - writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, null); + writer.WriteProperty(options, PropIsHidden, value.IsHidden, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIsWriteIndex, value.IsWriteIndex, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropSearchRouting, value.SearchRouting, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AnalyzeToken.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AnalyzeToken.g.cs index bb46ba0379c..e36d4fb34c6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AnalyzeToken.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/AnalyzeToken.g.cs @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.AnalyzeToken Read( continue; } - if (propPositionLength.TryReadProperty(ref reader, options, PropPositionLength, null)) + if (propPositionLength.TryReadProperty(ref reader, options, PropPositionLength, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,7 +99,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropEndOffset, value.EndOffset, null, null); writer.WriteProperty(options, PropPosition, value.Position, null, null); - writer.WriteProperty(options, PropPositionLength, value.PositionLength, null, null); + writer.WriteProperty(options, PropPositionLength, value.PositionLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStartOffset, value.StartOffset, null, null); writer.WriteProperty(options, PropToken, value.Token, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CreateFrom.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CreateFrom.g.cs index 780649d2f78..4fb53e93d1a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CreateFrom.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/CreateFrom.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.CreateFrom Read(re continue; } - if (propRemoveIndexBlocks.TryReadProperty(ref reader, options, PropRemoveIndexBlocks, null)) + if (propRemoveIndexBlocks.TryReadProperty(ref reader, options, PropRemoveIndexBlocks, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMappingsOverride, value.MappingsOverride, null, null); - writer.WriteProperty(options, PropRemoveIndexBlocks, value.RemoveIndexBlocks, null, null); + writer.WriteProperty(options, PropRemoveIndexBlocks, value.RemoveIndexBlocks, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSettingsOverride, value.SettingsOverride, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStream.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStream.g.cs index 12ca838d7ed..f243324f06d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStream.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStream.g.cs @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStream Read(re LocalJsonValue propTimestampField = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowCustomRouting.TryReadProperty(ref reader, options, PropAllowCustomRouting, null)) + if (propAllowCustomRouting.TryReadProperty(ref reader, options, PropAllowCustomRouting, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -120,7 +120,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStream Read(re continue; } - if (propReplicated.TryReadProperty(ref reader, options, PropReplicated, null)) + if (propReplicated.TryReadProperty(ref reader, options, PropReplicated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -135,7 +135,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStream Read(re continue; } - if (propSystem.TryReadProperty(ref reader, options, PropSystem, null)) + if (propSystem.TryReadProperty(ref reader, options, PropSystem, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -185,7 +185,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStream Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.DataStream value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowCustomRouting, value.AllowCustomRouting, null, null); + writer.WriteProperty(options, PropAllowCustomRouting, value.AllowCustomRouting, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFailureStore, value.FailureStore, null, null); writer.WriteProperty(options, PropGeneration, value.Generation, null, null); writer.WriteProperty(options, PropHidden, value.Hidden, null, null); @@ -196,10 +196,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteProperty(options, PropNextGenerationManagedBy, value.NextGenerationManagedBy, null, null); writer.WriteProperty(options, PropPreferIlm, value.PreferIlm, null, null); - writer.WriteProperty(options, PropReplicated, value.Replicated, null, null); + writer.WriteProperty(options, PropReplicated, value.Replicated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRolloverOnWrite, value.RolloverOnWrite, null, null); writer.WriteProperty(options, PropStatus, value.Status, null, null); - writer.WriteProperty(options, PropSystem, value.System, null, null); + writer.WriteProperty(options, PropSystem, value.System, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTemplate, value.Template, null, null); writer.WriteProperty(options, PropTimestampField, value.TimestampField, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamIndex.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamIndex.g.cs index fadfcdfb91f..35152744d40 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamIndex.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamIndex.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamIndex Re continue; } - if (propManagedBy.TryReadProperty(ref reader, options, PropManagedBy, null)) + if (propManagedBy.TryReadProperty(ref reader, options, PropManagedBy, static Elastic.Clients.Elasticsearch.IndexManagement.ManagedBy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPreferIlm.TryReadProperty(ref reader, options, PropPreferIlm, null)) + if (propPreferIlm.TryReadProperty(ref reader, options, PropPreferIlm, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,8 +92,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIlmPolicy, value.IlmPolicy, null, null); writer.WriteProperty(options, PropIndexName, value.IndexName, null, null); writer.WriteProperty(options, PropIndexUuid, value.IndexUuid, null, null); - writer.WriteProperty(options, PropManagedBy, value.ManagedBy, null, null); - writer.WriteProperty(options, PropPreferIlm, value.PreferIlm, null, null); + writer.WriteProperty(options, PropManagedBy, value.ManagedBy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.IndexManagement.ManagedBy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPreferIlm, value.PreferIlm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs index f4c1f42298e..cec385460dc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycle.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycl continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDataRetention, value.DataRetention, null, null); writer.WriteProperty(options, PropDownsampling, value.Downsampling, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleExplain.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleExplain.g.cs index 6a12be7ef9a..897cfab7d08 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleExplain.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleExplain.g.cs @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycl continue; } - if (propIndexCreationDateMillis.TryReadProperty(ref reader, options, PropIndexCreationDateMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propIndexCreationDateMillis.TryReadProperty(ref reader, options, PropIndexCreationDateMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -79,7 +79,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycl continue; } - if (propRolloverDateMillis.TryReadProperty(ref reader, options, PropRolloverDateMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propRolloverDateMillis.TryReadProperty(ref reader, options, PropRolloverDateMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -124,10 +124,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropError, value.Error, null, null); writer.WriteProperty(options, PropGenerationTime, value.GenerationTime, null, null); writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropIndexCreationDateMillis, value.IndexCreationDateMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropIndexCreationDateMillis, value.IndexCreationDateMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropLifecycle, value.Lifecycle, null, null); writer.WriteProperty(options, PropManagedByLifecycle, value.ManagedByLifecycle, null, null); - writer.WriteProperty(options, PropRolloverDateMillis, value.RolloverDateMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropRolloverDateMillis, value.RolloverDateMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropTimeSinceIndexCreation, value.TimeSinceIndexCreation, null, null); writer.WriteProperty(options, PropTimeSinceRollover, value.TimeSinceRollover, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs index fb3277e1680..1f11b62010b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleRolloverConditions.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycl continue; } - if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, null)) + if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxPrimaryShardDocs.TryReadProperty(ref reader, options, PropMaxPrimaryShardDocs, null)) + if (propMaxPrimaryShardDocs.TryReadProperty(ref reader, options, PropMaxPrimaryShardDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,12 +81,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycl continue; } - if (propMinDocs.TryReadProperty(ref reader, options, PropMinDocs, null)) + if (propMinDocs.TryReadProperty(ref reader, options, PropMinDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinPrimaryShardDocs.TryReadProperty(ref reader, options, PropMinPrimaryShardDocs, null)) + if (propMinPrimaryShardDocs.TryReadProperty(ref reader, options, PropMinPrimaryShardDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,13 +130,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMaxAge, value.MaxAge, null, null); - writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, null); - writer.WriteProperty(options, PropMaxPrimaryShardDocs, value.MaxPrimaryShardDocs, null, null); + writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxPrimaryShardDocs, value.MaxPrimaryShardDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxPrimaryShardSize, value.MaxPrimaryShardSize, null, null); writer.WriteProperty(options, PropMaxSize, value.MaxSize, null, null); writer.WriteProperty(options, PropMinAge, value.MinAge, null, null); - writer.WriteProperty(options, PropMinDocs, value.MinDocs, null, null); - writer.WriteProperty(options, PropMinPrimaryShardDocs, value.MinPrimaryShardDocs, null, null); + writer.WriteProperty(options, PropMinDocs, value.MinDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinPrimaryShardDocs, value.MinPrimaryShardDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinPrimaryShardSize, value.MinPrimaryShardSize, null, null); writer.WriteProperty(options, PropMinSize, value.MinSize, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs index 88201c7df55..2500777e4a2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamLifecycleWithRollover.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamLifecycl continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDataRetention, value.DataRetention, null, null); writer.WriteProperty(options, PropDownsampling, value.Downsampling, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRollover, value.Rollover, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs index c2c318f416c..146c954e483 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/DataStreamVisibility.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibili LocalJsonValue propHidden = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowCustomRouting.TryReadProperty(ref reader, options, PropAllowCustomRouting, null)) + if (propAllowCustomRouting.TryReadProperty(ref reader, options, PropAllowCustomRouting, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHidden.TryReadProperty(ref reader, options, PropHidden, null)) + if (propHidden.TryReadProperty(ref reader, options, PropHidden, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibili public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.DataStreamVisibility value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowCustomRouting, value.AllowCustomRouting, null, null); - writer.WriteProperty(options, PropHidden, value.Hidden, null, null); + writer.WriteProperty(options, PropAllowCustomRouting, value.AllowCustomRouting, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHidden, value.Hidden, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ExplainAnalyzeToken.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ExplainAnalyzeToken.g.cs index 4015d3d2564..17ebffb1e8c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ExplainAnalyzeToken.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ExplainAnalyzeToken.g.cs @@ -60,7 +60,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ExplainAnalyzeToke continue; } - if (propKeyword.TryReadProperty(ref reader, options, PropKeyword, null)) + if (propKeyword.TryReadProperty(ref reader, options, PropKeyword, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ExplainAnalyzeToke } propAttributes ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out object value, null, null); + reader.ReadProperty(options, out string key, out object value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propAttributes[key] = value; } @@ -121,7 +121,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBytes, value.Bytes, null, null); writer.WriteProperty(options, PropEndOffset, value.EndOffset, null, null); - writer.WriteProperty(options, PropKeyword, value.Keyword, null, null); + writer.WriteProperty(options, PropKeyword, value.Keyword, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPosition, value.Position, null, null); writer.WriteProperty(options, PropPositionLength, value.PositionLength, null, null); writer.WriteProperty(options, PropStartOffset, value.StartOffset, null, null); @@ -132,7 +132,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.Attributes) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexRoutingAllocation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexRoutingAllocation.g.cs index a8ef9079219..14c18671842 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexRoutingAllocation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexRoutingAllocation.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexRoutingAlloca continue; } - if (propEnable.TryReadProperty(ref reader, options, PropEnable, null)) + if (propEnable.TryReadProperty(ref reader, options, PropEnable, static Elastic.Clients.Elasticsearch.IndexManagement.IndexRoutingAllocationOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDisk, value.Disk, null, null); - writer.WriteProperty(options, PropEnable, value.Enable, null, null); + writer.WriteProperty(options, PropEnable, value.Enable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.IndexManagement.IndexRoutingAllocationOptions? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInclude, value.Include, null, null); writer.WriteProperty(options, PropInitialRecovery, value.InitialRecovery, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingBlocks.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingBlocks.g.cs index 7dccce2032e..389acc08d4c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingBlocks.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingBlocks.g.cs @@ -41,27 +41,27 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingBlocks LocalJsonValue propWrite = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMetadata.TryReadProperty(ref reader, options, PropMetadata, null)) + if (propMetadata.TryReadProperty(ref reader, options, PropMetadata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRead.TryReadProperty(ref reader, options, PropRead, null)) + if (propRead.TryReadProperty(ref reader, options, PropRead, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReadOnly.TryReadProperty(ref reader, options, PropReadOnly, null)) + if (propReadOnly.TryReadProperty(ref reader, options, PropReadOnly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReadOnlyAllowDelete.TryReadProperty(ref reader, options, PropReadOnlyAllowDelete, null)) + if (propReadOnlyAllowDelete.TryReadProperty(ref reader, options, PropReadOnlyAllowDelete, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWrite.TryReadProperty(ref reader, options, PropWrite, null)) + if (propWrite.TryReadProperty(ref reader, options, PropWrite, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingBlocks public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingBlocks value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMetadata, value.Metadata, null, null); - writer.WriteProperty(options, PropRead, value.Read, null, null); - writer.WriteProperty(options, PropReadOnly, value.ReadOnly, null, null); - writer.WriteProperty(options, PropReadOnlyAllowDelete, value.ReadOnlyAllowDelete, null, null); - writer.WriteProperty(options, PropWrite, value.Write, null, null); + writer.WriteProperty(options, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRead, value.Read, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReadOnly, value.ReadOnly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReadOnlyAllowDelete, value.ReadOnlyAllowDelete, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWrite, value.Write, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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..aab9e498f68 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettings.g.cs @@ -164,7 +164,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read continue; } - if (propCheckOnStartup.TryReadProperty(ref reader, options, PropCheckOnStartup, null)) + if (propCheckOnStartup.TryReadProperty(ref reader, options, PropCheckOnStartup, static Elastic.Clients.Elasticsearch.IndexManagement.IndexCheckOnStartup? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -174,12 +174,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read continue; } - if (propCreationDate.TryReadProperty(ref reader, options, PropCreationDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propCreationDate.TryReadProperty(ref reader, options, PropCreationDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propCreationDateString.TryReadProperty(ref reader, options, PropCreationDateString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCreationDateString.TryReadProperty(ref reader, options, PropCreationDateString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -234,7 +234,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read continue; } - if (propLoadFixedBitsetFiltersEagerly.TryReadProperty(ref reader, options, PropLoadFixedBitsetFiltersEagerly, null)) + if (propLoadFixedBitsetFiltersEagerly.TryReadProperty(ref reader, options, PropLoadFixedBitsetFiltersEagerly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -244,57 +244,57 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read continue; } - if (propMaxDocvalueFieldsSearch.TryReadProperty(ref reader, options, PropMaxDocvalueFieldsSearch, null)) + if (propMaxDocvalueFieldsSearch.TryReadProperty(ref reader, options, PropMaxDocvalueFieldsSearch, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxInnerResultWindow.TryReadProperty(ref reader, options, PropMaxInnerResultWindow, null)) + if (propMaxInnerResultWindow.TryReadProperty(ref reader, options, PropMaxInnerResultWindow, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxNgramDiff.TryReadProperty(ref reader, options, PropMaxNgramDiff, null)) + if (propMaxNgramDiff.TryReadProperty(ref reader, options, PropMaxNgramDiff, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxRefreshListeners.TryReadProperty(ref reader, options, PropMaxRefreshListeners, null)) + if (propMaxRefreshListeners.TryReadProperty(ref reader, options, PropMaxRefreshListeners, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxRegexLength.TryReadProperty(ref reader, options, PropMaxRegexLength, null)) + if (propMaxRegexLength.TryReadProperty(ref reader, options, PropMaxRegexLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxRescoreWindow.TryReadProperty(ref reader, options, PropMaxRescoreWindow, null)) + if (propMaxRescoreWindow.TryReadProperty(ref reader, options, PropMaxRescoreWindow, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxResultWindow.TryReadProperty(ref reader, options, PropMaxResultWindow, null)) + if (propMaxResultWindow.TryReadProperty(ref reader, options, PropMaxResultWindow, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxScriptFields.TryReadProperty(ref reader, options, PropMaxScriptFields, null)) + if (propMaxScriptFields.TryReadProperty(ref reader, options, PropMaxScriptFields, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxShingleDiff.TryReadProperty(ref reader, options, PropMaxShingleDiff, null)) + if (propMaxShingleDiff.TryReadProperty(ref reader, options, PropMaxShingleDiff, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxSlicesPerScroll.TryReadProperty(ref reader, options, PropMaxSlicesPerScroll, null)) + if (propMaxSlicesPerScroll.TryReadProperty(ref reader, options, PropMaxSlicesPerScroll, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxTermsCount.TryReadProperty(ref reader, options, PropMaxTermsCount, null)) + if (propMaxTermsCount.TryReadProperty(ref reader, options, PropMaxTermsCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -314,7 +314,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read continue; } - if (propNumberOfRoutingShards.TryReadProperty(ref reader, options, PropNumberOfRoutingShards, null)) + if (propNumberOfRoutingShards.TryReadProperty(ref reader, options, PropNumberOfRoutingShards, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -354,7 +354,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read continue; } - if (propRoutingPartitionSize.TryReadProperty(ref reader, options, PropRoutingPartitionSize, null)) + if (propRoutingPartitionSize.TryReadProperty(ref reader, options, PropRoutingPartitionSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -399,7 +399,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read continue; } - if (propTopMetricsMaxSize.TryReadProperty(ref reader, options, PropTopMetricsMaxSize, null)) + if (propTopMetricsMaxSize.TryReadProperty(ref reader, options, PropTopMetricsMaxSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -425,7 +425,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettings Read } propOtherSettings ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out object value, null, null); + reader.ReadProperty(options, out string key, out object value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propOtherSettings[key] = value; } @@ -499,10 +499,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAnalyze, value.Analyze, null, null); writer.WriteProperty(options, PropAutoExpandReplicas, value.AutoExpandReplicas, null, null); writer.WriteProperty(options, PropBlocks, value.Blocks, null, null); - writer.WriteProperty(options, PropCheckOnStartup, value.CheckOnStartup, null, null); + writer.WriteProperty(options, PropCheckOnStartup, value.CheckOnStartup, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.IndexManagement.IndexCheckOnStartup? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCodec, value.Codec, null, null); - writer.WriteProperty(options, PropCreationDate, value.CreationDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropCreationDateString, value.CreationDateString, 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, PropCreationDate, value.CreationDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropCreationDateString, value.CreationDateString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropDefaultPipeline, value.DefaultPipeline, null, null); writer.WriteProperty(options, PropFinalPipeline, value.FinalPipeline, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); @@ -513,23 +513,23 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndexingPressure, value.IndexingPressure, null, null); writer.WriteProperty(options, PropIndexingSlowlog, value.IndexingSlowlog, null, null); writer.WriteProperty(options, PropLifecycle, value.Lifecycle, null, null); - writer.WriteProperty(options, PropLoadFixedBitsetFiltersEagerly, value.LoadFixedBitsetFiltersEagerly, null, null); + writer.WriteProperty(options, PropLoadFixedBitsetFiltersEagerly, value.LoadFixedBitsetFiltersEagerly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMapping, value.Mapping, null, null); - writer.WriteProperty(options, PropMaxDocvalueFieldsSearch, value.MaxDocvalueFieldsSearch, null, null); - writer.WriteProperty(options, PropMaxInnerResultWindow, value.MaxInnerResultWindow, null, null); - writer.WriteProperty(options, PropMaxNgramDiff, value.MaxNgramDiff, null, null); - writer.WriteProperty(options, PropMaxRefreshListeners, value.MaxRefreshListeners, null, null); - writer.WriteProperty(options, PropMaxRegexLength, value.MaxRegexLength, null, null); - writer.WriteProperty(options, PropMaxRescoreWindow, value.MaxRescoreWindow, null, null); - writer.WriteProperty(options, PropMaxResultWindow, value.MaxResultWindow, null, null); - writer.WriteProperty(options, PropMaxScriptFields, value.MaxScriptFields, null, null); - writer.WriteProperty(options, PropMaxShingleDiff, value.MaxShingleDiff, null, null); - writer.WriteProperty(options, PropMaxSlicesPerScroll, value.MaxSlicesPerScroll, null, null); - writer.WriteProperty(options, PropMaxTermsCount, value.MaxTermsCount, null, null); + writer.WriteProperty(options, PropMaxDocvalueFieldsSearch, value.MaxDocvalueFieldsSearch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxInnerResultWindow, value.MaxInnerResultWindow, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxNgramDiff, value.MaxNgramDiff, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxRefreshListeners, value.MaxRefreshListeners, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxRegexLength, value.MaxRegexLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxRescoreWindow, value.MaxRescoreWindow, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxResultWindow, value.MaxResultWindow, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxScriptFields, value.MaxScriptFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxShingleDiff, value.MaxShingleDiff, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxSlicesPerScroll, value.MaxSlicesPerScroll, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxTermsCount, value.MaxTermsCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMerge, value.Merge, null, null); writer.WriteProperty(options, PropMode, value.Mode, null, null); writer.WriteProperty(options, PropNumberOfReplicas, value.NumberOfReplicas, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); - writer.WriteProperty(options, PropNumberOfRoutingShards, value.NumberOfRoutingShards, null, null); + writer.WriteProperty(options, PropNumberOfRoutingShards, value.NumberOfRoutingShards, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNumberOfShards, value.NumberOfShards, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); writer.WriteProperty(options, PropProvidedName, value.ProvidedName, null, null); @@ -537,7 +537,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropQueryString, value.QueryString, null, null); writer.WriteProperty(options, PropRefreshInterval, value.RefreshInterval, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropRoutingPartitionSize, value.RoutingPartitionSize, null, null); + writer.WriteProperty(options, PropRoutingPartitionSize, value.RoutingPartitionSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRoutingPath, value.RoutingPath, 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, PropSearch, value.Search, null, null); writer.WriteProperty(options, PropSettings, value.Settings, null, null); @@ -546,7 +546,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropSort, value.Sort, null, null); writer.WriteProperty(options, PropStore, value.Store, null, null); writer.WriteProperty(options, PropTimeSeries, value.TimeSeries, null, null); - writer.WriteProperty(options, PropTopMetricsMaxSize, value.TopMetricsMaxSize, null, null); + writer.WriteProperty(options, PropTopMetricsMaxSize, value.TopMetricsMaxSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTranslog, value.Translog, null, null); writer.WriteProperty(options, PropUuid, value.Uuid, null, null); writer.WriteProperty(options, PropVerifiedBeforeClose, value.VerifiedBeforeClose, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); @@ -555,7 +555,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.OtherSettings) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } @@ -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/IndexSettingsLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs index 9054f3da87a..6b3a0ee38c6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsLifecycle.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsLifec LocalJsonValue propStep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propIndexingComplete.TryReadProperty(ref reader, options, PropIndexingComplete, null)) + if (propIndexingComplete.TryReadProperty(ref reader, options, PropIndexingComplete, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsLifec continue; } - if (propOriginationDate.TryReadProperty(ref reader, options, PropOriginationDate, null)) + if (propOriginationDate.TryReadProperty(ref reader, options, PropOriginationDate, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propParseOriginationDate.TryReadProperty(ref reader, options, PropParseOriginationDate, null)) + if (propParseOriginationDate.TryReadProperty(ref reader, options, PropParseOriginationDate, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,10 +105,10 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsLifec public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsLifecycle value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropIndexingComplete, value.IndexingComplete, null, null); + writer.WriteProperty(options, PropIndexingComplete, value.IndexingComplete, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropName, value.Name, null, null); - writer.WriteProperty(options, PropOriginationDate, value.OriginationDate, null, null); - writer.WriteProperty(options, PropParseOriginationDate, value.ParseOriginationDate, null, null); + writer.WriteProperty(options, PropOriginationDate, value.OriginationDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropParseOriginationDate, value.ParseOriginationDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPreferIlm, value.PreferIlm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); writer.WriteProperty(options, PropRolloverAlias, value.RolloverAlias, null, null); writer.WriteProperty(options, PropStep, value.Step, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsTimeSeries.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsTimeSeries.g.cs index 90763844894..6311f963cba 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsTimeSeries.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexSettingsTimeSeries.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsTimeS LocalJsonValue propStartTime = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEndTime.TryReadProperty(ref reader, options, PropEndTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEndTime.TryReadProperty(ref reader, options, PropEndTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { 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)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsTimeS public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.IndexSettingsTimeSeries value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - 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, 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.WriteProperty(options, PropEndTime, value.EndTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs index 79084ca62d9..b4ccebd6b4c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplate.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate Read LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowAutoCreate.TryReadProperty(ref reader, options, PropAllowAutoCreate, null)) + if (propAllowAutoCreate.TryReadProperty(ref reader, options, PropAllowAutoCreate, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate Read continue; } - if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, null)) + if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate Read continue; } - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate Read continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,16 +129,16 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowAutoCreate, value.AllowAutoCreate, null, null); + writer.WriteProperty(options, PropAllowAutoCreate, value.AllowAutoCreate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropComposedOf, value.ComposedOf, 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, PropDataStream, value.DataStream, null, null); - writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, null); + writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIgnoreMissingComponentTemplates, value.IgnoreMissingComponentTemplates, null, null); writer.WriteProperty(options, PropIndexPatterns, value.IndexPatterns, 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, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTemplate, value.Template, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs index b1f1f71c0ff..bba7ada8f87 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexTemplateDataStreamConfiguration.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataS LocalJsonValue propHidden = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowCustomRouting.TryReadProperty(ref reader, options, PropAllowCustomRouting, null)) + if (propAllowCustomRouting.TryReadProperty(ref reader, options, PropAllowCustomRouting, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHidden.TryReadProperty(ref reader, options, PropHidden, null)) + if (propHidden.TryReadProperty(ref reader, options, PropHidden, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataS public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.IndexTemplateDataStreamConfiguration value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowCustomRouting, value.AllowCustomRouting, null, null); - writer.WriteProperty(options, PropHidden, value.Hidden, null, null); + writer.WriteProperty(options, PropAllowCustomRouting, value.AllowCustomRouting, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHidden, value.Hidden, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingPressureMemory.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingPressureMemory.g.cs index 722cf8954f3..d8a6f0f961d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingPressureMemory.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingPressureMemory.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexingPressureMe LocalJsonValue propLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLimit.TryReadProperty(ref reader, options, PropLimit, null)) + if (propLimit.TryReadProperty(ref reader, options, PropLimit, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexingPressureMe public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.IndexingPressureMemory value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLimit, value.Limit, null, null); + writer.WriteProperty(options, PropLimit, value.Limit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingSlowlogSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingSlowlogSettings.g.cs index ec4b8759157..0ba2dcfba2a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingSlowlogSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndexingSlowlogSettings.g.cs @@ -44,12 +44,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndexingSlowlogSet continue; } - if (propReformat.TryReadProperty(ref reader, options, PropReformat, null)) + if (propReformat.TryReadProperty(ref reader, options, PropReformat, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSource.TryReadProperty(ref reader, options, PropSource, null)) + if (propSource.TryReadProperty(ref reader, options, PropSource, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,8 +82,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropLevel, value.Level, null, null); - writer.WriteProperty(options, PropReformat, value.Reformat, null, null); - writer.WriteProperty(options, PropSource, value.Source, null, null); + writer.WriteProperty(options, PropReformat, value.Reformat, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropThreshold, value.Threshold, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesStats.g.cs index 538f482b32e..de13490f542 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/IndicesStats.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndicesStats Read( LocalJsonValue propUuid = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propHealth.TryReadProperty(ref reader, options, PropHealth, null)) + if (propHealth.TryReadProperty(ref reader, options, PropHealth, static Elastic.Clients.Elasticsearch.HealthStatus? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndicesStats Read( continue; } - if (propStatus.TryReadProperty(ref reader, options, PropStatus, null)) + if (propStatus.TryReadProperty(ref reader, options, PropStatus, static Elastic.Clients.Elasticsearch.IndexManagement.IndexMetadataState? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,10 +97,10 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.IndicesStats Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.IndicesStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropHealth, value.Health, null, null); + writer.WriteProperty(options, PropHealth, value.Health, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.HealthStatus? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPrimaries, value.Primaries, null, null); writer.WriteProperty(options, PropShards, value.Shards, 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, PropStatus, value.Status, null, null); + writer.WriteProperty(options, PropStatus, value.Status, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.IndexManagement.IndexMetadataState? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotal, value.Total, null, null); writer.WriteProperty(options, PropUuid, value.Uuid, null, null); writer.WriteEndObject(); 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..b3cd35b4342 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettings.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin LocalJsonValue propTotalFields = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,7 +121,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDepth, value.Depth, null, null); writer.WriteProperty(options, PropDimensionFields, value.DimensionFields, null, null); writer.WriteProperty(options, PropFieldNameLength, value.FieldNameLength, null, null); @@ -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/IndexManagement/MappingLimitSettingsDepth.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDepth.g.cs index 8d6978c5e6c..b78d7c26343 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDepth.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDepth.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin LocalJsonValue propLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLimit.TryReadProperty(ref reader, options, PropLimit, null)) + if (propLimit.TryReadProperty(ref reader, options, PropLimit, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsDepth value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLimit, value.Limit, null, null); + writer.WriteProperty(options, PropLimit, value.Limit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs index 4deb60ece7a..e3fb2376ff6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsDimensionFields.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin LocalJsonValue propLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLimit.TryReadProperty(ref reader, options, PropLimit, null)) + if (propLimit.TryReadProperty(ref reader, options, PropLimit, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsDimensionFields value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLimit, value.Limit, null, null); + writer.WriteProperty(options, PropLimit, value.Limit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsFieldNameLength.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsFieldNameLength.g.cs index 8935f6b0361..41234caabe2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsFieldNameLength.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsFieldNameLength.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin LocalJsonValue propLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLimit.TryReadProperty(ref reader, options, PropLimit, null)) + if (propLimit.TryReadProperty(ref reader, options, PropLimit, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsFieldNameLength value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLimit, value.Limit, null, null); + writer.WriteProperty(options, PropLimit, value.Limit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedFields.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedFields.g.cs index 5a06121b00b..ef6ca69abe1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedFields.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedFields.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin LocalJsonValue propLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLimit.TryReadProperty(ref reader, options, PropLimit, null)) + if (propLimit.TryReadProperty(ref reader, options, PropLimit, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsNestedFields value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLimit, value.Limit, null, null); + writer.WriteProperty(options, PropLimit, value.Limit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedObjects.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedObjects.g.cs index 399355c753d..0a885109c27 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedObjects.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MappingLimitSettingsNestedObjects.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin LocalJsonValue propLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLimit.TryReadProperty(ref reader, options, PropLimit, null)) + if (propLimit.TryReadProperty(ref reader, options, PropLimit, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettin public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.MappingLimitSettingsNestedObjects value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLimit, value.Limit, null, null); + writer.WriteProperty(options, PropLimit, value.Limit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MergeScheduler.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MergeScheduler.g.cs index c5f9c91cda1..8ea88300943 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MergeScheduler.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/MergeScheduler.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MergeScheduler Rea LocalJsonValue propMaxThreadCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxMergeCount.TryReadProperty(ref reader, options, PropMaxMergeCount, null)) + if (propMaxMergeCount.TryReadProperty(ref reader, options, PropMaxMergeCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxThreadCount.TryReadProperty(ref reader, options, PropMaxThreadCount, null)) + if (propMaxThreadCount.TryReadProperty(ref reader, options, PropMaxThreadCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.MergeScheduler Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.MergeScheduler value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxMergeCount, value.MaxMergeCount, null, null); - writer.WriteProperty(options, PropMaxThreadCount, value.MaxThreadCount, null, null); + writer.WriteProperty(options, PropMaxMergeCount, value.MaxMergeCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxThreadCount, value.MaxThreadCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RecoveryOrigin.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RecoveryOrigin.g.cs index c648611b3e7..f55c87fc077 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RecoveryOrigin.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RecoveryOrigin.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RecoveryOrigin Rea LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBootstrapNewHistoryUuid.TryReadProperty(ref reader, options, PropBootstrapNewHistoryUuid, null)) + if (propBootstrapNewHistoryUuid.TryReadProperty(ref reader, options, PropBootstrapNewHistoryUuid, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,7 +145,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RecoveryOrigin Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.RecoveryOrigin value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBootstrapNewHistoryUuid, value.BootstrapNewHistoryUuid, null, null); + writer.WriteProperty(options, PropBootstrapNewHistoryUuid, value.BootstrapNewHistoryUuid, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHost, value.Host, null, null); writer.WriteProperty(options, PropHostname, value.Hostname, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs index 3e423639c45..4669ab7d501 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveAction.g.cs @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RemoveAction Read( continue; } - if (propMustExist.TryReadProperty(ref reader, options, PropMustExist, null)) + if (propMustExist.TryReadProperty(ref reader, options, PropMustExist, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAliases, value.Aliases, 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, PropIndex, value.Index, null, null); writer.WriteProperty(options, PropIndices, value.Indices, null, null); - writer.WriteProperty(options, PropMustExist, value.MustExist, null, null); + writer.WriteProperty(options, PropMustExist, value.MustExist, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs index a664d744bf5..8258fe80293 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RemoveIndexAction.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RemoveIndexAction continue; } - if (propMustExist.TryReadProperty(ref reader, options, PropMustExist, null)) + if (propMustExist.TryReadProperty(ref reader, options, PropMustExist, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropIndex, value.Index, null, null); writer.WriteProperty(options, PropIndices, value.Indices, null, null); - writer.WriteProperty(options, PropMustExist, value.MustExist, null, null); + writer.WriteProperty(options, PropMustExist, value.MustExist, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ResolveClusterInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ResolveClusterInfo.g.cs index dac73d5e8f0..1b4161d6e35 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ResolveClusterInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ResolveClusterInfo.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ResolveClusterInfo continue; } - if (propMatchingIndices.TryReadProperty(ref reader, options, PropMatchingIndices, null)) + if (propMatchingIndices.TryReadProperty(ref reader, options, PropMatchingIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropConnected, value.Connected, null, null); writer.WriteProperty(options, PropError, value.Error, null, null); - writer.WriteProperty(options, PropMatchingIndices, value.MatchingIndices, null, null); + writer.WriteProperty(options, PropMatchingIndices, value.MatchingIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSkipUnavailable, value.SkipUnavailable, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RolloverConditions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RolloverConditions.g.cs index f4a907fc810..a6ee808e4eb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RolloverConditions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/RolloverConditions.g.cs @@ -66,17 +66,17 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RolloverConditions continue; } - if (propMaxAgeMillis.TryReadProperty(ref reader, options, PropMaxAgeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propMaxAgeMillis.TryReadProperty(ref reader, options, PropMaxAgeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, null)) + if (propMaxDocs.TryReadProperty(ref reader, options, PropMaxDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxPrimaryShardDocs.TryReadProperty(ref reader, options, PropMaxPrimaryShardDocs, null)) + if (propMaxPrimaryShardDocs.TryReadProperty(ref reader, options, PropMaxPrimaryShardDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RolloverConditions continue; } - if (propMaxPrimaryShardSizeBytes.TryReadProperty(ref reader, options, PropMaxPrimaryShardSizeBytes, null)) + if (propMaxPrimaryShardSizeBytes.TryReadProperty(ref reader, options, PropMaxPrimaryShardSizeBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RolloverConditions continue; } - if (propMaxSizeBytes.TryReadProperty(ref reader, options, PropMaxSizeBytes, null)) + if (propMaxSizeBytes.TryReadProperty(ref reader, options, PropMaxSizeBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RolloverConditions continue; } - if (propMinDocs.TryReadProperty(ref reader, options, PropMinDocs, null)) + if (propMinDocs.TryReadProperty(ref reader, options, PropMinDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinPrimaryShardDocs.TryReadProperty(ref reader, options, PropMinPrimaryShardDocs, null)) + if (propMinPrimaryShardDocs.TryReadProperty(ref reader, options, PropMinPrimaryShardDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,7 +121,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RolloverConditions continue; } - if (propMinPrimaryShardSizeBytes.TryReadProperty(ref reader, options, PropMinPrimaryShardSizeBytes, null)) + if (propMinPrimaryShardSizeBytes.TryReadProperty(ref reader, options, PropMinPrimaryShardSizeBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -131,7 +131,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.RolloverConditions continue; } - if (propMinSizeBytes.TryReadProperty(ref reader, options, PropMinSizeBytes, null)) + if (propMinSizeBytes.TryReadProperty(ref reader, options, PropMinSizeBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -170,20 +170,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMaxAge, value.MaxAge, null, null); - writer.WriteProperty(options, PropMaxAgeMillis, value.MaxAgeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, null); - writer.WriteProperty(options, PropMaxPrimaryShardDocs, value.MaxPrimaryShardDocs, null, null); + writer.WriteProperty(options, PropMaxAgeMillis, value.MaxAgeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropMaxDocs, value.MaxDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxPrimaryShardDocs, value.MaxPrimaryShardDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxPrimaryShardSize, value.MaxPrimaryShardSize, null, null); - writer.WriteProperty(options, PropMaxPrimaryShardSizeBytes, value.MaxPrimaryShardSizeBytes, null, null); + writer.WriteProperty(options, PropMaxPrimaryShardSizeBytes, value.MaxPrimaryShardSizeBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxSize, value.MaxSize, null, null); - writer.WriteProperty(options, PropMaxSizeBytes, value.MaxSizeBytes, null, null); + writer.WriteProperty(options, PropMaxSizeBytes, value.MaxSizeBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinAge, value.MinAge, null, null); - writer.WriteProperty(options, PropMinDocs, value.MinDocs, null, null); - writer.WriteProperty(options, PropMinPrimaryShardDocs, value.MinPrimaryShardDocs, null, null); + writer.WriteProperty(options, PropMinDocs, value.MinDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinPrimaryShardDocs, value.MinPrimaryShardDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinPrimaryShardSize, value.MinPrimaryShardSize, null, null); - writer.WriteProperty(options, PropMinPrimaryShardSizeBytes, value.MinPrimaryShardSizeBytes, null, null); + writer.WriteProperty(options, PropMinPrimaryShardSizeBytes, value.MinPrimaryShardSizeBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinSize, value.MinSize, null, null); - writer.WriteProperty(options, PropMinSizeBytes, value.MinSizeBytes, null, null); + writer.WriteProperty(options, PropMinSizeBytes, value.MinSizeBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsAnalyze.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsAnalyze.g.cs index 81a4d3b14f2..b5329931608 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsAnalyze.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsAnalyze.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsAnalyze Re LocalJsonValue propMaxTokenCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxTokenCount.TryReadProperty(ref reader, options, PropMaxTokenCount, null)) + if (propMaxTokenCount.TryReadProperty(ref reader, options, PropMaxTokenCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsAnalyze Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SettingsAnalyze value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxTokenCount, value.MaxTokenCount, null, null); + writer.WriteProperty(options, PropMaxTokenCount, value.MaxTokenCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsHighlight.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsHighlight.g.cs index ea1cda8e15d..26281f1695e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsHighlight.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsHighlight.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsHighlight LocalJsonValue propMaxAnalyzedOffset = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxAnalyzedOffset.TryReadProperty(ref reader, options, PropMaxAnalyzedOffset, null)) + if (propMaxAnalyzedOffset.TryReadProperty(ref reader, options, PropMaxAnalyzedOffset, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsHighlight public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SettingsHighlight value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxAnalyzedOffset, value.MaxAnalyzedOffset, null, null); + writer.WriteProperty(options, PropMaxAnalyzedOffset, value.MaxAnalyzedOffset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityBm25.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityBm25.g.cs index a390d125faf..1e4889ef433 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityBm25.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityBm25.g.cs @@ -38,17 +38,17 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarity LocalJsonValue propK1 = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propB.TryReadProperty(ref reader, options, PropB, null)) + if (propB.TryReadProperty(ref reader, options, PropB, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDiscountOverlaps.TryReadProperty(ref reader, options, PropDiscountOverlaps, null)) + if (propDiscountOverlaps.TryReadProperty(ref reader, options, PropDiscountOverlaps, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propK1.TryReadProperty(ref reader, options, PropK1, null)) + if (propK1.TryReadProperty(ref reader, options, PropK1, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,9 +80,9 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarity public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarityBm25 value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropB, value.B, null, null); - writer.WriteProperty(options, PropDiscountOverlaps, value.DiscountOverlaps, null, null); - writer.WriteProperty(options, PropK1, value.K1, null, null); + writer.WriteProperty(options, PropB, value.B, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDiscountOverlaps, value.DiscountOverlaps, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropK1, value.K1, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmd.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmd.g.cs index 4cb166acf32..2216adc468e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmd.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmd.g.cs @@ -34,7 +34,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarity LocalJsonValue propMu = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMu.TryReadProperty(ref reader, options, PropMu, null)) + if (propMu.TryReadProperty(ref reader, options, PropMu, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarity public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarityLmd value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMu, value.Mu, null, null); + writer.WriteProperty(options, PropMu, value.Mu, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmj.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmj.g.cs index 856168c7031..6a4343e9d38 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmj.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SettingsSimilarityLmj.g.cs @@ -34,7 +34,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarity LocalJsonValue propLambda = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propLambda.TryReadProperty(ref reader, options, PropLambda, null)) + if (propLambda.TryReadProperty(ref reader, options, PropLambda, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarity public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SettingsSimilarityLmj value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropLambda, value.Lambda, null, null); + writer.WriteProperty(options, PropLambda, value.Lambda, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardFileSizeInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardFileSizeInfo.g.cs index 5e7a2ea4680..eb1d6158481 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardFileSizeInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardFileSizeInfo.g.cs @@ -43,12 +43,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ShardFileSizeInfo LocalJsonValue propSizeInBytes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAverageSizeInBytes.TryReadProperty(ref reader, options, PropAverageSizeInBytes, null)) + if (propAverageSizeInBytes.TryReadProperty(ref reader, options, PropAverageSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,12 +58,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ShardFileSizeInfo continue; } - if (propMaxSizeInBytes.TryReadProperty(ref reader, options, PropMaxSizeInBytes, null)) + if (propMaxSizeInBytes.TryReadProperty(ref reader, options, PropMaxSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinSizeInBytes.TryReadProperty(ref reader, options, PropMinSizeInBytes, null)) + if (propMinSizeInBytes.TryReadProperty(ref reader, options, PropMinSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,11 +97,11 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ShardFileSizeInfo public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.ShardFileSizeInfo value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAverageSizeInBytes, value.AverageSizeInBytes, null, null); - writer.WriteProperty(options, PropCount, value.Count, null, null); + writer.WriteProperty(options, PropAverageSizeInBytes, value.AverageSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropMaxSizeInBytes, value.MaxSizeInBytes, null, null); - writer.WriteProperty(options, PropMinSizeInBytes, value.MinSizeInBytes, null, null); + writer.WriteProperty(options, PropMaxSizeInBytes, value.MaxSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinSizeInBytes, value.MinSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSizeInBytes, value.SizeInBytes, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardRecovery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardRecovery.g.cs index dade4f8957c..4abadfe7498 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardRecovery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardRecovery.g.cs @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ShardRecovery Read 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)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -103,12 +103,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ShardRecovery Read continue; } - if (propStopTime.TryReadProperty(ref reader, options, PropStopTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propStopTime.TryReadProperty(ref reader, options, PropStopTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propStopTimeInMillis.TryReadProperty(ref reader, options, PropStopTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propStopTimeInMillis.TryReadProperty(ref reader, options, PropStopTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -183,10 +183,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteProperty(options, PropStage, value.Stage, null, null); writer.WriteProperty(options, PropStart, value.Start, 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.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropStopTime, value.StopTime, 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, PropStopTimeInMillis, value.StopTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropStopTime, value.StopTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStopTimeInMillis, value.StopTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropTarget, value.Target, null, null); writer.WriteProperty(options, PropTotalTime, value.TotalTime, null, null); writer.WriteProperty(options, PropTotalTimeInMillis, value.TotalTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardStore.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardStore.g.cs index 39a766f3349..e56bf57f5fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardStore.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/ShardStore.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.ShardStore Read(re } propNodeId.Initialized = propNode.Initialized = true; - reader.ReadProperty(options, out propNodeId.Value, out propNode.Value, null, null); + reader.ReadProperty(options, out propNodeId.Value, out propNode.Value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAllocation, value.Allocation, null, null); writer.WriteProperty(options, PropAllocationId, value.AllocationId, null, null); writer.WriteProperty(options, PropStoreException, value.StoreException, null, null); - writer.WriteProperty(options, value.NodeId, value.Node, null, null); + writer.WriteProperty(options, value.NodeId, value.Node, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SlowlogSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SlowlogSettings.g.cs index 7d55de11501..7dceb395a37 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SlowlogSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SlowlogSettings.g.cs @@ -44,12 +44,12 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SlowlogSettings Re continue; } - if (propReformat.TryReadProperty(ref reader, options, PropReformat, null)) + if (propReformat.TryReadProperty(ref reader, options, PropReformat, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSource.TryReadProperty(ref reader, options, PropSource, null)) + if (propSource.TryReadProperty(ref reader, options, PropSource, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,8 +82,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropLevel, value.Level, null, null); - writer.WriteProperty(options, PropReformat, value.Reformat, null, null); - writer.WriteProperty(options, PropSource, value.Source, null, null); + writer.WriteProperty(options, PropReformat, value.Reformat, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSource, value.Source, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropThreshold, value.Threshold, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SoftDeletes.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SoftDeletes.g.cs index 4cbf0f2ef4e..4d2b1fae80d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SoftDeletes.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/SoftDeletes.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SoftDeletes Read(r LocalJsonValue propRetentionLease = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.SoftDeletes Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.SoftDeletes value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRetentionLease, value.RetentionLease, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Storage.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Storage.g.cs index 04c382c2c65..0b87bb2140c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Storage.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Storage.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.Storage Read(ref S LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowMmap.TryReadProperty(ref reader, options, PropAllowMmap, null)) + if (propAllowMmap.TryReadProperty(ref reader, options, PropAllowMmap, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.Storage Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.Storage value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowMmap, value.AllowMmap, null, null); + writer.WriteProperty(options, PropAllowMmap, value.AllowMmap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/TemplateMapping.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/TemplateMapping.g.cs index 47e7f42d6eb..b4426c7e2e4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/TemplateMapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/TemplateMapping.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.TemplateMapping Re continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -102,7 +102,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropMappings, value.Mappings, null, null); writer.WriteProperty(options, PropOrder, value.Order, null, null); writer.WriteProperty(options, PropSettings, value.Settings, 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, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Translog.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Translog.g.cs index 4a782c07ecd..f98db7abbfc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Translog.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexManagement/Translog.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.Translog Read(ref LocalJsonValue propSyncInterval = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDurability.TryReadProperty(ref reader, options, PropDurability, null)) + if (propDurability.TryReadProperty(ref reader, options, PropDurability, static Elastic.Clients.Elasticsearch.IndexManagement.TranslogDurability? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.IndexManagement.Translog Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndexManagement.Translog value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDurability, value.Durability, null, null); + writer.WriteProperty(options, PropDurability, value.Durability, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.IndexManagement.TranslogDurability? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFlushThresholdSize, value.FlushThresholdSize, null, null); writer.WriteProperty(options, PropRetention, value.Retention, null, null); writer.WriteProperty(options, PropSyncInterval, value.SyncInterval, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexingStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexingStats.g.cs index 2f46463a582..f14d823d884 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexingStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndexingStats.g.cs @@ -131,7 +131,7 @@ public override Elastic.Clients.Elasticsearch.IndexingStats Read(ref System.Text continue; } - if (propWriteLoad.TryReadProperty(ref reader, options, PropWriteLoad, null)) + if (propWriteLoad.TryReadProperty(ref reader, options, PropWriteLoad, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -183,7 +183,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropThrottleTime, value.ThrottleTime, null, null); writer.WriteProperty(options, PropThrottleTimeInMillis, value.ThrottleTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropTypes, value.Types, 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, PropWriteLoad, value.WriteLoad, null, null); + writer.WriteProperty(options, PropWriteLoad, value.WriteLoad, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndicesOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndicesOptions.g.cs index 60ee500d03e..ace167d6a4b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndicesOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/IndicesOptions.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.IndicesOptions Read(ref System.Tex LocalJsonValue propIgnoreUnavailable = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowNoIndices.TryReadProperty(ref reader, options, PropAllowNoIndices, null)) + if (propAllowNoIndices.TryReadProperty(ref reader, options, PropAllowNoIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.IndicesOptions Read(ref System.Tex continue; } - if (propIgnoreThrottled.TryReadProperty(ref reader, options, PropIgnoreThrottled, null)) + if (propIgnoreThrottled.TryReadProperty(ref reader, options, PropIgnoreThrottled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, null)) + if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.IndicesOptions Read(ref System.Tex public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.IndicesOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowNoIndices, value.AllowNoIndices, null, null); + writer.WriteProperty(options, PropAllowNoIndices, value.AllowNoIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropIgnoreThrottled, value.IgnoreThrottled, null, null); - writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, null); + writer.WriteProperty(options, PropIgnoreThrottled, value.IgnoreThrottled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AdaptiveAllocations.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AdaptiveAllocations.g.cs index f463f057cff..b95ff6b7478 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AdaptiveAllocations.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AdaptiveAllocations.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Inference.AdaptiveAllocations Read LocalJsonValue propMinNumberOfAllocations = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxNumberOfAllocations.TryReadProperty(ref reader, options, PropMaxNumberOfAllocations, null)) + if (propMaxNumberOfAllocations.TryReadProperty(ref reader, options, PropMaxNumberOfAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinNumberOfAllocations.TryReadProperty(ref reader, options, PropMinNumberOfAllocations, null)) + if (propMinNumberOfAllocations.TryReadProperty(ref reader, options, PropMinNumberOfAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Inference.AdaptiveAllocations Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.AdaptiveAllocations value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); - writer.WriteProperty(options, PropMaxNumberOfAllocations, value.MaxNumberOfAllocations, null, null); - writer.WriteProperty(options, PropMinNumberOfAllocations, value.MinNumberOfAllocations, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxNumberOfAllocations, value.MaxNumberOfAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinNumberOfAllocations, value.MinNumberOfAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AlibabaCloudTaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AlibabaCloudTaskSettings.g.cs index 94ae39fbb78..51d1e9d8e99 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AlibabaCloudTaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AlibabaCloudTaskSettings.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Inference.AlibabaCloudTaskSettings continue; } - if (propReturnToken.TryReadProperty(ref reader, options, PropReturnToken, null)) + if (propReturnToken.TryReadProperty(ref reader, options, PropReturnToken, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropInputType, value.InputType, null, null); - writer.WriteProperty(options, PropReturnToken, value.ReturnToken, null, null); + writer.WriteProperty(options, PropReturnToken, value.ReturnToken, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AmazonBedrockTaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AmazonBedrockTaskSettings.g.cs index 3c3f1060d8c..d1415c2eb51 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AmazonBedrockTaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AmazonBedrockTaskSettings.g.cs @@ -39,22 +39,22 @@ public override Elastic.Clients.Elasticsearch.Inference.AmazonBedrockTaskSetting LocalJsonValue propTopP = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxNewTokens.TryReadProperty(ref reader, options, PropMaxNewTokens, null)) + if (propMaxNewTokens.TryReadProperty(ref reader, options, PropMaxNewTokens, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, null)) + if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopK.TryReadProperty(ref reader, options, PropTopK, null)) + if (propTopK.TryReadProperty(ref reader, options, PropTopK, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopP.TryReadProperty(ref reader, options, PropTopP, null)) + if (propTopP.TryReadProperty(ref reader, options, PropTopP, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.Inference.AmazonBedrockTaskSetting public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.AmazonBedrockTaskSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxNewTokens, value.MaxNewTokens, null, null); - writer.WriteProperty(options, PropTemperature, value.Temperature, null, null); - writer.WriteProperty(options, PropTopK, value.TopK, null, null); - writer.WriteProperty(options, PropTopP, value.TopP, null, null); + writer.WriteProperty(options, PropMaxNewTokens, value.MaxNewTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTemperature, value.Temperature, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopK, value.TopK, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopP, value.TopP, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AnthropicTaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AnthropicTaskSettings.g.cs index 3c0411af820..cddb0d47054 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AnthropicTaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AnthropicTaskSettings.g.cs @@ -44,17 +44,17 @@ public override Elastic.Clients.Elasticsearch.Inference.AnthropicTaskSettings Re continue; } - if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, null)) + if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopK.TryReadProperty(ref reader, options, PropTopK, null)) + if (propTopK.TryReadProperty(ref reader, options, PropTopK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopP.TryReadProperty(ref reader, options, PropTopP, null)) + if (propTopP.TryReadProperty(ref reader, options, PropTopP, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMaxTokens, value.MaxTokens, null, null); - writer.WriteProperty(options, PropTemperature, value.Temperature, null, null); - writer.WriteProperty(options, PropTopK, value.TopK, null, null); - writer.WriteProperty(options, PropTopP, value.TopP, null, null); + writer.WriteProperty(options, PropTemperature, value.Temperature, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopK, value.TopK, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopP, value.TopP, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AzureAiStudioTaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AzureAiStudioTaskSettings.g.cs index a8496e67c96..1ba08d90db2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AzureAiStudioTaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/AzureAiStudioTaskSettings.g.cs @@ -41,22 +41,22 @@ public override Elastic.Clients.Elasticsearch.Inference.AzureAiStudioTaskSetting LocalJsonValue propUser = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDoSample.TryReadProperty(ref reader, options, PropDoSample, null)) + if (propDoSample.TryReadProperty(ref reader, options, PropDoSample, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxNewTokens.TryReadProperty(ref reader, options, PropMaxNewTokens, null)) + if (propMaxNewTokens.TryReadProperty(ref reader, options, PropMaxNewTokens, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, null)) + if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopP.TryReadProperty(ref reader, options, PropTopP, null)) + if (propTopP.TryReadProperty(ref reader, options, PropTopP, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,10 +89,10 @@ public override Elastic.Clients.Elasticsearch.Inference.AzureAiStudioTaskSetting public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.AzureAiStudioTaskSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDoSample, value.DoSample, null, null); - writer.WriteProperty(options, PropMaxNewTokens, value.MaxNewTokens, null, null); - writer.WriteProperty(options, PropTemperature, value.Temperature, null, null); - writer.WriteProperty(options, PropTopP, value.TopP, null, null); + writer.WriteProperty(options, PropDoSample, value.DoSample, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxNewTokens, value.MaxNewTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTemperature, value.Temperature, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopP, value.TopP, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropUser, value.User, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereServiceSettings.g.cs index eb557ec44ff..9a8964ade56 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereServiceSettings.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Inference.CohereServiceSettings Re continue; } - if (propEmbeddingType.TryReadProperty(ref reader, options, PropEmbeddingType, null)) + if (propEmbeddingType.TryReadProperty(ref reader, options, PropEmbeddingType, static Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Inference.CohereServiceSettings Re continue; } - if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, null)) + if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, static Elastic.Clients.Elasticsearch.Inference.CohereSimilarityType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,10 +90,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); - writer.WriteProperty(options, PropEmbeddingType, value.EmbeddingType, null, null); + writer.WriteProperty(options, PropEmbeddingType, value.EmbeddingType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Inference.CohereEmbeddingType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropRateLimit, value.RateLimit, null, null); - writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); + writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Inference.CohereSimilarityType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -144,6 +144,8 @@ internal CohereServiceSettings(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// /// For a text_embedding task, the types of embeddings you want to get back. + /// Use binary for binary embeddings, which are encoded as bytes with signed int8 precision. + /// Use bit for binary embeddings, which are encoded as bytes with signed int8 precision (this is a synonym of binary). /// Use byte for signed int8 embeddings (this is a synonym of int8). /// Use float for the default float embeddings. /// Use int8 for signed int8 embeddings. @@ -236,6 +238,8 @@ public Elastic.Clients.Elasticsearch.Inference.CohereServiceSettingsDescriptor A /// /// /// For a text_embedding task, the types of embeddings you want to get back. + /// Use binary for binary embeddings, which are encoded as bytes with signed int8 precision. + /// Use bit for binary embeddings, which are encoded as bytes with signed int8 precision (this is a synonym of binary). /// Use byte for signed int8 embeddings (this is a synonym of int8). /// Use float for the default float embeddings. /// Use int8 for signed int8 embeddings. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereTaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereTaskSettings.g.cs index 4d569f60eb4..59655b377cf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereTaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CohereTaskSettings.g.cs @@ -39,22 +39,22 @@ public override Elastic.Clients.Elasticsearch.Inference.CohereTaskSettings Read( LocalJsonValue propTruncate = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propInputType.TryReadProperty(ref reader, options, PropInputType, null)) + if (propInputType.TryReadProperty(ref reader, options, PropInputType, static Elastic.Clients.Elasticsearch.Inference.CohereInputType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, null)) + if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopN.TryReadProperty(ref reader, options, PropTopN, null)) + if (propTopN.TryReadProperty(ref reader, options, PropTopN, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, null)) + if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, static Elastic.Clients.Elasticsearch.Inference.CohereTruncateType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.Inference.CohereTaskSettings Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.CohereTaskSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropInputType, value.InputType, null, null); - writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, null); - writer.WriteProperty(options, PropTopN, value.TopN, null, null); - writer.WriteProperty(options, PropTruncate, value.Truncate, null, null); + writer.WriteProperty(options, PropInputType, value.InputType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Inference.CohereInputType? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopN, value.TopN, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTruncate, value.Truncate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Inference.CohereTruncateType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CompletionToolFunction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CompletionToolFunction.g.cs index b73bfc9a254..802f60c3878 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CompletionToolFunction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/CompletionToolFunction.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Inference.CompletionToolFunction R continue; } - if (propStrict.TryReadProperty(ref reader, options, PropStrict, null)) + if (propStrict.TryReadProperty(ref reader, options, PropStrict, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteProperty(options, PropParameters, value.Parameters, null, null); - writer.WriteProperty(options, PropStrict, value.Strict, null, null); + writer.WriteProperty(options, PropStrict, value.Strict, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.g.cs index d0d6d5f808c..8baea6e16ad 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchServiceSettings.g.cs @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Inference.ElasticsearchServiceSett continue; } - if (propNumAllocations.TryReadProperty(ref reader, options, PropNumAllocations, null)) + if (propNumAllocations.TryReadProperty(ref reader, options, PropNumAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,7 +92,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAdaptiveAllocations, value.AdaptiveAllocations, null, null); writer.WriteProperty(options, PropDeploymentId, value.DeploymentId, null, null); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); - writer.WriteProperty(options, PropNumAllocations, value.NumAllocations, null, null); + writer.WriteProperty(options, PropNumAllocations, value.NumAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNumThreads, value.NumThreads, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchTaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchTaskSettings.g.cs index 5f7bd5496e0..fdd264fc9ec 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchTaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/ElasticsearchTaskSettings.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Inference.ElasticsearchTaskSetting LocalJsonValue propReturnDocuments = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, null)) + if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Inference.ElasticsearchTaskSetting public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.ElasticsearchTaskSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, null); + writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/GoogleVertexAITaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/GoogleVertexAITaskSettings.g.cs index d585a8e16e1..9fe39debb81 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/GoogleVertexAITaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/GoogleVertexAITaskSettings.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskSettin LocalJsonValue propTopN = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAutoTruncate.TryReadProperty(ref reader, options, PropAutoTruncate, null)) + if (propAutoTruncate.TryReadProperty(ref reader, options, PropAutoTruncate, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopN.TryReadProperty(ref reader, options, PropTopN, null)) + if (propTopN.TryReadProperty(ref reader, options, PropTopN, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskSettin public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.GoogleVertexAITaskSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAutoTruncate, value.AutoTruncate, null, null); - writer.WriteProperty(options, PropTopN, value.TopN, null, null); + writer.WriteProperty(options, PropAutoTruncate, value.AutoTruncate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopN, value.TopN, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/HuggingFaceServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/HuggingFaceServiceSettings.g.cs index 8462e99a92b..2b9934509da 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/HuggingFaceServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/HuggingFaceServiceSettings.g.cs @@ -26,6 +26,7 @@ namespace Elastic.Clients.Elasticsearch.Inference; internal sealed partial class HuggingFaceServiceSettingsConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText PropApiKey = System.Text.Json.JsonEncodedText.Encode("api_key"); + private static readonly System.Text.Json.JsonEncodedText PropModelId = System.Text.Json.JsonEncodedText.Encode("model_id"); private static readonly System.Text.Json.JsonEncodedText PropRateLimit = System.Text.Json.JsonEncodedText.Encode("rate_limit"); private static readonly System.Text.Json.JsonEncodedText PropUrl = System.Text.Json.JsonEncodedText.Encode("url"); @@ -33,6 +34,7 @@ public override Elastic.Clients.Elasticsearch.Inference.HuggingFaceServiceSettin { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propApiKey = default; + LocalJsonValue propModelId = default; LocalJsonValue propRateLimit = default; LocalJsonValue propUrl = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -42,6 +44,11 @@ public override Elastic.Clients.Elasticsearch.Inference.HuggingFaceServiceSettin continue; } + if (propModelId.TryReadProperty(ref reader, options, PropModelId, null)) + { + continue; + } + if (propRateLimit.TryReadProperty(ref reader, options, PropRateLimit, null)) { continue; @@ -65,6 +72,7 @@ public override Elastic.Clients.Elasticsearch.Inference.HuggingFaceServiceSettin return new Elastic.Clients.Elasticsearch.Inference.HuggingFaceServiceSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) { ApiKey = propApiKey.Value, + ModelId = propModelId.Value, RateLimit = propRateLimit.Value, Url = propUrl.Value }; @@ -74,6 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); + writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropRateLimit, value.RateLimit, null, null); writer.WriteProperty(options, PropUrl, value.Url, null, null); writer.WriteEndObject(); @@ -124,10 +133,21 @@ internal HuggingFaceServiceSettings(Elastic.Clients.Elasticsearch.Serialization. #endif string ApiKey { get; set; } + /// + /// + /// The name of the HuggingFace model to use for the inference task. + /// For completion and chat_completion tasks, this field is optional but may be required for certain models — particularly when using serverless inference endpoints. + /// For the text_embedding task, this field should not be included. Otherwise, the request will fail. + /// + /// + public string? ModelId { get; set; } + /// /// /// This setting helps to minimize the number of rate limit errors returned from Hugging Face. - /// By default, the hugging_face service sets the number of requests allowed per minute to 3000. + /// By default, the hugging_face service sets the number of requests allowed per minute to 3000 for all supported tasks. + /// Hugging Face does not publish a universal rate limit — actual limits may vary. + /// It is recommended to adjust this value based on the capacity and limits of your specific deployment environment. /// /// public Elastic.Clients.Elasticsearch.Inference.RateLimitSetting? RateLimit { get; set; } @@ -135,6 +155,8 @@ internal HuggingFaceServiceSettings(Elastic.Clients.Elasticsearch.Serialization. /// /// /// The URL endpoint to use for the requests. + /// For completion and chat_completion tasks, the deployed model must be compatible with the Hugging Face Chat Completion interface (see the linked external documentation for details). The endpoint URL for the request must include /v1/chat/completions. + /// If the model supports the OpenAI Chat Completion schema, a toggle should appear in the interface. Enabling this toggle doesn't change any model behavior, it reveals the full endpoint URL needed (which should include /v1/chat/completions) when configuring the inference endpoint in Elasticsearch. If the model doesn't support this schema, the toggle may not be shown. /// /// public @@ -181,10 +203,25 @@ public Elastic.Clients.Elasticsearch.Inference.HuggingFaceServiceSettingsDescrip return this; } + /// + /// + /// The name of the HuggingFace model to use for the inference task. + /// For completion and chat_completion tasks, this field is optional but may be required for certain models — particularly when using serverless inference endpoints. + /// For the text_embedding task, this field should not be included. Otherwise, the request will fail. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.HuggingFaceServiceSettingsDescriptor ModelId(string? value) + { + Instance.ModelId = value; + return this; + } + /// /// /// This setting helps to minimize the number of rate limit errors returned from Hugging Face. - /// By default, the hugging_face service sets the number of requests allowed per minute to 3000. + /// By default, the hugging_face service sets the number of requests allowed per minute to 3000 for all supported tasks. + /// Hugging Face does not publish a universal rate limit — actual limits may vary. + /// It is recommended to adjust this value based on the capacity and limits of your specific deployment environment. /// /// public Elastic.Clients.Elasticsearch.Inference.HuggingFaceServiceSettingsDescriptor RateLimit(Elastic.Clients.Elasticsearch.Inference.RateLimitSetting? value) @@ -196,7 +233,9 @@ public Elastic.Clients.Elasticsearch.Inference.HuggingFaceServiceSettingsDescrip /// /// /// This setting helps to minimize the number of rate limit errors returned from Hugging Face. - /// By default, the hugging_face service sets the number of requests allowed per minute to 3000. + /// By default, the hugging_face service sets the number of requests allowed per minute to 3000 for all supported tasks. + /// Hugging Face does not publish a universal rate limit — actual limits may vary. + /// It is recommended to adjust this value based on the capacity and limits of your specific deployment environment. /// /// public Elastic.Clients.Elasticsearch.Inference.HuggingFaceServiceSettingsDescriptor RateLimit() @@ -208,7 +247,9 @@ public Elastic.Clients.Elasticsearch.Inference.HuggingFaceServiceSettingsDescrip /// /// /// This setting helps to minimize the number of rate limit errors returned from Hugging Face. - /// By default, the hugging_face service sets the number of requests allowed per minute to 3000. + /// By default, the hugging_face service sets the number of requests allowed per minute to 3000 for all supported tasks. + /// Hugging Face does not publish a universal rate limit — actual limits may vary. + /// It is recommended to adjust this value based on the capacity and limits of your specific deployment environment. /// /// public Elastic.Clients.Elasticsearch.Inference.HuggingFaceServiceSettingsDescriptor RateLimit(System.Action? action) @@ -220,6 +261,8 @@ public Elastic.Clients.Elasticsearch.Inference.HuggingFaceServiceSettingsDescrip /// /// /// The URL endpoint to use for the requests. + /// For completion and chat_completion tasks, the deployed model must be compatible with the Hugging Face Chat Completion interface (see the linked external documentation for details). The endpoint URL for the request must include /v1/chat/completions. + /// If the model supports the OpenAI Chat Completion schema, a toggle should appear in the interface. Enabling this toggle doesn't change any model behavior, it reveals the full endpoint URL needed (which should include /v1/chat/completions) when configuring the inference endpoint in Elasticsearch. If the model doesn't support this schema, the toggle may not be shown. /// /// public Elastic.Clients.Elasticsearch.Inference.HuggingFaceServiceSettingsDescriptor Url(string value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/HuggingFaceTaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/HuggingFaceTaskSettings.g.cs new file mode 100644 index 00000000000..67501bd5d0b --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/HuggingFaceTaskSettings.g.cs @@ -0,0 +1,163 @@ +// 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.Inference; + +internal sealed partial class HuggingFaceTaskSettingsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropReturnDocuments = System.Text.Json.JsonEncodedText.Encode("return_documents"); + private static readonly System.Text.Json.JsonEncodedText PropTopN = System.Text.Json.JsonEncodedText.Encode("top_n"); + + public override Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettings Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propReturnDocuments = default; + LocalJsonValue propTopN = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propTopN.TryReadProperty(ref reader, options, PropTopN, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + 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.Inference.HuggingFaceTaskSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + ReturnDocuments = propReturnDocuments.Value, + TopN = propTopN.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettings value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopN, value.TopN, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettingsConverter))] +public sealed partial class HuggingFaceTaskSettings +{ +#if NET7_0_OR_GREATER + public HuggingFaceTaskSettings() + { + } +#endif +#if !NET7_0_OR_GREATER + public HuggingFaceTaskSettings() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal HuggingFaceTaskSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// For a rerank task, return doc text within the results. + /// + /// + public bool? ReturnDocuments { get; set; } + + /// + /// + /// For a rerank task, the number of most relevant documents to return. + /// It defaults to the number of the documents. + /// + /// + public int? TopN { get; set; } +} + +public readonly partial struct HuggingFaceTaskSettingsDescriptor +{ + internal Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettings Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public HuggingFaceTaskSettingsDescriptor(Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettings instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public HuggingFaceTaskSettingsDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettingsDescriptor(Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettings instance) => new Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettingsDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettings(Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettingsDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// For a rerank task, return doc text within the results. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettingsDescriptor ReturnDocuments(bool? value = true) + { + Instance.ReturnDocuments = value; + return this; + } + + /// + /// + /// For a rerank task, the number of most relevant documents to return. + /// It defaults to the number of the documents. + /// + /// + public Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettingsDescriptor TopN(int? value) + { + Instance.TopN = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettings Build(System.Action? action) + { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettings(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + var builder = new Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettingsDescriptor(new Elastic.Clients.Elasticsearch.Inference.HuggingFaceTaskSettings(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/Inference/InferenceChunkingSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.g.cs index 57092ce8c4b..f62cbc789af 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/InferenceChunkingSettings.g.cs @@ -39,17 +39,17 @@ public override Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSetting LocalJsonValue propStrategy = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxChunkSize.TryReadProperty(ref reader, options, PropMaxChunkSize, null)) + if (propMaxChunkSize.TryReadProperty(ref reader, options, PropMaxChunkSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOverlap.TryReadProperty(ref reader, options, PropOverlap, null)) + if (propOverlap.TryReadProperty(ref reader, options, PropOverlap, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSentenceOverlap.TryReadProperty(ref reader, options, PropSentenceOverlap, null)) + if (propSentenceOverlap.TryReadProperty(ref reader, options, PropSentenceOverlap, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSetting public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.InferenceChunkingSettings 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, PropMaxChunkSize, value.MaxChunkSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOverlap, value.Overlap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSentenceOverlap, value.SentenceOverlap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStrategy, value.Strategy, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAIServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAIServiceSettings.g.cs index 8d2d6101adc..8b9cb8ec2d2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAIServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAIServiceSettings.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Inference.JinaAIServiceSettings Re continue; } - if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, null)) + if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, static Elastic.Clients.Elasticsearch.Inference.JinaAISimilarityType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropRateLimit, value.RateLimit, null, null); - writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); + writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Inference.JinaAISimilarityType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAITaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAITaskSettings.g.cs index 56bc25e3120..487112a0a00 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAITaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/JinaAITaskSettings.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Inference.JinaAITaskSettings Read( LocalJsonValue propTopN = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, null)) + if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTask.TryReadProperty(ref reader, options, PropTask, null)) + if (propTask.TryReadProperty(ref reader, options, PropTask, static Elastic.Clients.Elasticsearch.Inference.JinaAITextEmbeddingTask? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopN.TryReadProperty(ref reader, options, PropTopN, null)) + if (propTopN.TryReadProperty(ref reader, options, PropTopN, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Inference.JinaAITaskSettings Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.JinaAITaskSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, null); - writer.WriteProperty(options, PropTask, value.Task, null, null); - writer.WriteProperty(options, PropTopN, value.TopN, null, null); + writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTask, value.Task, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Inference.JinaAITextEmbeddingTask? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopN, value.TopN, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/Message.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/Message.g.cs index e90ccb1fb44..35037af3295 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/Message.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/Message.g.cs @@ -123,12 +123,33 @@ internal Message(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSent /// /// The content of the message. /// + /// + /// String example: + /// + /// + /// { + /// "content": "Some string" + /// } + /// + /// + /// Object example: + /// + /// + /// { + /// "content": [ + /// { + /// "text": "Some text", + /// "type": "text" + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Union>? Content { get; set; } /// /// - /// The role of the message author. + /// The role of the message author. Valid values are user, assistant, system, and tool. /// /// public @@ -139,15 +160,30 @@ internal Message(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSent /// /// - /// The tool call that this message is responding to. + /// Only for tool role messages. The tool call that this message is responding to. /// /// public Elastic.Clients.Elasticsearch.Id? ToolCallId { get; set; } /// /// - /// The tool calls generated by the model. + /// Only for assistant role messages. The tool calls generated by the model. If it's specified, the content field is optional. + /// Example: /// + /// + /// { + /// "tool_calls": [ + /// { + /// "id": "call_KcAjWtAww20AihPHphUh46Gd", + /// "type": "function", + /// "function": { + /// "name": "get_current_weather", + /// "arguments": "{\"location\":\"Boston, MA\"}" + /// } + /// } + /// ] + /// } + /// /// public System.Collections.Generic.ICollection? ToolCalls { get; set; } } @@ -180,6 +216,27 @@ public MessageDescriptor() /// /// The content of the message. /// + /// + /// String example: + /// + /// + /// { + /// "content": "Some string" + /// } + /// + /// + /// Object example: + /// + /// + /// { + /// "content": [ + /// { + /// "text": "Some text", + /// "type": "text" + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor Content(Elastic.Clients.Elasticsearch.Union>? value) { @@ -189,7 +246,7 @@ public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor Content(Elastic /// /// - /// The role of the message author. + /// The role of the message author. Valid values are user, assistant, system, and tool. /// /// public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor Role(string value) @@ -200,7 +257,7 @@ public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor Role(string val /// /// - /// The tool call that this message is responding to. + /// Only for tool role messages. The tool call that this message is responding to. /// /// public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor ToolCallId(Elastic.Clients.Elasticsearch.Id? value) @@ -211,8 +268,23 @@ public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor ToolCallId(Elas /// /// - /// The tool calls generated by the model. + /// Only for assistant role messages. The tool calls generated by the model. If it's specified, the content field is optional. + /// Example: /// + /// + /// { + /// "tool_calls": [ + /// { + /// "id": "call_KcAjWtAww20AihPHphUh46Gd", + /// "type": "function", + /// "function": { + /// "name": "get_current_weather", + /// "arguments": "{\"location\":\"Boston, MA\"}" + /// } + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor ToolCalls(System.Collections.Generic.ICollection? value) { @@ -222,8 +294,23 @@ public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor ToolCalls(Syste /// /// - /// The tool calls generated by the model. + /// Only for assistant role messages. The tool calls generated by the model. If it's specified, the content field is optional. + /// Example: /// + /// + /// { + /// "tool_calls": [ + /// { + /// "id": "call_KcAjWtAww20AihPHphUh46Gd", + /// "type": "function", + /// "function": { + /// "name": "get_current_weather", + /// "arguments": "{\"location\":\"Boston, MA\"}" + /// } + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor ToolCalls(params Elastic.Clients.Elasticsearch.Inference.ToolCall[] values) { @@ -233,8 +320,23 @@ public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor ToolCalls(param /// /// - /// The tool calls generated by the model. + /// Only for assistant role messages. The tool calls generated by the model. If it's specified, the content field is optional. + /// Example: /// + /// + /// { + /// "tool_calls": [ + /// { + /// "id": "call_KcAjWtAww20AihPHphUh46Gd", + /// "type": "function", + /// "function": { + /// "name": "get_current_weather", + /// "arguments": "{\"location\":\"Boston, MA\"}" + /// } + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.MessageDescriptor ToolCalls(params System.Action[] actions) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/MistralServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/MistralServiceSettings.g.cs index fe7b6f01977..95acd2b7cd6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/MistralServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/MistralServiceSettings.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Inference.MistralServiceSettings R continue; } - if (propMaxInputTokens.TryReadProperty(ref reader, options, PropMaxInputTokens, null)) + if (propMaxInputTokens.TryReadProperty(ref reader, options, PropMaxInputTokens, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); - writer.WriteProperty(options, PropMaxInputTokens, value.MaxInputTokens, null, null); + writer.WriteProperty(options, PropMaxInputTokens, value.MaxInputTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModel, value.Model, null, null); writer.WriteProperty(options, PropRateLimit, value.RateLimit, null, null); writer.WriteEndObject(); @@ -143,7 +143,7 @@ internal MistralServiceSettings(Elastic.Clients.Elasticsearch.Serialization.Json /// /// /// The name of the model to use for the inference task. - /// Refer to the Mistral models documentation for the list of available text embedding models. + /// Refer to the Mistral models documentation for the list of available models. /// /// public @@ -212,7 +212,7 @@ public Elastic.Clients.Elasticsearch.Inference.MistralServiceSettingsDescriptor /// /// /// The name of the model to use for the inference task. - /// Refer to the Mistral models documentation for the list of available text embedding models. + /// Refer to the Mistral models documentation for the list of available models. /// /// public Elastic.Clients.Elasticsearch.Inference.MistralServiceSettingsDescriptor Model(string value) diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/OpenAIServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/OpenAIServiceSettings.g.cs index 1edad9dce40..04833602fec 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/OpenAIServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/OpenAIServiceSettings.g.cs @@ -48,7 +48,7 @@ public override Elastic.Clients.Elasticsearch.Inference.OpenAIServiceSettings Re continue; } - if (propDimensions.TryReadProperty(ref reader, options, PropDimensions, null)) + if (propDimensions.TryReadProperty(ref reader, options, PropDimensions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,7 +98,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropApiKey, value.ApiKey, null, null); - writer.WriteProperty(options, PropDimensions, value.Dimensions, null, null); + writer.WriteProperty(options, PropDimensions, value.Dimensions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropOrganizationId, value.OrganizationId, null, null); writer.WriteProperty(options, PropRateLimit, value.RateLimit, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RateLimitSetting.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RateLimitSetting.g.cs index 8564783b52a..984cb6c4ee3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RateLimitSetting.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RateLimitSetting.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Inference.RateLimitSetting Read(re LocalJsonValue propRequestsPerMinute = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propRequestsPerMinute.TryReadProperty(ref reader, options, PropRequestsPerMinute, null)) + if (propRequestsPerMinute.TryReadProperty(ref reader, options, PropRequestsPerMinute, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Inference.RateLimitSetting Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.RateLimitSetting value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropRequestsPerMinute, value.RequestsPerMinute, null, null); + writer.WriteProperty(options, PropRequestsPerMinute, value.RequestsPerMinute, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RequestChatCompletion.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RequestChatCompletion.g.cs index 84311acaddc..27a1cae4ba6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RequestChatCompletion.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/RequestChatCompletion.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Inference.RequestChatCompletion Re LocalJsonValue propTopP = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxCompletionTokens.TryReadProperty(ref reader, options, PropMaxCompletionTokens, null)) + if (propMaxCompletionTokens.TryReadProperty(ref reader, options, PropMaxCompletionTokens, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Inference.RequestChatCompletion Re continue; } - if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, null)) + if (propTemperature.TryReadProperty(ref reader, options, PropTemperature, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.Inference.RequestChatCompletion Re continue; } - if (propTopP.TryReadProperty(ref reader, options, PropTopP, null)) + if (propTopP.TryReadProperty(ref reader, options, PropTopP, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,14 +113,14 @@ public override Elastic.Clients.Elasticsearch.Inference.RequestChatCompletion Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.RequestChatCompletion value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxCompletionTokens, value.MaxCompletionTokens, null, null); + writer.WriteProperty(options, PropMaxCompletionTokens, value.MaxCompletionTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMessages, value.Messages, 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, PropModel, value.Model, null, null); writer.WriteProperty(options, PropStop, value.Stop, 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, PropTemperature, value.Temperature, null, null); + writer.WriteProperty(options, PropTemperature, value.Temperature, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropToolChoice, value.ToolChoice, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Union? v) => w.WriteUnionValue(o, v, null, null)); writer.WriteProperty(options, PropTools, value.Tools, 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, PropTopP, value.TopP, null, null); + writer.WriteProperty(options, PropTopP, value.TopP, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -194,14 +194,51 @@ internal RequestChatCompletion(Elastic.Clients.Elasticsearch.Serialization.JsonC /// /// /// Controls which tool is called by the model. + /// String representation: One of auto, none, or requrired. auto allows the model to choose between calling tools and generating a message. none causes the model to not call any tools. required forces the model to call one or more tools. + /// Example (object representation): /// + /// + /// { + /// "tool_choice": { + /// "type": "function", + /// "function": { + /// "name": "get_current_weather" + /// } + /// } + /// } + /// /// public Elastic.Clients.Elasticsearch.Union? ToolChoice { get; set; } /// /// /// A list of tools that the model can call. + /// Example: /// + /// + /// { + /// "tools": [ + /// { + /// "type": "function", + /// "function": { + /// "name": "get_price_of_item", + /// "description": "Get the current price of an item", + /// "parameters": { + /// "type": "object", + /// "properties": { + /// "item": { + /// "id": "12345" + /// }, + /// "unit": { + /// "type": "currency" + /// } + /// } + /// } + /// } + /// } + /// ] + /// } + /// /// public System.Collections.Generic.ICollection? Tools { get; set; } @@ -335,7 +372,19 @@ public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor T /// /// /// Controls which tool is called by the model. + /// String representation: One of auto, none, or requrired. auto allows the model to choose between calling tools and generating a message. none causes the model to not call any tools. required forces the model to call one or more tools. + /// Example (object representation): /// + /// + /// { + /// "tool_choice": { + /// "type": "function", + /// "function": { + /// "name": "get_current_weather" + /// } + /// } + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor ToolChoice(Elastic.Clients.Elasticsearch.Union? value) { @@ -346,7 +395,32 @@ public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor T /// /// /// A list of tools that the model can call. + /// Example: /// + /// + /// { + /// "tools": [ + /// { + /// "type": "function", + /// "function": { + /// "name": "get_price_of_item", + /// "description": "Get the current price of an item", + /// "parameters": { + /// "type": "object", + /// "properties": { + /// "item": { + /// "id": "12345" + /// }, + /// "unit": { + /// "type": "currency" + /// } + /// } + /// } + /// } + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor Tools(System.Collections.Generic.ICollection? value) { @@ -357,7 +431,32 @@ public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor T /// /// /// A list of tools that the model can call. + /// Example: /// + /// + /// { + /// "tools": [ + /// { + /// "type": "function", + /// "function": { + /// "name": "get_price_of_item", + /// "description": "Get the current price of an item", + /// "parameters": { + /// "type": "object", + /// "properties": { + /// "item": { + /// "id": "12345" + /// }, + /// "unit": { + /// "type": "currency" + /// } + /// } + /// } + /// } + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor Tools(params Elastic.Clients.Elasticsearch.Inference.CompletionTool[] values) { @@ -368,7 +467,32 @@ public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor T /// /// /// A list of tools that the model can call. + /// Example: /// + /// + /// { + /// "tools": [ + /// { + /// "type": "function", + /// "function": { + /// "name": "get_price_of_item", + /// "description": "Get the current price of an item", + /// "parameters": { + /// "type": "object", + /// "properties": { + /// "item": { + /// "id": "12345" + /// }, + /// "unit": { + /// "type": "currency" + /// } + /// } + /// } + /// } + /// } + /// ] + /// } + /// /// public Elastic.Clients.Elasticsearch.Inference.RequestChatCompletionDescriptor Tools(params System.Action[] actions) { diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAIServiceSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAIServiceSettings.g.cs index 41e63a2b182..4f70809a62a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAIServiceSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAIServiceSettings.g.cs @@ -39,12 +39,12 @@ public override Elastic.Clients.Elasticsearch.Inference.VoyageAIServiceSettings LocalJsonValue propRateLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDimensions.TryReadProperty(ref reader, options, PropDimensions, null)) + if (propDimensions.TryReadProperty(ref reader, options, PropDimensions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEmbeddingType.TryReadProperty(ref reader, options, PropEmbeddingType, null)) + if (propEmbeddingType.TryReadProperty(ref reader, options, PropEmbeddingType, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,8 +81,8 @@ public override Elastic.Clients.Elasticsearch.Inference.VoyageAIServiceSettings public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Inference.VoyageAIServiceSettings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDimensions, value.Dimensions, null, null); - writer.WriteProperty(options, PropEmbeddingType, value.EmbeddingType, null, null); + writer.WriteProperty(options, PropDimensions, value.Dimensions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEmbeddingType, value.EmbeddingType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropRateLimit, value.RateLimit, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAITaskSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAITaskSettings.g.cs index 185c1c66a86..d73e91e77c2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAITaskSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Inference/VoyageAITaskSettings.g.cs @@ -44,17 +44,17 @@ public override Elastic.Clients.Elasticsearch.Inference.VoyageAITaskSettings Rea continue; } - if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, null)) + if (propReturnDocuments.TryReadProperty(ref reader, options, PropReturnDocuments, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTopK.TryReadProperty(ref reader, options, PropTopK, null)) + if (propTopK.TryReadProperty(ref reader, options, PropTopK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTruncation.TryReadProperty(ref reader, options, PropTruncation, null)) + if (propTruncation.TryReadProperty(ref reader, options, PropTruncation, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropInputType, value.InputType, null, null); - writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, null); - writer.WriteProperty(options, PropTopK, value.TopK, null, null); - writer.WriteProperty(options, PropTruncation, value.Truncation, null, null); + writer.WriteProperty(options, PropReturnDocuments, value.ReturnDocuments, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTopK, value.TopK, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTruncation, value.Truncation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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..0fc63a888b3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/AppendProcessor.g.cs @@ -40,14 +40,14 @@ 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; LocalJsonValue> propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowDuplicates.TryReadProperty(ref reader, options, PropAllowDuplicates, null)) + if (propAllowDuplicates.TryReadProperty(ref reader, options, PropAllowDuplicates, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.AppendProcessor Read(ref Sy continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,11 +113,11 @@ public override Elastic.Clients.Elasticsearch.Ingest.AppendProcessor Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.AppendProcessor value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowDuplicates, value.AllowDuplicates, null, null); + writer.WriteProperty(options, PropAllowDuplicates, value.AllowDuplicates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropValue, value.Value, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); @@ -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..33e0920663d 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; @@ -72,17 +72,17 @@ public override Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessor Read(re continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexedChars.TryReadProperty(ref reader, options, PropIndexedChars, null)) + if (propIndexedChars.TryReadProperty(ref reader, options, PropIndexedChars, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -102,7 +102,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.AttachmentProcessor Read(re continue; } - if (propRemoveBinary.TryReadProperty(ref reader, options, PropRemoveBinary, null)) + if (propRemoveBinary.TryReadProperty(ref reader, options, PropRemoveBinary, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -156,13 +156,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); - writer.WriteProperty(options, PropIndexedChars, value.IndexedChars, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexedChars, value.IndexedChars, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexedCharsField, value.IndexedCharsField, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropProperties, value.Properties, 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, PropRemoveBinary, value.RemoveBinary, null, null); + writer.WriteProperty(options, PropRemoveBinary, value.RemoveBinary, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResourceName, value.ResourceName, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); @@ -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..e75b4d80e49 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; @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.BytesProcessor Read(ref Sys continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); @@ -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..3e3956fee4b 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; @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.CircleProcessor Read(ref Sy continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -133,8 +133,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropErrorDistance, value.ErrorDistance, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropShapeType, value.ShapeType, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); @@ -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..739e024091d 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; @@ -98,12 +98,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.CommunityIDProcessor Read(r continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,7 +113,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.CommunityIDProcessor Read(r continue; } - if (propSeed.TryReadProperty(ref reader, options, PropSeed, null)) + if (propSeed.TryReadProperty(ref reader, options, PropSeed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -184,10 +184,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIcmpCode, value.IcmpCode, null, null); writer.WriteProperty(options, PropIcmpType, value.IcmpType, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropSeed, value.Seed, null, null); + writer.WriteProperty(options, PropSeed, value.Seed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSourceIp, value.SourceIp, null, null); writer.WriteProperty(options, PropSourcePort, value.SourcePort, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); @@ -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..b26785c5cdd 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; @@ -64,12 +64,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.ConvertProcessor Read(ref S continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,8 +124,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); @@ -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..8912f0c7a1c 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; @@ -75,12 +75,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.CsvProcessor Read(ref Syste continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,7 +110,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.CsvProcessor Read(ref Syste continue; } - if (propTrim.TryReadProperty(ref reader, options, PropTrim, null)) + if (propTrim.TryReadProperty(ref reader, options, PropTrim, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -149,14 +149,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropEmptyValue, value.EmptyValue, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropQuote, value.Quote, null, null); writer.WriteProperty(options, PropSeparator, value.Separator, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetFields, value.TargetFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropTrim, value.Trim, null, null); + writer.WriteProperty(options, PropTrim, value.Trim, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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..927bade3e95 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; } @@ -80,7 +80,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DateIndexNameProcessor Read continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,12 +145,12 @@ 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); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexNameFormat, value.IndexNameFormat, null, null); writer.WriteProperty(options, PropIndexNamePrefix, value.IndexNamePrefix, null, null); writer.WriteProperty(options, PropLocale, value.Locale, 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..dbdda163c68 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; @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DateProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,7 +141,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormats, value.Formats, 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, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLocale, value.Locale, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropOutputFormat, value.OutputFormat, null, null); @@ -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..4d261abec2a 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; @@ -69,12 +69,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.DissectProcessor Read(ref S continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -125,8 +125,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropPattern, value.Pattern, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); @@ -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/DocumentSimulation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DocumentSimulation.g.cs index 72b69fee3c3..0206cfa98c7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DocumentSimulation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/DocumentSimulation.g.cs @@ -71,18 +71,18 @@ public override Elastic.Clients.Elasticsearch.Ingest.DocumentSimulation Read(ref continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, null)) + if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, static Elastic.Clients.Elasticsearch.VersionType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propMetadata ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out string value, null, null); + reader.ReadProperty(options, out string key, out string value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propMetadata[key] = value; } @@ -108,13 +108,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIngest, value.Ingest, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropSource, value.Source, 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, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropVersionType, value.VersionType, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionType, value.VersionType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.VersionType? v) => w.WriteNullableValue(o, v)); if (value.Metadata is not null) { foreach (var item in value.Metadata) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } 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..ef41e77ed5f 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; @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessor Read(r continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DotExpanderProcessor Read(r continue; } - if (propOverride.TryReadProperty(ref reader, options, PropOverride, null)) + if (propOverride.TryReadProperty(ref reader, options, PropOverride, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,9 +116,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropOverride, value.Override, null, null); + writer.WriteProperty(options, PropOverride, value.Override, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPath, value.Path, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteEndObject(); @@ -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..31a1e9cecb0 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; @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.DropProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); writer.WriteEndObject(); @@ -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..3d5d4debaf7 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; @@ -70,17 +70,17 @@ public override Elastic.Clients.Elasticsearch.Ingest.EnrichProcessor Read(ref Sy continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxMatches.TryReadProperty(ref reader, options, PropMaxMatches, null)) + if (propMaxMatches.TryReadProperty(ref reader, options, PropMaxMatches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,7 +90,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.EnrichProcessor Read(ref Sy continue; } - if (propOverride.TryReadProperty(ref reader, options, PropOverride, null)) + if (propOverride.TryReadProperty(ref reader, options, PropOverride, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,7 +100,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.EnrichProcessor Read(ref Sy continue; } - if (propShapeRelation.TryReadProperty(ref reader, options, PropShapeRelation, null)) + if (propShapeRelation.TryReadProperty(ref reader, options, PropShapeRelation, static Elastic.Clients.Elasticsearch.GeoShapeRelation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -148,13 +148,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); - writer.WriteProperty(options, PropMaxMatches, value.MaxMatches, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxMatches, value.MaxMatches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropOverride, value.Override, null, null); + writer.WriteProperty(options, PropOverride, value.Override, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPolicyName, value.PolicyName, null, null); - writer.WriteProperty(options, PropShapeRelation, value.ShapeRelation, null, null); + writer.WriteProperty(options, PropShapeRelation, value.ShapeRelation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.GeoShapeRelation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); writer.WriteEndObject(); @@ -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..077f9dea1e5 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; @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.FailProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,7 +99,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMessage, value.Message, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); @@ -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..1849299f595 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; @@ -66,17 +66,17 @@ public override Elastic.Clients.Elasticsearch.Ingest.FingerprintProcessor Read(r continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMethod.TryReadProperty(ref reader, options, PropMethod, null)) + if (propMethod.TryReadProperty(ref reader, options, PropMethod, static Elastic.Clients.Elasticsearch.Ingest.FingerprintDigest? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,9 +132,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); - writer.WriteProperty(options, PropMethod, value.Method, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMethod, value.Method, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Ingest.FingerprintDigest? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropSalt, value.Salt, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); @@ -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..7a55225f290 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; @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.ForeachProcessor Read(ref S continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropProcessor, value.Processor, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); @@ -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..20f2cd82881 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; @@ -79,12 +79,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessor Read(ref S continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -119,7 +119,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.GeoGridProcessor Read(ref S continue; } - if (propTargetFormat.TryReadProperty(ref reader, options, PropTargetFormat, null)) + if (propTargetFormat.TryReadProperty(ref reader, options, PropTargetFormat, static Elastic.Clients.Elasticsearch.Ingest.GeoGridTargetFormat? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -165,15 +165,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNonChildrenField, value.NonChildrenField, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropParentField, value.ParentField, null, null); writer.WriteProperty(options, PropPrecisionField, value.PrecisionField, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); - writer.WriteProperty(options, PropTargetFormat, value.TargetFormat, null, null); + writer.WriteProperty(options, PropTargetFormat, value.TargetFormat, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Ingest.GeoGridTargetFormat? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTileType, value.TileType, null, null); writer.WriteEndObject(); } @@ -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..2c3ce3ea09e 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; @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessor Read(ref Sys continue; } - if (propDownloadDatabaseOnPipelineCreation.TryReadProperty(ref reader, options, PropDownloadDatabaseOnPipelineCreation, null)) + if (propDownloadDatabaseOnPipelineCreation.TryReadProperty(ref reader, options, PropDownloadDatabaseOnPipelineCreation, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessor Read(ref Sys continue; } - if (propFirstOnly.TryReadProperty(ref reader, options, PropFirstOnly, null)) + if (propFirstOnly.TryReadProperty(ref reader, options, PropFirstOnly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.GeoIpProcessor Read(ref Sys continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -147,12 +147,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDatabaseFile, value.DatabaseFile, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropDownloadDatabaseOnPipelineCreation, value.DownloadDatabaseOnPipelineCreation, null, null); + writer.WriteProperty(options, PropDownloadDatabaseOnPipelineCreation, value.DownloadDatabaseOnPipelineCreation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropFirstOnly, value.FirstOnly, null, null); + writer.WriteProperty(options, PropFirstOnly, value.FirstOnly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropProperties, value.Properties, 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, PropTag, value.Tag, null, null); @@ -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..5caa288f1a2 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; @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.GrokProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.GrokProcessor Read(ref Syst continue; } - if (propTraceMatch.TryReadProperty(ref reader, options, PropTraceMatch, null)) + if (propTraceMatch.TryReadProperty(ref reader, options, PropTraceMatch, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,13 +141,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropEcsCompatibility, value.EcsCompatibility, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropPatternDefinitions, value.PatternDefinitions, 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, PropPatterns, value.Patterns, 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, PropTag, value.Tag, null, null); - writer.WriteProperty(options, PropTraceMatch, value.TraceMatch, null, null); + writer.WriteProperty(options, PropTraceMatch, value.TraceMatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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..4838e5e8d14 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; @@ -66,12 +66,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.GsubProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,8 +132,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropPattern, value.Pattern, null, null); writer.WriteProperty(options, PropReplacement, value.Replacement, null, null); @@ -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..c0261170806 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; @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.HtmlStripProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); @@ -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/InferenceConfigClassification.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigClassification.g.cs index 1e1be6d92ff..b9059dda8ca 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigClassification.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigClassification.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.InferenceConfigClassificati LocalJsonValue propTopClassesResultsField = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, null)) + if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,8 +89,8 @@ public override Elastic.Clients.Elasticsearch.Ingest.InferenceConfigClassificati public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.InferenceConfigClassification value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); - writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, null); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPredictionFieldType, value.PredictionFieldType, null, null); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTopClassesResultsField, value.TopClassesResultsField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigRegression.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigRegression.g.cs index ee7fc47234a..69ee088a1bb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigRegression.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/InferenceConfigRegression.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.InferenceConfigRegression R LocalJsonValue propResultsField = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, null)) + if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.InferenceConfigRegression R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.InferenceConfigRegression value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, null); + writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteEndObject(); } 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..88d756d8c46 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; @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.InferenceProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -140,8 +140,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropFieldMap, value.FieldMap, 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, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInferenceConfig, value.InferenceConfig, null, null); writer.WriteProperty(options, PropInputOutput, value.InputOutput, 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, PropModelId, value.ModelId, null, null); @@ -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/IpDatabaseConfigurationMetadata.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpDatabaseConfigurationMetadata.g.cs index 858411580a5..e9b56001a11 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpDatabaseConfigurationMetadata.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/IpDatabaseConfigurationMetadata.g.cs @@ -51,12 +51,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.IpDatabaseConfigurationMeta continue; } - if (propModifiedDate.TryReadProperty(ref reader, options, PropModifiedDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propModifiedDate.TryReadProperty(ref reader, options, PropModifiedDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propModifiedDateMillis.TryReadProperty(ref reader, options, PropModifiedDateMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propModifiedDateMillis.TryReadProperty(ref reader, options, PropModifiedDateMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -91,8 +91,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDatabase, value.Database, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropModifiedDate, value.ModifiedDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropModifiedDateMillis, value.ModifiedDateMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropModifiedDate, value.ModifiedDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropModifiedDateMillis, value.ModifiedDateMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropVersion, value.Version, null, null); writer.WriteEndObject(); } 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..06e6120e43d 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; @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessor Read(re continue; } - if (propDownloadDatabaseOnPipelineCreation.TryReadProperty(ref reader, options, PropDownloadDatabaseOnPipelineCreation, null)) + if (propDownloadDatabaseOnPipelineCreation.TryReadProperty(ref reader, options, PropDownloadDatabaseOnPipelineCreation, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessor Read(re continue; } - if (propFirstOnly.TryReadProperty(ref reader, options, PropFirstOnly, null)) + if (propFirstOnly.TryReadProperty(ref reader, options, PropFirstOnly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.IpLocationProcessor Read(re continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -147,12 +147,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDatabaseFile, value.DatabaseFile, null, null); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropDownloadDatabaseOnPipelineCreation, value.DownloadDatabaseOnPipelineCreation, null, null); + writer.WriteProperty(options, PropDownloadDatabaseOnPipelineCreation, value.DownloadDatabaseOnPipelineCreation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropFirstOnly, value.FirstOnly, null, null); + writer.WriteProperty(options, PropFirstOnly, value.FirstOnly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropProperties, value.Properties, 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, PropTag, value.Tag, null, null); @@ -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..31715f44f64 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; @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.JoinProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,7 +116,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropSeparator, value.Separator, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); @@ -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..8ec6485d2be 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JsonProcessor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/JsonProcessor.g.cs @@ -44,24 +44,24 @@ 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; LocalJsonValue propTargetField = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAddToRoot.TryReadProperty(ref reader, options, PropAddToRoot, null)) + if (propAddToRoot.TryReadProperty(ref reader, options, PropAddToRoot, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propAddToRootConflictStrategy.TryReadProperty(ref reader, options, PropAddToRootConflictStrategy, null)) + if (propAddToRootConflictStrategy.TryReadProperty(ref reader, options, PropAddToRootConflictStrategy, static Elastic.Clients.Elasticsearch.Ingest.JsonProcessorConflictStrategy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propAllowDuplicateKeys.TryReadProperty(ref reader, options, PropAllowDuplicateKeys, null)) + if (propAllowDuplicateKeys.TryReadProperty(ref reader, options, PropAllowDuplicateKeys, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.JsonProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,13 +129,13 @@ public override Elastic.Clients.Elasticsearch.Ingest.JsonProcessor Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.JsonProcessor value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAddToRoot, value.AddToRoot, null, null); - writer.WriteProperty(options, PropAddToRootConflictStrategy, value.AddToRootConflictStrategy, null, null); - writer.WriteProperty(options, PropAllowDuplicateKeys, value.AllowDuplicateKeys, null, null); + writer.WriteProperty(options, PropAddToRoot, value.AddToRoot, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropAddToRootConflictStrategy, value.AddToRootConflictStrategy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Ingest.JsonProcessorConflictStrategy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropAllowDuplicateKeys, value.AllowDuplicateKeys, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); @@ -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..7b7b8707e5b 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; @@ -88,12 +88,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,7 +113,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.KeyValueProcessor Read(ref continue; } - if (propStripBrackets.TryReadProperty(ref reader, options, PropStripBrackets, null)) + if (propStripBrackets.TryReadProperty(ref reader, options, PropStripBrackets, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -182,12 +182,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFieldSplit, value.FieldSplit, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIncludeKeys, value.IncludeKeys, 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, PropOnFailure, value.OnFailure, 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, PropPrefix, value.Prefix, null, null); - writer.WriteProperty(options, PropStripBrackets, value.StripBrackets, null, null); + writer.WriteProperty(options, PropStripBrackets, value.StripBrackets, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); writer.WriteProperty(options, PropTrimKey, value.TrimKey, null, null); @@ -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..667d169b1ee 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; @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.LowercaseProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); @@ -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..4e50256c324 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; @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.NetworkDirectionProcessor R continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -140,8 +140,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropDestinationIp, value.DestinationIp, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInternalNetworks, value.InternalNetworks, 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, PropInternalNetworksField, value.InternalNetworksField, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); @@ -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/Pipeline.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs index 2a9331c54f4..2e3a1927463 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/Pipeline.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.Pipeline Read(ref System.Te LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, null)) + if (propDeprecated.TryReadProperty(ref reader, options, PropDeprecated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.Pipeline Read(ref System.Te continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.Pipeline Read(ref System.Te public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Ingest.Pipeline value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, null); + writer.WriteProperty(options, PropDeprecated, value.Deprecated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, 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, PropOnFailure, value.OnFailure, 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, PropProcessors, value.Processors, 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, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineConfig.g.cs index 4589b421f77..7294700dd90 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineConfig.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.PipelineConfig Read(ref Sys continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropProcessors, value.Processors, 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, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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..ee5c6b11053 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; @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.PipelineProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissingPipeline.TryReadProperty(ref reader, options, PropIgnoreMissingPipeline, null)) + if (propIgnoreMissingPipeline.TryReadProperty(ref reader, options, PropIgnoreMissingPipeline, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,8 +107,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissingPipeline, value.IgnoreMissingPipeline, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissingPipeline, value.IgnoreMissingPipeline, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); @@ -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/PipelineProcessorResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessorResult.g.cs index 7e31e8e3281..d05d18274d2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessorResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Ingest/PipelineProcessorResult.g.cs @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.PipelineProcessorResult Rea continue; } - if (propStatus.TryReadProperty(ref reader, options, PropStatus, null)) + if (propStatus.TryReadProperty(ref reader, options, PropStatus, static Elastic.Clients.Elasticsearch.Ingest.PipelineSimulationStatusOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,7 +110,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropError, value.Error, null, null); writer.WriteProperty(options, PropIgnoredError, value.IgnoredError, null, null); writer.WriteProperty(options, PropProcessorType, value.ProcessorType, null, null); - writer.WriteProperty(options, PropStatus, value.Status, null, null); + writer.WriteProperty(options, PropStatus, value.Status, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Ingest.PipelineSimulationStatusOptions? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteEndObject(); } 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..e3e918fb673 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; @@ -72,12 +72,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.RedactProcessor Read(ref Sy continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -102,7 +102,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.RedactProcessor Read(ref Sy continue; } - if (propSkipIfUnlicensed.TryReadProperty(ref reader, options, PropSkipIfUnlicensed, null)) + if (propSkipIfUnlicensed.TryReadProperty(ref reader, options, PropSkipIfUnlicensed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -117,7 +117,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.RedactProcessor Read(ref Sy continue; } - if (propTraceRedact.TryReadProperty(ref reader, options, PropTraceRedact, null)) + if (propTraceRedact.TryReadProperty(ref reader, options, PropTraceRedact, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -156,16 +156,16 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropPatternDefinitions, value.PatternDefinitions, 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, PropPatterns, value.Patterns, 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, PropPrefix, value.Prefix, null, null); - writer.WriteProperty(options, PropSkipIfUnlicensed, value.SkipIfUnlicensed, null, null); + writer.WriteProperty(options, PropSkipIfUnlicensed, value.SkipIfUnlicensed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSuffix, value.Suffix, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); - writer.WriteProperty(options, PropTraceRedact, value.TraceRedact, null, null); + writer.WriteProperty(options, PropTraceRedact, value.TraceRedact, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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..8a0b29e0bc0 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; @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.RegisteredDomainProcessor R continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); @@ -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..0faec27b1f1 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; @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.RemoveProcessor Read(ref Sy continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKeep, value.Keep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); @@ -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..73bd1314c98 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; @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.RenameProcessor Read(ref Sy continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); @@ -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..31b4423f47d 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; @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.RerouteProcessor Read(ref S continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -117,7 +117,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropDestination, value.Destination, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNamespace, value.Namespace, 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, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); @@ -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..ddda27bf1ad 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; @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.ScriptProcessor Read(ref Sy continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,7 +124,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLang, value.Lang, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropParams, value.Params, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); @@ -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..f5c0fa1e11d 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; @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.SetProcessor Read(ref Syste continue; } - if (propIgnoreEmptyValue.TryReadProperty(ref reader, options, PropIgnoreEmptyValue, null)) + if (propIgnoreEmptyValue.TryReadProperty(ref reader, options, PropIgnoreEmptyValue, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.SetProcessor Read(ref Syste continue; } - if (propOverride.TryReadProperty(ref reader, options, PropOverride, null)) + if (propOverride.TryReadProperty(ref reader, options, PropOverride, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,11 +141,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreEmptyValue, value.IgnoreEmptyValue, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreEmptyValue, value.IgnoreEmptyValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMediaType, value.MediaType, null, null); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropOverride, value.Override, null, null); + writer.WriteProperty(options, PropOverride, value.Override, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); writer.WriteEndObject(); @@ -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..95687ec2388 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; @@ -60,7 +60,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.SetSecurityUserProcessor Re continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,7 +108,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropProperties, value.Properties, 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, PropTag, value.Tag, null, null); @@ -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..13d4c53f156 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; @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.SortProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.SortProcessor Read(ref Syst continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,9 +116,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropOrder, value.Order, null, null); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); writer.WriteEndObject(); @@ -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..b702ed58b02 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; @@ -66,12 +66,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.SplitProcessor Read(ref Sys continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.SplitProcessor Read(ref Sys continue; } - if (propPreserveTrailing.TryReadProperty(ref reader, options, PropPreserveTrailing, null)) + if (propPreserveTrailing.TryReadProperty(ref reader, options, PropPreserveTrailing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,10 +132,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropPreserveTrailing, value.PreserveTrailing, null, null); + writer.WriteProperty(options, PropPreserveTrailing, value.PreserveTrailing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSeparator, value.Separator, null, null); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); @@ -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..40b25cad667 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; @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.TerminateProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); writer.WriteEndObject(); @@ -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..ad85d9868ff 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; @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.TrimProcessor Read(ref Syst continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); @@ -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..fa33a30cb60 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; @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.UppercaseProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); @@ -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..a5ea7059d0a 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; @@ -66,17 +66,17 @@ public override Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propKeepOriginal.TryReadProperty(ref reader, options, PropKeepOriginal, null)) + if (propKeepOriginal.TryReadProperty(ref reader, options, PropKeepOriginal, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.UriPartsProcessor Read(ref continue; } - if (propRemoveIfSuccessful.TryReadProperty(ref reader, options, PropRemoveIfSuccessful, null)) + if (propRemoveIfSuccessful.TryReadProperty(ref reader, options, PropRemoveIfSuccessful, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,11 +132,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); - writer.WriteProperty(options, PropKeepOriginal, value.KeepOriginal, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropKeepOriginal, value.KeepOriginal, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropRemoveIfSuccessful, value.RemoveIfSuccessful, null, null); + writer.WriteProperty(options, PropRemoveIfSuccessful, value.RemoveIfSuccessful, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); writer.WriteEndObject(); @@ -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..e60a246dbe5 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; @@ -62,12 +62,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.UrlDecodeProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,8 +116,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropTag, value.Tag, null, null); writer.WriteProperty(options, PropTargetField, value.TargetField, null, null); @@ -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..59dc62bc041 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; @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessor Read(ref continue; } - if (propExtractDeviceType.TryReadProperty(ref reader, options, PropExtractDeviceType, null)) + if (propExtractDeviceType.TryReadProperty(ref reader, options, PropExtractDeviceType, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.Ingest.UserAgentProcessor Read(ref continue; } - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, null)) + if (propIgnoreMissing.TryReadProperty(ref reader, options, PropIgnoreMissing, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,11 +138,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropExtractDeviceType, value.ExtractDeviceType, null, null); + writer.WriteProperty(options, PropExtractDeviceType, value.ExtractDeviceType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropIf, value.If, null, null); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); - writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMissing, value.IgnoreMissing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOnFailure, value.OnFailure, 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, PropProperties, value.Properties, 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, PropRegexFile, value.RegexFile, null, null); @@ -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/InlineGet.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineGet.g.cs index 03b8f83ff3c..d9334b5b425 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineGet.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/InlineGet.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.InlineGet Read(ref Syst continue; } - if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, null)) + if (propPrimaryTerm.TryReadProperty(ref reader, options, PropPrimaryTerm, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.InlineGet Read(ref Syst continue; } - if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, null)) + if (propSeqNo.TryReadProperty(ref reader, options, PropSeqNo, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.InlineGet Read(ref Syst } propMetadata ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out object value, null, null); + reader.ReadProperty(options, out string key, out object value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propMetadata[key] = value; } @@ -97,15 +97,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFields, value.Fields, 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, PropFound, value.Found, null, null); - writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, null); + writer.WriteProperty(options, PropPrimaryTerm, value.PrimaryTerm, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, null); + writer.WriteProperty(options, PropSeqNo, value.SeqNo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSource, value.Source, null, null); if (value.Metadata is not null) { foreach (var item in value.Metadata) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/InnerRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/InnerRetriever.g.cs new file mode 100644 index 00000000000..23bcebc4138 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/InnerRetriever.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; + +internal sealed partial class InnerRetrieverConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropNormalizer = System.Text.Json.JsonEncodedText.Encode("normalizer"); + private static readonly System.Text.Json.JsonEncodedText PropRetriever = System.Text.Json.JsonEncodedText.Encode("retriever"); + private static readonly System.Text.Json.JsonEncodedText PropWeight = System.Text.Json.JsonEncodedText.Encode("weight"); + + public override Elastic.Clients.Elasticsearch.InnerRetriever Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propNormalizer = default; + LocalJsonValue propRetriever = default; + LocalJsonValue propWeight = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propNormalizer.TryReadProperty(ref reader, options, PropNormalizer, null)) + { + continue; + } + + if (propRetriever.TryReadProperty(ref reader, options, PropRetriever, null)) + { + continue; + } + + if (propWeight.TryReadProperty(ref reader, options, PropWeight, 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.InnerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Normalizer = propNormalizer.Value, + Retriever = propRetriever.Value, + Weight = propWeight.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.InnerRetriever value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropNormalizer, value.Normalizer, null, null); + writer.WriteProperty(options, PropRetriever, value.Retriever, null, null); + writer.WriteProperty(options, PropWeight, value.Weight, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.InnerRetrieverConverter))] +public sealed partial class InnerRetriever +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InnerRetriever(Elastic.Clients.Elasticsearch.ScoreNormalizer normalizer, Elastic.Clients.Elasticsearch.Retriever retriever, float weight) + { + Normalizer = normalizer; + Retriever = retriever; + Weight = weight; + } +#if NET7_0_OR_GREATER + public InnerRetriever() + { + } +#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 InnerRetriever() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal InnerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.ScoreNormalizer Normalizer { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Retriever Retriever { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + float Weight { get; set; } +} + +public readonly partial struct InnerRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.InnerRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InnerRetrieverDescriptor(Elastic.Clients.Elasticsearch.InnerRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InnerRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.InnerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor(Elastic.Clients.Elasticsearch.InnerRetriever instance) => new Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.InnerRetriever(Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Normalizer(Elastic.Clients.Elasticsearch.ScoreNormalizer value) + { + Instance.Normalizer = value; + return this; + } + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever value) + { + Instance.Retriever = value; + return this; + } + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Retriever(System.Action> action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Weight(float value) + { + Instance.Weight = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.InnerRetriever Build(System.Action> action) + { + var builder = new Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor(new Elastic.Clients.Elasticsearch.InnerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} + +public readonly partial struct InnerRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.InnerRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InnerRetrieverDescriptor(Elastic.Clients.Elasticsearch.InnerRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public InnerRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.InnerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor(Elastic.Clients.Elasticsearch.InnerRetriever instance) => new Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.InnerRetriever(Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Normalizer(Elastic.Clients.Elasticsearch.ScoreNormalizer value) + { + Instance.Normalizer = value; + return this; + } + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever value) + { + Instance.Retriever = value; + return this; + } + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Retriever(System.Action action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Retriever(System.Action> action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor Weight(float value) + { + Instance.Weight = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.InnerRetriever Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor(new Elastic.Clients.Elasticsearch.InnerRetriever(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/KnnQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs index 3e96a50040e..757efad5f50 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnQuery.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.KnnQuery Read(ref System.Text.Json LocalJsonValue propSimilarity = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,12 +66,12 @@ public override Elastic.Clients.Elasticsearch.KnnQuery Read(ref System.Text.Json continue; } - if (propK.TryReadProperty(ref reader, options, PropK, null)) + if (propK.TryReadProperty(ref reader, options, PropK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumCandidates.TryReadProperty(ref reader, options, PropNumCandidates, null)) + if (propNumCandidates.TryReadProperty(ref reader, options, PropNumCandidates, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.KnnQuery Read(ref System.Text.Json continue; } - if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, null)) + if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,16 +129,16 @@ public override Elastic.Clients.Elasticsearch.KnnQuery Read(ref System.Text.Json public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.KnnQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFilter, value.Filter, 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, PropK, value.K, null, null); - writer.WriteProperty(options, PropNumCandidates, value.NumCandidates, null, null); + writer.WriteProperty(options, PropK, value.K, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumCandidates, value.NumCandidates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropQueryVector, value.QueryVector, 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, PropQueryVectorBuilder, value.QueryVectorBuilder, null, null); writer.WriteProperty(options, PropRescoreVector, value.RescoreVector, null, null); - writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); + writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.g.cs index 2625c338e41..242567e04bb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnRetriever.g.cs @@ -29,6 +29,7 @@ internal sealed partial class KnnRetrieverConverter : System.Text.Json.Serializa private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); private static readonly System.Text.Json.JsonEncodedText PropK = System.Text.Json.JsonEncodedText.Encode("k"); private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); private static readonly System.Text.Json.JsonEncodedText PropNumCandidates = System.Text.Json.JsonEncodedText.Encode("num_candidates"); private static readonly System.Text.Json.JsonEncodedText PropQueryVector = System.Text.Json.JsonEncodedText.Encode("query_vector"); private static readonly System.Text.Json.JsonEncodedText PropQueryVectorBuilder = System.Text.Json.JsonEncodedText.Encode("query_vector_builder"); @@ -42,6 +43,7 @@ public override Elastic.Clients.Elasticsearch.KnnRetriever Read(ref System.Text. LocalJsonValue?> propFilter = default; LocalJsonValue propK = default; LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; LocalJsonValue propNumCandidates = default; LocalJsonValue?> propQueryVector = default; LocalJsonValue propQueryVectorBuilder = default; @@ -64,7 +66,12 @@ public override Elastic.Clients.Elasticsearch.KnnRetriever Read(ref System.Text. continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propName.TryReadProperty(ref reader, options, PropName, null)) { continue; } @@ -89,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.KnnRetriever Read(ref System.Text. continue; } - if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, null)) + if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,6 +117,7 @@ public override Elastic.Clients.Elasticsearch.KnnRetriever Read(ref System.Text. Filter = propFilter.Value, K = propK.Value, MinScore = propMinScore.Value, + Name = propName.Value, NumCandidates = propNumCandidates.Value, QueryVector = propQueryVector.Value, QueryVectorBuilder = propQueryVectorBuilder.Value, @@ -124,12 +132,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFilter, value.Filter, 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, PropK, value.K, null, null); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteProperty(options, PropNumCandidates, value.NumCandidates, null, null); writer.WriteProperty(options, PropQueryVector, value.QueryVector, 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, PropQueryVectorBuilder, value.QueryVectorBuilder, null, null); writer.WriteProperty(options, PropRescoreVector, value.RescoreVector, null, null); - writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); + writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -197,6 +206,13 @@ internal KnnRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo /// public float? MinScore { get; set; } + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + /// /// /// Number of nearest neighbor candidates to consider per shard. @@ -328,6 +344,17 @@ public Elastic.Clients.Elasticsearch.KnnRetrieverDescriptor MinScore( return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.KnnRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// Number of nearest neighbor candidates to consider per shard. @@ -533,6 +560,17 @@ public Elastic.Clients.Elasticsearch.KnnRetrieverDescriptor MinScore(float? valu return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.KnnRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// Number of nearest neighbor candidates to consider per shard. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs index d4e1b274902..06b073001e3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/KnnSearch.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.KnnSearch Read(ref System.Text.Jso LocalJsonValue propSimilarity = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.KnnSearch Read(ref System.Text.Jso continue; } - if (propK.TryReadProperty(ref reader, options, PropK, null)) + if (propK.TryReadProperty(ref reader, options, PropK, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumCandidates.TryReadProperty(ref reader, options, PropNumCandidates, null)) + if (propNumCandidates.TryReadProperty(ref reader, options, PropNumCandidates, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.KnnSearch Read(ref System.Text.Jso continue; } - if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, null)) + if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,16 +129,16 @@ public override Elastic.Clients.Elasticsearch.KnnSearch Read(ref System.Text.Jso public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.KnnSearch value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFilter, value.Filter, 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, PropInnerHits, value.InnerHits, null, null); - writer.WriteProperty(options, PropK, value.K, null, null); - writer.WriteProperty(options, PropNumCandidates, value.NumCandidates, null, null); + writer.WriteProperty(options, PropK, value.K, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumCandidates, value.NumCandidates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryVector, value.QueryVector, 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, PropQueryVectorBuilder, value.QueryVectorBuilder, null, null); writer.WriteProperty(options, PropRescoreVector, value.RescoreVector, null, null); - writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); + writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/License.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/License.g.cs index 7d786b70299..de26596cdb8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/License.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/License.g.cs @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.LicenseManagement.License Read(ref continue; } - if (propMaxNodes.TryReadProperty(ref reader, options, PropMaxNodes, null)) + if (propMaxNodes.TryReadProperty(ref reader, options, PropMaxNodes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxResourceUnits.TryReadProperty(ref reader, options, PropMaxResourceUnits, null)) + if (propMaxResourceUnits.TryReadProperty(ref reader, options, PropMaxResourceUnits, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.LicenseManagement.License Read(ref continue; } - if (propStartDateInMillis.TryReadProperty(ref reader, options, PropStartDateInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propStartDateInMillis.TryReadProperty(ref reader, options, PropStartDateInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -133,10 +133,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIssueDateInMillis, value.IssueDateInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropIssuedTo, value.IssuedTo, null, null); writer.WriteProperty(options, PropIssuer, value.Issuer, null, null); - writer.WriteProperty(options, PropMaxNodes, value.MaxNodes, null, null); - writer.WriteProperty(options, PropMaxResourceUnits, value.MaxResourceUnits, null, null); + writer.WriteProperty(options, PropMaxNodes, value.MaxNodes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxResourceUnits, value.MaxResourceUnits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSignature, value.Signature, null, null); - writer.WriteProperty(options, PropStartDateInMillis, value.StartDateInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropStartDateInMillis, value.StartDateInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropUid, value.Uid, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/LicenseInformation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/LicenseInformation.g.cs index 5cfd081f890..f0a511d44be 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/LicenseInformation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LicenseManagement/LicenseInformation.g.cs @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.LicenseManagement.LicenseInformati LocalJsonValue propUid = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propExpiryDate.TryReadProperty(ref reader, options, PropExpiryDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propExpiryDate.TryReadProperty(ref reader, options, PropExpiryDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propExpiryDateInMillis.TryReadProperty(ref reader, options, PropExpiryDateInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propExpiryDateInMillis.TryReadProperty(ref reader, options, PropExpiryDateInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.LicenseManagement.LicenseInformati continue; } - if (propMaxNodes.TryReadProperty(ref reader, options, PropMaxNodes, null)) + if (propMaxNodes.TryReadProperty(ref reader, options, PropMaxNodes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxResourceUnits.TryReadProperty(ref reader, options, PropMaxResourceUnits, null)) + if (propMaxResourceUnits.TryReadProperty(ref reader, options, PropMaxResourceUnits, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,14 +145,14 @@ public override Elastic.Clients.Elasticsearch.LicenseManagement.LicenseInformati public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.LicenseManagement.LicenseInformation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropExpiryDate, value.ExpiryDate, 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, PropExpiryDateInMillis, value.ExpiryDateInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropExpiryDate, value.ExpiryDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropExpiryDateInMillis, value.ExpiryDateInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropIssueDate, value.IssueDate, 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, PropIssueDateInMillis, value.IssueDateInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropIssuedTo, value.IssuedTo, null, null); writer.WriteProperty(options, PropIssuer, value.Issuer, null, null); - writer.WriteProperty(options, PropMaxNodes, value.MaxNodes, null, null); - writer.WriteProperty(options, PropMaxResourceUnits, value.MaxResourceUnits, null, null); + writer.WriteProperty(options, PropMaxNodes, value.MaxNodes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxResourceUnits, value.MaxResourceUnits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropStartDateInMillis, value.StartDateInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropStatus, value.Status, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/LinearRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LinearRetriever.g.cs new file mode 100644 index 00000000000..e339bd77146 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/LinearRetriever.g.cs @@ -0,0 +1,460 @@ +// 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; + +internal sealed partial class LinearRetrieverConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); + private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); + private static readonly System.Text.Json.JsonEncodedText PropRankWindowSize = System.Text.Json.JsonEncodedText.Encode("rank_window_size"); + private static readonly System.Text.Json.JsonEncodedText PropRetrievers = System.Text.Json.JsonEncodedText.Encode("retrievers"); + + public override Elastic.Clients.Elasticsearch.LinearRetriever Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue?> propFilter = default; + LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; + LocalJsonValue propRankWindowSize = default; + LocalJsonValue?> propRetrievers = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propFilter.TryReadProperty(ref reader, options, PropFilter, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null))) + { + continue; + } + + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propName.TryReadProperty(ref reader, options, PropName, null)) + { + continue; + } + + if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, null)) + { + continue; + } + + if (propRetrievers.TryReadProperty(ref reader, options, PropRetrievers, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) + { + continue; + } + + if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip) + { + reader.Skip(); + 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.LinearRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Filter = propFilter.Value, + MinScore = propMinScore.Value, + Name = propName.Value, + RankWindowSize = propRankWindowSize.Value, + Retrievers = propRetrievers.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.LinearRetriever value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropFilter, value.Filter, 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, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); + writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, null); + writer.WriteProperty(options, PropRetrievers, value.Retrievers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteCollectionValue(o, v, null)); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.LinearRetrieverConverter))] +public sealed partial class LinearRetriever +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LinearRetriever(int rankWindowSize) + { + RankWindowSize = rankWindowSize; + } +#if NET7_0_OR_GREATER + public LinearRetriever() + { + } +#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 LinearRetriever() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal LinearRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public System.Collections.Generic.ICollection? Filter { get; set; } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public float? MinScore { get; set; } + + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + int RankWindowSize { get; set; } + + /// + /// + /// Inner retrievers. + /// + /// + public System.Collections.Generic.ICollection? Retrievers { get; set; } +} + +public readonly partial struct LinearRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.LinearRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LinearRetrieverDescriptor(Elastic.Clients.Elasticsearch.LinearRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LinearRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.LinearRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor(Elastic.Clients.Elasticsearch.LinearRetriever instance) => new Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.LinearRetriever(Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Filter(System.Collections.Generic.ICollection? value) + { + Instance.Filter = value; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Filter(params Elastic.Clients.Elasticsearch.QueryDsl.Query[] values) + { + Instance.Filter = [.. values]; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Filter(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor MinScore(float? value) + { + Instance.MinScore = value; + return this; + } + + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor RankWindowSize(int value) + { + Instance.RankWindowSize = value; + return this; + } + + /// + /// + /// Inner retrievers. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Retrievers(System.Collections.Generic.ICollection? value) + { + Instance.Retrievers = value; + return this; + } + + /// + /// + /// Inner retrievers. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Retrievers(params Elastic.Clients.Elasticsearch.InnerRetriever[] values) + { + Instance.Retrievers = [.. values]; + return this; + } + + /// + /// + /// Inner retrievers. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Retrievers(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor.Build(action)); + } + + Instance.Retrievers = items; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.LinearRetriever Build(System.Action> action) + { + var builder = new Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor(new Elastic.Clients.Elasticsearch.LinearRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} + +public readonly partial struct LinearRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.LinearRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LinearRetrieverDescriptor(Elastic.Clients.Elasticsearch.LinearRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public LinearRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.LinearRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor(Elastic.Clients.Elasticsearch.LinearRetriever instance) => new Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.LinearRetriever(Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Filter(System.Collections.Generic.ICollection? value) + { + Instance.Filter = value; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Filter(params Elastic.Clients.Elasticsearch.QueryDsl.Query[] values) + { + Instance.Filter = [.. values]; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Filter(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Filter(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor MinScore(float? value) + { + Instance.MinScore = value; + return this; + } + + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor RankWindowSize(int value) + { + Instance.RankWindowSize = value; + return this; + } + + /// + /// + /// Inner retrievers. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Retrievers(System.Collections.Generic.ICollection? value) + { + Instance.Retrievers = value; + return this; + } + + /// + /// + /// Inner retrievers. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Retrievers(params Elastic.Clients.Elasticsearch.InnerRetriever[] values) + { + Instance.Retrievers = [.. values]; + return this; + } + + /// + /// + /// Inner retrievers. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Retrievers(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor.Build(action)); + } + + Instance.Retrievers = items; + return this; + } + + /// + /// + /// Inner retrievers. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor Retrievers(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.InnerRetrieverDescriptor.Build(action)); + } + + Instance.Retrievers = items; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.LinearRetriever Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor(new Elastic.Clients.Elasticsearch.LinearRetriever(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/MachineLearning/AdaptiveAllocationsSettings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AdaptiveAllocationsSettings.g.cs index d12d38d3a77..e869ddcca30 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AdaptiveAllocationsSettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AdaptiveAllocationsSettings.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AdaptiveAllocation continue; } - if (propMaxNumberOfAllocations.TryReadProperty(ref reader, options, PropMaxNumberOfAllocations, null)) + if (propMaxNumberOfAllocations.TryReadProperty(ref reader, options, PropMaxNumberOfAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinNumberOfAllocations.TryReadProperty(ref reader, options, PropMinNumberOfAllocations, null)) + if (propMinNumberOfAllocations.TryReadProperty(ref reader, options, PropMinNumberOfAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,8 +74,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); - writer.WriteProperty(options, PropMaxNumberOfAllocations, value.MaxNumberOfAllocations, null, null); - writer.WriteProperty(options, PropMinNumberOfAllocations, value.MinNumberOfAllocations, null, null); + writer.WriteProperty(options, PropMaxNumberOfAllocations, value.MaxNumberOfAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinNumberOfAllocations, value.MinNumberOfAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfig.g.cs index 6bf7eacc3b6..3a01ed0721b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfig.g.cs @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AnalysisConfig Rea continue; } - if (propMultivariateByFields.TryReadProperty(ref reader, options, PropMultivariateByFields, null)) + if (propMultivariateByFields.TryReadProperty(ref reader, options, PropMultivariateByFields, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,7 +145,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropInfluencers, value.Influencers, null, null); writer.WriteProperty(options, PropLatency, value.Latency, null, null); writer.WriteProperty(options, PropModelPruneWindow, value.ModelPruneWindow, null, null); - writer.WriteProperty(options, PropMultivariateByFields, value.MultivariateByFields, null, null); + writer.WriteProperty(options, PropMultivariateByFields, value.MultivariateByFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPerPartitionCategorization, value.PerPartitionCategorization, null, null); writer.WriteProperty(options, PropSummaryCountFieldName, value.SummaryCountFieldName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfigRead.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfigRead.g.cs index 96d0cf84fef..275d6ee826e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfigRead.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisConfigRead.g.cs @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AnalysisConfigRead continue; } - if (propMultivariateByFields.TryReadProperty(ref reader, options, PropMultivariateByFields, null)) + if (propMultivariateByFields.TryReadProperty(ref reader, options, PropMultivariateByFields, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,7 +145,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropInfluencers, value.Influencers, null, null); writer.WriteProperty(options, PropLatency, value.Latency, null, null); writer.WriteProperty(options, PropModelPruneWindow, value.ModelPruneWindow, null, null); - writer.WriteProperty(options, PropMultivariateByFields, value.MultivariateByFields, null, null); + writer.WriteProperty(options, PropMultivariateByFields, value.MultivariateByFields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPerPartitionCategorization, value.PerPartitionCategorization, null, null); writer.WriteProperty(options, PropSummaryCountFieldName, value.SummaryCountFieldName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisLimits.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisLimits.g.cs index dd8414c6fb0..5b3bbc73df9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisLimits.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnalysisLimits.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AnalysisLimits Rea LocalJsonValue propModelMemoryLimit = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCategorizationExamplesLimit.TryReadProperty(ref reader, options, PropCategorizationExamplesLimit, null)) + if (propCategorizationExamplesLimit.TryReadProperty(ref reader, options, PropCategorizationExamplesLimit, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AnalysisLimits Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.AnalysisLimits value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCategorizationExamplesLimit, value.CategorizationExamplesLimit, null, null); + writer.WriteProperty(options, PropCategorizationExamplesLimit, value.CategorizationExamplesLimit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelMemoryLimit, value.ModelMemoryLimit, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnomalyExplanation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnomalyExplanation.g.cs index 53b90b62bae..2608051edd8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnomalyExplanation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/AnomalyExplanation.g.cs @@ -51,12 +51,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AnomalyExplanation LocalJsonValue propUpperConfidenceBound = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAnomalyCharacteristicsImpact.TryReadProperty(ref reader, options, PropAnomalyCharacteristicsImpact, null)) + if (propAnomalyCharacteristicsImpact.TryReadProperty(ref reader, options, PropAnomalyCharacteristicsImpact, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propAnomalyLength.TryReadProperty(ref reader, options, PropAnomalyLength, null)) + if (propAnomalyLength.TryReadProperty(ref reader, options, PropAnomalyLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,37 +66,37 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AnomalyExplanation continue; } - if (propHighVariancePenalty.TryReadProperty(ref reader, options, PropHighVariancePenalty, null)) + if (propHighVariancePenalty.TryReadProperty(ref reader, options, PropHighVariancePenalty, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncompleteBucketPenalty.TryReadProperty(ref reader, options, PropIncompleteBucketPenalty, null)) + if (propIncompleteBucketPenalty.TryReadProperty(ref reader, options, PropIncompleteBucketPenalty, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLowerConfidenceBound.TryReadProperty(ref reader, options, PropLowerConfidenceBound, null)) + if (propLowerConfidenceBound.TryReadProperty(ref reader, options, PropLowerConfidenceBound, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMultiBucketImpact.TryReadProperty(ref reader, options, PropMultiBucketImpact, null)) + if (propMultiBucketImpact.TryReadProperty(ref reader, options, PropMultiBucketImpact, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSingleBucketImpact.TryReadProperty(ref reader, options, PropSingleBucketImpact, null)) + if (propSingleBucketImpact.TryReadProperty(ref reader, options, PropSingleBucketImpact, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTypicalValue.TryReadProperty(ref reader, options, PropTypicalValue, null)) + if (propTypicalValue.TryReadProperty(ref reader, options, PropTypicalValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUpperConfidenceBound.TryReadProperty(ref reader, options, PropUpperConfidenceBound, null)) + if (propUpperConfidenceBound.TryReadProperty(ref reader, options, PropUpperConfidenceBound, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,16 +129,16 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.AnomalyExplanation public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.AnomalyExplanation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAnomalyCharacteristicsImpact, value.AnomalyCharacteristicsImpact, null, null); - writer.WriteProperty(options, PropAnomalyLength, value.AnomalyLength, null, null); + writer.WriteProperty(options, PropAnomalyCharacteristicsImpact, value.AnomalyCharacteristicsImpact, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropAnomalyLength, value.AnomalyLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAnomalyType, value.AnomalyType, null, null); - writer.WriteProperty(options, PropHighVariancePenalty, value.HighVariancePenalty, null, null); - writer.WriteProperty(options, PropIncompleteBucketPenalty, value.IncompleteBucketPenalty, null, null); - writer.WriteProperty(options, PropLowerConfidenceBound, value.LowerConfidenceBound, null, null); - writer.WriteProperty(options, PropMultiBucketImpact, value.MultiBucketImpact, null, null); - writer.WriteProperty(options, PropSingleBucketImpact, value.SingleBucketImpact, null, null); - writer.WriteProperty(options, PropTypicalValue, value.TypicalValue, null, null); - writer.WriteProperty(options, PropUpperConfidenceBound, value.UpperConfidenceBound, null, null); + writer.WriteProperty(options, PropHighVariancePenalty, value.HighVariancePenalty, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncompleteBucketPenalty, value.IncompleteBucketPenalty, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLowerConfidenceBound, value.LowerConfidenceBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMultiBucketImpact, value.MultiBucketImpact, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSingleBucketImpact, value.SingleBucketImpact, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTypicalValue, value.TypicalValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUpperConfidenceBound, value.UpperConfidenceBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketInfluencer.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketInfluencer.g.cs index 728144ce700..6a083661574 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketInfluencer.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketInfluencer.g.cs @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.BucketInfluencer R continue; } - if (propTimestampString.TryReadProperty(ref reader, options, PropTimestampString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propTimestampString.TryReadProperty(ref reader, options, PropTimestampString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -147,7 +147,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropRawAnomalyScore, value.RawAnomalyScore, null, null); writer.WriteProperty(options, PropResultType, value.ResultType, null, null); writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropTimestampString, value.TimestampString, 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, PropTimestampString, value.TimestampString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketSummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketSummary.g.cs index 6e21baafd59..a1d1aa46b6f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketSummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/BucketSummary.g.cs @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.BucketSummary Read continue; } - if (propTimestampString.TryReadProperty(ref reader, options, PropTimestampString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propTimestampString.TryReadProperty(ref reader, options, PropTimestampString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -147,7 +147,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropProcessingTimeMs, value.ProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropResultType, value.ResultType, null, null); writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropTimestampString, value.TimestampString, 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, PropTimestampString, value.TimestampString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } 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/Category.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Category.g.cs index 9f7fcf40f9a..594ca4dc5f2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Category.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Category.g.cs @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Category Read(ref continue; } - if (propNumMatches.TryReadProperty(ref reader, options, PropNumMatches, null)) + if (propNumMatches.TryReadProperty(ref reader, options, PropNumMatches, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -167,7 +167,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropJobId, value.JobId, null, null); writer.WriteProperty(options, PropMaxMatchingLength, value.MaxMatchingLength, null, null); writer.WriteProperty(options, PropMlcategory, value.Mlcategory, null, null); - writer.WriteProperty(options, PropNumMatches, value.NumMatches, null, null); + writer.WriteProperty(options, PropNumMatches, value.NumMatches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropP, value.P, null, null); writer.WriteProperty(options, PropPartitionFieldName, value.PartitionFieldName, null, null); writer.WriteProperty(options, PropPartitionFieldValue, value.PartitionFieldValue, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ClassificationInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ClassificationInferenceOptions.g.cs index 08852730365..1bc4d270947 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ClassificationInferenceOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ClassificationInferenceOptions.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ClassificationInfe LocalJsonValue propTopClassesResultsField = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, null)) + if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,8 +89,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ClassificationInfe public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.ClassificationInferenceOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); - writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, null); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPredictionFieldType, value.PredictionFieldType, null, null); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTopClassesResultsField, value.TopClassesResultsField, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataCounts.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataCounts.g.cs index 00be60ce302..5dd3f7a6e1d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataCounts.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataCounts.g.cs @@ -74,7 +74,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataCounts Read(re continue; } - if (propEarliestRecordTimestamp.TryReadProperty(ref reader, options, PropEarliestRecordTimestamp, null)) + if (propEarliestRecordTimestamp.TryReadProperty(ref reader, options, PropEarliestRecordTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -109,32 +109,32 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataCounts Read(re continue; } - if (propLastDataTime.TryReadProperty(ref reader, options, PropLastDataTime, null)) + if (propLastDataTime.TryReadProperty(ref reader, options, PropLastDataTime, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLatestBucketTimestamp.TryReadProperty(ref reader, options, PropLatestBucketTimestamp, null)) + if (propLatestBucketTimestamp.TryReadProperty(ref reader, options, PropLatestBucketTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLatestEmptyBucketTimestamp.TryReadProperty(ref reader, options, PropLatestEmptyBucketTimestamp, null)) + if (propLatestEmptyBucketTimestamp.TryReadProperty(ref reader, options, PropLatestEmptyBucketTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLatestRecordTimestamp.TryReadProperty(ref reader, options, PropLatestRecordTimestamp, null)) + if (propLatestRecordTimestamp.TryReadProperty(ref reader, options, PropLatestRecordTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLatestSparseBucketTimestamp.TryReadProperty(ref reader, options, PropLatestSparseBucketTimestamp, null)) + if (propLatestSparseBucketTimestamp.TryReadProperty(ref reader, options, PropLatestSparseBucketTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLogTime.TryReadProperty(ref reader, options, PropLogTime, null)) + if (propLogTime.TryReadProperty(ref reader, options, PropLogTime, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -202,19 +202,19 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBucketCount, value.BucketCount, null, null); - writer.WriteProperty(options, PropEarliestRecordTimestamp, value.EarliestRecordTimestamp, null, null); + writer.WriteProperty(options, PropEarliestRecordTimestamp, value.EarliestRecordTimestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropEmptyBucketCount, value.EmptyBucketCount, null, null); writer.WriteProperty(options, PropInputBytes, value.InputBytes, null, null); writer.WriteProperty(options, PropInputFieldCount, value.InputFieldCount, null, null); writer.WriteProperty(options, PropInputRecordCount, value.InputRecordCount, null, null); writer.WriteProperty(options, PropInvalidDateCount, value.InvalidDateCount, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropLastDataTime, value.LastDataTime, null, null); - writer.WriteProperty(options, PropLatestBucketTimestamp, value.LatestBucketTimestamp, null, null); - writer.WriteProperty(options, PropLatestEmptyBucketTimestamp, value.LatestEmptyBucketTimestamp, null, null); - writer.WriteProperty(options, PropLatestRecordTimestamp, value.LatestRecordTimestamp, null, null); - writer.WriteProperty(options, PropLatestSparseBucketTimestamp, value.LatestSparseBucketTimestamp, null, null); - writer.WriteProperty(options, PropLogTime, value.LogTime, null, null); + writer.WriteProperty(options, PropLastDataTime, value.LastDataTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLatestBucketTimestamp, value.LatestBucketTimestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLatestEmptyBucketTimestamp, value.LatestEmptyBucketTimestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLatestRecordTimestamp, value.LatestRecordTimestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLatestSparseBucketTimestamp, value.LatestSparseBucketTimestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLogTime, value.LogTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMissingFieldCount, value.MissingFieldCount, null, null); writer.WriteProperty(options, PropOutOfOrderTimestampCount, value.OutOfOrderTimestampCount, null, null); writer.WriteProperty(options, PropProcessedFieldCount, value.ProcessedFieldCount, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Datafeed.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Datafeed.g.cs index b2c7e11250f..753ccee94dd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Datafeed.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Datafeed.g.cs @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Datafeed Read(ref continue; } - if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, null)) + if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -139,7 +139,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Datafeed Read(ref continue; } - if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, null)) + if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -188,12 +188,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndices, value.Indices, 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, PropIndicesOptions, value.IndicesOptions, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, null); + writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryDelay, value.QueryDelay, null, null); writer.WriteProperty(options, PropRuntimeMappings, value.RuntimeMappings, 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, PropScriptFields, value.ScriptFields, 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, PropScrollSize, value.ScrollSize, null, null); + writer.WriteProperty(options, PropScrollSize, value.ScrollSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedConfig.g.cs index 77242dd4b45..e1c8b249fef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedConfig.g.cs @@ -101,7 +101,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DatafeedConfig Rea continue; } - if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, null)) + if (propMaxEmptySearches.TryReadProperty(ref reader, options, PropMaxEmptySearches, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -126,7 +126,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DatafeedConfig Rea continue; } - if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, null)) + if (propScrollSize.TryReadProperty(ref reader, options, PropScrollSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -171,12 +171,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndices, value.Indices, null, null); writer.WriteProperty(options, PropIndicesOptions, value.IndicesOptions, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, null); + writer.WriteProperty(options, PropMaxEmptySearches, value.MaxEmptySearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryDelay, value.QueryDelay, 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, PropScrollSize, value.ScrollSize, null, null); + writer.WriteProperty(options, PropScrollSize, value.ScrollSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedTimingStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedTimingStats.g.cs index 509ba4b3624..f50d4fa5145 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedTimingStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DatafeedTimingStats.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DatafeedTimingStat LocalJsonValue propTotalSearchTimeMs = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAverageSearchTimePerBucketMs.TryReadProperty(ref reader, options, PropAverageSearchTimePerBucketMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propAverageSearchTimePerBucketMs.TryReadProperty(ref reader, options, PropAverageSearchTimePerBucketMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -105,7 +105,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DatafeedTimingStat public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DatafeedTimingStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAverageSearchTimePerBucketMs, value.AverageSearchTimePerBucketMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropAverageSearchTimePerBucketMs, value.AverageSearchTimePerBucketMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropBucketCount, value.BucketCount, null, null); writer.WriteProperty(options, PropExponentialAverageCalculationContext, value.ExponentialAverageCalculationContext, null, null); writer.WriteProperty(options, PropExponentialAverageSearchTimePerHourMs, value.ExponentialAverageSearchTimePerHourMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); 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/DataframeAnalysisClassification.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisClassification.g.cs index ed1b036a2f7..f9e3031c3e4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisClassification.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisClassification.g.cs @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisC LocalJsonValue propTrainingPercent = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAlpha.TryReadProperty(ref reader, options, PropAlpha, null)) + if (propAlpha.TryReadProperty(ref reader, options, PropAlpha, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,27 +87,27 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisC continue; } - if (propDownsampleFactor.TryReadProperty(ref reader, options, PropDownsampleFactor, null)) + if (propDownsampleFactor.TryReadProperty(ref reader, options, PropDownsampleFactor, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEarlyStoppingEnabled.TryReadProperty(ref reader, options, PropEarlyStoppingEnabled, null)) + if (propEarlyStoppingEnabled.TryReadProperty(ref reader, options, PropEarlyStoppingEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEta.TryReadProperty(ref reader, options, PropEta, null)) + if (propEta.TryReadProperty(ref reader, options, PropEta, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEtaGrowthRatePerTree.TryReadProperty(ref reader, options, PropEtaGrowthRatePerTree, null)) + if (propEtaGrowthRatePerTree.TryReadProperty(ref reader, options, PropEtaGrowthRatePerTree, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFeatureBagFraction.TryReadProperty(ref reader, options, PropFeatureBagFraction, null)) + if (propFeatureBagFraction.TryReadProperty(ref reader, options, PropFeatureBagFraction, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -117,32 +117,32 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisC continue; } - if (propGamma.TryReadProperty(ref reader, options, PropGamma, null)) + if (propGamma.TryReadProperty(ref reader, options, PropGamma, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLambda.TryReadProperty(ref reader, options, PropLambda, null)) + if (propLambda.TryReadProperty(ref reader, options, PropLambda, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxOptimizationRoundsPerHyperparameter.TryReadProperty(ref reader, options, PropMaxOptimizationRoundsPerHyperparameter, null)) + if (propMaxOptimizationRoundsPerHyperparameter.TryReadProperty(ref reader, options, PropMaxOptimizationRoundsPerHyperparameter, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees, null) || propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees1, null)) + if (propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees1, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, null)) + if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,17 +152,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisC continue; } - if (propRandomizeSeed.TryReadProperty(ref reader, options, PropRandomizeSeed, null)) + if (propRandomizeSeed.TryReadProperty(ref reader, options, PropRandomizeSeed, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSoftTreeDepthLimit.TryReadProperty(ref reader, options, PropSoftTreeDepthLimit, null)) + if (propSoftTreeDepthLimit.TryReadProperty(ref reader, options, PropSoftTreeDepthLimit, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSoftTreeDepthTolerance.TryReadProperty(ref reader, options, PropSoftTreeDepthTolerance, null)) + if (propSoftTreeDepthTolerance.TryReadProperty(ref reader, options, PropSoftTreeDepthTolerance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -210,25 +210,25 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisC public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisClassification value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAlpha, value.Alpha, null, null); + writer.WriteProperty(options, PropAlpha, value.Alpha, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropClassAssignmentObjective, value.ClassAssignmentObjective, null, null); writer.WriteProperty(options, PropDependentVariable, value.DependentVariable, null, null); - writer.WriteProperty(options, PropDownsampleFactor, value.DownsampleFactor, null, null); - writer.WriteProperty(options, PropEarlyStoppingEnabled, value.EarlyStoppingEnabled, null, null); - writer.WriteProperty(options, PropEta, value.Eta, null, null); - writer.WriteProperty(options, PropEtaGrowthRatePerTree, value.EtaGrowthRatePerTree, null, null); - writer.WriteProperty(options, PropFeatureBagFraction, value.FeatureBagFraction, null, null); + writer.WriteProperty(options, PropDownsampleFactor, value.DownsampleFactor, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEarlyStoppingEnabled, value.EarlyStoppingEnabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEta, value.Eta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEtaGrowthRatePerTree, value.EtaGrowthRatePerTree, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFeatureBagFraction, value.FeatureBagFraction, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFeatureProcessors, value.FeatureProcessors, 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, PropGamma, value.Gamma, null, null); - writer.WriteProperty(options, PropLambda, value.Lambda, null, null); - writer.WriteProperty(options, PropMaxOptimizationRoundsPerHyperparameter, value.MaxOptimizationRoundsPerHyperparameter, null, null); - writer.WriteProperty(options, PropMaxTrees, value.MaxTrees, null, null); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); - writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, null); + writer.WriteProperty(options, PropGamma, value.Gamma, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLambda, value.Lambda, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxOptimizationRoundsPerHyperparameter, value.MaxOptimizationRoundsPerHyperparameter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxTrees, value.MaxTrees, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPredictionFieldName, value.PredictionFieldName, null, null); - writer.WriteProperty(options, PropRandomizeSeed, value.RandomizeSeed, null, null); - writer.WriteProperty(options, PropSoftTreeDepthLimit, value.SoftTreeDepthLimit, null, null); - writer.WriteProperty(options, PropSoftTreeDepthTolerance, value.SoftTreeDepthTolerance, null, null); + writer.WriteProperty(options, PropRandomizeSeed, value.RandomizeSeed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSoftTreeDepthLimit, value.SoftTreeDepthLimit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSoftTreeDepthTolerance, value.SoftTreeDepthTolerance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTrainingPercent, value.TrainingPercent, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorNGramEncoding.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorNGramEncoding.g.cs index c490af203fc..699aa4d1341 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorNGramEncoding.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisFeatureProcessorNGramEncoding.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisF LocalJsonValue propStart = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCustom.TryReadProperty(ref reader, options, PropCustom, null)) + if (propCustom.TryReadProperty(ref reader, options, PropCustom, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisF continue; } - if (propLength.TryReadProperty(ref reader, options, PropLength, null)) + if (propLength.TryReadProperty(ref reader, options, PropLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisF continue; } - if (propStart.TryReadProperty(ref reader, options, PropStart, null)) + if (propStart.TryReadProperty(ref reader, options, PropStart, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisF public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisFeatureProcessorNGramEncoding value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCustom, value.Custom, null, null); + writer.WriteProperty(options, PropCustom, value.Custom, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFeaturePrefix, value.FeaturePrefix, null, null); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropLength, value.Length, null, null); + writer.WriteProperty(options, PropLength, value.Length, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNGrams, value.NGrams, 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, PropStart, value.Start, null, null); + writer.WriteProperty(options, PropStart, value.Start, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisOutlierDetection.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisOutlierDetection.g.cs index d77c6f16d76..2e433899141 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisOutlierDetection.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisOutlierDetection.g.cs @@ -43,12 +43,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisO LocalJsonValue propStandardizationEnabled = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propComputeFeatureInfluence.TryReadProperty(ref reader, options, PropComputeFeatureInfluence, null)) + if (propComputeFeatureInfluence.TryReadProperty(ref reader, options, PropComputeFeatureInfluence, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFeatureInfluenceThreshold.TryReadProperty(ref reader, options, PropFeatureInfluenceThreshold, null)) + if (propFeatureInfluenceThreshold.TryReadProperty(ref reader, options, PropFeatureInfluenceThreshold, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,17 +58,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisO continue; } - if (propNNeighbors.TryReadProperty(ref reader, options, PropNNeighbors, null)) + if (propNNeighbors.TryReadProperty(ref reader, options, PropNNeighbors, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOutlierFraction.TryReadProperty(ref reader, options, PropOutlierFraction, null)) + if (propOutlierFraction.TryReadProperty(ref reader, options, PropOutlierFraction, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStandardizationEnabled.TryReadProperty(ref reader, options, PropStandardizationEnabled, null)) + if (propStandardizationEnabled.TryReadProperty(ref reader, options, PropStandardizationEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisO public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisOutlierDetection value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropComputeFeatureInfluence, value.ComputeFeatureInfluence, null, null); - writer.WriteProperty(options, PropFeatureInfluenceThreshold, value.FeatureInfluenceThreshold, null, null); + writer.WriteProperty(options, PropComputeFeatureInfluence, value.ComputeFeatureInfluence, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFeatureInfluenceThreshold, value.FeatureInfluenceThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMethod, value.Method, null, null); - writer.WriteProperty(options, PropNNeighbors, value.NNeighbors, null, null); - writer.WriteProperty(options, PropOutlierFraction, value.OutlierFraction, null, null); - writer.WriteProperty(options, PropStandardizationEnabled, value.StandardizationEnabled, null, null); + writer.WriteProperty(options, PropNNeighbors, value.NNeighbors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOutlierFraction, value.OutlierFraction, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStandardizationEnabled, value.StandardizationEnabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisRegression.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisRegression.g.cs index d714b6cddb8..64030936e1f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisRegression.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalysisRegression.g.cs @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisR LocalJsonValue propTrainingPercent = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAlpha.TryReadProperty(ref reader, options, PropAlpha, null)) + if (propAlpha.TryReadProperty(ref reader, options, PropAlpha, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,27 +82,27 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisR continue; } - if (propDownsampleFactor.TryReadProperty(ref reader, options, PropDownsampleFactor, null)) + if (propDownsampleFactor.TryReadProperty(ref reader, options, PropDownsampleFactor, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEarlyStoppingEnabled.TryReadProperty(ref reader, options, PropEarlyStoppingEnabled, null)) + if (propEarlyStoppingEnabled.TryReadProperty(ref reader, options, PropEarlyStoppingEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEta.TryReadProperty(ref reader, options, PropEta, null)) + if (propEta.TryReadProperty(ref reader, options, PropEta, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEtaGrowthRatePerTree.TryReadProperty(ref reader, options, PropEtaGrowthRatePerTree, null)) + if (propEtaGrowthRatePerTree.TryReadProperty(ref reader, options, PropEtaGrowthRatePerTree, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFeatureBagFraction.TryReadProperty(ref reader, options, PropFeatureBagFraction, null)) + if (propFeatureBagFraction.TryReadProperty(ref reader, options, PropFeatureBagFraction, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,12 +112,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisR continue; } - if (propGamma.TryReadProperty(ref reader, options, PropGamma, null)) + if (propGamma.TryReadProperty(ref reader, options, PropGamma, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLambda.TryReadProperty(ref reader, options, PropLambda, null)) + if (propLambda.TryReadProperty(ref reader, options, PropLambda, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,22 +127,22 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisR continue; } - if (propLossFunctionParameter.TryReadProperty(ref reader, options, PropLossFunctionParameter, null)) + if (propLossFunctionParameter.TryReadProperty(ref reader, options, PropLossFunctionParameter, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxOptimizationRoundsPerHyperparameter.TryReadProperty(ref reader, options, PropMaxOptimizationRoundsPerHyperparameter, null)) + if (propMaxOptimizationRoundsPerHyperparameter.TryReadProperty(ref reader, options, PropMaxOptimizationRoundsPerHyperparameter, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees, null) || propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees1, null)) + if (propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propMaxTrees.TryReadProperty(ref reader, options, PropMaxTrees1, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, null)) + if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,17 +152,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisR continue; } - if (propRandomizeSeed.TryReadProperty(ref reader, options, PropRandomizeSeed, null)) + if (propRandomizeSeed.TryReadProperty(ref reader, options, PropRandomizeSeed, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSoftTreeDepthLimit.TryReadProperty(ref reader, options, PropSoftTreeDepthLimit, null)) + if (propSoftTreeDepthLimit.TryReadProperty(ref reader, options, PropSoftTreeDepthLimit, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSoftTreeDepthTolerance.TryReadProperty(ref reader, options, PropSoftTreeDepthTolerance, null)) + if (propSoftTreeDepthTolerance.TryReadProperty(ref reader, options, PropSoftTreeDepthTolerance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -210,25 +210,25 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisR public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalysisRegression value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAlpha, value.Alpha, null, null); + writer.WriteProperty(options, PropAlpha, value.Alpha, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDependentVariable, value.DependentVariable, null, null); - writer.WriteProperty(options, PropDownsampleFactor, value.DownsampleFactor, null, null); - writer.WriteProperty(options, PropEarlyStoppingEnabled, value.EarlyStoppingEnabled, null, null); - writer.WriteProperty(options, PropEta, value.Eta, null, null); - writer.WriteProperty(options, PropEtaGrowthRatePerTree, value.EtaGrowthRatePerTree, null, null); - writer.WriteProperty(options, PropFeatureBagFraction, value.FeatureBagFraction, null, null); + writer.WriteProperty(options, PropDownsampleFactor, value.DownsampleFactor, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEarlyStoppingEnabled, value.EarlyStoppingEnabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEta, value.Eta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEtaGrowthRatePerTree, value.EtaGrowthRatePerTree, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFeatureBagFraction, value.FeatureBagFraction, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFeatureProcessors, value.FeatureProcessors, 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, PropGamma, value.Gamma, null, null); - writer.WriteProperty(options, PropLambda, value.Lambda, null, null); + writer.WriteProperty(options, PropGamma, value.Gamma, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLambda, value.Lambda, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLossFunction, value.LossFunction, null, null); - writer.WriteProperty(options, PropLossFunctionParameter, value.LossFunctionParameter, null, null); - writer.WriteProperty(options, PropMaxOptimizationRoundsPerHyperparameter, value.MaxOptimizationRoundsPerHyperparameter, null, null); - writer.WriteProperty(options, PropMaxTrees, value.MaxTrees, null, null); - writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, null); + writer.WriteProperty(options, PropLossFunctionParameter, value.LossFunctionParameter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxOptimizationRoundsPerHyperparameter, value.MaxOptimizationRoundsPerHyperparameter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxTrees, value.MaxTrees, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPredictionFieldName, value.PredictionFieldName, null, null); - writer.WriteProperty(options, PropRandomizeSeed, value.RandomizeSeed, null, null); - writer.WriteProperty(options, PropSoftTreeDepthLimit, value.SoftTreeDepthLimit, null, null); - writer.WriteProperty(options, PropSoftTreeDepthTolerance, value.SoftTreeDepthTolerance, null, null); + writer.WriteProperty(options, PropRandomizeSeed, value.RandomizeSeed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSoftTreeDepthLimit, value.SoftTreeDepthLimit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSoftTreeDepthTolerance, value.SoftTreeDepthTolerance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTrainingPercent, value.TrainingPercent, null, null); writer.WriteEndObject(); } 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/DataframeAnalyticsStatsMemoryUsage.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsStatsMemoryUsage.g.cs index 4edacb8e013..6b75e16a831 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsStatsMemoryUsage.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsStatsMemoryUsage.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalytics LocalJsonValue propTimestamp = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMemoryReestimateBytes.TryReadProperty(ref reader, options, PropMemoryReestimateBytes, null)) + if (propMemoryReestimateBytes.TryReadProperty(ref reader, options, PropMemoryReestimateBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalytics continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalytics public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalyticsStatsMemoryUsage value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMemoryReestimateBytes, value.MemoryReestimateBytes, null, null); + writer.WriteProperty(options, PropMemoryReestimateBytes, value.MemoryReestimateBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPeakUsageBytes, value.PeakUsageBytes, null, null); writer.WriteProperty(options, PropStatus, value.Status, null, null); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsSummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsSummary.g.cs index 955d9cefccc..ef980fbb58c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsSummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeAnalyticsSummary.g.cs @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalytics LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, null)) + if (propAllowLazyStart.TryReadProperty(ref reader, options, PropAllowLazyStart, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -77,7 +77,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalytics continue; } - if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -97,7 +97,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalytics continue; } - if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, null)) + if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -153,15 +153,15 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalytics public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeAnalyticsSummary value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, null); + writer.WriteProperty(options, PropAllowLazyStart, value.AllowLazyStart, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAnalysis, value.Analysis, null, null); writer.WriteProperty(options, PropAnalyzedFields, value.AnalyzedFields, null, null); writer.WriteProperty(options, PropAuthorization, value.Authorization, null, null); - writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropDest, value.Dest, null, null); writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, null); + writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMeta, value.Meta, 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, PropModelMemoryLimit, value.ModelMemoryLimit, null, null); writer.WriteProperty(options, PropSource, value.Source, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetricsAucRoc.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetricsAucRoc.g.cs index 9ae2088ecd1..4c82b9a88d6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetricsAucRoc.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationClassificationMetricsAucRoc.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeEvaluatio continue; } - if (propIncludeCurve.TryReadProperty(ref reader, options, PropIncludeCurve, null)) + if (propIncludeCurve.TryReadProperty(ref reader, options, PropIncludeCurve, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropClassName, value.ClassName, null, null); - writer.WriteProperty(options, PropIncludeCurve, value.IncludeCurve, null, null); + writer.WriteProperty(options, PropIncludeCurve, value.IncludeCurve, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsHuber.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsHuber.g.cs index 083a5cbd37f..75ade7ef216 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsHuber.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsHuber.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeEvaluatio LocalJsonValue propDelta = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDelta.TryReadProperty(ref reader, options, PropDelta, null)) + if (propDelta.TryReadProperty(ref reader, options, PropDelta, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeEvaluatio public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeEvaluationRegressionMetricsHuber value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDelta, value.Delta, null, null); + writer.WriteProperty(options, PropDelta, value.Delta, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsMsle.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsMsle.g.cs index 1ca8cf39e01..c8351f60ebd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsMsle.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframeEvaluationRegressionMetricsMsle.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeEvaluatio LocalJsonValue propOffset = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propOffset.TryReadProperty(ref reader, options, PropOffset, null)) + if (propOffset.TryReadProperty(ref reader, options, PropOffset, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframeEvaluatio public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.DataframeEvaluationRegressionMetricsMsle value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropOffset, value.Offset, null, null); + writer.WriteProperty(options, PropOffset, value.Offset, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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..114071666c1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframePreviewConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DataframePreviewConfig.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DataframePreviewCo continue; } - if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, null)) + if (propMaxNumThreads.TryReadProperty(ref reader, options, PropMaxNumThreads, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAnalysis, value.Analysis, null, null); writer.WriteProperty(options, PropAnalyzedFields, value.AnalyzedFields, null, null); - writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, null); + writer.WriteProperty(options, PropMaxNumThreads, value.MaxNumThreads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelMemoryLimit, value.ModelMemoryLimit, null, null); writer.WriteProperty(options, PropSource, value.Source, null, null); writer.WriteEndObject(); @@ -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/MachineLearning/Detector.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Detector.g.cs index 54c5e795de9..52b774d1ad6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Detector.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Detector.g.cs @@ -66,12 +66,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Detector Read(ref continue; } - if (propDetectorIndex.TryReadProperty(ref reader, options, PropDetectorIndex, null)) + if (propDetectorIndex.TryReadProperty(ref reader, options, PropDetectorIndex, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExcludeFrequent.TryReadProperty(ref reader, options, PropExcludeFrequent, null)) + if (propExcludeFrequent.TryReadProperty(ref reader, options, PropExcludeFrequent, static Elastic.Clients.Elasticsearch.MachineLearning.ExcludeFrequent? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Detector Read(ref continue; } - if (propUseNull.TryReadProperty(ref reader, options, PropUseNull, null)) + if (propUseNull.TryReadProperty(ref reader, options, PropUseNull, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,13 +132,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropByFieldName, value.ByFieldName, null, null); writer.WriteProperty(options, PropCustomRules, value.CustomRules, 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, PropDetectorDescription, value.DetectorDescription, null, null); - writer.WriteProperty(options, PropDetectorIndex, value.DetectorIndex, null, null); - writer.WriteProperty(options, PropExcludeFrequent, value.ExcludeFrequent, null, null); + writer.WriteProperty(options, PropDetectorIndex, value.DetectorIndex, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExcludeFrequent, value.ExcludeFrequent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.ExcludeFrequent? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFieldName, value.FieldName, null, null); writer.WriteProperty(options, PropFunction, value.Function, null, null); writer.WriteProperty(options, PropOverFieldName, value.OverFieldName, null, null); writer.WriteProperty(options, PropPartitionFieldName, value.PartitionFieldName, null, null); - writer.WriteProperty(options, PropUseNull, value.UseNull, null, null); + writer.WriteProperty(options, PropUseNull, value.UseNull, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DetectorRead.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DetectorRead.g.cs index e2a0dd70c88..82d7f57ecab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DetectorRead.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/DetectorRead.g.cs @@ -66,12 +66,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DetectorRead Read( continue; } - if (propDetectorIndex.TryReadProperty(ref reader, options, PropDetectorIndex, null)) + if (propDetectorIndex.TryReadProperty(ref reader, options, PropDetectorIndex, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propExcludeFrequent.TryReadProperty(ref reader, options, PropExcludeFrequent, null)) + if (propExcludeFrequent.TryReadProperty(ref reader, options, PropExcludeFrequent, static Elastic.Clients.Elasticsearch.MachineLearning.ExcludeFrequent? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.DetectorRead Read( continue; } - if (propUseNull.TryReadProperty(ref reader, options, PropUseNull, null)) + if (propUseNull.TryReadProperty(ref reader, options, PropUseNull, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,13 +132,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropByFieldName, value.ByFieldName, null, null); writer.WriteProperty(options, PropCustomRules, value.CustomRules, 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, PropDetectorDescription, value.DetectorDescription, null, null); - writer.WriteProperty(options, PropDetectorIndex, value.DetectorIndex, null, null); - writer.WriteProperty(options, PropExcludeFrequent, value.ExcludeFrequent, null, null); + writer.WriteProperty(options, PropDetectorIndex, value.DetectorIndex, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropExcludeFrequent, value.ExcludeFrequent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.ExcludeFrequent? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFieldName, value.FieldName, null, null); writer.WriteProperty(options, PropFunction, value.Function, null, null); writer.WriteProperty(options, PropOverFieldName, value.OverFieldName, null, null); writer.WriteProperty(options, PropPartitionFieldName, value.PartitionFieldName, null, null); - writer.WriteProperty(options, PropUseNull, value.UseNull, null, null); + writer.WriteProperty(options, PropUseNull, value.UseNull, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ExponentialAverageCalculationContext.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ExponentialAverageCalculationContext.g.cs index f9a306941b0..154069553a8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ExponentialAverageCalculationContext.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ExponentialAverageCalculationContext.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ExponentialAverage continue; } - if (propLatestTimestamp.TryReadProperty(ref reader, options, PropLatestTimestamp, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propLatestTimestamp.TryReadProperty(ref reader, options, PropLatestTimestamp, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propPreviousExponentialAverageMs.TryReadProperty(ref reader, options, PropPreviousExponentialAverageMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propPreviousExponentialAverageMs.TryReadProperty(ref reader, options, PropPreviousExponentialAverageMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -74,8 +74,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropIncrementalMetricValueMs, value.IncrementalMetricValueMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropLatestTimestamp, value.LatestTimestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropPreviousExponentialAverageMs, value.PreviousExponentialAverageMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropLatestTimestamp, value.LatestTimestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropPreviousExponentialAverageMs, value.PreviousExponentialAverageMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceOptions.g.cs index edb30011fca..7a211e3d0c3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceOptions.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.FillMaskInferenceO continue; } - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,7 +90,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropMaskToken, value.MaskToken, null, null); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteProperty(options, PropVocabulary, value.Vocabulary, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceUpdateOptions.g.cs index 26750344e69..7495768c552 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceUpdateOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FillMaskInferenceUpdateOptions.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.FillMaskInferenceU LocalJsonValue propTokenization = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.FillMaskInferenceU public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.FillMaskInferenceUpdateOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FilterRef.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FilterRef.g.cs index a97cacb7104..a045392302b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FilterRef.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/FilterRef.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.FilterRef Read(ref continue; } - if (propFilterType.TryReadProperty(ref reader, options, PropFilterType, null)) + if (propFilterType.TryReadProperty(ref reader, options, PropFilterType, static Elastic.Clients.Elasticsearch.MachineLearning.FilterType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFilterId, value.FilterId, null, null); - writer.WriteProperty(options, PropFilterType, value.FilterType, null, null); + writer.WriteProperty(options, PropFilterType, value.FilterType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.FilterType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Hyperparameter.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Hyperparameter.g.cs index 1a266d5b7d9..893ec048cd7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Hyperparameter.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Hyperparameter.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Hyperparameter Rea LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAbsoluteImportance.TryReadProperty(ref reader, options, PropAbsoluteImportance, null)) + if (propAbsoluteImportance.TryReadProperty(ref reader, options, PropAbsoluteImportance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Hyperparameter Rea continue; } - if (propRelativeImportance.TryReadProperty(ref reader, options, PropRelativeImportance, null)) + if (propRelativeImportance.TryReadProperty(ref reader, options, PropRelativeImportance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,9 +89,9 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Hyperparameter Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.Hyperparameter value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAbsoluteImportance, value.AbsoluteImportance, null, null); + writer.WriteProperty(options, PropAbsoluteImportance, value.AbsoluteImportance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropName, value.Name, null, null); - writer.WriteProperty(options, PropRelativeImportance, value.RelativeImportance, null, null); + writer.WriteProperty(options, PropRelativeImportance, value.RelativeImportance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSupplied, value.Supplied, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs index 123fb584671..1a48dfb655d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/InferenceResponseResult.g.cs @@ -59,7 +59,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.InferenceResponseR continue; } - if (propIsTruncated.TryReadProperty(ref reader, options, PropIsTruncated, null)) + if (propIsTruncated.TryReadProperty(ref reader, options, PropIsTruncated, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,12 +74,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.InferenceResponseR continue; } - if (propPredictionProbability.TryReadProperty(ref reader, options, PropPredictionProbability, null)) + if (propPredictionProbability.TryReadProperty(ref reader, options, PropPredictionProbability, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPredictionScore.TryReadProperty(ref reader, options, PropPredictionScore, null)) + if (propPredictionScore.TryReadProperty(ref reader, options, PropPredictionScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -123,11 +123,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropEntities, value.Entities, 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, PropFeatureImportance, value.FeatureImportance, 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, PropIsTruncated, value.IsTruncated, null, null); + writer.WriteProperty(options, PropIsTruncated, value.IsTruncated, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPredictedValue, value.PredictedValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteSingleOrManyCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null))); writer.WriteProperty(options, PropPredictedValueSequence, value.PredictedValueSequence, null, null); - writer.WriteProperty(options, PropPredictionProbability, value.PredictionProbability, null, null); - writer.WriteProperty(options, PropPredictionScore, value.PredictionScore, null, null); + writer.WriteProperty(options, PropPredictionProbability, value.PredictionProbability, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPredictionScore, value.PredictionScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTopClasses, value.TopClasses, 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, PropWarning, value.Warning, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Job.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Job.g.cs index f2943c7e2c8..375af9b2ac3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Job.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Job.g.cs @@ -102,7 +102,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Job Read(ref Syste continue; } - if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -112,7 +112,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Job Read(ref Syste continue; } - if (propDailyModelSnapshotRetentionAfterDays.TryReadProperty(ref reader, options, PropDailyModelSnapshotRetentionAfterDays, null)) + if (propDailyModelSnapshotRetentionAfterDays.TryReadProperty(ref reader, options, PropDailyModelSnapshotRetentionAfterDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,7 +127,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Job Read(ref Syste continue; } - if (propDeleting.TryReadProperty(ref reader, options, PropDeleting, null)) + if (propDeleting.TryReadProperty(ref reader, options, PropDeleting, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,7 +137,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Job Read(ref Syste continue; } - if (propFinishedTime.TryReadProperty(ref reader, options, PropFinishedTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propFinishedTime.TryReadProperty(ref reader, options, PropFinishedTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -177,7 +177,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Job Read(ref Syste continue; } - if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, null)) + if (propRenormalizationWindowDays.TryReadProperty(ref reader, options, PropRenormalizationWindowDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -187,7 +187,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Job Read(ref Syste continue; } - if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, null)) + if (propResultsRetentionDays.TryReadProperty(ref reader, options, PropResultsRetentionDays, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -238,14 +238,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAnalysisLimits, value.AnalysisLimits, null, null); writer.WriteProperty(options, PropBackgroundPersistInterval, value.BackgroundPersistInterval, null, null); writer.WriteProperty(options, PropBlocked, value.Blocked, null, null); - writer.WriteProperty(options, PropCreateTime, value.CreateTime, 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, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropCustomSettings, value.CustomSettings, null, null); - writer.WriteProperty(options, PropDailyModelSnapshotRetentionAfterDays, value.DailyModelSnapshotRetentionAfterDays, null, null); + writer.WriteProperty(options, PropDailyModelSnapshotRetentionAfterDays, value.DailyModelSnapshotRetentionAfterDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDataDescription, value.DataDescription, null, null); writer.WriteProperty(options, PropDatafeedConfig, value.DatafeedConfig, null, null); - writer.WriteProperty(options, PropDeleting, value.Deleting, null, null); + writer.WriteProperty(options, PropDeleting, value.Deleting, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropFinishedTime, value.FinishedTime, 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, PropFinishedTime, value.FinishedTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropGroups, value.Groups, 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, PropJobId, value.JobId, null, null); writer.WriteProperty(options, PropJobType, value.JobType, null, null); @@ -253,9 +253,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropModelPlotConfig, value.ModelPlotConfig, null, null); writer.WriteProperty(options, PropModelSnapshotId, value.ModelSnapshotId, null, null); writer.WriteProperty(options, PropModelSnapshotRetentionDays, value.ModelSnapshotRetentionDays, null, null); - writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, null); + writer.WriteProperty(options, PropRenormalizationWindowDays, value.RenormalizationWindowDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsIndexName, value.ResultsIndexName, null, null); - writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, null); + writer.WriteProperty(options, PropResultsRetentionDays, value.ResultsRetentionDays, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobStats.g.cs index 92ba4fda1dc..be6a246d76d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobStats.g.cs @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.JobStats Read(ref continue; } - if (propDeleting.TryReadProperty(ref reader, options, PropDeleting, null)) + if (propDeleting.TryReadProperty(ref reader, options, PropDeleting, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.JobStats Read(ref continue; } - if (propOpenTime.TryReadProperty(ref reader, options, PropOpenTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propOpenTime.TryReadProperty(ref reader, options, PropOpenTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -131,12 +131,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAssignmentExplanation, value.AssignmentExplanation, null, null); writer.WriteProperty(options, PropDataCounts, value.DataCounts, null, null); - writer.WriteProperty(options, PropDeleting, value.Deleting, null, null); + writer.WriteProperty(options, PropDeleting, value.Deleting, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropForecastsStats, value.ForecastsStats, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); writer.WriteProperty(options, PropModelSizeStats, value.ModelSizeStats, null, null); writer.WriteProperty(options, PropNode, value.Node, null, null); - writer.WriteProperty(options, PropOpenTime, value.OpenTime, 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, PropOpenTime, value.OpenTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropState, value.State, null, null); writer.WriteProperty(options, PropTimingStats, value.TimingStats, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobTimingStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobTimingStats.g.cs index 364ff2fd7a4..6be5fe2fe10 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobTimingStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/JobTimingStats.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.JobTimingStats Rea LocalJsonValue propTotalBucketProcessingTimeMs = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAverageBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropAverageBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propAverageBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropAverageBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.JobTimingStats Rea continue; } - if (propExponentialAverageBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropExponentialAverageBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propExponentialAverageBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropExponentialAverageBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -72,12 +72,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.JobTimingStats Rea continue; } - if (propMaximumBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropMaximumBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propMaximumBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropMaximumBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propMinimumBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropMinimumBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propMinimumBucketProcessingTimeMs.TryReadProperty(ref reader, options, PropMinimumBucketProcessingTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -113,13 +113,13 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.JobTimingStats Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.JobTimingStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAverageBucketProcessingTimeMs, value.AverageBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropAverageBucketProcessingTimeMs, value.AverageBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropBucketCount, value.BucketCount, null, null); - writer.WriteProperty(options, PropExponentialAverageBucketProcessingTimeMs, value.ExponentialAverageBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropExponentialAverageBucketProcessingTimeMs, value.ExponentialAverageBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropExponentialAverageBucketProcessingTimePerHourMs, value.ExponentialAverageBucketProcessingTimePerHourMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropMaximumBucketProcessingTimeMs, value.MaximumBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropMinimumBucketProcessingTimeMs, value.MinimumBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropMaximumBucketProcessingTimeMs, value.MaximumBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropMinimumBucketProcessingTimeMs, value.MinimumBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropTotalBucketProcessingTimeMs, value.TotalBucketProcessingTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Limits.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Limits.g.cs index 022e2a46f55..fbc671aa8d7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Limits.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Limits.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Limits Read(ref Sy continue; } - if (propMaxSingleMlNodeProcessors.TryReadProperty(ref reader, options, PropMaxSingleMlNodeProcessors, null)) + if (propMaxSingleMlNodeProcessors.TryReadProperty(ref reader, options, PropMaxSingleMlNodeProcessors, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Limits Read(ref Sy continue; } - if (propTotalMlProcessors.TryReadProperty(ref reader, options, PropTotalMlProcessors, null)) + if (propTotalMlProcessors.TryReadProperty(ref reader, options, PropTotalMlProcessors, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropEffectiveMaxModelMemoryLimit, value.EffectiveMaxModelMemoryLimit, null, null); writer.WriteProperty(options, PropMaxModelMemoryLimit, value.MaxModelMemoryLimit, null, null); - writer.WriteProperty(options, PropMaxSingleMlNodeProcessors, value.MaxSingleMlNodeProcessors, null, null); + writer.WriteProperty(options, PropMaxSingleMlNodeProcessors, value.MaxSingleMlNodeProcessors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalMlMemory, value.TotalMlMemory, null, null); - writer.WriteProperty(options, PropTotalMlProcessors, value.TotalMlProcessors, null, null); + writer.WriteProperty(options, PropTotalMlProcessors, value.TotalMlProcessors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPackageConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPackageConfig.g.cs index af574532ceb..e9e903f0220 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPackageConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPackageConfig.g.cs @@ -59,7 +59,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ModelPackageConfig LocalJsonValue propVocabularyFile = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -161,7 +161,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ModelPackageConfig public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.ModelPackageConfig value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropInferenceConfig, value.InferenceConfig, 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, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPlotConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPlotConfig.g.cs index 432d22547d8..74d2a5931e5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPlotConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelPlotConfig.g.cs @@ -37,12 +37,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ModelPlotConfig Re LocalJsonValue propTerms = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAnnotationsEnabled.TryReadProperty(ref reader, options, PropAnnotationsEnabled, null)) + if (propAnnotationsEnabled.TryReadProperty(ref reader, options, PropAnnotationsEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,8 +73,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ModelPlotConfig Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.ModelPlotConfig value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAnnotationsEnabled, value.AnnotationsEnabled, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropAnnotationsEnabled, value.AnnotationsEnabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTerms, value.Terms, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSizeStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSizeStats.g.cs index 595fb1b9af8..8ba7eb35939 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSizeStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSizeStats.g.cs @@ -160,7 +160,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ModelSizeStats Rea continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, null)) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -242,7 +242,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropPeakModelBytes, value.PeakModelBytes, null, null); writer.WriteProperty(options, PropRareCategoryCount, value.RareCategoryCount, null, null); writer.WriteProperty(options, PropResultType, value.ResultType, null, null); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, null); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalByFieldCount, value.TotalByFieldCount, null, null); writer.WriteProperty(options, PropTotalCategoryCount, value.TotalCategoryCount, null, null); writer.WriteProperty(options, PropTotalOverFieldCount, value.TotalOverFieldCount, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSnapshot.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSnapshot.g.cs index f8e7025a2e7..2c63809a87e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSnapshot.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ModelSnapshot.g.cs @@ -61,12 +61,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ModelSnapshot Read continue; } - if (propLatestRecordTimeStamp.TryReadProperty(ref reader, options, PropLatestRecordTimeStamp, null)) + if (propLatestRecordTimeStamp.TryReadProperty(ref reader, options, PropLatestRecordTimeStamp, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLatestResultTimeStamp.TryReadProperty(ref reader, options, PropLatestResultTimeStamp, null)) + if (propLatestResultTimeStamp.TryReadProperty(ref reader, options, PropLatestResultTimeStamp, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -131,8 +131,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropJobId, value.JobId, null, null); - writer.WriteProperty(options, PropLatestRecordTimeStamp, value.LatestRecordTimeStamp, null, null); - writer.WriteProperty(options, PropLatestResultTimeStamp, value.LatestResultTimeStamp, null, null); + writer.WriteProperty(options, PropLatestRecordTimeStamp, value.LatestRecordTimeStamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLatestResultTimeStamp, value.LatestResultTimeStamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinVersion, value.MinVersion, null, null); writer.WriteProperty(options, PropModelSizeStats, value.ModelSizeStats, null, null); writer.WriteProperty(options, PropRetain, value.Retain, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpBertTokenizationConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpBertTokenizationConfig.g.cs index 2902d6e024e..3345ba50678 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpBertTokenizationConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpBertTokenizationConfig.g.cs @@ -41,27 +41,27 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.NlpBertTokenizatio LocalJsonValue propWithSpecialTokens = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDoLowerCase.TryReadProperty(ref reader, options, PropDoLowerCase, null)) + if (propDoLowerCase.TryReadProperty(ref reader, options, PropDoLowerCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxSequenceLength.TryReadProperty(ref reader, options, PropMaxSequenceLength, null)) + if (propMaxSequenceLength.TryReadProperty(ref reader, options, PropMaxSequenceLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSpan.TryReadProperty(ref reader, options, PropSpan, null)) + if (propSpan.TryReadProperty(ref reader, options, PropSpan, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, null)) + if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, static Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWithSpecialTokens.TryReadProperty(ref reader, options, PropWithSpecialTokens, null)) + if (propWithSpecialTokens.TryReadProperty(ref reader, options, PropWithSpecialTokens, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.NlpBertTokenizatio public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.NlpBertTokenizationConfig value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDoLowerCase, value.DoLowerCase, null, null); - writer.WriteProperty(options, PropMaxSequenceLength, value.MaxSequenceLength, null, null); - writer.WriteProperty(options, PropSpan, value.Span, null, null); - writer.WriteProperty(options, PropTruncate, value.Truncate, null, null); - writer.WriteProperty(options, PropWithSpecialTokens, value.WithSpecialTokens, null, null); + writer.WriteProperty(options, PropDoLowerCase, value.DoLowerCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxSequenceLength, value.MaxSequenceLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSpan, value.Span, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTruncate, value.Truncate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWithSpecialTokens, value.WithSpecialTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpRobertaTokenizationConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpRobertaTokenizationConfig.g.cs index 9aa5b04df80..521b29cdb9e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpRobertaTokenizationConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpRobertaTokenizationConfig.g.cs @@ -43,32 +43,32 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.NlpRobertaTokeniza LocalJsonValue propWithSpecialTokens = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAddPrefixSpace.TryReadProperty(ref reader, options, PropAddPrefixSpace, null)) + if (propAddPrefixSpace.TryReadProperty(ref reader, options, PropAddPrefixSpace, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDoLowerCase.TryReadProperty(ref reader, options, PropDoLowerCase, null)) + if (propDoLowerCase.TryReadProperty(ref reader, options, PropDoLowerCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxSequenceLength.TryReadProperty(ref reader, options, PropMaxSequenceLength, null)) + if (propMaxSequenceLength.TryReadProperty(ref reader, options, PropMaxSequenceLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSpan.TryReadProperty(ref reader, options, PropSpan, null)) + if (propSpan.TryReadProperty(ref reader, options, PropSpan, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, null)) + if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, static Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWithSpecialTokens.TryReadProperty(ref reader, options, PropWithSpecialTokens, null)) + if (propWithSpecialTokens.TryReadProperty(ref reader, options, PropWithSpecialTokens, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.NlpRobertaTokeniza public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.NlpRobertaTokenizationConfig value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAddPrefixSpace, value.AddPrefixSpace, null, null); - writer.WriteProperty(options, PropDoLowerCase, value.DoLowerCase, null, null); - writer.WriteProperty(options, PropMaxSequenceLength, value.MaxSequenceLength, null, null); - writer.WriteProperty(options, PropSpan, value.Span, null, null); - writer.WriteProperty(options, PropTruncate, value.Truncate, null, null); - writer.WriteProperty(options, PropWithSpecialTokens, value.WithSpecialTokens, null, null); + writer.WriteProperty(options, PropAddPrefixSpace, value.AddPrefixSpace, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDoLowerCase, value.DoLowerCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxSequenceLength, value.MaxSequenceLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSpan, value.Span, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTruncate, value.Truncate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWithSpecialTokens, value.WithSpecialTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpTokenizationUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpTokenizationUpdateOptions.g.cs index a664c82e64f..de9407568bc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpTokenizationUpdateOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/NlpTokenizationUpdateOptions.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.NlpTokenizationUpd LocalJsonValue propTruncate = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propSpan.TryReadProperty(ref reader, options, PropSpan, null)) + if (propSpan.TryReadProperty(ref reader, options, PropSpan, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, null)) + if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, static Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.NlpTokenizationUpd public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.NlpTokenizationUpdateOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropSpan, value.Span, null, null); - writer.WriteProperty(options, PropTruncate, value.Truncate, null, null); + writer.WriteProperty(options, PropSpan, value.Span, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTruncate, value.Truncate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/OverallBucket.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/OverallBucket.g.cs index a2152a3cf17..6a605780719 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/OverallBucket.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/OverallBucket.g.cs @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.OverallBucket Read continue; } - if (propTimestampString.TryReadProperty(ref reader, options, PropTimestampString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propTimestampString.TryReadProperty(ref reader, options, PropTimestampString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -111,7 +111,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropOverallScore, value.OverallScore, null, null); writer.WriteProperty(options, PropResultType, value.ResultType, null, null); writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropTimestampString, value.TimestampString, 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, PropTimestampString, value.TimestampString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Page.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Page.g.cs index 50bc0409b47..8a2e6240be8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Page.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/Page.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Page Read(ref Syst LocalJsonValue propSize = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.Page Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.Page value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFrom, value.From, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/PerPartitionCategorization.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/PerPartitionCategorization.g.cs index 45fd29983cb..4ac9aa8443f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/PerPartitionCategorization.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/PerPartitionCategorization.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PerPartitionCatego LocalJsonValue propStopOnWarn = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStopOnWarn.TryReadProperty(ref reader, options, PropStopOnWarn, null)) + if (propStopOnWarn.TryReadProperty(ref reader, options, PropStopOnWarn, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.PerPartitionCatego public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.PerPartitionCategorization value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); - writer.WriteProperty(options, PropStopOnWarn, value.StopOnWarn, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStopOnWarn, value.StopOnWarn, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QueryFeatureExtractor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QueryFeatureExtractor.g.cs index c1102a62db5..ed6caac50b5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QueryFeatureExtractor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QueryFeatureExtractor.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.QueryFeatureExtrac LocalJsonValue propQuery = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDefaultScore.TryReadProperty(ref reader, options, PropDefaultScore, null)) + if (propDefaultScore.TryReadProperty(ref reader, options, PropDefaultScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.QueryFeatureExtrac public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.QueryFeatureExtractor value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDefaultScore, value.DefaultScore, null, null); + writer.WriteProperty(options, PropDefaultScore, value.DefaultScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFeatureName, value.FeatureName, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceOptions.g.cs index 52636601311..fe30b1b01b0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceOptions.g.cs @@ -39,12 +39,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.QuestionAnsweringI LocalJsonValue propTokenization = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxAnswerLength.TryReadProperty(ref reader, options, PropMaxAnswerLength, null)) + if (propMaxAnswerLength.TryReadProperty(ref reader, options, PropMaxAnswerLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,8 +81,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.QuestionAnsweringI public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.QuestionAnsweringInferenceOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxAnswerLength, value.MaxAnswerLength, null, null); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); + writer.WriteProperty(options, PropMaxAnswerLength, value.MaxAnswerLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceUpdateOptions.g.cs index cfdcc7af759..a36a9a647ce 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceUpdateOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/QuestionAnsweringInferenceUpdateOptions.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.QuestionAnsweringI LocalJsonValue propTokenization = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxAnswerLength.TryReadProperty(ref reader, options, PropMaxAnswerLength, null)) + if (propMaxAnswerLength.TryReadProperty(ref reader, options, PropMaxAnswerLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,8 +89,8 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.QuestionAnsweringI public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.QuestionAnsweringInferenceUpdateOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxAnswerLength, value.MaxAnswerLength, null, null); - writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, null); + writer.WriteProperty(options, PropMaxAnswerLength, value.MaxAnswerLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuestion, value.Question, null, null); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/RegressionInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/RegressionInferenceOptions.g.cs index fa3ef84e1d6..743d684eabf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/RegressionInferenceOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/RegressionInferenceOptions.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.RegressionInferenc LocalJsonValue propResultsField = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, null)) + if (propNumTopFeatureImportanceValues.TryReadProperty(ref reader, options, PropNumTopFeatureImportanceValues, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.RegressionInferenc public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.RegressionInferenceOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, null); + writer.WriteProperty(options, PropNumTopFeatureImportanceValues, value.NumTopFeatureImportanceValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceOptions.g.cs index 1dd085b1cd1..5110562d5af 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceOptions.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TextClassification continue; } - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,7 +90,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropClassificationLabels, value.ClassificationLabels, 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, PropNumTopClasses, value.NumTopClasses, null, null); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteProperty(options, PropVocabulary, value.Vocabulary, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceUpdateOptions.g.cs index 2b8941efac8..6be011e9cab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceUpdateOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextClassificationInferenceUpdateOptions.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TextClassification continue; } - if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, null)) + if (propNumTopClasses.TryReadProperty(ref reader, options, PropNumTopClasses, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropClassificationLabels, value.ClassificationLabels, 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, PropNumTopClasses, value.NumTopClasses, null, null); + writer.WriteProperty(options, PropNumTopClasses, value.NumTopClasses, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextEmbeddingInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextEmbeddingInferenceOptions.g.cs index 25437e0274c..3e23ac87a11 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextEmbeddingInferenceOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TextEmbeddingInferenceOptions.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TextEmbeddingInfer LocalJsonValue propVocabulary = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propEmbeddingSize.TryReadProperty(ref reader, options, PropEmbeddingSize, null)) + if (propEmbeddingSize.TryReadProperty(ref reader, options, PropEmbeddingSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TextEmbeddingInfer public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.TextEmbeddingInferenceOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropEmbeddingSize, value.EmbeddingSize, null, null); + writer.WriteProperty(options, PropEmbeddingSize, value.EmbeddingSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteProperty(options, PropVocabulary, value.Vocabulary, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelAssignment.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelAssignment.g.cs index 4f995474ce2..3fa8047e4cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelAssignment.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelAssignment.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelAssign continue; } - if (propMaxAssignedAllocations.TryReadProperty(ref reader, options, PropMaxAssignedAllocations, null)) + if (propMaxAssignedAllocations.TryReadProperty(ref reader, options, PropMaxAssignedAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,7 +107,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAdaptiveAllocations, value.AdaptiveAllocations, null, null); writer.WriteProperty(options, PropAssignmentState, value.AssignmentState, null, null); - writer.WriteProperty(options, PropMaxAssignedAllocations, value.MaxAssignedAllocations, null, null); + writer.WriteProperty(options, PropMaxAssignedAllocations, value.MaxAssignedAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropReason, value.Reason, null, null); writer.WriteProperty(options, PropRoutingTable, value.RoutingTable, 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, 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))); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelConfig.g.cs index 020a88aab20..5c4d98fae9a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelConfig.g.cs @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelConfig continue; } - if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelConfig continue; } - if (propEstimatedHeapMemoryUsageBytes.TryReadProperty(ref reader, options, PropEstimatedHeapMemoryUsageBytes, null)) + if (propEstimatedHeapMemoryUsageBytes.TryReadProperty(ref reader, options, PropEstimatedHeapMemoryUsageBytes, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEstimatedOperations.TryReadProperty(ref reader, options, PropEstimatedOperations, null)) + if (propEstimatedOperations.TryReadProperty(ref reader, options, PropEstimatedOperations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFullyDefined.TryReadProperty(ref reader, options, PropFullyDefined, null)) + if (propFullyDefined.TryReadProperty(ref reader, options, PropFullyDefined, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -153,7 +153,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelConfig continue; } - if (propModelType.TryReadProperty(ref reader, options, PropModelType, null)) + if (propModelType.TryReadProperty(ref reader, options, PropModelType, static Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -219,12 +219,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCompressedDefinition, value.CompressedDefinition, null, null); writer.WriteProperty(options, PropCreatedBy, value.CreatedBy, null, null); - writer.WriteProperty(options, PropCreateTime, value.CreateTime, 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, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropDefaultFieldMap, value.DefaultFieldMap, 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, PropDescription, value.Description, null, null); - writer.WriteProperty(options, PropEstimatedHeapMemoryUsageBytes, value.EstimatedHeapMemoryUsageBytes, null, null); - writer.WriteProperty(options, PropEstimatedOperations, value.EstimatedOperations, null, null); - writer.WriteProperty(options, PropFullyDefined, value.FullyDefined, null, null); + writer.WriteProperty(options, PropEstimatedHeapMemoryUsageBytes, value.EstimatedHeapMemoryUsageBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEstimatedOperations, value.EstimatedOperations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFullyDefined, value.FullyDefined, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInferenceConfig, value.InferenceConfig, null, null); writer.WriteProperty(options, PropInput, value.Input, null, null); writer.WriteProperty(options, PropLicenseLevel, value.LicenseLevel, null, null); @@ -233,7 +233,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropModelPackage, value.ModelPackage, null, null); writer.WriteProperty(options, PropModelSizeBytes, value.ModelSizeBytes, null, null); - writer.WriteProperty(options, PropModelType, value.ModelType, null, null); + writer.WriteProperty(options, PropModelType, value.ModelType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPlatformArchitecture, value.PlatformArchitecture, null, null); writer.WriteProperty(options, PropPrefixStrings, value.PrefixStrings, null, null); writer.WriteProperty(options, PropTags, value.Tags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentNodesStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentNodesStats.g.cs index 82fb4e35a7c..882af60f97e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentNodesStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentNodesStats.g.cs @@ -67,42 +67,42 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy LocalJsonValue propTimeoutCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAverageInferenceTimeMs.TryReadProperty(ref reader, options, PropAverageInferenceTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propAverageInferenceTimeMs.TryReadProperty(ref reader, options, PropAverageInferenceTimeMs, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propAverageInferenceTimeMsExcludingCacheHits.TryReadProperty(ref reader, options, PropAverageInferenceTimeMsExcludingCacheHits, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propAverageInferenceTimeMsExcludingCacheHits.TryReadProperty(ref reader, options, PropAverageInferenceTimeMsExcludingCacheHits, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propAverageInferenceTimeMsLastMinute.TryReadProperty(ref reader, options, PropAverageInferenceTimeMsLastMinute, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propAverageInferenceTimeMsLastMinute.TryReadProperty(ref reader, options, PropAverageInferenceTimeMsLastMinute, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propErrorCount.TryReadProperty(ref reader, options, PropErrorCount, null)) + if (propErrorCount.TryReadProperty(ref reader, options, PropErrorCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propInferenceCacheHitCount.TryReadProperty(ref reader, options, PropInferenceCacheHitCount, null)) + if (propInferenceCacheHitCount.TryReadProperty(ref reader, options, PropInferenceCacheHitCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propInferenceCacheHitCountLastMinute.TryReadProperty(ref reader, options, PropInferenceCacheHitCountLastMinute, null)) + if (propInferenceCacheHitCountLastMinute.TryReadProperty(ref reader, options, PropInferenceCacheHitCountLastMinute, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propInferenceCount.TryReadProperty(ref reader, options, PropInferenceCount, null)) + if (propInferenceCount.TryReadProperty(ref reader, options, PropInferenceCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLastAccess.TryReadProperty(ref reader, options, PropLastAccess, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propLastAccess.TryReadProperty(ref reader, options, PropLastAccess, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -112,12 +112,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propNumberOfAllocations.TryReadProperty(ref reader, options, PropNumberOfAllocations, null)) + if (propNumberOfAllocations.TryReadProperty(ref reader, options, PropNumberOfAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumberOfPendingRequests.TryReadProperty(ref reader, options, PropNumberOfPendingRequests, null)) + if (propNumberOfPendingRequests.TryReadProperty(ref reader, options, PropNumberOfPendingRequests, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,7 +127,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propRejectedExecutionCount.TryReadProperty(ref reader, options, PropRejectedExecutionCount, null)) + if (propRejectedExecutionCount.TryReadProperty(ref reader, options, PropRejectedExecutionCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,12 +137,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy 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.DateTimeMillisMarker)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propThreadsPerAllocation.TryReadProperty(ref reader, options, PropThreadsPerAllocation, null)) + if (propThreadsPerAllocation.TryReadProperty(ref reader, options, PropThreadsPerAllocation, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,7 +152,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propTimeoutCount.TryReadProperty(ref reader, options, PropTimeoutCount, null)) + if (propTimeoutCount.TryReadProperty(ref reader, options, PropTimeoutCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -193,24 +193,24 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploymentNodesStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAverageInferenceTimeMs, value.AverageInferenceTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropAverageInferenceTimeMsExcludingCacheHits, value.AverageInferenceTimeMsExcludingCacheHits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropAverageInferenceTimeMsLastMinute, value.AverageInferenceTimeMsLastMinute, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropErrorCount, value.ErrorCount, null, null); - writer.WriteProperty(options, PropInferenceCacheHitCount, value.InferenceCacheHitCount, null, null); - writer.WriteProperty(options, PropInferenceCacheHitCountLastMinute, value.InferenceCacheHitCountLastMinute, null, null); - writer.WriteProperty(options, PropInferenceCount, value.InferenceCount, null, null); - writer.WriteProperty(options, PropLastAccess, value.LastAccess, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropAverageInferenceTimeMs, value.AverageInferenceTimeMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropAverageInferenceTimeMsExcludingCacheHits, value.AverageInferenceTimeMsExcludingCacheHits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropAverageInferenceTimeMsLastMinute, value.AverageInferenceTimeMsLastMinute, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropErrorCount, value.ErrorCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropInferenceCacheHitCount, value.InferenceCacheHitCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropInferenceCacheHitCountLastMinute, value.InferenceCacheHitCountLastMinute, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropInferenceCount, value.InferenceCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLastAccess, value.LastAccess, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropNode, value.Node, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair? v) => w.WriteKeyValuePairValue(o, v, null, null)); - writer.WriteProperty(options, PropNumberOfAllocations, value.NumberOfAllocations, null, null); - writer.WriteProperty(options, PropNumberOfPendingRequests, value.NumberOfPendingRequests, null, null); + writer.WriteProperty(options, PropNumberOfAllocations, value.NumberOfAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumberOfPendingRequests, value.NumberOfPendingRequests, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPeakThroughputPerMinute, value.PeakThroughputPerMinute, null, null); - writer.WriteProperty(options, PropRejectedExecutionCount, value.RejectedExecutionCount, null, null); + writer.WriteProperty(options, PropRejectedExecutionCount, value.RejectedExecutionCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRoutingState, value.RoutingState, 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.DateTimeMillisMarker))); - writer.WriteProperty(options, PropThreadsPerAllocation, value.ThreadsPerAllocation, null, null); + writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropThreadsPerAllocation, value.ThreadsPerAllocation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropThroughputLastMinute, value.ThroughputLastMinute, null, null); - writer.WriteProperty(options, PropTimeoutCount, value.TimeoutCount, null, null); + writer.WriteProperty(options, PropTimeoutCount, value.TimeoutCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs index 74d0a1fa91f..3f2ed9e0782 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelDeploymentStats.g.cs @@ -87,12 +87,12 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propErrorCount.TryReadProperty(ref reader, options, PropErrorCount, null)) + if (propErrorCount.TryReadProperty(ref reader, options, PropErrorCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propInferenceCount.TryReadProperty(ref reader, options, PropInferenceCount, null)) + if (propInferenceCount.TryReadProperty(ref reader, options, PropInferenceCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,7 +107,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propNumberOfAllocations.TryReadProperty(ref reader, options, PropNumberOfAllocations, null)) + if (propNumberOfAllocations.TryReadProperty(ref reader, options, PropNumberOfAllocations, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -122,7 +122,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propQueueCapacity.TryReadProperty(ref reader, options, PropQueueCapacity, null)) + if (propQueueCapacity.TryReadProperty(ref reader, options, PropQueueCapacity, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,7 +132,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propRejectedExecutionCount.TryReadProperty(ref reader, options, PropRejectedExecutionCount, null)) + if (propRejectedExecutionCount.TryReadProperty(ref reader, options, PropRejectedExecutionCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -142,17 +142,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelDeploy continue; } - if (propState.TryReadProperty(ref reader, options, PropState, null)) + if (propState.TryReadProperty(ref reader, options, PropState, static Elastic.Clients.Elasticsearch.MachineLearning.DeploymentAssignmentState? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propThreadsPerAllocation.TryReadProperty(ref reader, options, PropThreadsPerAllocation, null)) + if (propThreadsPerAllocation.TryReadProperty(ref reader, options, PropThreadsPerAllocation, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeoutCount.TryReadProperty(ref reader, options, PropTimeoutCount, null)) + if (propTimeoutCount.TryReadProperty(ref reader, options, PropTimeoutCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -197,20 +197,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAllocationStatus, value.AllocationStatus, null, null); writer.WriteProperty(options, PropCacheSize, value.CacheSize, null, null); writer.WriteProperty(options, PropDeploymentId, value.DeploymentId, null, null); - writer.WriteProperty(options, PropErrorCount, value.ErrorCount, null, null); - writer.WriteProperty(options, PropInferenceCount, value.InferenceCount, null, null); + writer.WriteProperty(options, PropErrorCount, value.ErrorCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropInferenceCount, value.InferenceCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropNodes, value.Nodes, 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, PropNumberOfAllocations, value.NumberOfAllocations, null, null); + writer.WriteProperty(options, PropNumberOfAllocations, value.NumberOfAllocations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPeakThroughputPerMinute, value.PeakThroughputPerMinute, null, null); writer.WriteProperty(options, PropPriority, value.Priority, null, null); - writer.WriteProperty(options, PropQueueCapacity, value.QueueCapacity, null, null); + writer.WriteProperty(options, PropQueueCapacity, value.QueueCapacity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropReason, value.Reason, null, null); - writer.WriteProperty(options, PropRejectedExecutionCount, value.RejectedExecutionCount, null, null); + writer.WriteProperty(options, PropRejectedExecutionCount, value.RejectedExecutionCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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.DateTimeMillisMarker))); - writer.WriteProperty(options, PropState, value.State, null, null); - writer.WriteProperty(options, PropThreadsPerAllocation, value.ThreadsPerAllocation, null, null); - writer.WriteProperty(options, PropTimeoutCount, value.TimeoutCount, null, null); + writer.WriteProperty(options, PropState, value.State, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.DeploymentAssignmentState? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropThreadsPerAllocation, value.ThreadsPerAllocation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeoutCount, value.TimeoutCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelInferenceFeatureImportance.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelInferenceFeatureImportance.g.cs index a997e9f1320..395abb3f6d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelInferenceFeatureImportance.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelInferenceFeatureImportance.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelInfere continue; } - if (propImportance.TryReadProperty(ref reader, options, PropImportance, null)) + if (propImportance.TryReadProperty(ref reader, options, PropImportance, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropClasses, value.Classes, 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, PropFeatureName, value.FeatureName, null, null); - writer.WriteProperty(options, PropImportance, value.Importance, null, null); + writer.WriteProperty(options, PropImportance, value.Importance, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelTreeNode.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelTreeNode.g.cs index c0c23ace428..03e8f15cc5a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelTreeNode.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/TrainedModelTreeNode.g.cs @@ -54,17 +54,17 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelTreeNo continue; } - if (propDefaultLeft.TryReadProperty(ref reader, options, PropDefaultLeft, null)) + if (propDefaultLeft.TryReadProperty(ref reader, options, PropDefaultLeft, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLeafValue.TryReadProperty(ref reader, options, PropLeafValue, null)) + if (propLeafValue.TryReadProperty(ref reader, options, PropLeafValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLeftChild.TryReadProperty(ref reader, options, PropLeftChild, null)) + if (propLeftChild.TryReadProperty(ref reader, options, PropLeftChild, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,22 +74,22 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.TrainedModelTreeNo continue; } - if (propRightChild.TryReadProperty(ref reader, options, PropRightChild, null)) + if (propRightChild.TryReadProperty(ref reader, options, PropRightChild, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSplitFeature.TryReadProperty(ref reader, options, PropSplitFeature, null)) + if (propSplitFeature.TryReadProperty(ref reader, options, PropSplitFeature, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSplitGain.TryReadProperty(ref reader, options, PropSplitGain, null)) + if (propSplitGain.TryReadProperty(ref reader, options, PropSplitGain, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propThreshold.TryReadProperty(ref reader, options, PropThreshold, null)) + if (propThreshold.TryReadProperty(ref reader, options, PropThreshold, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -122,14 +122,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDecisionType, value.DecisionType, null, null); - writer.WriteProperty(options, PropDefaultLeft, value.DefaultLeft, null, null); - writer.WriteProperty(options, PropLeafValue, value.LeafValue, null, null); - writer.WriteProperty(options, PropLeftChild, value.LeftChild, null, null); + writer.WriteProperty(options, PropDefaultLeft, value.DefaultLeft, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLeafValue, value.LeafValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLeftChild, value.LeftChild, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNodeIndex, value.NodeIndex, null, null); - writer.WriteProperty(options, PropRightChild, value.RightChild, null, null); - writer.WriteProperty(options, PropSplitFeature, value.SplitFeature, null, null); - writer.WriteProperty(options, PropSplitGain, value.SplitGain, null, null); - writer.WriteProperty(options, PropThreshold, value.Threshold, null, null); + writer.WriteProperty(options, PropRightChild, value.RightChild, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSplitFeature, value.SplitFeature, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSplitGain, value.SplitGain, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropThreshold, value.Threshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/XlmRobertaTokenizationConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/XlmRobertaTokenizationConfig.g.cs index 0e4f03a24f8..7faa03118e6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/XlmRobertaTokenizationConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/XlmRobertaTokenizationConfig.g.cs @@ -41,27 +41,27 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.XlmRobertaTokeniza LocalJsonValue propWithSpecialTokens = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDoLowerCase.TryReadProperty(ref reader, options, PropDoLowerCase, null)) + if (propDoLowerCase.TryReadProperty(ref reader, options, PropDoLowerCase, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxSequenceLength.TryReadProperty(ref reader, options, PropMaxSequenceLength, null)) + if (propMaxSequenceLength.TryReadProperty(ref reader, options, PropMaxSequenceLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSpan.TryReadProperty(ref reader, options, PropSpan, null)) + if (propSpan.TryReadProperty(ref reader, options, PropSpan, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, null)) + if (propTruncate.TryReadProperty(ref reader, options, PropTruncate, static Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWithSpecialTokens.TryReadProperty(ref reader, options, PropWithSpecialTokens, null)) + if (propWithSpecialTokens.TryReadProperty(ref reader, options, PropWithSpecialTokens, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.XlmRobertaTokeniza public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.MachineLearning.XlmRobertaTokenizationConfig value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDoLowerCase, value.DoLowerCase, null, null); - writer.WriteProperty(options, PropMaxSequenceLength, value.MaxSequenceLength, null, null); - writer.WriteProperty(options, PropSpan, value.Span, null, null); - writer.WriteProperty(options, PropTruncate, value.Truncate, null, null); - writer.WriteProperty(options, PropWithSpecialTokens, value.WithSpecialTokens, null, null); + writer.WriteProperty(options, PropDoLowerCase, value.DoLowerCase, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxSequenceLength, value.MaxSequenceLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSpan, value.Span, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTruncate, value.Truncate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.MachineLearning.TokenizationTruncate? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWithSpecialTokens, value.WithSpecialTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceOptions.g.cs index cc838106081..6800d6ee885 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceOptions.g.cs @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ZeroShotClassifica continue; } - if (propMultiLabel.TryReadProperty(ref reader, options, PropMultiLabel, null)) + if (propMultiLabel.TryReadProperty(ref reader, options, PropMultiLabel, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,7 +100,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropClassificationLabels, value.ClassificationLabels, 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, PropHypothesisTemplate, value.HypothesisTemplate, null, null); writer.WriteProperty(options, PropLabels, value.Labels, 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, PropMultiLabel, value.MultiLabel, null, null); + writer.WriteProperty(options, PropMultiLabel, value.MultiLabel, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceUpdateOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceUpdateOptions.g.cs index 1397aa5982b..b8ec648f3cb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceUpdateOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/MachineLearning/ZeroShotClassificationInferenceUpdateOptions.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.MachineLearning.ZeroShotClassifica continue; } - if (propMultiLabel.TryReadProperty(ref reader, options, PropMultiLabel, null)) + if (propMultiLabel.TryReadProperty(ref reader, options, PropMultiLabel, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropLabels, value.Labels, 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, PropMultiLabel, value.MultiLabel, null, null); + writer.WriteProperty(options, PropMultiLabel, value.MultiLabel, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResultsField, value.ResultsField, null, null); writer.WriteProperty(options, PropTokenization, value.Tokenization, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs index cb6ab28d31f..c2779988f79 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/AggregateMetricDoubleProperty.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.AggregateMetricDoublePrope continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.AggregateMetricDoublePrope continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.AggregateMetricDoublePrope continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,14 +129,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDefaultMetric, value.DefaultMetric, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropMetrics, value.Metrics, 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs index e876e8c452b..c8e83d3a3ce 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BinaryProperty.g.cs @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.BinaryProperty Read(ref Sy continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.BinaryProperty Read(ref Sy continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.BinaryProperty Read(ref Sy continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,14 +129,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs index b7c6ef3ec61..d658d5f1425 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/BooleanProperty.g.cs @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.BooleanProperty Read(ref S LocalJsonValue propTimeSeriesDimension = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,12 +76,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.BooleanProperty Read(ref S continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,17 +96,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.BooleanProperty Read(ref S continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,12 +116,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.BooleanProperty Read(ref S continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -136,17 +136,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.BooleanProperty Read(ref S continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -192,23 +192,23 @@ public override Elastic.Clients.Elasticsearch.Mapping.BooleanProperty Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.BooleanProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFielddata, value.Fielddata, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs index e3aa8d3565f..c52cb587eac 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ByteNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ByteNumberProperty Read(re LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ByteNumberProperty Read(re continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.ByteNumberProperty Read(re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ByteNumberProperty Read(re continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static byte? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.ByteNumberProperty Read(re continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.ByteNumberProperty Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.ByteNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, byte? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } 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..5017cacd59d --- /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, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propSentenceOverlap.TryReadProperty(ref reader, options, PropSentenceOverlap, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + 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, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSentenceOverlap, value.SentenceOverlap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + 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/CompletionProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs index fb08a98c18e..e5a684fe19d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CompletionProperty.g.cs @@ -77,12 +77,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.CompletionProperty Read(re continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,12 +92,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.CompletionProperty Read(re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxInputLength.TryReadProperty(ref reader, options, PropMaxInputLength, null)) + if (propMaxInputLength.TryReadProperty(ref reader, options, PropMaxInputLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,12 +107,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.CompletionProperty Read(re continue; } - if (propPreservePositionIncrements.TryReadProperty(ref reader, options, PropPreservePositionIncrements, null)) + if (propPreservePositionIncrements.TryReadProperty(ref reader, options, PropPreservePositionIncrements, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPreserveSeparators.TryReadProperty(ref reader, options, PropPreserveSeparators, null)) + if (propPreserveSeparators.TryReadProperty(ref reader, options, PropPreserveSeparators, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,12 +127,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.CompletionProperty Read(re continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -179,18 +179,18 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); writer.WriteProperty(options, PropContexts, value.Contexts, 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, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropMaxInputLength, value.MaxInputLength, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxInputLength, value.MaxInputLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropPreservePositionIncrements, value.PreservePositionIncrements, null, null); - writer.WriteProperty(options, PropPreserveSeparators, value.PreserveSeparators, null, null); + writer.WriteProperty(options, PropPreservePositionIncrements, value.PreservePositionIncrements, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPreserveSeparators, value.PreserveSeparators, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropSearchAnalyzer, value.SearchAnalyzer, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs index 745b951a28e..0552f59c865 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ConstantKeywordProperty.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ConstantKeywordProperty Re LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ConstantKeywordProperty Re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,7 +71,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ConstantKeywordProperty Re continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,12 +112,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ConstantKeywordProperty Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.ConstantKeywordProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CountedKeywordProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CountedKeywordProperty.g.cs index d5c4839fb17..3f6bb929cbc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CountedKeywordProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/CountedKeywordProperty.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.CountedKeywordProperty Rea LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.CountedKeywordProperty Rea continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.CountedKeywordProperty Rea continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,13 +112,13 @@ public override Elastic.Clients.Elasticsearch.Mapping.CountedKeywordProperty Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.CountedKeywordProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs index 5403a3d5cf2..8308bbaf535 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateNanosProperty.g.cs @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateNanosProperty Read(ref LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,12 +76,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateNanosProperty Read(ref continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,17 +96,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateNanosProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,17 +116,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateNanosProperty Read(ref continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrecisionStep.TryReadProperty(ref reader, options, PropPrecisionStep, null)) + if (propPrecisionStep.TryReadProperty(ref reader, options, PropPrecisionStep, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -141,12 +141,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateNanosProperty Read(ref continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -192,23 +192,23 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateNanosProperty Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.DateNanosProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, 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, PropOnScriptError, value.OnScriptError, null, null); - writer.WriteProperty(options, PropPrecisionStep, value.PrecisionStep, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrecisionStep, value.PrecisionStep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs index 300216c795a..4db4d7c1fa3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateProperty.g.cs @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateProperty Read(ref Syst LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,12 +80,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateProperty Read(ref Syst continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,17 +105,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateProperty Read(ref Syst continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -130,17 +130,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateProperty Read(ref Syst continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrecisionStep.TryReadProperty(ref reader, options, PropPrecisionStep, null)) + if (propPrecisionStep.TryReadProperty(ref reader, options, PropPrecisionStep, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -155,12 +155,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateProperty Read(ref Syst continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -208,25 +208,25 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateProperty Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.DateProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFielddata, value.Fielddata, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLocale, value.Locale, 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, PropNullValue, value.NullValue, 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, PropOnScriptError, value.OnScriptError, null, null); - writer.WriteProperty(options, PropPrecisionStep, value.PrecisionStep, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrecisionStep, value.PrecisionStep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs index c1fbe6edf8f..721ef629a94 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DateRangeProperty.g.cs @@ -58,12 +58,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateRangeProperty Read(ref LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateRangeProperty Read(ref continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,12 +93,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateRangeProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,12 +113,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateRangeProperty Read(ref continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -160,19 +160,19 @@ public override Elastic.Clients.Elasticsearch.Mapping.DateRangeProperty Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.DateRangeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs index 6c5d0af94dd..c7303601b11 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorIndexOptions.g.cs @@ -39,17 +39,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptions Re LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propConfidenceInterval.TryReadProperty(ref reader, options, PropConfidenceInterval, null)) + if (propConfidenceInterval.TryReadProperty(ref reader, options, PropConfidenceInterval, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEfConstruction.TryReadProperty(ref reader, options, PropEfConstruction, null)) + if (propEfConstruction.TryReadProperty(ref reader, options, PropEfConstruction, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propM.TryReadProperty(ref reader, options, PropM, null)) + if (propM.TryReadProperty(ref reader, options, PropM, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptions Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.DenseVectorIndexOptions value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropConfidenceInterval, value.ConfidenceInterval, null, null); - writer.WriteProperty(options, PropEfConstruction, value.EfConstruction, null, null); - writer.WriteProperty(options, PropM, value.M, null, null); + writer.WriteProperty(options, PropConfidenceInterval, value.ConfidenceInterval, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEfConstruction, value.EfConstruction, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropM, value.M, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs index fb0e1a963ad..95bdd0b7c8d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DenseVectorProperty.g.cs @@ -54,17 +54,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DenseVectorProperty Read(r LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDims.TryReadProperty(ref reader, options, PropDims, null)) + if (propDims.TryReadProperty(ref reader, options, PropDims, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propElementType.TryReadProperty(ref reader, options, PropElementType, null)) + if (propElementType.TryReadProperty(ref reader, options, PropElementType, static Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,12 +74,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DenseVectorProperty Read(r continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,12 +99,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DenseVectorProperty Read(r continue; } - if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, null)) + if (propSimilarity.TryReadProperty(ref reader, options, PropSimilarity, static Elastic.Clients.Elasticsearch.Mapping.DenseVectorSimilarity? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -144,17 +144,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DenseVectorProperty Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.DenseVectorProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDims, value.Dims, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropElementType, value.ElementType, null, null); + writer.WriteProperty(options, PropDims, value.Dims, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropElementType, value.ElementType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DenseVectorElementType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSimilarity, value.Similarity, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DenseVectorSimilarity? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs index 3df5bb65fea..cbbf2324a73 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleNumberProperty Read( LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleNumberProperty Read( continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleNumberProperty Read( continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleNumberProperty Read( continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleNumberProperty Read( continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleNumberProperty Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.DoubleNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs index 7c8eb06b433..46aef4c0cf7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DoubleRangeProperty.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleRangeProperty Read(r LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleRangeProperty Read(r continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,12 +86,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleRangeProperty Read(r continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleRangeProperty Read(r continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,18 +152,18 @@ public override Elastic.Clients.Elasticsearch.Mapping.DoubleRangeProperty Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.DoubleRangeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs index 22cfb98740d..95e50ae9c60 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicProperty.g.cs @@ -99,12 +99,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.DynamicProperty Read(ref S continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,22 +114,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.DynamicProperty Read(ref S continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, null)) + if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -144,27 +144,27 @@ public override Elastic.Clients.Elasticsearch.Mapping.DynamicProperty Read(ref S continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, null)) + if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, static Elastic.Clients.Elasticsearch.Mapping.IndexOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexPhrases.TryReadProperty(ref reader, options, PropIndexPhrases, null)) + if (propIndexPhrases.TryReadProperty(ref reader, options, PropIndexPhrases, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -184,7 +184,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.DynamicProperty Read(ref S continue; } - if (propNorms.TryReadProperty(ref reader, options, PropNorms, null)) + if (propNorms.TryReadProperty(ref reader, options, PropNorms, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -194,17 +194,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.DynamicProperty Read(ref S continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPositionIncrementGap.TryReadProperty(ref reader, options, PropPositionIncrementGap, null)) + if (propPositionIncrementGap.TryReadProperty(ref reader, options, PropPositionIncrementGap, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrecisionStep.TryReadProperty(ref reader, options, PropPrecisionStep, null)) + if (propPrecisionStep.TryReadProperty(ref reader, options, PropPrecisionStep, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -229,22 +229,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.DynamicProperty Read(ref S continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTermVector.TryReadProperty(ref reader, options, PropTermVector, null)) + if (propTermVector.TryReadProperty(ref reader, options, PropTermVector, static Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -305,36 +305,36 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, null); - writer.WriteProperty(options, PropIndexPhrases, value.IndexPhrases, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.IndexOptions? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexPhrases, value.IndexPhrases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexPrefixes, value.IndexPrefixes, null, null); writer.WriteProperty(options, PropLocale, value.Locale, 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, PropNorms, value.Norms, null, null); + writer.WriteProperty(options, PropNorms, value.Norms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); - writer.WriteProperty(options, PropPositionIncrementGap, value.PositionIncrementGap, null, null); - writer.WriteProperty(options, PropPrecisionStep, value.PrecisionStep, null, null); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPositionIncrementGap, value.PositionIncrementGap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrecisionStep, value.PrecisionStep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteProperty(options, PropSearchAnalyzer, value.SearchAnalyzer, null, null); writer.WriteProperty(options, PropSearchQuoteAnalyzer, value.SearchQuoteAnalyzer, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTermVector, value.TermVector, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTermVector, value.TermVector, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicTemplate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicTemplate.g.cs index 3b5530ee031..8aa4a5505b5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicTemplate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/DynamicTemplate.g.cs @@ -59,7 +59,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.DynamicTemplate Read(ref S continue; } - if (propMatchPattern.TryReadProperty(ref reader, options, PropMatchPattern, null)) + if (propMatchPattern.TryReadProperty(ref reader, options, PropMatchPattern, static Elastic.Clients.Elasticsearch.Mapping.MatchType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -143,7 +143,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropMatch, value.Match, 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, PropMatchMappingType, value.MatchMappingType, 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, PropMatchPattern, value.MatchPattern, null, null); + writer.WriteProperty(options, PropMatchPattern, value.MatchPattern, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.MatchType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPathMatch, value.PathMatch, 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, PropPathUnmatch, value.PathUnmatch, 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, PropUnmatch, value.Unmatch, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs index 9d5e3704a1e..85020207303 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FieldAliasProperty.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.FieldAliasProperty Read(re LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.FieldAliasProperty Read(re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.FieldAliasProperty Read(re continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,13 +112,13 @@ public override Elastic.Clients.Elasticsearch.Mapping.FieldAliasProperty Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.FieldAliasProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropPath, value.Path, null, null); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FlattenedProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FlattenedProperty.g.cs index 93c85f39f5a..1b463444c59 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FlattenedProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FlattenedProperty.g.cs @@ -62,27 +62,27 @@ public override Elastic.Clients.Elasticsearch.Mapping.FlattenedProperty Read(ref LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDepthLimit.TryReadProperty(ref reader, options, PropDepthLimit, null)) + if (propDepthLimit.TryReadProperty(ref reader, options, PropDepthLimit, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, null)) + if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,17 +92,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.FlattenedProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, null)) + if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, static Elastic.Clients.Elasticsearch.Mapping.IndexOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,12 +127,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FlattenedProperty Read(ref continue; } - if (propSplitQueriesOnWhitespace.TryReadProperty(ref reader, options, PropSplitQueriesOnWhitespace, null)) + if (propSplitQueriesOnWhitespace.TryReadProperty(ref reader, options, PropSplitQueriesOnWhitespace, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -176,21 +176,21 @@ public override Elastic.Clients.Elasticsearch.Mapping.FlattenedProperty Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.FlattenedProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropDepthLimit, value.DepthLimit, null, null); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDepthLimit, value.DepthLimit, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.IndexOptions? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); - writer.WriteProperty(options, PropSplitQueriesOnWhitespace, value.SplitQueriesOnWhitespace, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSplitQueriesOnWhitespace, value.SplitQueriesOnWhitespace, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs index dea713017d3..6552082019b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatNumberProperty Read(r LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatNumberProperty Read(r continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatNumberProperty Read(r continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatNumberProperty Read(r continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatNumberProperty Read(r continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatNumberProperty Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.FloatNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs index 287a7928cb7..507824ff8db 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/FloatRangeProperty.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatRangeProperty Read(re LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatRangeProperty Read(re continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,12 +86,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatRangeProperty Read(re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatRangeProperty Read(re continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,18 +152,18 @@ public override Elastic.Clients.Elasticsearch.Mapping.FloatRangeProperty Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.FloatRangeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs index fb1f38600e3..a50990daf9b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoPointProperty.g.cs @@ -67,12 +67,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoPointProperty Read(ref continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,22 +82,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoPointProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, null)) + if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,7 +112,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoPointProperty Read(ref continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,12 +127,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoPointProperty Read(ref continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -177,20 +177,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } 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..4020002971a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/GeoShapeProperty.g.cs @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty Read(ref LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,12 +72,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty Read(ref continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,22 +87,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, null)) + if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,7 +112,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty Read(ref continue; } - if (propOrientation.TryReadProperty(ref reader, options, PropOrientation, null)) + if (propOrientation.TryReadProperty(ref reader, options, PropOrientation, static Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -122,17 +122,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty Read(ref continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStrategy.TryReadProperty(ref reader, options, PropStrategy, null)) + if (propStrategy.TryReadProperty(ref reader, options, PropStrategy, static Elastic.Clients.Elasticsearch.Mapping.GeoStrategy? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -176,21 +176,21 @@ public override Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.GeoShapeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropOrientation, value.Orientation, null, null); + writer.WriteProperty(options, PropOrientation, value.Orientation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropStrategy, value.Strategy, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStrategy, value.Strategy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.GeoStrategy? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } @@ -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/HalfFloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs index c7214bd5462..0b0f1fc3496 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HalfFloatNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.HalfFloatNumberProperty Re LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.HalfFloatNumberProperty Re continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.HalfFloatNumberProperty Re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.HalfFloatNumberProperty Re continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.HalfFloatNumberProperty Re continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.HalfFloatNumberProperty Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.HalfFloatNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs index 2aafaa6a2a3..5c22b48282d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/HistogramProperty.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.HistogramProperty Read(ref LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.HistogramProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.HistogramProperty Read(ref continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,13 +112,13 @@ public override Elastic.Clients.Elasticsearch.Mapping.HistogramProperty Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.HistogramProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IcuCollationProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IcuCollationProperty.g.cs index d0af9e5dc94..c1436301755 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IcuCollationProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IcuCollationProperty.g.cs @@ -82,17 +82,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty Read( LocalJsonValue propVariant = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAlternate.TryReadProperty(ref reader, options, PropAlternate, null)) + if (propAlternate.TryReadProperty(ref reader, options, PropAlternate, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseFirst.TryReadProperty(ref reader, options, PropCaseFirst, null)) + if (propCaseFirst.TryReadProperty(ref reader, options, PropCaseFirst, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseLevel.TryReadProperty(ref reader, options, PropCaseLevel, null)) + if (propCaseLevel.TryReadProperty(ref reader, options, PropCaseLevel, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,17 +107,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty Read( continue; } - if (propDecomposition.TryReadProperty(ref reader, options, PropDecomposition, null)) + if (propDecomposition.TryReadProperty(ref reader, options, PropDecomposition, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,22 +127,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty Read( continue; } - if (propHiraganaQuaternaryMode.TryReadProperty(ref reader, options, PropHiraganaQuaternaryMode, null)) + if (propHiraganaQuaternaryMode.TryReadProperty(ref reader, options, PropHiraganaQuaternaryMode, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, null)) + if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, static Elastic.Clients.Elasticsearch.Mapping.IndexOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -157,7 +157,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty Read( continue; } - if (propNorms.TryReadProperty(ref reader, options, PropNorms, null)) + if (propNorms.TryReadProperty(ref reader, options, PropNorms, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -167,7 +167,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty Read( continue; } - if (propNumeric.TryReadProperty(ref reader, options, PropNumeric, null)) + if (propNumeric.TryReadProperty(ref reader, options, PropNumeric, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -182,17 +182,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty Read( continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStrength.TryReadProperty(ref reader, options, PropStrength, null)) + if (propStrength.TryReadProperty(ref reader, options, PropStrength, static Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -256,29 +256,29 @@ public override Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.IcuCollationProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAlternate, value.Alternate, null, null); - writer.WriteProperty(options, PropCaseFirst, value.CaseFirst, null, null); - writer.WriteProperty(options, PropCaseLevel, value.CaseLevel, null, null); + writer.WriteProperty(options, PropAlternate, value.Alternate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationAlternate? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseFirst, value.CaseFirst, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationCaseFirst? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseLevel, value.CaseLevel, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropCountry, value.Country, null, null); - writer.WriteProperty(options, PropDecomposition, value.Decomposition, null, null); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDecomposition, value.Decomposition, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationDecomposition? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropHiraganaQuaternaryMode, value.HiraganaQuaternaryMode, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, null); + writer.WriteProperty(options, PropHiraganaQuaternaryMode, value.HiraganaQuaternaryMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.IndexOptions? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLanguage, value.Language, 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, PropNorms, value.Norms, null, null); + writer.WriteProperty(options, PropNorms, value.Norms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropNumeric, value.Numeric, null, null); + writer.WriteProperty(options, PropNumeric, value.Numeric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropRules, value.Rules, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropStrength, value.Strength, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStrength, value.Strength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Analysis.IcuCollationStrength? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteProperty(options, PropVariableTop, value.VariableTop, null, null); writer.WriteProperty(options, PropVariant, value.Variant, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs index 8c28bc0ad6a..29481d60dd7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty Read LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty Read continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty Read continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty Read continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty Read continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.IntegerNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs index 23388acac9f..b073085bc64 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IntegerRangeProperty.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerRangeProperty Read( LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerRangeProperty Read( continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,12 +86,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerRangeProperty Read( continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerRangeProperty Read( continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,18 +152,18 @@ public override Elastic.Clients.Elasticsearch.Mapping.IntegerRangeProperty Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.IntegerRangeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs index e4691667ada..d0f3ea2e00f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpProperty.g.cs @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpProperty Read(ref System LocalJsonValue propTimeSeriesDimension = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,12 +74,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpProperty Read(ref System continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,17 +89,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpProperty Read(ref System continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,7 +114,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpProperty Read(ref System continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,17 +129,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpProperty Read(ref System continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -184,22 +184,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpProperty Read(ref System public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.IpProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs index c162146f6a4..07d7d60e95e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/IpRangeProperty.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpRangeProperty Read(ref S LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpRangeProperty Read(ref S continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,12 +86,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpRangeProperty Read(ref S continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpRangeProperty Read(ref S continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,18 +152,18 @@ public override Elastic.Clients.Elasticsearch.Mapping.IpRangeProperty Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.IpRangeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs index 717bf19d7d0..83968a038ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/JoinProperty.g.cs @@ -48,12 +48,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.JoinProperty Read(ref Syst LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, null)) + if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.JoinProperty Read(ref Syst continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.JoinProperty Read(ref Syst continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -120,14 +120,14 @@ public override Elastic.Clients.Elasticsearch.Mapping.JoinProperty Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.JoinProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropRelations, value.Relations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary>? v) => w.WriteDictionaryValue>(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, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/KeywordProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/KeywordProperty.g.cs index 334bb4016b6..ab736045544 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/KeywordProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/KeywordProperty.g.cs @@ -74,7 +74,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.KeywordProperty Read(ref S LocalJsonValue propTimeSeriesDimension = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,17 +84,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.KeywordProperty Read(ref S continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, null)) + if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,17 +104,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.KeywordProperty Read(ref S continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, null)) + if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, static Elastic.Clients.Elasticsearch.Mapping.IndexOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,7 +129,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.KeywordProperty Read(ref S continue; } - if (propNorms.TryReadProperty(ref reader, options, PropNorms, null)) + if (propNorms.TryReadProperty(ref reader, options, PropNorms, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -139,7 +139,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.KeywordProperty Read(ref S continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -159,22 +159,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.KeywordProperty Read(ref S continue; } - if (propSplitQueriesOnWhitespace.TryReadProperty(ref reader, options, PropSplitQueriesOnWhitespace, null)) + if (propSplitQueriesOnWhitespace.TryReadProperty(ref reader, options, PropSplitQueriesOnWhitespace, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -224,27 +224,27 @@ public override Elastic.Clients.Elasticsearch.Mapping.KeywordProperty Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.KeywordProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.IndexOptions? v) => w.WriteNullableValue(o, v)); 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, PropNormalizer, value.Normalizer, null, null); - writer.WriteProperty(options, PropNorms, value.Norms, null, null); + writer.WriteProperty(options, PropNorms, value.Norms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); - writer.WriteProperty(options, PropSplitQueriesOnWhitespace, value.SplitQueriesOnWhitespace, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); + writer.WriteProperty(options, PropSplitQueriesOnWhitespace, value.SplitQueriesOnWhitespace, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs index a76c3b762a8..a2f1aca80d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongNumberProperty Read(re LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongNumberProperty Read(re continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongNumberProperty Read(re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongNumberProperty Read(re continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongNumberProperty Read(re continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongNumberProperty Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.LongNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs index 079547bd19d..43c819273dd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/LongRangeProperty.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongRangeProperty Read(ref LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongRangeProperty Read(ref continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,12 +86,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongRangeProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongRangeProperty Read(ref continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -152,18 +152,18 @@ public override Elastic.Clients.Elasticsearch.Mapping.LongRangeProperty Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.LongRangeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs index b8c2e22dd8f..a6cfa4bbeea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/Murmur3HashProperty.g.cs @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.Murmur3HashProperty Read(r continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.Murmur3HashProperty Read(r continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.Murmur3HashProperty Read(r continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,14 +129,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs index 5b518745f45..b1e3461f066 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/NestedProperty.g.cs @@ -59,12 +59,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.NestedProperty Read(ref Sy continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,17 +74,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.NestedProperty Read(ref Sy continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncludeInParent.TryReadProperty(ref reader, options, PropIncludeInParent, null)) + if (propIncludeInParent.TryReadProperty(ref reader, options, PropIncludeInParent, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncludeInRoot.TryReadProperty(ref reader, options, PropIncludeInRoot, null)) + if (propIncludeInRoot.TryReadProperty(ref reader, options, PropIncludeInRoot, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,12 +99,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.NestedProperty Read(ref Sy continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,16 +145,16 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIncludeInParent, value.IncludeInParent, null, null); - writer.WriteProperty(options, PropIncludeInRoot, value.IncludeInRoot, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncludeInParent, value.IncludeInParent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncludeInRoot, value.IncludeInRoot, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs index 46d6a62cb1f..74b0d06742d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ObjectProperty.g.cs @@ -57,12 +57,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ObjectProperty Read(ref Sy continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ObjectProperty Read(ref Sy continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -87,17 +87,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.ObjectProperty Read(ref Sy continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSubobjects.TryReadProperty(ref reader, options, PropSubobjects, null)) + if (propSubobjects.TryReadProperty(ref reader, options, PropSubobjects, static Elastic.Clients.Elasticsearch.Mapping.Subobjects? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,15 +137,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSubobjects, value.Subobjects, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSubobjects, value.Subobjects, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.Subobjects? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs index 25e884b6864..c4d4de33778 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PassthroughObjectProperty.g.cs @@ -59,12 +59,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.PassthroughObjectProperty continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.PassthroughObjectProperty continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.PassthroughObjectProperty continue; } - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -94,17 +94,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.PassthroughObjectProperty continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,16 +145,16 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs index 5577e8d6690..59227dfadde 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PercolatorProperty.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.PercolatorProperty Read(re LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.PercolatorProperty Read(re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -69,7 +69,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.PercolatorProperty Read(re continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,12 +104,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.PercolatorProperty Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.PercolatorProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PointProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PointProperty.g.cs index 16344f2d164..dd3499ef5a9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PointProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/PointProperty.g.cs @@ -61,12 +61,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.PointProperty Read(ref Sys continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,17 +76,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.PointProperty Read(ref Sys continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, null)) + if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.PointProperty Read(ref Sys continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -153,17 +153,17 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs index 27eab76564a..a7c5b2342b5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeatureProperty.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeatureProperty Read(r LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeatureProperty Read(r continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeatureProperty Read(r continue; } - if (propPositiveScoreImpact.TryReadProperty(ref reader, options, PropPositiveScoreImpact, null)) + if (propPositiveScoreImpact.TryReadProperty(ref reader, options, PropPositiveScoreImpact, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeatureProperty Read(r continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,13 +112,13 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeatureProperty Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.RankFeatureProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropPositiveScoreImpact, value.PositiveScoreImpact, null, null); + writer.WriteProperty(options, PropPositiveScoreImpact, value.PositiveScoreImpact, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeaturesProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeaturesProperty.g.cs index 26737fb521b..5cb8bb5e6c7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeaturesProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/RankFeaturesProperty.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeaturesProperty Read( LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeaturesProperty Read( continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeaturesProperty Read( continue; } - if (propPositiveScoreImpact.TryReadProperty(ref reader, options, PropPositiveScoreImpact, null)) + if (propPositiveScoreImpact.TryReadProperty(ref reader, options, PropPositiveScoreImpact, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeaturesProperty Read( continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,13 +112,13 @@ public override Elastic.Clients.Elasticsearch.Mapping.RankFeaturesProperty Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.RankFeaturesProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropPositiveScoreImpact, value.PositiveScoreImpact, null, null); + writer.WriteProperty(options, PropPositiveScoreImpact, value.PositiveScoreImpact, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs index 3d3db47587f..991e2a5b3b9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ScaledFloatNumberProperty.g.cs @@ -70,12 +70,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,17 +100,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -120,12 +120,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -135,7 +135,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty continue; } - if (propScalingFactor.TryReadProperty(ref reader, options, PropScalingFactor, null)) + if (propScalingFactor.TryReadProperty(ref reader, options, PropScalingFactor, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,22 +145,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -208,25 +208,25 @@ public override Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.ScaledFloatNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropScalingFactor, value.ScalingFactor, null, null); + writer.WriteProperty(options, PropScalingFactor, value.ScalingFactor, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs index 46970d27001..5d0c6375d21 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SearchAsYouTypeProperty.g.cs @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SearchAsYouTypeProperty Re continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,22 +86,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.SearchAsYouTypeProperty Re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, null)) + if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, static Elastic.Clients.Elasticsearch.Mapping.IndexOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxShingleSize.TryReadProperty(ref reader, options, PropMaxShingleSize, null)) + if (propMaxShingleSize.TryReadProperty(ref reader, options, PropMaxShingleSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -111,7 +111,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SearchAsYouTypeProperty Re continue; } - if (propNorms.TryReadProperty(ref reader, options, PropNorms, null)) + if (propNorms.TryReadProperty(ref reader, options, PropNorms, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -136,17 +136,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.SearchAsYouTypeProperty Re continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTermVector.TryReadProperty(ref reader, options, PropTermVector, null)) + if (propTermVector.TryReadProperty(ref reader, options, PropTermVector, static Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -194,21 +194,21 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, null); - writer.WriteProperty(options, PropMaxShingleSize, value.MaxShingleSize, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.IndexOptions? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxShingleSize, value.MaxShingleSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropNorms, value.Norms, null, null); + writer.WriteProperty(options, PropNorms, value.Norms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropSearchAnalyzer, value.SearchAnalyzer, null, null); writer.WriteProperty(options, PropSearchQuoteAnalyzer, value.SearchQuoteAnalyzer, null, null); writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTermVector, value.TermVector, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTermVector, value.TermVector, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } 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..991da485129 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShapeProperty.g.cs @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShapeProperty Read(ref Sys LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShapeProperty Read(ref Sys continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,17 +83,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShapeProperty Read(ref Sys continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, null)) + if (propIgnoreZValue.TryReadProperty(ref reader, options, PropIgnoreZValue, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShapeProperty Read(ref Sys continue; } - if (propOrientation.TryReadProperty(ref reader, options, PropOrientation, null)) + if (propOrientation.TryReadProperty(ref reader, options, PropOrientation, static Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,12 +113,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShapeProperty Read(ref Sys continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -160,19 +160,19 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShapeProperty Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.ShapeProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreZValue, value.IgnoreZValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropOrientation, value.Orientation, null, null); + writer.WriteProperty(options, PropOrientation, value.Orientation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.GeoOrientation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } @@ -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/Mapping/ShortNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs index 88f2b1cf293..1bb328da407 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/ShortNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShortNumberProperty Read(r LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShortNumberProperty Read(r continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShortNumberProperty Read(r continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShortNumberProperty Read(r continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static short? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShortNumberProperty Read(r continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.ShortNumberProperty Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.ShortNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, short? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SourceField.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SourceField.g.cs index dff20e7d5da..453934aaf31 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SourceField.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SourceField.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SourceField Read(ref Syste LocalJsonValue propMode = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompress.TryReadProperty(ref reader, options, PropCompress, null)) + if (propCompress.TryReadProperty(ref reader, options, PropCompress, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SourceField Read(ref Syste continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SourceField Read(ref Syste continue; } - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.Mapping.SourceFieldMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.SourceField Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.SourceField value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompress, value.Compress, null, null); + writer.WriteProperty(options, PropCompress, value.Compress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCompressThreshold, value.CompressThreshold, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropMode, value.Mode, null, null); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SourceFieldMode? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs index de1cdc3a393..085d503fee1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/SparseVectorProperty.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SparseVectorProperty Read( LocalJsonValue propSyntheticSourceKeep = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SparseVectorProperty Read( continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -69,7 +69,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.SparseVectorProperty Read( continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,12 +104,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.SparseVectorProperty Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.SparseVectorProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextProperty.g.cs index 6eeca87fb60..955e8dff5fa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TextProperty.g.cs @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.TextProperty Read(ref Syst continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,17 +93,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.TextProperty Read(ref Syst continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, null)) + if (propEagerGlobalOrdinals.TryReadProperty(ref reader, options, PropEagerGlobalOrdinals, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFielddata.TryReadProperty(ref reader, options, PropFielddata, null)) + if (propFielddata.TryReadProperty(ref reader, options, PropFielddata, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,22 +118,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.TextProperty Read(ref Syst continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, null)) + if (propIndexOptions.TryReadProperty(ref reader, options, PropIndexOptions, static Elastic.Clients.Elasticsearch.Mapping.IndexOptions? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndexPhrases.TryReadProperty(ref reader, options, PropIndexPhrases, null)) + if (propIndexPhrases.TryReadProperty(ref reader, options, PropIndexPhrases, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -148,12 +148,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.TextProperty Read(ref Syst continue; } - if (propNorms.TryReadProperty(ref reader, options, PropNorms, null)) + if (propNorms.TryReadProperty(ref reader, options, PropNorms, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPositionIncrementGap.TryReadProperty(ref reader, options, PropPositionIncrementGap, null)) + if (propPositionIncrementGap.TryReadProperty(ref reader, options, PropPositionIncrementGap, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -178,17 +178,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.TextProperty Read(ref Syst continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTermVector.TryReadProperty(ref reader, options, PropTermVector, null)) + if (propTermVector.TryReadProperty(ref reader, options, PropTermVector, static Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -241,28 +241,28 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, null); - writer.WriteProperty(options, PropFielddata, value.Fielddata, null, null); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEagerGlobalOrdinals, value.EagerGlobalOrdinals, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFielddata, value.Fielddata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFielddataFrequencyFilter, value.FielddataFrequencyFilter, null, null); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); - writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, null); - writer.WriteProperty(options, PropIndexPhrases, value.IndexPhrases, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexOptions, value.IndexOptions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.IndexOptions? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndexPhrases, value.IndexPhrases, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexPrefixes, value.IndexPrefixes, 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, PropNorms, value.Norms, null, null); - writer.WriteProperty(options, PropPositionIncrementGap, value.PositionIncrementGap, null, null); + writer.WriteProperty(options, PropNorms, value.Norms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPositionIncrementGap, value.PositionIncrementGap, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropSearchAnalyzer, value.SearchAnalyzer, null, null); writer.WriteProperty(options, PropSearchQuoteAnalyzer, value.SearchQuoteAnalyzer, null, null); writer.WriteProperty(options, PropSimilarity, value.Similarity, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTermVector, value.TermVector, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTermVector, value.TermVector, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TermVectorOption? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs index 114ed3d8f93..448663ac3cc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TokenCountProperty.g.cs @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.TokenCountProperty Read(re continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,17 +75,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.TokenCountProperty Read(re continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnablePositionIncrements.TryReadProperty(ref reader, options, PropEnablePositionIncrements, null)) + if (propEnablePositionIncrements.TryReadProperty(ref reader, options, PropEnablePositionIncrements, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -95,12 +95,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.TokenCountProperty Read(re continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -110,7 +110,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.TokenCountProperty Read(re continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -120,12 +120,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.TokenCountProperty Read(re continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -169,19 +169,19 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); - writer.WriteProperty(options, PropEnablePositionIncrements, value.EnablePositionIncrements, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnablePositionIncrements, value.EnablePositionIncrements, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TypeMapping.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TypeMapping.g.cs index e01dcebd005..1b3e2ebe82a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TypeMapping.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/TypeMapping.g.cs @@ -75,12 +75,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.TypeMapping Read(ref Syste continue; } - if (propDateDetection.TryReadProperty(ref reader, options, PropDateDetection, null)) + if (propDateDetection.TryReadProperty(ref reader, options, PropDateDetection, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -95,7 +95,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.TypeMapping Read(ref Syste continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -115,7 +115,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.TypeMapping Read(ref Syste continue; } - if (propNumericDetection.TryReadProperty(ref reader, options, PropNumericDetection, null)) + if (propNumericDetection.TryReadProperty(ref reader, options, PropNumericDetection, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,7 +145,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.TypeMapping Read(ref Syste continue; } - if (propSubobjects.TryReadProperty(ref reader, options, PropSubobjects, null)) + if (propSubobjects.TryReadProperty(ref reader, options, PropSubobjects, static Elastic.Clients.Elasticsearch.Mapping.Subobjects? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -187,21 +187,21 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAllField, value.AllField, null, null); writer.WriteProperty(options, PropDataStreamTimestamp, value.DataStreamTimestamp, null, null); - writer.WriteProperty(options, PropDateDetection, value.DateDetection, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDateDetection, value.DateDetection, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDynamicDateFormats, value.DynamicDateFormats, 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, PropDynamicTemplates, value.DynamicTemplates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection>? v) => w.WriteCollectionValue>(o, v, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.KeyValuePair v) => w.WriteKeyValuePairValue(o, v, null, null))); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFieldNames, value.FieldNames, null, null); writer.WriteProperty(options, PropIndexField, value.IndexField, 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, PropNumericDetection, value.NumericDetection, null, null); + writer.WriteProperty(options, PropNumericDetection, value.NumericDetection, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); writer.WriteProperty(options, PropRuntime, value.Runtime, 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, PropSize, value.Size, null, null); writer.WriteProperty(options, PropSource, value.Source, null, null); - writer.WriteProperty(options, PropSubobjects, value.Subobjects, null, null); + writer.WriteProperty(options, PropSubobjects, value.Subobjects, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.Subobjects? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs index 10fef02df29..f7866fe4de3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/UnsignedLongNumberProperty.g.cs @@ -68,12 +68,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.UnsignedLongNumberProperty LocalJsonValue propTimeSeriesMetric = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, null)) + if (propCoerce.TryReadProperty(ref reader, options, PropCoerce, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,12 +83,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.UnsignedLongNumberProperty continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,17 +98,17 @@ public override Elastic.Clients.Elasticsearch.Mapping.UnsignedLongNumberProperty continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, null)) + if (propIgnoreMalformed.TryReadProperty(ref reader, options, PropIgnoreMalformed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIndex.TryReadProperty(ref reader, options, PropIndex, null)) + if (propIndex.TryReadProperty(ref reader, options, PropIndex, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,12 +118,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.UnsignedLongNumberProperty continue; } - if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, null)) + if (propNullValue.TryReadProperty(ref reader, options, PropNullValue, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, null)) + if (propOnScriptError.TryReadProperty(ref reader, options, PropOnScriptError, static Elastic.Clients.Elasticsearch.Mapping.OnScriptError? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,22 +138,22 @@ public override Elastic.Clients.Elasticsearch.Mapping.UnsignedLongNumberProperty continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, null)) + if (propTimeSeriesDimension.TryReadProperty(ref reader, options, PropTimeSeriesDimension, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, null)) + if (propTimeSeriesMetric.TryReadProperty(ref reader, options, PropTimeSeriesMetric, static Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -200,24 +200,24 @@ public override Elastic.Clients.Elasticsearch.Mapping.UnsignedLongNumberProperty public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Mapping.UnsignedLongNumberProperty value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCoerce, value.Coerce, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoerce, value.Coerce, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); - writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, null); - writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreMalformed, value.IgnoreMalformed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIndex, value.Index, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); - writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, null); + writer.WriteProperty(options, PropNullValue, value.NullValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOnScriptError, value.OnScriptError, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.OnScriptError? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropProperties, value.Properties, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); - writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, null); - writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesDimension, value.TimeSeriesDimension, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeSeriesMetric, value.TimeSeriesMetric, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.TimeSeriesMetricType? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs index 787561e779c..8566a0539ad 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/VersionProperty.g.cs @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.VersionProperty Read(ref S continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,7 +70,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.VersionProperty Read(ref S continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.VersionProperty Read(ref S continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,14 +129,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs index 5ea0c1ae8bd..f9b07a18195 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Mapping/WildcardProperty.g.cs @@ -57,12 +57,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.WildcardProperty Read(ref continue; } - if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, null)) + if (propDocValues.TryReadProperty(ref reader, options, PropDocValues, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, null)) + if (propDynamic.TryReadProperty(ref reader, options, PropDynamic, static Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Mapping.WildcardProperty Read(ref continue; } - if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, null)) + if (propIgnoreAbove.TryReadProperty(ref reader, options, PropIgnoreAbove, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -92,12 +92,12 @@ public override Elastic.Clients.Elasticsearch.Mapping.WildcardProperty Read(ref continue; } - if (propStore.TryReadProperty(ref reader, options, PropStore, null)) + if (propStore.TryReadProperty(ref reader, options, PropStore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, null)) + if (propSyntheticSourceKeep.TryReadProperty(ref reader, options, PropSyntheticSourceKeep, static Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,15 +137,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCopyTo, value.CopyTo, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); - writer.WriteProperty(options, PropDocValues, value.DocValues, null, null); - writer.WriteProperty(options, PropDynamic, value.Dynamic, null, null); + writer.WriteProperty(options, PropDocValues, value.DocValues, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDynamic, value.Dynamic, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.DynamicMapping? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, null); + writer.WriteProperty(options, PropIgnoreAbove, value.IgnoreAbove, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropNullValue, value.NullValue, null, null); writer.WriteProperty(options, PropProperties, value.Properties, null, null); - writer.WriteProperty(options, PropStore, value.Store, null, null); - writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, null); + writer.WriteProperty(options, PropStore, value.Store, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropSyntheticSourceKeep, value.SyntheticSourceKeep, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Mapping.SyntheticSourceKeepEnum? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedSortValue.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedSortValue.g.cs index f7dfc437035..4e3eacd6096 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedSortValue.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/NestedSortValue.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.NestedSortValue Read(ref System.Te continue; } - if (propMaxChildren.TryReadProperty(ref reader, options, PropMaxChildren, null)) + if (propMaxChildren.TryReadProperty(ref reader, options, PropMaxChildren, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropMaxChildren, value.MaxChildren, null, null); + writer.WriteProperty(options, PropMaxChildren, value.MaxChildren, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNested, value.Nested, null, null); writer.WriteProperty(options, PropPath, value.Path, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/AdaptiveSelection.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/AdaptiveSelection.g.cs index eca1c35f769..7efa35f1e18 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/AdaptiveSelection.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/AdaptiveSelection.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.AdaptiveSelection Read(ref S LocalJsonValue propRank = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAvgQueueSize.TryReadProperty(ref reader, options, PropAvgQueueSize, null)) + if (propAvgQueueSize.TryReadProperty(ref reader, options, PropAvgQueueSize, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.AdaptiveSelection Read(ref S continue; } - if (propAvgResponseTimeNs.TryReadProperty(ref reader, options, PropAvgResponseTimeNs, null)) + if (propAvgResponseTimeNs.TryReadProperty(ref reader, options, PropAvgResponseTimeNs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,12 +65,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.AdaptiveSelection Read(ref S continue; } - if (propAvgServiceTimeNs.TryReadProperty(ref reader, options, PropAvgServiceTimeNs, null)) + if (propAvgServiceTimeNs.TryReadProperty(ref reader, options, PropAvgServiceTimeNs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOutgoingSearches.TryReadProperty(ref reader, options, PropOutgoingSearches, null)) + if (propOutgoingSearches.TryReadProperty(ref reader, options, PropOutgoingSearches, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,12 +105,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.AdaptiveSelection Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.AdaptiveSelection value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAvgQueueSize, value.AvgQueueSize, null, null); + writer.WriteProperty(options, PropAvgQueueSize, value.AvgQueueSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAvgResponseTime, value.AvgResponseTime, null, null); - writer.WriteProperty(options, PropAvgResponseTimeNs, value.AvgResponseTimeNs, null, null); + writer.WriteProperty(options, PropAvgResponseTimeNs, value.AvgResponseTimeNs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAvgServiceTime, value.AvgServiceTime, null, null); - writer.WriteProperty(options, PropAvgServiceTimeNs, value.AvgServiceTimeNs, null, null); - writer.WriteProperty(options, PropOutgoingSearches, value.OutgoingSearches, null, null); + writer.WriteProperty(options, PropAvgServiceTimeNs, value.AvgServiceTimeNs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOutgoingSearches, value.OutgoingSearches, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRank, value.Rank, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Breaker.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Breaker.g.cs index 546d2e417a1..88a6ef8da8d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Breaker.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Breaker.g.cs @@ -48,7 +48,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Breaker Read(ref System.Text continue; } - if (propEstimatedSizeInBytes.TryReadProperty(ref reader, options, PropEstimatedSizeInBytes, null)) + if (propEstimatedSizeInBytes.TryReadProperty(ref reader, options, PropEstimatedSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,17 +58,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.Breaker Read(ref System.Text continue; } - if (propLimitSizeInBytes.TryReadProperty(ref reader, options, PropLimitSizeInBytes, null)) + if (propLimitSizeInBytes.TryReadProperty(ref reader, options, PropLimitSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOverhead.TryReadProperty(ref reader, options, PropOverhead, null)) + if (propOverhead.TryReadProperty(ref reader, options, PropOverhead, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTripped.TryReadProperty(ref reader, options, PropTripped, null)) + if (propTripped.TryReadProperty(ref reader, options, PropTripped, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,11 +98,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropEstimatedSize, value.EstimatedSize, null, null); - writer.WriteProperty(options, PropEstimatedSizeInBytes, value.EstimatedSizeInBytes, null, null); + writer.WriteProperty(options, PropEstimatedSizeInBytes, value.EstimatedSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLimitSize, value.LimitSize, null, null); - writer.WriteProperty(options, PropLimitSizeInBytes, value.LimitSizeInBytes, null, null); - writer.WriteProperty(options, PropOverhead, value.Overhead, null, null); - writer.WriteProperty(options, PropTripped, value.Tripped, null, null); + writer.WriteProperty(options, PropLimitSizeInBytes, value.LimitSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOverhead, value.Overhead, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTripped, value.Tripped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpu.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpu.g.cs index e321961c21a..47f2bee5d63 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpu.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpu.g.cs @@ -39,12 +39,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.CgroupCpu Read(ref System.Te LocalJsonValue propStat = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCfsPeriodMicros.TryReadProperty(ref reader, options, PropCfsPeriodMicros, null)) + if (propCfsPeriodMicros.TryReadProperty(ref reader, options, PropCfsPeriodMicros, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCfsQuotaMicros.TryReadProperty(ref reader, options, PropCfsQuotaMicros, null)) + if (propCfsQuotaMicros.TryReadProperty(ref reader, options, PropCfsQuotaMicros, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,8 +81,8 @@ public override Elastic.Clients.Elasticsearch.Nodes.CgroupCpu Read(ref System.Te public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.CgroupCpu value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCfsPeriodMicros, value.CfsPeriodMicros, null, null); - writer.WriteProperty(options, PropCfsQuotaMicros, value.CfsQuotaMicros, null, null); + writer.WriteProperty(options, PropCfsPeriodMicros, value.CfsPeriodMicros, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCfsQuotaMicros, value.CfsQuotaMicros, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropControlGroup, value.ControlGroup, null, null); writer.WriteProperty(options, PropStat, value.Stat, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpuStat.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpuStat.g.cs index cb451e3d9dd..60a24b5d546 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpuStat.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CgroupCpuStat.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.CgroupCpuStat Read(ref Syste LocalJsonValue propTimeThrottledNanos = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propNumberOfElapsedPeriods.TryReadProperty(ref reader, options, PropNumberOfElapsedPeriods, null)) + if (propNumberOfElapsedPeriods.TryReadProperty(ref reader, options, PropNumberOfElapsedPeriods, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNumberOfTimesThrottled.TryReadProperty(ref reader, options, PropNumberOfTimesThrottled, null)) + if (propNumberOfTimesThrottled.TryReadProperty(ref reader, options, PropNumberOfTimesThrottled, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeThrottledNanos.TryReadProperty(ref reader, options, PropTimeThrottledNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) + if (propTimeThrottledNanos.TryReadProperty(ref reader, options, PropTimeThrottledNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.CgroupCpuStat Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.CgroupCpuStat value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropNumberOfElapsedPeriods, value.NumberOfElapsedPeriods, null, null); - writer.WriteProperty(options, PropNumberOfTimesThrottled, value.NumberOfTimesThrottled, null, null); - writer.WriteProperty(options, PropTimeThrottledNanos, value.TimeThrottledNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); + writer.WriteProperty(options, PropNumberOfElapsedPeriods, value.NumberOfElapsedPeriods, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNumberOfTimesThrottled, value.NumberOfTimesThrottled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeThrottledNanos, value.TimeThrottledNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Client.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Client.g.cs index bdf388d08be..1b97264e411 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Client.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Client.g.cs @@ -58,17 +58,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.Client Read(ref System.Text. continue; } - if (propClosedTimeMillis.TryReadProperty(ref reader, options, PropClosedTimeMillis, null)) + if (propClosedTimeMillis.TryReadProperty(ref reader, options, PropClosedTimeMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propId.TryReadProperty(ref reader, options, PropId, null)) + if (propId.TryReadProperty(ref reader, options, PropId, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLastRequestTimeMillis.TryReadProperty(ref reader, options, PropLastRequestTimeMillis, null)) + if (propLastRequestTimeMillis.TryReadProperty(ref reader, options, PropLastRequestTimeMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Client Read(ref System.Text. continue; } - if (propOpenedTimeMillis.TryReadProperty(ref reader, options, PropOpenedTimeMillis, null)) + if (propOpenedTimeMillis.TryReadProperty(ref reader, options, PropOpenedTimeMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,12 +93,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.Client Read(ref System.Text. continue; } - if (propRequestCount.TryReadProperty(ref reader, options, PropRequestCount, null)) + if (propRequestCount.TryReadProperty(ref reader, options, PropRequestCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRequestSizeBytes.TryReadProperty(ref reader, options, PropRequestSizeBytes, null)) + if (propRequestSizeBytes.TryReadProperty(ref reader, options, PropRequestSizeBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -138,15 +138,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAgent, value.Agent, null, null); - writer.WriteProperty(options, PropClosedTimeMillis, value.ClosedTimeMillis, null, null); - writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropLastRequestTimeMillis, value.LastRequestTimeMillis, null, null); + writer.WriteProperty(options, PropClosedTimeMillis, value.ClosedTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropId, value.Id, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLastRequestTimeMillis, value.LastRequestTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLastUri, value.LastUri, null, null); writer.WriteProperty(options, PropLocalAddress, value.LocalAddress, null, null); - writer.WriteProperty(options, PropOpenedTimeMillis, value.OpenedTimeMillis, null, null); + writer.WriteProperty(options, PropOpenedTimeMillis, value.OpenedTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRemoteAddress, value.RemoteAddress, null, null); - writer.WriteProperty(options, PropRequestCount, value.RequestCount, null, null); - writer.WriteProperty(options, PropRequestSizeBytes, value.RequestSizeBytes, null, null); + writer.WriteProperty(options, PropRequestCount, value.RequestCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRequestSizeBytes, value.RequestSizeBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropXOpaqueId, value.XOpaqueId, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateQueue.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateQueue.g.cs index 480530769fe..e3cf5feab2b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateQueue.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateQueue.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateQueue Read(ref S LocalJsonValue propTotal = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCommitted.TryReadProperty(ref reader, options, PropCommitted, null)) + if (propCommitted.TryReadProperty(ref reader, options, PropCommitted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPending.TryReadProperty(ref reader, options, PropPending, null)) + if (propPending.TryReadProperty(ref reader, options, PropPending, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + if (propTotal.TryReadProperty(ref reader, options, PropTotal, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateQueue Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.ClusterStateQueue value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCommitted, value.Committed, null, null); - writer.WriteProperty(options, PropPending, value.Pending, null, null); - writer.WriteProperty(options, PropTotal, value.Total, null, null); + writer.WriteProperty(options, PropCommitted, value.Committed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPending, value.Pending, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotal, value.Total, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateUpdate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateUpdate.g.cs index 9c832de2c25..07eb4255579 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateUpdate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ClusterStateUpdate.g.cs @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateUpdate Read(ref continue; } - if (propCommitTimeMillis.TryReadProperty(ref reader, options, PropCommitTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propCommitTimeMillis.TryReadProperty(ref reader, options, PropCommitTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateUpdate Read(ref continue; } - if (propCompletionTimeMillis.TryReadProperty(ref reader, options, PropCompletionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propCompletionTimeMillis.TryReadProperty(ref reader, options, PropCompletionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -86,7 +86,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateUpdate Read(ref continue; } - if (propComputationTimeMillis.TryReadProperty(ref reader, options, PropComputationTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propComputationTimeMillis.TryReadProperty(ref reader, options, PropComputationTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateUpdate Read(ref continue; } - if (propContextConstructionTimeMillis.TryReadProperty(ref reader, options, PropContextConstructionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propContextConstructionTimeMillis.TryReadProperty(ref reader, options, PropContextConstructionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -111,7 +111,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateUpdate Read(ref continue; } - if (propMasterApplyTimeMillis.TryReadProperty(ref reader, options, PropMasterApplyTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propMasterApplyTimeMillis.TryReadProperty(ref reader, options, PropMasterApplyTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -121,7 +121,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateUpdate Read(ref continue; } - if (propNotificationTimeMillis.TryReadProperty(ref reader, options, PropNotificationTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propNotificationTimeMillis.TryReadProperty(ref reader, options, PropNotificationTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -131,7 +131,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ClusterStateUpdate Read(ref continue; } - if (propPublicationTimeMillis.TryReadProperty(ref reader, options, PropPublicationTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propPublicationTimeMillis.TryReadProperty(ref reader, options, PropPublicationTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -170,20 +170,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCommitTime, value.CommitTime, null, null); - writer.WriteProperty(options, PropCommitTimeMillis, value.CommitTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropCommitTimeMillis, value.CommitTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, null); - writer.WriteProperty(options, PropCompletionTimeMillis, value.CompletionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropCompletionTimeMillis, value.CompletionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropComputationTime, value.ComputationTime, null, null); - writer.WriteProperty(options, PropComputationTimeMillis, value.ComputationTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropComputationTimeMillis, value.ComputationTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropContextConstructionTime, value.ContextConstructionTime, null, null); - writer.WriteProperty(options, PropContextConstructionTimeMillis, value.ContextConstructionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropContextConstructionTimeMillis, value.ContextConstructionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropCount, value.Count, null, null); writer.WriteProperty(options, PropMasterApplyTime, value.MasterApplyTime, null, null); - writer.WriteProperty(options, PropMasterApplyTimeMillis, value.MasterApplyTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropMasterApplyTimeMillis, value.MasterApplyTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropNotificationTime, value.NotificationTime, null, null); - writer.WriteProperty(options, PropNotificationTimeMillis, value.NotificationTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropNotificationTimeMillis, value.NotificationTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropPublicationTime, value.PublicationTime, null, null); - writer.WriteProperty(options, PropPublicationTimeMillis, value.PublicationTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropPublicationTimeMillis, value.PublicationTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Context.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Context.g.cs index b2545231f48..17a67d4cdae 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Context.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Context.g.cs @@ -39,17 +39,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.Context Read(ref System.Text LocalJsonValue propContext2 = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCacheEvictions.TryReadProperty(ref reader, options, PropCacheEvictions, null)) + if (propCacheEvictions.TryReadProperty(ref reader, options, PropCacheEvictions, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompilationLimitTriggered.TryReadProperty(ref reader, options, PropCompilationLimitTriggered, null)) + if (propCompilationLimitTriggered.TryReadProperty(ref reader, options, PropCompilationLimitTriggered, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompilations.TryReadProperty(ref reader, options, PropCompilations, null)) + if (propCompilations.TryReadProperty(ref reader, options, PropCompilations, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.Context Read(ref System.Text public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.Context value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCacheEvictions, value.CacheEvictions, null, null); - writer.WriteProperty(options, PropCompilationLimitTriggered, value.CompilationLimitTriggered, null, null); - writer.WriteProperty(options, PropCompilations, value.Compilations, null, null); + writer.WriteProperty(options, PropCacheEvictions, value.CacheEvictions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompilationLimitTriggered, value.CompilationLimitTriggered, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompilations, value.Compilations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropContext2, value.Context2, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Cpu.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Cpu.g.cs index 276e918336c..4f4907ba5ab 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Cpu.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Cpu.g.cs @@ -52,7 +52,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Cpu Read(ref System.Text.Jso continue; } - if (propPercent.TryReadProperty(ref reader, options, PropPercent, null)) + if (propPercent.TryReadProperty(ref reader, options, PropPercent, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Cpu Read(ref System.Text.Jso continue; } - if (propSysInMillis.TryReadProperty(ref reader, options, PropSysInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propSysInMillis.TryReadProperty(ref reader, options, PropSysInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Cpu Read(ref System.Text.Jso continue; } - if (propTotalInMillis.TryReadProperty(ref reader, options, PropTotalInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTotalInMillis.TryReadProperty(ref reader, options, PropTotalInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Cpu Read(ref System.Text.Jso continue; } - if (propUserInMillis.TryReadProperty(ref reader, options, PropUserInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propUserInMillis.TryReadProperty(ref reader, options, PropUserInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -114,13 +114,13 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropLoadAverage, value.LoadAverage, 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, PropPercent, value.Percent, null, null); + writer.WriteProperty(options, PropPercent, value.Percent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSys, value.Sys, null, null); - writer.WriteProperty(options, PropSysInMillis, value.SysInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropSysInMillis, value.SysInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropTotal, value.Total, null, null); - writer.WriteProperty(options, PropTotalInMillis, value.TotalInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropTotalInMillis, value.TotalInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropUser, value.User, null, null); - writer.WriteProperty(options, PropUserInMillis, value.UserInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropUserInMillis, value.UserInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CpuAcct.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CpuAcct.g.cs index 6fe40b1d472..4ef4d282d2d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CpuAcct.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/CpuAcct.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.CpuAcct Read(ref System.Text continue; } - if (propUsageNanos.TryReadProperty(ref reader, options, PropUsageNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) + if (propUsageNanos.TryReadProperty(ref reader, options, PropUsageNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) { continue; } @@ -66,7 +66,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropControlGroup, value.ControlGroup, null, null); - writer.WriteProperty(options, PropUsageNanos, value.UsageNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); + writer.WriteProperty(options, PropUsageNanos, value.UsageNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/DataPathStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/DataPathStats.g.cs index 4fafe3c6ffd..b0f042ff56f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/DataPathStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/DataPathStats.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.DataPathStats Read(ref Syste continue; } - if (propAvailableInBytes.TryReadProperty(ref reader, options, PropAvailableInBytes, null)) + if (propAvailableInBytes.TryReadProperty(ref reader, options, PropAvailableInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -78,7 +78,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.DataPathStats Read(ref Syste continue; } - if (propDiskReads.TryReadProperty(ref reader, options, PropDiskReads, null)) + if (propDiskReads.TryReadProperty(ref reader, options, PropDiskReads, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -88,12 +88,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.DataPathStats Read(ref Syste continue; } - if (propDiskReadSizeInBytes.TryReadProperty(ref reader, options, PropDiskReadSizeInBytes, null)) + if (propDiskReadSizeInBytes.TryReadProperty(ref reader, options, PropDiskReadSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDiskWrites.TryReadProperty(ref reader, options, PropDiskWrites, null)) + if (propDiskWrites.TryReadProperty(ref reader, options, PropDiskWrites, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.DataPathStats Read(ref Syste continue; } - if (propDiskWriteSizeInBytes.TryReadProperty(ref reader, options, PropDiskWriteSizeInBytes, null)) + if (propDiskWriteSizeInBytes.TryReadProperty(ref reader, options, PropDiskWriteSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,7 +113,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.DataPathStats Read(ref Syste continue; } - if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, null)) + if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -133,7 +133,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.DataPathStats Read(ref Syste continue; } - if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, null)) + if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -178,20 +178,20 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAvailable, value.Available, null, null); - writer.WriteProperty(options, PropAvailableInBytes, value.AvailableInBytes, null, null); + writer.WriteProperty(options, PropAvailableInBytes, value.AvailableInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDiskQueue, value.DiskQueue, null, null); - writer.WriteProperty(options, PropDiskReads, value.DiskReads, null, null); + writer.WriteProperty(options, PropDiskReads, value.DiskReads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDiskReadSize, value.DiskReadSize, null, null); - writer.WriteProperty(options, PropDiskReadSizeInBytes, value.DiskReadSizeInBytes, null, null); - writer.WriteProperty(options, PropDiskWrites, value.DiskWrites, null, null); + writer.WriteProperty(options, PropDiskReadSizeInBytes, value.DiskReadSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDiskWrites, value.DiskWrites, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDiskWriteSize, value.DiskWriteSize, null, null); - writer.WriteProperty(options, PropDiskWriteSizeInBytes, value.DiskWriteSizeInBytes, null, null); + writer.WriteProperty(options, PropDiskWriteSizeInBytes, value.DiskWriteSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFree, value.Free, null, null); - writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, null); + writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMount, value.Mount, null, null); writer.WriteProperty(options, PropPath, value.Path, null, null); writer.WriteProperty(options, PropTotal, value.Total, null, null); - writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, null); + writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ExtendedMemoryStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ExtendedMemoryStats.g.cs index e24f5239b10..f7b6fb4d69b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ExtendedMemoryStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ExtendedMemoryStats.g.cs @@ -55,17 +55,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.ExtendedMemoryStats Read(ref LocalJsonValue propUsedPercent = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAdjustedTotalInBytes.TryReadProperty(ref reader, options, PropAdjustedTotalInBytes, null)) + if (propAdjustedTotalInBytes.TryReadProperty(ref reader, options, PropAdjustedTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, null)) + if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFreePercent.TryReadProperty(ref reader, options, PropFreePercent, null)) + if (propFreePercent.TryReadProperty(ref reader, options, PropFreePercent, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.ExtendedMemoryStats Read(ref continue; } - if (propResidentInBytes.TryReadProperty(ref reader, options, PropResidentInBytes, null)) + if (propResidentInBytes.TryReadProperty(ref reader, options, PropResidentInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -85,12 +85,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.ExtendedMemoryStats Read(ref continue; } - if (propShareInBytes.TryReadProperty(ref reader, options, PropShareInBytes, null)) + if (propShareInBytes.TryReadProperty(ref reader, options, PropShareInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, null)) + if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -100,17 +100,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.ExtendedMemoryStats Read(ref continue; } - if (propTotalVirtualInBytes.TryReadProperty(ref reader, options, PropTotalVirtualInBytes, null)) + if (propTotalVirtualInBytes.TryReadProperty(ref reader, options, PropTotalVirtualInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, null)) + if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUsedPercent.TryReadProperty(ref reader, options, PropUsedPercent, null)) + if (propUsedPercent.TryReadProperty(ref reader, options, PropUsedPercent, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,18 +145,18 @@ public override Elastic.Clients.Elasticsearch.Nodes.ExtendedMemoryStats Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.ExtendedMemoryStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAdjustedTotalInBytes, value.AdjustedTotalInBytes, null, null); - writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, null); - writer.WriteProperty(options, PropFreePercent, value.FreePercent, null, null); + writer.WriteProperty(options, PropAdjustedTotalInBytes, value.AdjustedTotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFreePercent, value.FreePercent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResident, value.Resident, null, null); - writer.WriteProperty(options, PropResidentInBytes, value.ResidentInBytes, null, null); + writer.WriteProperty(options, PropResidentInBytes, value.ResidentInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShare, value.Share, null, null); - writer.WriteProperty(options, PropShareInBytes, value.ShareInBytes, null, null); - writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, null); + writer.WriteProperty(options, PropShareInBytes, value.ShareInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalVirtual, value.TotalVirtual, null, null); - writer.WriteProperty(options, PropTotalVirtualInBytes, value.TotalVirtualInBytes, null, null); - writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, null); - writer.WriteProperty(options, PropUsedPercent, value.UsedPercent, null, null); + writer.WriteProperty(options, PropTotalVirtualInBytes, value.TotalVirtualInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUsedPercent, value.UsedPercent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystem.g.cs index 13c9c18f141..01753213186 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystem.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.FileSystem Read(ref System.T continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, null)) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropData, value.Data, 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, PropIoStats, value.IoStats, null, null); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, null); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotal, value.Total, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystemTotal.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystemTotal.g.cs index 62fa4708641..04f1bbc4bb5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystemTotal.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/FileSystemTotal.g.cs @@ -48,7 +48,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.FileSystemTotal Read(ref Sys continue; } - if (propAvailableInBytes.TryReadProperty(ref reader, options, PropAvailableInBytes, null)) + if (propAvailableInBytes.TryReadProperty(ref reader, options, PropAvailableInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.FileSystemTotal Read(ref Sys continue; } - if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, null)) + if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.FileSystemTotal Read(ref Sys continue; } - if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, null)) + if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,11 +98,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAvailable, value.Available, null, null); - writer.WriteProperty(options, PropAvailableInBytes, value.AvailableInBytes, null, null); + writer.WriteProperty(options, PropAvailableInBytes, value.AvailableInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFree, value.Free, null, null); - writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, null); + writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotal, value.Total, null, null); - writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, null); + writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/GarbageCollectorTotal.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/GarbageCollectorTotal.g.cs index 0167567d61a..04295ce175c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/GarbageCollectorTotal.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/GarbageCollectorTotal.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.GarbageCollectorTotal Read(r LocalJsonValue propCollectionTimeInMillis = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCollectionCount.TryReadProperty(ref reader, options, PropCollectionCount, null)) + if (propCollectionCount.TryReadProperty(ref reader, options, PropCollectionCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.GarbageCollectorTotal Read(r continue; } - if (propCollectionTimeInMillis.TryReadProperty(ref reader, options, PropCollectionTimeInMillis, null)) + if (propCollectionTimeInMillis.TryReadProperty(ref reader, options, PropCollectionTimeInMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.GarbageCollectorTotal Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.GarbageCollectorTotal value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCollectionCount, value.CollectionCount, null, null); + writer.WriteProperty(options, PropCollectionCount, value.CollectionCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCollectionTime, value.CollectionTime, null, null); - writer.WriteProperty(options, PropCollectionTimeInMillis, value.CollectionTimeInMillis, null, null); + writer.WriteProperty(options, PropCollectionTimeInMillis, value.CollectionTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Http.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Http.g.cs index cd2b2b9a767..15e035f2a80 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Http.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Http.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Http Read(ref System.Text.Js continue; } - if (propCurrentOpen.TryReadProperty(ref reader, options, PropCurrentOpen, null)) + if (propCurrentOpen.TryReadProperty(ref reader, options, PropCurrentOpen, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Http Read(ref System.Text.Js continue; } - if (propTotalOpened.TryReadProperty(ref reader, options, PropTotalOpened, null)) + if (propTotalOpened.TryReadProperty(ref reader, options, PropTotalOpened, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,9 +82,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropClients, value.Clients, 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, PropCurrentOpen, value.CurrentOpen, null, null); + writer.WriteProperty(options, PropCurrentOpen, value.CurrentOpen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRoutes, value.Routes, 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, PropTotalOpened, value.TotalOpened, null, null); + writer.WriteProperty(options, PropTotalOpened, value.TotalOpened, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IndexingPressureMemory.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IndexingPressureMemory.g.cs index f9599a6d567..a368fb0e90b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IndexingPressureMemory.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IndexingPressureMemory.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.IndexingPressureMemory Read( continue; } - if (propLimitInBytes.TryReadProperty(ref reader, options, PropLimitInBytes, null)) + if (propLimitInBytes.TryReadProperty(ref reader, options, PropLimitInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCurrent, value.Current, null, null); writer.WriteProperty(options, PropLimit, value.Limit, null, null); - writer.WriteProperty(options, PropLimitInBytes, value.LimitInBytes, null, null); + writer.WriteProperty(options, PropLimitInBytes, value.LimitInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotal, value.Total, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IoStatDevice.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IoStatDevice.g.cs index dc9b44f066d..c4a4b0d5a08 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IoStatDevice.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/IoStatDevice.g.cs @@ -48,27 +48,27 @@ public override Elastic.Clients.Elasticsearch.Nodes.IoStatDevice Read(ref System continue; } - if (propOperations.TryReadProperty(ref reader, options, PropOperations, null)) + if (propOperations.TryReadProperty(ref reader, options, PropOperations, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReadKilobytes.TryReadProperty(ref reader, options, PropReadKilobytes, null)) + if (propReadKilobytes.TryReadProperty(ref reader, options, PropReadKilobytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReadOperations.TryReadProperty(ref reader, options, PropReadOperations, null)) + if (propReadOperations.TryReadProperty(ref reader, options, PropReadOperations, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWriteKilobytes.TryReadProperty(ref reader, options, PropWriteKilobytes, null)) + if (propWriteKilobytes.TryReadProperty(ref reader, options, PropWriteKilobytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propWriteOperations.TryReadProperty(ref reader, options, PropWriteOperations, null)) + if (propWriteOperations.TryReadProperty(ref reader, options, PropWriteOperations, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,11 +98,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropDeviceName, value.DeviceName, null, null); - writer.WriteProperty(options, PropOperations, value.Operations, null, null); - writer.WriteProperty(options, PropReadKilobytes, value.ReadKilobytes, null, null); - writer.WriteProperty(options, PropReadOperations, value.ReadOperations, null, null); - writer.WriteProperty(options, PropWriteKilobytes, value.WriteKilobytes, null, null); - writer.WriteProperty(options, PropWriteOperations, value.WriteOperations, null, null); + writer.WriteProperty(options, PropOperations, value.Operations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReadKilobytes, value.ReadKilobytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReadOperations, value.ReadOperations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWriteKilobytes, value.WriteKilobytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropWriteOperations, value.WriteOperations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Jvm.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Jvm.g.cs index 551c29fe2d2..4dca710c2cf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Jvm.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Jvm.g.cs @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Jvm Read(ref System.Text.Jso continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, null)) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Jvm Read(ref System.Text.Jso continue; } - if (propUptimeInMillis.TryReadProperty(ref reader, options, PropUptimeInMillis, null)) + if (propUptimeInMillis.TryReadProperty(ref reader, options, PropUptimeInMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -118,9 +118,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropGc, value.Gc, null, null); writer.WriteProperty(options, PropMem, value.Mem, null, null); writer.WriteProperty(options, PropThreads, value.Threads, null, null); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, null); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropUptime, value.Uptime, null, null); - writer.WriteProperty(options, PropUptimeInMillis, value.UptimeInMillis, null, null); + writer.WriteProperty(options, PropUptimeInMillis, value.UptimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmClasses.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmClasses.g.cs index b04612e5aa7..540b54f7db8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmClasses.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmClasses.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmClasses Read(ref System.T LocalJsonValue propTotalUnloadedCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCurrentLoadedCount.TryReadProperty(ref reader, options, PropCurrentLoadedCount, null)) + if (propCurrentLoadedCount.TryReadProperty(ref reader, options, PropCurrentLoadedCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalLoadedCount.TryReadProperty(ref reader, options, PropTotalLoadedCount, null)) + if (propTotalLoadedCount.TryReadProperty(ref reader, options, PropTotalLoadedCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalUnloadedCount.TryReadProperty(ref reader, options, PropTotalUnloadedCount, null)) + if (propTotalUnloadedCount.TryReadProperty(ref reader, options, PropTotalUnloadedCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmClasses Read(ref System.T public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.JvmClasses value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCurrentLoadedCount, value.CurrentLoadedCount, null, null); - writer.WriteProperty(options, PropTotalLoadedCount, value.TotalLoadedCount, null, null); - writer.WriteProperty(options, PropTotalUnloadedCount, value.TotalUnloadedCount, null, null); + writer.WriteProperty(options, PropCurrentLoadedCount, value.CurrentLoadedCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalLoadedCount, value.TotalLoadedCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalUnloadedCount, value.TotalUnloadedCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmMemoryStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmMemoryStats.g.cs index fbfcc345887..d69025d8588 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmMemoryStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmMemoryStats.g.cs @@ -45,32 +45,32 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmMemoryStats Read(ref Syst LocalJsonValue?> propPools = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propHeapCommittedInBytes.TryReadProperty(ref reader, options, PropHeapCommittedInBytes, null)) + if (propHeapCommittedInBytes.TryReadProperty(ref reader, options, PropHeapCommittedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHeapMaxInBytes.TryReadProperty(ref reader, options, PropHeapMaxInBytes, null)) + if (propHeapMaxInBytes.TryReadProperty(ref reader, options, PropHeapMaxInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHeapUsedInBytes.TryReadProperty(ref reader, options, PropHeapUsedInBytes, null)) + if (propHeapUsedInBytes.TryReadProperty(ref reader, options, PropHeapUsedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHeapUsedPercent.TryReadProperty(ref reader, options, PropHeapUsedPercent, null)) + if (propHeapUsedPercent.TryReadProperty(ref reader, options, PropHeapUsedPercent, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNonHeapCommittedInBytes.TryReadProperty(ref reader, options, PropNonHeapCommittedInBytes, null)) + if (propNonHeapCommittedInBytes.TryReadProperty(ref reader, options, PropNonHeapCommittedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNonHeapUsedInBytes.TryReadProperty(ref reader, options, PropNonHeapUsedInBytes, null)) + if (propNonHeapUsedInBytes.TryReadProperty(ref reader, options, PropNonHeapUsedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,12 +105,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmMemoryStats Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.JvmMemoryStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropHeapCommittedInBytes, value.HeapCommittedInBytes, null, null); - writer.WriteProperty(options, PropHeapMaxInBytes, value.HeapMaxInBytes, null, null); - writer.WriteProperty(options, PropHeapUsedInBytes, value.HeapUsedInBytes, null, null); - writer.WriteProperty(options, PropHeapUsedPercent, value.HeapUsedPercent, null, null); - writer.WriteProperty(options, PropNonHeapCommittedInBytes, value.NonHeapCommittedInBytes, null, null); - writer.WriteProperty(options, PropNonHeapUsedInBytes, value.NonHeapUsedInBytes, null, null); + writer.WriteProperty(options, PropHeapCommittedInBytes, value.HeapCommittedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHeapMaxInBytes, value.HeapMaxInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHeapUsedInBytes, value.HeapUsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHeapUsedPercent, value.HeapUsedPercent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNonHeapCommittedInBytes, value.NonHeapCommittedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNonHeapUsedInBytes, value.NonHeapUsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPools, value.Pools, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmThreads.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmThreads.g.cs index b9c827ed7ac..2b7c6b6a2cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmThreads.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/JvmThreads.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmThreads Read(ref System.T LocalJsonValue propPeakCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPeakCount.TryReadProperty(ref reader, options, PropPeakCount, null)) + if (propPeakCount.TryReadProperty(ref reader, options, PropPeakCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.Nodes.JvmThreads Read(ref System.T public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.JvmThreads value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropPeakCount, value.PeakCount, null, null); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPeakCount, value.PeakCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/MemoryStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/MemoryStats.g.cs index de64118d19b..ae85cf96e09 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/MemoryStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/MemoryStats.g.cs @@ -51,12 +51,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.MemoryStats Read(ref System. LocalJsonValue propUsedInBytes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAdjustedTotalInBytes.TryReadProperty(ref reader, options, PropAdjustedTotalInBytes, null)) + if (propAdjustedTotalInBytes.TryReadProperty(ref reader, options, PropAdjustedTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, null)) + if (propFreeInBytes.TryReadProperty(ref reader, options, PropFreeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.MemoryStats Read(ref System. continue; } - if (propResidentInBytes.TryReadProperty(ref reader, options, PropResidentInBytes, null)) + if (propResidentInBytes.TryReadProperty(ref reader, options, PropResidentInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,12 +76,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.MemoryStats Read(ref System. continue; } - if (propShareInBytes.TryReadProperty(ref reader, options, PropShareInBytes, null)) + if (propShareInBytes.TryReadProperty(ref reader, options, PropShareInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, null)) + if (propTotalInBytes.TryReadProperty(ref reader, options, PropTotalInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,12 +91,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.MemoryStats Read(ref System. continue; } - if (propTotalVirtualInBytes.TryReadProperty(ref reader, options, PropTotalVirtualInBytes, null)) + if (propTotalVirtualInBytes.TryReadProperty(ref reader, options, PropTotalVirtualInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, null)) + if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,16 +129,16 @@ public override Elastic.Clients.Elasticsearch.Nodes.MemoryStats Read(ref System. public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.MemoryStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAdjustedTotalInBytes, value.AdjustedTotalInBytes, null, null); - writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, null); + writer.WriteProperty(options, PropAdjustedTotalInBytes, value.AdjustedTotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFreeInBytes, value.FreeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropResident, value.Resident, null, null); - writer.WriteProperty(options, PropResidentInBytes, value.ResidentInBytes, null, null); + writer.WriteProperty(options, PropResidentInBytes, value.ResidentInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShare, value.Share, null, null); - writer.WriteProperty(options, PropShareInBytes, value.ShareInBytes, null, null); - writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, null); + writer.WriteProperty(options, PropShareInBytes, value.ShareInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalInBytes, value.TotalInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalVirtual, value.TotalVirtual, null, null); - writer.WriteProperty(options, PropTotalVirtualInBytes, value.TotalVirtualInBytes, null, null); - writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, null); + writer.WriteProperty(options, PropTotalVirtualInBytes, value.TotalVirtualInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeBufferPool.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeBufferPool.g.cs index 286a31df671..512f68d9492 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeBufferPool.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeBufferPool.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeBufferPool Read(ref Syst LocalJsonValue propUsedInBytes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeBufferPool Read(ref Syst continue; } - if (propTotalCapacityInBytes.TryReadProperty(ref reader, options, PropTotalCapacityInBytes, null)) + if (propTotalCapacityInBytes.TryReadProperty(ref reader, options, PropTotalCapacityInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeBufferPool Read(ref Syst continue; } - if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, null)) + if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeBufferPool Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.NodeBufferPool value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCount, value.Count, null, null); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalCapacity, value.TotalCapacity, null, null); - writer.WriteProperty(options, PropTotalCapacityInBytes, value.TotalCapacityInBytes, null, null); + writer.WriteProperty(options, PropTotalCapacityInBytes, value.TotalCapacityInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropUsed, value.Used, null, null); - writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, null); + writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfo.g.cs index 9ca45578720..edcd6a8bbd9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfo.g.cs @@ -174,7 +174,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeInfo Read(ref System.Tex continue; } - if (propTotalIndexingBuffer.TryReadProperty(ref reader, options, PropTotalIndexingBuffer, null)) + if (propTotalIndexingBuffer.TryReadProperty(ref reader, options, PropTotalIndexingBuffer, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -260,7 +260,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropRoles, value.Roles, 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, PropSettings, value.Settings, null, null); writer.WriteProperty(options, PropThreadPool, value.ThreadPool, 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, PropTotalIndexingBuffer, value.TotalIndexingBuffer, null, null); + writer.WriteProperty(options, PropTotalIndexingBuffer, value.TotalIndexingBuffer, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotalIndexingBufferInBytes, value.TotalIndexingBufferInBytes, null, null); writer.WriteProperty(options, PropTransport, value.Transport, null, null); writer.WriteProperty(options, PropTransportAddress, value.TransportAddress, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoDiscover.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoDiscover.g.cs index f216a269074..eca816be62d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoDiscover.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoDiscover.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeInfoDiscover Read(ref Sy } propSettings ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out object value, null, null); + reader.ReadProperty(options, out string key, out object value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static object (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propSettings[key] = value; } @@ -78,7 +78,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.Settings) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs index 40a686df83d..5fce2ad57b5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeInfoXpackMl.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeInfoXpackMl Read(ref Sys LocalJsonValue propUseAutoMachineMemoryPercent = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propUseAutoMachineMemoryPercent.TryReadProperty(ref reader, options, PropUseAutoMachineMemoryPercent, null)) + if (propUseAutoMachineMemoryPercent.TryReadProperty(ref reader, options, PropUseAutoMachineMemoryPercent, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeInfoXpackMl Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.NodeInfoXpackMl value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropUseAutoMachineMemoryPercent, value.UseAutoMachineMemoryPercent, null, null); + writer.WriteProperty(options, PropUseAutoMachineMemoryPercent, value.UseAutoMachineMemoryPercent, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeOperatingSystemInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeOperatingSystemInfo.g.cs index 01eb879235c..6ae5f7a40fb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeOperatingSystemInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeOperatingSystemInfo.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeOperatingSystemInfo Read LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllocatedProcessors.TryReadProperty(ref reader, options, PropAllocatedProcessors, null)) + if (propAllocatedProcessors.TryReadProperty(ref reader, options, PropAllocatedProcessors, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,7 +129,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeOperatingSystemInfo Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.NodeOperatingSystemInfo value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllocatedProcessors, value.AllocatedProcessors, null, null); + writer.WriteProperty(options, PropAllocatedProcessors, value.AllocatedProcessors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropArch, value.Arch, null, null); writer.WriteProperty(options, PropAvailableProcessors, value.AvailableProcessors, null, null); writer.WriteProperty(options, PropCpu, value.Cpu, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeThreadPoolInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeThreadPoolInfo.g.cs index 4c7a7451161..d059f8888db 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeThreadPoolInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/NodeThreadPoolInfo.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeThreadPoolInfo Read(ref LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCore.TryReadProperty(ref reader, options, PropCore, null)) + if (propCore.TryReadProperty(ref reader, options, PropCore, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeThreadPoolInfo Read(ref continue; } - if (propMax.TryReadProperty(ref reader, options, PropMax, null)) + if (propMax.TryReadProperty(ref reader, options, PropMax, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeThreadPoolInfo Read(ref continue; } - if (propSize.TryReadProperty(ref reader, options, PropSize, null)) + if (propSize.TryReadProperty(ref reader, options, PropSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,11 +97,11 @@ public override Elastic.Clients.Elasticsearch.Nodes.NodeThreadPoolInfo Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.NodeThreadPoolInfo value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCore, value.Core, null, null); + writer.WriteProperty(options, PropCore, value.Core, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropKeepAlive, value.KeepAlive, null, null); - writer.WriteProperty(options, PropMax, value.Max, null, null); + writer.WriteProperty(options, PropMax, value.Max, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueueSize, value.QueueSize, null, null); - writer.WriteProperty(options, PropSize, value.Size, null, null); + writer.WriteProperty(options, PropSize, value.Size, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/OperatingSystem.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/OperatingSystem.g.cs index 295b3dac164..21ca652ff65 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/OperatingSystem.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/OperatingSystem.g.cs @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.OperatingSystem Read(ref Sys continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, null)) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCpu, value.Cpu, null, null); writer.WriteProperty(options, PropMem, value.Mem, null, null); writer.WriteProperty(options, PropSwap, value.Swap, null, null); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, null); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Pool.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Pool.g.cs index 1a600eb9812..216a8136394 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Pool.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Pool.g.cs @@ -39,22 +39,22 @@ public override Elastic.Clients.Elasticsearch.Nodes.Pool Read(ref System.Text.Js LocalJsonValue propUsedInBytes = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMaxInBytes.TryReadProperty(ref reader, options, PropMaxInBytes, null)) + if (propMaxInBytes.TryReadProperty(ref reader, options, PropMaxInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPeakMaxInBytes.TryReadProperty(ref reader, options, PropPeakMaxInBytes, null)) + if (propPeakMaxInBytes.TryReadProperty(ref reader, options, PropPeakMaxInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPeakUsedInBytes.TryReadProperty(ref reader, options, PropPeakUsedInBytes, null)) + if (propPeakUsedInBytes.TryReadProperty(ref reader, options, PropPeakUsedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, null)) + if (propUsedInBytes.TryReadProperty(ref reader, options, PropUsedInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.Nodes.Pool Read(ref System.Text.Js public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.Pool value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMaxInBytes, value.MaxInBytes, null, null); - writer.WriteProperty(options, PropPeakMaxInBytes, value.PeakMaxInBytes, null, null); - writer.WriteProperty(options, PropPeakUsedInBytes, value.PeakUsedInBytes, null, null); - writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, null); + writer.WriteProperty(options, PropMaxInBytes, value.MaxInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPeakMaxInBytes, value.PeakMaxInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPeakUsedInBytes, value.PeakUsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUsedInBytes, value.UsedInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PressureMemory.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PressureMemory.g.cs index 92ef43b4c8e..dfb4531044b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PressureMemory.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PressureMemory.g.cs @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.PressureMemory Read(ref Syst continue; } - if (propAllInBytes.TryReadProperty(ref reader, options, PropAllInBytes, null)) + if (propAllInBytes.TryReadProperty(ref reader, options, PropAllInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,7 +72,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.PressureMemory Read(ref Syst continue; } - if (propCombinedCoordinatingAndPrimaryInBytes.TryReadProperty(ref reader, options, PropCombinedCoordinatingAndPrimaryInBytes, null)) + if (propCombinedCoordinatingAndPrimaryInBytes.TryReadProperty(ref reader, options, PropCombinedCoordinatingAndPrimaryInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,12 +82,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.PressureMemory Read(ref Syst continue; } - if (propCoordinatingInBytes.TryReadProperty(ref reader, options, PropCoordinatingInBytes, null)) + if (propCoordinatingInBytes.TryReadProperty(ref reader, options, PropCoordinatingInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCoordinatingRejections.TryReadProperty(ref reader, options, PropCoordinatingRejections, null)) + if (propCoordinatingRejections.TryReadProperty(ref reader, options, PropCoordinatingRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.PressureMemory Read(ref Syst continue; } - if (propPrimaryInBytes.TryReadProperty(ref reader, options, PropPrimaryInBytes, null)) + if (propPrimaryInBytes.TryReadProperty(ref reader, options, PropPrimaryInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrimaryRejections.TryReadProperty(ref reader, options, PropPrimaryRejections, null)) + if (propPrimaryRejections.TryReadProperty(ref reader, options, PropPrimaryRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -112,12 +112,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.PressureMemory Read(ref Syst continue; } - if (propReplicaInBytes.TryReadProperty(ref reader, options, PropReplicaInBytes, null)) + if (propReplicaInBytes.TryReadProperty(ref reader, options, PropReplicaInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propReplicaRejections.TryReadProperty(ref reader, options, PropReplicaRejections, null)) + if (propReplicaRejections.TryReadProperty(ref reader, options, PropReplicaRejections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -154,18 +154,18 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAll, value.All, null, null); - writer.WriteProperty(options, PropAllInBytes, value.AllInBytes, null, null); + writer.WriteProperty(options, PropAllInBytes, value.AllInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCombinedCoordinatingAndPrimary, value.CombinedCoordinatingAndPrimary, null, null); - writer.WriteProperty(options, PropCombinedCoordinatingAndPrimaryInBytes, value.CombinedCoordinatingAndPrimaryInBytes, null, null); + writer.WriteProperty(options, PropCombinedCoordinatingAndPrimaryInBytes, value.CombinedCoordinatingAndPrimaryInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCoordinating, value.Coordinating, null, null); - writer.WriteProperty(options, PropCoordinatingInBytes, value.CoordinatingInBytes, null, null); - writer.WriteProperty(options, PropCoordinatingRejections, value.CoordinatingRejections, null, null); + writer.WriteProperty(options, PropCoordinatingInBytes, value.CoordinatingInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCoordinatingRejections, value.CoordinatingRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPrimary, value.Primary, null, null); - writer.WriteProperty(options, PropPrimaryInBytes, value.PrimaryInBytes, null, null); - writer.WriteProperty(options, PropPrimaryRejections, value.PrimaryRejections, null, null); + writer.WriteProperty(options, PropPrimaryInBytes, value.PrimaryInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrimaryRejections, value.PrimaryRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropReplica, value.Replica, null, null); - writer.WriteProperty(options, PropReplicaInBytes, value.ReplicaInBytes, null, null); - writer.WriteProperty(options, PropReplicaRejections, value.ReplicaRejections, null, null); + writer.WriteProperty(options, PropReplicaInBytes, value.ReplicaInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropReplicaRejections, value.ReplicaRejections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Process.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Process.g.cs index aedcb9977e6..e1a447b98c5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Process.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Process.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Process Read(ref System.Text continue; } - if (propMaxFileDescriptors.TryReadProperty(ref reader, options, PropMaxFileDescriptors, null)) + if (propMaxFileDescriptors.TryReadProperty(ref reader, options, PropMaxFileDescriptors, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.Process Read(ref System.Text continue; } - if (propOpenFileDescriptors.TryReadProperty(ref reader, options, PropOpenFileDescriptors, null)) + if (propOpenFileDescriptors.TryReadProperty(ref reader, options, PropOpenFileDescriptors, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, null)) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,10 +90,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCpu, value.Cpu, null, null); - writer.WriteProperty(options, PropMaxFileDescriptors, value.MaxFileDescriptors, null, null); + writer.WriteProperty(options, PropMaxFileDescriptors, value.MaxFileDescriptors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMem, value.Mem, null, null); - writer.WriteProperty(options, PropOpenFileDescriptors, value.OpenFileDescriptors, null, null); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, null); + writer.WriteProperty(options, PropOpenFileDescriptors, value.OpenFileDescriptors, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Processor.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Processor.g.cs index fbe829ac1d7..693a0706f4c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Processor.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Processor.g.cs @@ -39,22 +39,22 @@ public override Elastic.Clients.Elasticsearch.Nodes.Processor Read(ref System.Te LocalJsonValue propTimeInMillis = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCurrent.TryReadProperty(ref reader, options, PropCurrent, null)) + if (propCurrent.TryReadProperty(ref reader, options, PropCurrent, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFailed.TryReadProperty(ref reader, options, PropFailed, null)) + if (propFailed.TryReadProperty(ref reader, options, PropFailed, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTimeInMillis.TryReadProperty(ref reader, options, PropTimeInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propTimeInMillis.TryReadProperty(ref reader, options, PropTimeInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.Nodes.Processor Read(ref System.Te public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.Processor value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropCurrent, value.Current, null, null); - writer.WriteProperty(options, PropFailed, value.Failed, null, null); - writer.WriteProperty(options, PropTimeInMillis, value.TimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCurrent, value.Current, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFailed, value.Failed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTimeInMillis, value.TimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PublishedClusterStates.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PublishedClusterStates.g.cs index df25ae134bd..ba93613e746 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PublishedClusterStates.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/PublishedClusterStates.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.PublishedClusterStates Read( LocalJsonValue propIncompatibleDiffs = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCompatibleDiffs.TryReadProperty(ref reader, options, PropCompatibleDiffs, null)) + if (propCompatibleDiffs.TryReadProperty(ref reader, options, PropCompatibleDiffs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFullStates.TryReadProperty(ref reader, options, PropFullStates, null)) + if (propFullStates.TryReadProperty(ref reader, options, PropFullStates, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncompatibleDiffs.TryReadProperty(ref reader, options, PropIncompatibleDiffs, null)) + if (propIncompatibleDiffs.TryReadProperty(ref reader, options, PropIncompatibleDiffs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.PublishedClusterStates Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.PublishedClusterStates value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCompatibleDiffs, value.CompatibleDiffs, null, null); - writer.WriteProperty(options, PropFullStates, value.FullStates, null, null); - writer.WriteProperty(options, PropIncompatibleDiffs, value.IncompatibleDiffs, null, null); + writer.WriteProperty(options, PropCompatibleDiffs, value.CompatibleDiffs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFullStates, value.FullStates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncompatibleDiffs, value.IncompatibleDiffs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Recording.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Recording.g.cs index 7a891bf7acd..f03f394d653 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Recording.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Recording.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Recording Read(ref System.Te LocalJsonValue propName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCumulativeExecutionCount.TryReadProperty(ref reader, options, PropCumulativeExecutionCount, null)) + if (propCumulativeExecutionCount.TryReadProperty(ref reader, options, PropCumulativeExecutionCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Recording Read(ref System.Te continue; } - if (propCumulativeExecutionTimeMillis.TryReadProperty(ref reader, options, PropCumulativeExecutionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propCumulativeExecutionTimeMillis.TryReadProperty(ref reader, options, PropCumulativeExecutionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.Recording Read(ref System.Te public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.Recording value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCumulativeExecutionCount, value.CumulativeExecutionCount, null, null); + writer.WriteProperty(options, PropCumulativeExecutionCount, value.CumulativeExecutionCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCumulativeExecutionTime, value.CumulativeExecutionTime, null, null); - writer.WriteProperty(options, PropCumulativeExecutionTimeMillis, value.CumulativeExecutionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropCumulativeExecutionTimeMillis, value.CumulativeExecutionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RepositoryMeteringInformation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RepositoryMeteringInformation.g.cs index 90fa8ad9893..a62bda17cbf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RepositoryMeteringInformation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RepositoryMeteringInformation.g.cs @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.RepositoryMeteringInformatio continue; } - if (propClusterVersion.TryReadProperty(ref reader, options, PropClusterVersion, null)) + if (propClusterVersion.TryReadProperty(ref reader, options, PropClusterVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -79,7 +79,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.RepositoryMeteringInformatio continue; } - if (propRepositoryStoppedAt.TryReadProperty(ref reader, options, PropRepositoryStoppedAt, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propRepositoryStoppedAt.TryReadProperty(ref reader, options, PropRepositoryStoppedAt, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -122,12 +122,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropArchived, value.Archived, null, null); - writer.WriteProperty(options, PropClusterVersion, value.ClusterVersion, null, null); + writer.WriteProperty(options, PropClusterVersion, value.ClusterVersion, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRepositoryEphemeralId, value.RepositoryEphemeralId, null, null); writer.WriteProperty(options, PropRepositoryLocation, value.RepositoryLocation, null, null); writer.WriteProperty(options, PropRepositoryName, value.RepositoryName, null, null); writer.WriteProperty(options, PropRepositoryStartedAt, value.RepositoryStartedAt, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropRepositoryStoppedAt, value.RepositoryStoppedAt, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropRepositoryStoppedAt, value.RepositoryStoppedAt, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropRepositoryType, value.RepositoryType, null, null); writer.WriteProperty(options, PropRequestCounts, value.RequestCounts, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RequestCounts.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RequestCounts.g.cs index d848d96f017..da050da3403 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RequestCounts.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/RequestCounts.g.cs @@ -53,57 +53,57 @@ public override Elastic.Clients.Elasticsearch.Nodes.RequestCounts Read(ref Syste LocalJsonValue propPutObject = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propGetBlob.TryReadProperty(ref reader, options, PropGetBlob, null)) + if (propGetBlob.TryReadProperty(ref reader, options, PropGetBlob, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGetBlobProperties.TryReadProperty(ref reader, options, PropGetBlobProperties, null)) + if (propGetBlobProperties.TryReadProperty(ref reader, options, PropGetBlobProperties, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGetObject.TryReadProperty(ref reader, options, PropGetObject, null)) + if (propGetObject.TryReadProperty(ref reader, options, PropGetObject, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propInsertObject.TryReadProperty(ref reader, options, PropInsertObject, null)) + if (propInsertObject.TryReadProperty(ref reader, options, PropInsertObject, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propListBlobs.TryReadProperty(ref reader, options, PropListBlobs, null)) + if (propListBlobs.TryReadProperty(ref reader, options, PropListBlobs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propListObjects.TryReadProperty(ref reader, options, PropListObjects, null)) + if (propListObjects.TryReadProperty(ref reader, options, PropListObjects, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPutBlob.TryReadProperty(ref reader, options, PropPutBlob, null)) + if (propPutBlob.TryReadProperty(ref reader, options, PropPutBlob, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPutBlock.TryReadProperty(ref reader, options, PropPutBlock, null)) + if (propPutBlock.TryReadProperty(ref reader, options, PropPutBlock, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPutBlockList.TryReadProperty(ref reader, options, PropPutBlockList, null)) + if (propPutBlockList.TryReadProperty(ref reader, options, PropPutBlockList, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPutMultipartObject.TryReadProperty(ref reader, options, PropPutMultipartObject, null)) + if (propPutMultipartObject.TryReadProperty(ref reader, options, PropPutMultipartObject, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPutObject.TryReadProperty(ref reader, options, PropPutObject, null)) + if (propPutObject.TryReadProperty(ref reader, options, PropPutObject, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,17 +137,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.RequestCounts Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.RequestCounts value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropGetBlob, value.GetBlob, null, null); - writer.WriteProperty(options, PropGetBlobProperties, value.GetBlobProperties, null, null); - writer.WriteProperty(options, PropGetObject, value.GetObject, null, null); - writer.WriteProperty(options, PropInsertObject, value.InsertObject, null, null); - writer.WriteProperty(options, PropListBlobs, value.ListBlobs, null, null); - writer.WriteProperty(options, PropListObjects, value.ListObjects, null, null); - writer.WriteProperty(options, PropPutBlob, value.PutBlob, null, null); - writer.WriteProperty(options, PropPutBlock, value.PutBlock, null, null); - writer.WriteProperty(options, PropPutBlockList, value.PutBlockList, null, null); - writer.WriteProperty(options, PropPutMultipartObject, value.PutMultipartObject, null, null); - writer.WriteProperty(options, PropPutObject, value.PutObject, null, null); + writer.WriteProperty(options, PropGetBlob, value.GetBlob, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGetBlobProperties, value.GetBlobProperties, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGetObject, value.GetObject, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropInsertObject, value.InsertObject, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropListBlobs, value.ListBlobs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropListObjects, value.ListObjects, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPutBlob, value.PutBlob, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPutBlock, value.PutBlock, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPutBlockList, value.PutBlockList, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPutMultipartObject, value.PutMultipartObject, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPutObject, value.PutObject, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ScriptCache.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ScriptCache.g.cs index 28106c42c3b..19fcd1980e8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ScriptCache.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ScriptCache.g.cs @@ -39,17 +39,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.ScriptCache Read(ref System. LocalJsonValue propContext = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCacheEvictions.TryReadProperty(ref reader, options, PropCacheEvictions, null)) + if (propCacheEvictions.TryReadProperty(ref reader, options, PropCacheEvictions, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompilationLimitTriggered.TryReadProperty(ref reader, options, PropCompilationLimitTriggered, null)) + if (propCompilationLimitTriggered.TryReadProperty(ref reader, options, PropCompilationLimitTriggered, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompilations.TryReadProperty(ref reader, options, PropCompilations, null)) + if (propCompilations.TryReadProperty(ref reader, options, PropCompilations, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,9 +81,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.ScriptCache Read(ref System. public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.ScriptCache value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCacheEvictions, value.CacheEvictions, null, null); - writer.WriteProperty(options, PropCompilationLimitTriggered, value.CompilationLimitTriggered, null, null); - writer.WriteProperty(options, PropCompilations, value.Compilations, null, null); + writer.WriteProperty(options, PropCacheEvictions, value.CacheEvictions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompilationLimitTriggered, value.CompilationLimitTriggered, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompilations, value.Compilations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropContext, value.Context, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Scripting.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Scripting.g.cs index 66b7e7620b5..ed7ad48bff9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Scripting.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Scripting.g.cs @@ -41,17 +41,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.Scripting Read(ref System.Te LocalJsonValue?> propContexts = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCacheEvictions.TryReadProperty(ref reader, options, PropCacheEvictions, null)) + if (propCacheEvictions.TryReadProperty(ref reader, options, PropCacheEvictions, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompilationLimitTriggered.TryReadProperty(ref reader, options, PropCompilationLimitTriggered, null)) + if (propCompilationLimitTriggered.TryReadProperty(ref reader, options, PropCompilationLimitTriggered, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompilations.TryReadProperty(ref reader, options, PropCompilations, null)) + if (propCompilations.TryReadProperty(ref reader, options, PropCompilations, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,9 +89,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.Scripting Read(ref System.Te public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.Scripting value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCacheEvictions, value.CacheEvictions, null, null); - writer.WriteProperty(options, PropCompilationLimitTriggered, value.CompilationLimitTriggered, null, null); - writer.WriteProperty(options, PropCompilations, value.Compilations, null, null); + writer.WriteProperty(options, PropCacheEvictions, value.CacheEvictions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompilationLimitTriggered, value.CompilationLimitTriggered, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompilations, value.Compilations, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropCompilationsHistory, value.CompilationsHistory, 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, PropContexts, value.Contexts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection? v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SerializedClusterStateDetail.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SerializedClusterStateDetail.g.cs index 8ba51414af9..9738e5ea98c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SerializedClusterStateDetail.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SerializedClusterStateDetail.g.cs @@ -46,12 +46,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.SerializedClusterStateDetail continue; } - if (propCompressedSizeInBytes.TryReadProperty(ref reader, options, PropCompressedSizeInBytes, null)) + if (propCompressedSizeInBytes.TryReadProperty(ref reader, options, PropCompressedSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.SerializedClusterStateDetail continue; } - if (propUncompressedSizeInBytes.TryReadProperty(ref reader, options, PropUncompressedSizeInBytes, null)) + if (propUncompressedSizeInBytes.TryReadProperty(ref reader, options, PropUncompressedSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,10 +90,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCompressedSize, value.CompressedSize, null, null); - writer.WriteProperty(options, PropCompressedSizeInBytes, value.CompressedSizeInBytes, null, null); - writer.WriteProperty(options, PropCount, value.Count, null, null); + writer.WriteProperty(options, PropCompressedSizeInBytes, value.CompressedSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropUncompressedSize, value.UncompressedSize, null, null); - writer.WriteProperty(options, PropUncompressedSizeInBytes, value.UncompressedSizeInBytes, null, null); + writer.WriteProperty(options, PropUncompressedSizeInBytes, value.UncompressedSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SizeHttpHistogram.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SizeHttpHistogram.g.cs index 5299ab4a963..551b0fef31d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SizeHttpHistogram.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/SizeHttpHistogram.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.SizeHttpHistogram Read(ref S continue; } - if (propGeBytes.TryReadProperty(ref reader, options, PropGeBytes, null)) + if (propGeBytes.TryReadProperty(ref reader, options, PropGeBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLtBytes.TryReadProperty(ref reader, options, PropLtBytes, null)) + if (propLtBytes.TryReadProperty(ref reader, options, PropLtBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,8 +74,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropGeBytes, value.GeBytes, null, null); - writer.WriteProperty(options, PropLtBytes, value.LtBytes, null, null); + writer.WriteProperty(options, PropGeBytes, value.GeBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLtBytes, value.LtBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Stats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Stats.g.cs index b6186f43493..e60d4e8ca94 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Stats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Stats.g.cs @@ -170,7 +170,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Stats Read(ref System.Text.J continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, null)) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -244,7 +244,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteProperty(options, PropScriptCache, value.ScriptCache, 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.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null))); writer.WriteProperty(options, PropThreadPool, value.ThreadPool, 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, PropTimestamp, value.Timestamp, null, null); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTransport, value.Transport, null, null); writer.WriteProperty(options, PropTransportAddress, value.TransportAddress, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ThreadCount.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ThreadCount.g.cs index 9777c645bd0..625dfed042d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ThreadCount.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/ThreadCount.g.cs @@ -43,32 +43,32 @@ public override Elastic.Clients.Elasticsearch.Nodes.ThreadCount Read(ref System. LocalJsonValue propThreads = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propActive.TryReadProperty(ref reader, options, PropActive, null)) + if (propActive.TryReadProperty(ref reader, options, PropActive, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCompleted.TryReadProperty(ref reader, options, PropCompleted, null)) + if (propCompleted.TryReadProperty(ref reader, options, PropCompleted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLargest.TryReadProperty(ref reader, options, PropLargest, null)) + if (propLargest.TryReadProperty(ref reader, options, PropLargest, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propQueue.TryReadProperty(ref reader, options, PropQueue, null)) + if (propQueue.TryReadProperty(ref reader, options, PropQueue, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRejected.TryReadProperty(ref reader, options, PropRejected, null)) + if (propRejected.TryReadProperty(ref reader, options, PropRejected, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propThreads.TryReadProperty(ref reader, options, PropThreads, null)) + if (propThreads.TryReadProperty(ref reader, options, PropThreads, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.ThreadCount Read(ref System. public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.ThreadCount value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropActive, value.Active, null, null); - writer.WriteProperty(options, PropCompleted, value.Completed, null, null); - writer.WriteProperty(options, PropLargest, value.Largest, null, null); - writer.WriteProperty(options, PropQueue, value.Queue, null, null); - writer.WriteProperty(options, PropRejected, value.Rejected, null, null); - writer.WriteProperty(options, PropThreads, value.Threads, null, null); + writer.WriteProperty(options, PropActive, value.Active, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCompleted, value.Completed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLargest, value.Largest, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropQueue, value.Queue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRejected, value.Rejected, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropThreads, value.Threads, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TimeHttpHistogram.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TimeHttpHistogram.g.cs index 351c660c236..45de580dc9d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TimeHttpHistogram.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TimeHttpHistogram.g.cs @@ -42,12 +42,12 @@ public override Elastic.Clients.Elasticsearch.Nodes.TimeHttpHistogram Read(ref S continue; } - if (propGeMillis.TryReadProperty(ref reader, options, PropGeMillis, null)) + if (propGeMillis.TryReadProperty(ref reader, options, PropGeMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLtMillis.TryReadProperty(ref reader, options, PropLtMillis, null)) + if (propLtMillis.TryReadProperty(ref reader, options, PropLtMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,8 +74,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropGeMillis, value.GeMillis, null, null); - writer.WriteProperty(options, PropLtMillis, value.LtMillis, null, null); + writer.WriteProperty(options, PropGeMillis, value.GeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLtMillis, value.LtMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Transport.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Transport.g.cs index 720ab418ac9..bfc005aa806 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Transport.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/Transport.g.cs @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Transport Read(ref System.Te continue; } - if (propRxCount.TryReadProperty(ref reader, options, PropRxCount, null)) + if (propRxCount.TryReadProperty(ref reader, options, PropRxCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,22 +71,22 @@ public override Elastic.Clients.Elasticsearch.Nodes.Transport Read(ref System.Te continue; } - if (propRxSizeInBytes.TryReadProperty(ref reader, options, PropRxSizeInBytes, null)) + if (propRxSizeInBytes.TryReadProperty(ref reader, options, PropRxSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propServerOpen.TryReadProperty(ref reader, options, PropServerOpen, null)) + if (propServerOpen.TryReadProperty(ref reader, options, PropServerOpen, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalOutboundConnections.TryReadProperty(ref reader, options, PropTotalOutboundConnections, null)) + if (propTotalOutboundConnections.TryReadProperty(ref reader, options, PropTotalOutboundConnections, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTxCount.TryReadProperty(ref reader, options, PropTxCount, null)) + if (propTxCount.TryReadProperty(ref reader, options, PropTxCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.Nodes.Transport Read(ref System.Te continue; } - if (propTxSizeInBytes.TryReadProperty(ref reader, options, PropTxSizeInBytes, null)) + if (propTxSizeInBytes.TryReadProperty(ref reader, options, PropTxSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -131,14 +131,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropInboundHandlingTimeHistogram, value.InboundHandlingTimeHistogram, 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, PropOutboundHandlingTimeHistogram, value.OutboundHandlingTimeHistogram, 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, PropRxCount, value.RxCount, null, null); + writer.WriteProperty(options, PropRxCount, value.RxCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRxSize, value.RxSize, null, null); - writer.WriteProperty(options, PropRxSizeInBytes, value.RxSizeInBytes, null, null); - writer.WriteProperty(options, PropServerOpen, value.ServerOpen, null, null); - writer.WriteProperty(options, PropTotalOutboundConnections, value.TotalOutboundConnections, null, null); - writer.WriteProperty(options, PropTxCount, value.TxCount, null, null); + writer.WriteProperty(options, PropRxSizeInBytes, value.RxSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropServerOpen, value.ServerOpen, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalOutboundConnections, value.TotalOutboundConnections, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTxCount, value.TxCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTxSize, value.TxSize, null, null); - writer.WriteProperty(options, PropTxSizeInBytes, value.TxSizeInBytes, null, null); + writer.WriteProperty(options, PropTxSizeInBytes, value.TxSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TransportHistogram.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TransportHistogram.g.cs index 50ce61703a3..37a75605f59 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TransportHistogram.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Nodes/TransportHistogram.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Nodes.TransportHistogram Read(ref LocalJsonValue propLtMillis = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propGeMillis.TryReadProperty(ref reader, options, PropGeMillis, null)) + if (propGeMillis.TryReadProperty(ref reader, options, PropGeMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLtMillis.TryReadProperty(ref reader, options, PropLtMillis, null)) + if (propLtMillis.TryReadProperty(ref reader, options, PropLtMillis, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Nodes.TransportHistogram Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Nodes.TransportHistogram value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropGeMillis, value.GeMillis, null, null); - writer.WriteProperty(options, PropLtMillis, value.LtMillis, null, null); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropGeMillis, value.GeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLtMillis, value.LtMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/PinnedRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/PinnedRetriever.g.cs new file mode 100644 index 00000000000..9965dae9577 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/PinnedRetriever.g.cs @@ -0,0 +1,518 @@ +// 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; + +internal sealed partial class PinnedRetrieverConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropDocs = System.Text.Json.JsonEncodedText.Encode("docs"); + private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); + private static readonly System.Text.Json.JsonEncodedText PropIds = System.Text.Json.JsonEncodedText.Encode("ids"); + private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); + private static readonly System.Text.Json.JsonEncodedText PropRankWindowSize = System.Text.Json.JsonEncodedText.Encode("rank_window_size"); + private static readonly System.Text.Json.JsonEncodedText PropRetriever = System.Text.Json.JsonEncodedText.Encode("retriever"); + + public override Elastic.Clients.Elasticsearch.PinnedRetriever Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue?> propDocs = default; + LocalJsonValue?> propFilter = default; + LocalJsonValue?> propIds = default; + LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; + LocalJsonValue propRankWindowSize = default; + LocalJsonValue propRetriever = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propDocs.TryReadProperty(ref reader, options, PropDocs, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) + { + continue; + } + + if (propFilter.TryReadProperty(ref reader, options, PropFilter, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null))) + { + continue; + } + + if (propIds.TryReadProperty(ref reader, options, PropIds, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null))) + { + continue; + } + + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propName.TryReadProperty(ref reader, options, PropName, null)) + { + continue; + } + + if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, null)) + { + continue; + } + + if (propRetriever.TryReadProperty(ref reader, options, PropRetriever, 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.PinnedRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Docs = propDocs.Value, + Filter = propFilter.Value, + Ids = propIds.Value, + MinScore = propMinScore.Value, + Name = propName.Value, + RankWindowSize = propRankWindowSize.Value, + Retriever = propRetriever.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.PinnedRetriever value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropDocs, value.Docs, 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, PropFilter, value.Filter, 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, PropIds, value.Ids, 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, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); + writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, null); + writer.WriteProperty(options, PropRetriever, value.Retriever, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.PinnedRetrieverConverter))] +public sealed partial class PinnedRetriever +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PinnedRetriever(int rankWindowSize, Elastic.Clients.Elasticsearch.Retriever retriever) + { + RankWindowSize = rankWindowSize; + Retriever = retriever; + } +#if NET7_0_OR_GREATER + public PinnedRetriever() + { + } +#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 PinnedRetriever() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal PinnedRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public System.Collections.Generic.ICollection? Docs { get; set; } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public System.Collections.Generic.ICollection? Filter { get; set; } + public System.Collections.Generic.ICollection? Ids { get; set; } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public float? MinScore { get; set; } + + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + int RankWindowSize { get; set; } + + /// + /// + /// Inner retriever. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Retriever Retriever { get; set; } +} + +public readonly partial struct PinnedRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.PinnedRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PinnedRetrieverDescriptor(Elastic.Clients.Elasticsearch.PinnedRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PinnedRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.PinnedRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor(Elastic.Clients.Elasticsearch.PinnedRetriever instance) => new Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.PinnedRetriever(Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Docs(System.Collections.Generic.ICollection? value) + { + Instance.Docs = value; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Docs(params Elastic.Clients.Elasticsearch.SpecifiedDocument[] values) + { + Instance.Docs = [.. values]; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Docs(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor.Build(action)); + } + + Instance.Docs = items; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Filter(System.Collections.Generic.ICollection? value) + { + Instance.Filter = value; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Filter(params Elastic.Clients.Elasticsearch.QueryDsl.Query[] values) + { + Instance.Filter = [.. values]; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Filter(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Ids(System.Collections.Generic.ICollection? value) + { + Instance.Ids = value; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Ids(params string[] values) + { + Instance.Ids = [.. values]; + return this; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor MinScore(float? value) + { + Instance.MinScore = value; + return this; + } + + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor RankWindowSize(int value) + { + Instance.RankWindowSize = value; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever value) + { + Instance.Retriever = value; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Retriever(System.Action> action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.PinnedRetriever Build(System.Action> action) + { + var builder = new Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor(new Elastic.Clients.Elasticsearch.PinnedRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} + +public readonly partial struct PinnedRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.PinnedRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PinnedRetrieverDescriptor(Elastic.Clients.Elasticsearch.PinnedRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public PinnedRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.PinnedRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor(Elastic.Clients.Elasticsearch.PinnedRetriever instance) => new Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.PinnedRetriever(Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Docs(System.Collections.Generic.ICollection? value) + { + Instance.Docs = value; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Docs(params Elastic.Clients.Elasticsearch.SpecifiedDocument[] values) + { + Instance.Docs = [.. values]; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Docs(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor.Build(action)); + } + + Instance.Docs = items; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Filter(System.Collections.Generic.ICollection? value) + { + Instance.Filter = value; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Filter(params Elastic.Clients.Elasticsearch.QueryDsl.Query[] values) + { + Instance.Filter = [.. values]; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Filter(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Filter(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Ids(System.Collections.Generic.ICollection? value) + { + Instance.Ids = value; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Ids(params string[] values) + { + Instance.Ids = [.. values]; + return this; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor MinScore(float? value) + { + Instance.MinScore = value; + return this; + } + + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor RankWindowSize(int value) + { + Instance.RankWindowSize = value; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever value) + { + Instance.Retriever = value; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Retriever(System.Action action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor Retriever(System.Action> action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.PinnedRetriever Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor(new Elastic.Clients.Elasticsearch.PinnedRetriever(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/QueryDsl/BoolQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoolQuery.g.cs index 71659109a87..e0e7a056521 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoolQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoolQuery.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.BoolQuery Read(ref System LocalJsonValue?> propShould = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,7 +105,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.BoolQuery Read(ref System public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.BoolQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, 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, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); writer.WriteProperty(options, PropMust, value.Must, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoostingQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoostingQuery.g.cs index cd734f376ac..67bb4c61875 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoostingQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/BoostingQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.BoostingQuery Read(ref Sy LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.BoostingQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.BoostingQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNegative, value.Negative, null, null); writer.WriteProperty(options, PropNegativeBoost, value.NegativeBoost, null, null); writer.WriteProperty(options, PropPositive, value.Positive, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs index 3df02392259..2f572c51fb7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CombinedFieldsQuery.g.cs @@ -47,12 +47,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsQuery Read( LocalJsonValue propZeroTermsQuery = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, null)) + if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsQuery Read( continue; } - if (propOperator.TryReadProperty(ref reader, options, PropOperator, null)) + if (propOperator.TryReadProperty(ref reader, options, PropOperator, static Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsOperator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsQuery Read( continue; } - if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, null)) + if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, static Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsZeroTerms? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,14 +113,14 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsQuery Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); - writer.WriteProperty(options, PropOperator, value.Operator, null, null); + writer.WriteProperty(options, PropOperator, value.Operator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsOperator? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, null); + writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.CombinedFieldsZeroTerms? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CommonTermsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CommonTermsQuery.g.cs index e1516f81024..a77381fb3ac 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CommonTermsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/CommonTermsQuery.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.CommonTermsQuery Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -68,22 +68,22 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.CommonTermsQuery Read(ref continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCutoffFrequency.TryReadProperty(ref reader, options, PropCutoffFrequency, null)) + if (propCutoffFrequency.TryReadProperty(ref reader, options, PropCutoffFrequency, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHighFreqOperator.TryReadProperty(ref reader, options, PropHighFreqOperator, null)) + if (propHighFreqOperator.TryReadProperty(ref reader, options, PropHighFreqOperator, static Elastic.Clients.Elasticsearch.QueryDsl.Operator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLowFreqOperator.TryReadProperty(ref reader, options, PropLowFreqOperator, null)) + if (propLowFreqOperator.TryReadProperty(ref reader, options, PropLowFreqOperator, static Elastic.Clients.Elasticsearch.QueryDsl.Operator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,13 +132,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.CommonTermsQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.CommonTermsQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCutoffFrequency, value.CutoffFrequency, null, null); - writer.WriteProperty(options, PropHighFreqOperator, value.HighFreqOperator, null, null); - writer.WriteProperty(options, PropLowFreqOperator, value.LowFreqOperator, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCutoffFrequency, value.CutoffFrequency, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHighFreqOperator, value.HighFreqOperator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.Operator? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLowFreqOperator, value.LowFreqOperator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.Operator? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs index 165fc90fdf5..b06657d7a0b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ConstantScoreQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ConstantScoreQuery Read(r LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ConstantScoreQuery Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.ConstantScoreQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFilter, value.Filter, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDecayFunction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDecayFunction.g.cs index 159f96c5fea..125aa2752de 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDecayFunction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDecayFunction.g.cs @@ -35,13 +35,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateDecayFunction Read(re LocalJsonValue> propPlacement = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, null)) + if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, static Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propPlacement.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propPlacement.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propPlacement.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -56,8 +56,8 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateDecayFunction Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.DateDecayFunction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, null); - writer.WriteProperty(options, value.Field, value.Placement, null, null); + writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.Placement, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDistanceFeatureQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDistanceFeatureQuery.g.cs index f162df44c42..68a013d6b0a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDistanceFeatureQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateDistanceFeatureQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateDistanceFeatureQuery LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateDistanceFeatureQuery public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.DateDistanceFeatureQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropOrigin, value.Origin, null, null); writer.WriteProperty(options, PropPivot, value.Pivot, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateRangeQuery.g.cs index 2a390e134a5..80307865fed 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateRangeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DateRangeQuery.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQuery Read(ref S reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQuery Read(ref S LocalJsonValue propTo = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,7 +98,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQuery Read(ref S continue; } - if (propRelation.TryReadProperty(ref reader, options, PropRelation, null)) + if (propRelation.TryReadProperty(ref reader, options, PropRelation, static Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,9 +145,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQuery Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.DateRangeQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropFrom, value.From, null, null); writer.WriteProperty(options, PropGt, value.Gt, null, null); @@ -155,7 +155,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropLt, value.Lt, null, null); writer.WriteProperty(options, PropLte, value.Lte, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropRelation, value.Relation, null, null); + writer.WriteProperty(options, PropRelation, value.Relation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeZone, value.TimeZone, null, null); writer.WriteProperty(options, PropTo, value.To, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DecayPlacement.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DecayPlacement.g.cs index af918efeb5c..4133b60f5a3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DecayPlacement.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DecayPlacement.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DecayPlacement propScale = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDecay.TryReadProperty(ref reader, options, PropDecay, null)) + if (propDecay.TryReadProperty(ref reader, options, PropDecay, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DecayPlacement value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDecay, value.Decay, null, null); + writer.WriteProperty(options, PropDecay, value.Decay, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOffset, value.Offset, null, null); writer.WriteProperty(options, PropOrigin, value.Origin, null, null); writer.WriteProperty(options, PropScale, value.Scale, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DisMaxQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DisMaxQuery.g.cs index 2d406ab452b..2848148f7f5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DisMaxQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/DisMaxQuery.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DisMaxQuery Read(ref Syst LocalJsonValue propTieBreaker = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DisMaxQuery Read(ref Syst continue; } - if (propTieBreaker.TryReadProperty(ref reader, options, PropTieBreaker, null)) + if (propTieBreaker.TryReadProperty(ref reader, options, PropTieBreaker, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.DisMaxQuery Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.DisMaxQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueries, value.Queries, 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, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropTieBreaker, value.TieBreaker, null, null); + writer.WriteProperty(options, PropTieBreaker, value.TieBreaker, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ExistsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ExistsQuery.g.cs index fca370f3210..219b773ecc9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ExistsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ExistsQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ExistsQuery Read(ref Syst LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ExistsQuery Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.ExistsQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldAndFormat.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldAndFormat.g.cs index 120f097efd6..a7fe4e55f5d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldAndFormat.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldAndFormat.g.cs @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FieldAndFormat Read(ref S continue; } - if (propIncludeUnmapped.TryReadProperty(ref reader, options, PropIncludeUnmapped, null)) + if (propIncludeUnmapped.TryReadProperty(ref reader, options, PropIncludeUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropFormat, value.Format, null, null); - writer.WriteProperty(options, PropIncludeUnmapped, value.IncludeUnmapped, null, null); + writer.WriteProperty(options, PropIncludeUnmapped, value.IncludeUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldValueFactorScoreFunction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldValueFactorScoreFunction.g.cs index 2e81ddb14c6..0e528752056 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldValueFactorScoreFunction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FieldValueFactorScoreFunction.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FieldValueFactorScoreFunc LocalJsonValue propModifier = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFactor.TryReadProperty(ref reader, options, PropFactor, null)) + if (propFactor.TryReadProperty(ref reader, options, PropFactor, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FieldValueFactorScoreFunc continue; } - if (propMissing.TryReadProperty(ref reader, options, PropMissing, null)) + if (propMissing.TryReadProperty(ref reader, options, PropMissing, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propModifier.TryReadProperty(ref reader, options, PropModifier, null)) + if (propModifier.TryReadProperty(ref reader, options, PropModifier, static Elastic.Clients.Elasticsearch.QueryDsl.FieldValueFactorModifier? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FieldValueFactorScoreFunc public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.FieldValueFactorScoreFunction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFactor, value.Factor, null, null); + writer.WriteProperty(options, PropFactor, value.Factor, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropMissing, value.Missing, null, null); - writer.WriteProperty(options, PropModifier, value.Modifier, null, null); + writer.WriteProperty(options, PropMissing, value.Missing, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropModifier, value.Modifier, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.FieldValueFactorModifier? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScore.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScore.g.cs index a6852e96464..b99f5e030a5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScore.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScore.g.cs @@ -48,7 +48,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FunctionScore Read(ref Sy continue; } - if (propWeight.TryReadProperty(ref reader, options, PropWeight, null)) + if (propWeight.TryReadProperty(ref reader, options, PropWeight, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -150,7 +150,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien } writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropWeight, value.Weight, null, null); + writer.WriteProperty(options, PropWeight, value.Weight, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs index 534056a0ae0..b13b0aa8f2d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FunctionScoreQuery.g.cs @@ -56,12 +56,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreQuery Read(r LocalJsonValue propScoreMode = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoostMode.TryReadProperty(ref reader, options, PropBoostMode, null)) + if (propBoostMode.TryReadProperty(ref reader, options, PropBoostMode, static Elastic.Clients.Elasticsearch.QueryDsl.FunctionBoostMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -71,12 +71,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreQuery Read(r continue; } - if (propMaxBoost.TryReadProperty(ref reader, options, PropMaxBoost, null)) + if (propMaxBoost.TryReadProperty(ref reader, options, PropMaxBoost, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreQuery Read(r continue; } - if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, null)) + if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, static Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -122,14 +122,14 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreQuery Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropBoostMode, value.BoostMode, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoostMode, value.BoostMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.FunctionBoostMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFunctions, value.Functions, 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, PropMaxBoost, value.MaxBoost, null, null); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); + writer.WriteProperty(options, PropMaxBoost, value.MaxBoost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, null); + writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.FunctionScoreMode? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FuzzyQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FuzzyQuery.g.cs index 308cc716ea6..0b948e3f06b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FuzzyQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/FuzzyQuery.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FuzzyQuery Read(ref Syste reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FuzzyQuery Read(ref Syste LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,12 +73,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FuzzyQuery Read(ref Syste continue; } - if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, null)) + if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FuzzyQuery Read(ref Syste continue; } - if (propTranspositions.TryReadProperty(ref reader, options, PropTranspositions, null)) + if (propTranspositions.TryReadProperty(ref reader, options, PropTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -132,15 +132,15 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.FuzzyQuery Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.FuzzyQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFuzziness, value.Fuzziness, null, null); - writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); + writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropRewrite, value.Rewrite, null, null); - writer.WriteProperty(options, PropTranspositions, value.Transpositions, null, null); + writer.WriteProperty(options, PropTranspositions, value.Transpositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropValue, value.Value, null, null); writer.WriteEndObject(); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs index 1c7a81df2da..2f48cc2e270 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoBoundingBoxQuery.g.cs @@ -43,12 +43,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoBoundingBoxQuery Read( LocalJsonValue propValidationMethod = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -58,18 +58,18 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoBoundingBoxQuery Read( continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.QueryDsl.GeoExecution? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propValidationMethod.TryReadProperty(ref reader, options, PropValidationMethod, null)) + if (propValidationMethod.TryReadProperty(ref reader, options, PropValidationMethod, static Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propBoundingBox.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propBoundingBox.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propBoundingBox.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -91,15 +91,15 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoBoundingBoxQuery Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.GeoBoundingBoxQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); #pragma warning disable CS0618 - writer.WriteProperty(options, PropType, value.Type, null, null) + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.GeoExecution? v) => w.WriteNullableValue(o, v)) #pragma warning restore CS0618 ; - writer.WriteProperty(options, PropValidationMethod, value.ValidationMethod, null, null); - writer.WriteProperty(options, value.Field, value.BoundingBox, null, null); + writer.WriteProperty(options, PropValidationMethod, value.ValidationMethod, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.BoundingBox, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDecayFunction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDecayFunction.g.cs index ef268d2083f..15f01f80bc5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDecayFunction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDecayFunction.g.cs @@ -35,13 +35,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDecayFunction Read(ref LocalJsonValue> propPlacement = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, null)) + if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, static Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propPlacement.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propPlacement.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propPlacement.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -56,8 +56,8 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDecayFunction Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.GeoDecayFunction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, null); - writer.WriteProperty(options, value.Field, value.Placement, null, null); + writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.Placement, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceFeatureQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceFeatureQuery.g.cs index b964d97488c..212498d56e9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceFeatureQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceFeatureQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceFeatureQuery R LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceFeatureQuery R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceFeatureQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropOrigin, value.Origin, null, null); writer.WriteProperty(options, PropPivot, value.Pivot, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs index c0a3fe2a67f..274237a9002 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoDistanceQuery.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceQuery Read(ref LocalJsonValue propValidationMethod = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -55,12 +55,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceQuery Read(ref continue; } - if (propDistanceType.TryReadProperty(ref reader, options, PropDistanceType, null)) + if (propDistanceType.TryReadProperty(ref reader, options, PropDistanceType, static Elastic.Clients.Elasticsearch.GeoDistanceType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -70,13 +70,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceQuery Read(ref continue; } - if (propValidationMethod.TryReadProperty(ref reader, options, PropValidationMethod, null)) + if (propValidationMethod.TryReadProperty(ref reader, options, PropValidationMethod, static Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propLocation.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propLocation.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propLocation.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -96,13 +96,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.GeoDistanceQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDistance, value.Distance, null, null); - writer.WriteProperty(options, PropDistanceType, value.DistanceType, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropDistanceType, value.DistanceType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.GeoDistanceType? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropValidationMethod, value.ValidationMethod, null, null); - writer.WriteProperty(options, value.Field, value.Location, null, null); + writer.WriteProperty(options, PropValidationMethod, value.ValidationMethod, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.Location, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoGridQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoGridQuery.g.cs index 01c6ddebd99..dd0ff42e2fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoGridQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoGridQuery.g.cs @@ -27,16 +27,16 @@ internal sealed partial class GeoGridQueryConverter : System.Text.Json.Serializa { 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 VariantGeogrid = System.Text.Json.JsonEncodedText.Encode("geogrid"); private static readonly System.Text.Json.JsonEncodedText VariantGeohash = System.Text.Json.JsonEncodedText.Encode("geohash"); private static readonly System.Text.Json.JsonEncodedText VariantGeohex = System.Text.Json.JsonEncodedText.Encode("geohex"); + private static readonly System.Text.Json.JsonEncodedText VariantGeotile = System.Text.Json.JsonEncodedText.Encode("geotile"); public override Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery Read(ref Sys object? variant = null; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -55,25 +55,25 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery Read(ref Sys continue; } - if (reader.ValueTextEquals(VariantGeogrid)) + if (reader.ValueTextEquals(VariantGeohash)) { - variantType = VariantGeogrid.Value; + variantType = VariantGeohash.Value; reader.Read(); variant = reader.ReadValue(options, null); continue; } - if (reader.ValueTextEquals(VariantGeohash)) + if (reader.ValueTextEquals(VariantGeohex)) { - variantType = VariantGeohash.Value; + variantType = VariantGeohex.Value; reader.Read(); variant = reader.ReadValue(options, null); continue; } - if (reader.ValueTextEquals(VariantGeohex)) + if (reader.ValueTextEquals(VariantGeotile)) { - variantType = VariantGeohex.Value; + variantType = VariantGeotile.Value; reader.Read(); variant = reader.ReadValue(options, null); continue; @@ -104,26 +104,26 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); switch (value.VariantType) { case null: break; - case "geogrid": - writer.WriteProperty(options, value.VariantType, (string)value.Variant, null, null); - break; case "geohash": writer.WriteProperty(options, value.VariantType, (string)value.Variant, null, null); break; case "geohex": writer.WriteProperty(options, value.VariantType, (string)value.Variant, null, null); break; + case "geotile": + writer.WriteProperty(options, value.VariantType, (string)value.Variant, null, null); + break; default: throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery)}'."); } - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); writer.WriteEndObject(); @@ -152,9 +152,9 @@ internal GeoGridQuery(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo _ = sentinel; } - public string? Geogrid { get => GetVariant("geogrid"); set => SetVariant("geogrid", value); } public string? Geohash { get => GetVariant("geohash"); set => SetVariant("geohash", value); } public string? Geohex { get => GetVariant("geohex"); set => SetVariant("geohex", value); } + public string? Geotile { get => GetVariant("geotile"); set => SetVariant("geotile", value); } /// /// @@ -210,12 +210,6 @@ public GeoGridQueryDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery instance) => new Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery(Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor descriptor) => descriptor.Instance; - public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor Geogrid(string? value) - { - Instance.Geogrid = value; - return this; - } - public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor Geohash(string? value) { Instance.Geohash = value; @@ -228,6 +222,12 @@ public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor return this; } + public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor Geotile(string? value) + { + Instance.Geotile = value; + return this; + } + /// /// /// Floating point number used to decrease or increase the relevance scores of the query. @@ -288,12 +288,6 @@ public GeoGridQueryDescriptor() public static explicit operator Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery instance) => new Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor(instance); public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQuery(Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor descriptor) => descriptor.Instance; - public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor Geogrid(string? value) - { - Instance.Geogrid = value; - return this; - } - public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor Geohash(string? value) { Instance.Geohash = value; @@ -306,6 +300,12 @@ public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor Geohex(stri return this; } + public Elastic.Clients.Elasticsearch.QueryDsl.GeoGridQueryDescriptor Geotile(string? value) + { + Instance.Geotile = value; + return this; + } + /// /// /// Floating point number used to decrease or increase the relevance scores of the query. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs index 2fd1cef7711..e12525ae916 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoPolygonQuery.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoPolygonQuery Read(ref LocalJsonValue propValidationMethod = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,13 +56,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoPolygonQuery Read(ref continue; } - if (propValidationMethod.TryReadProperty(ref reader, options, PropValidationMethod, null)) + if (propValidationMethod.TryReadProperty(ref reader, options, PropValidationMethod, static Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propPolygon.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propPolygon.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propPolygon.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -80,11 +80,11 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoPolygonQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.GeoPolygonQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropValidationMethod, value.ValidationMethod, null, null); - writer.WriteProperty(options, value.Field, value.Polygon, null, null); + writer.WriteProperty(options, PropValidationMethod, value.ValidationMethod, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.GeoValidationMethod? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.Polygon, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeFieldQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeFieldQuery.g.cs index 06458d927c8..b3be8a764b5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeFieldQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeFieldQuery.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoShapeFieldQuery Read(r continue; } - if (propRelation.TryReadProperty(ref reader, options, PropRelation, null)) + if (propRelation.TryReadProperty(ref reader, options, PropRelation, static Elastic.Clients.Elasticsearch.GeoShapeRelation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropIndexedShape, value.IndexedShape, null, null); - writer.WriteProperty(options, PropRelation, value.Relation, null, null); + writer.WriteProperty(options, PropRelation, value.Relation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.GeoShapeRelation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShape, value.Shape, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeQuery.g.cs index 2e381d444b6..50463b4fba6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/GeoShapeQuery.g.cs @@ -39,12 +39,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoShapeQuery Read(ref Sy LocalJsonValue propShape = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoShapeQuery Read(ref Sy } propField.Initialized = propShape.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propShape.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propShape.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -72,10 +72,10 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.GeoShapeQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.GeoShapeQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, value.Field, value.Shape, null, null); + writer.WriteProperty(options, value.Field, value.Shape, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs index 27ecb9b868a..bc096a2aad6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasChildQuery.g.cs @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.HasChildQuery Read(ref Sy LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -64,12 +64,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.HasChildQuery Read(ref Sy continue; } - if (propMaxChildren.TryReadProperty(ref reader, options, PropMaxChildren, null)) + if (propMaxChildren.TryReadProperty(ref reader, options, PropMaxChildren, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinChildren.TryReadProperty(ref reader, options, PropMinChildren, null)) + if (propMinChildren.TryReadProperty(ref reader, options, PropMinChildren, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -84,7 +84,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.HasChildQuery Read(ref Sy continue; } - if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, null)) + if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, static Elastic.Clients.Elasticsearch.QueryDsl.ChildScoreMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,14 +121,14 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.HasChildQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.HasChildQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInnerHits, value.InnerHits, null, null); - writer.WriteProperty(options, PropMaxChildren, value.MaxChildren, null, null); - writer.WriteProperty(options, PropMinChildren, value.MinChildren, null, null); + writer.WriteProperty(options, PropMaxChildren, value.MaxChildren, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinChildren, value.MinChildren, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, null); + writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.ChildScoreMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs index 22ea3783d2c..221211aac73 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/HasParentQuery.g.cs @@ -45,12 +45,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.HasParentQuery Read(ref S LocalJsonValue propScore = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.HasParentQuery Read(ref S continue; } - if (propScore.TryReadProperty(ref reader, options, PropScore, null)) + if (propScore.TryReadProperty(ref reader, options, PropScore, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,13 +105,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.HasParentQuery Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.HasParentQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInnerHits, value.InnerHits, null, null); writer.WriteProperty(options, PropParentType, value.ParentType, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropScore, value.Score, null, null); + writer.WriteProperty(options, PropScore, value.Score, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IdsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IdsQuery.g.cs index 245fe27b1cd..dd835401562 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IdsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IdsQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IdsQuery Read(ref System. LocalJsonValue propValues = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IdsQuery Read(ref System. public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.IdsQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropValues, value.Values, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Intervals.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Intervals.g.cs index 8dab9b80ef0..a41ca652cd0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Intervals.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/Intervals.g.cs @@ -30,6 +30,8 @@ internal sealed partial class IntervalsConverter : System.Text.Json.Serializatio private static readonly System.Text.Json.JsonEncodedText VariantFuzzy = System.Text.Json.JsonEncodedText.Encode("fuzzy"); private static readonly System.Text.Json.JsonEncodedText VariantMatch = System.Text.Json.JsonEncodedText.Encode("match"); private static readonly System.Text.Json.JsonEncodedText VariantPrefix = System.Text.Json.JsonEncodedText.Encode("prefix"); + private static readonly System.Text.Json.JsonEncodedText VariantRange = System.Text.Json.JsonEncodedText.Encode("range"); + private static readonly System.Text.Json.JsonEncodedText VariantRegexp = System.Text.Json.JsonEncodedText.Encode("regexp"); private static readonly System.Text.Json.JsonEncodedText VariantWildcard = System.Text.Json.JsonEncodedText.Encode("wildcard"); public override Elastic.Clients.Elasticsearch.QueryDsl.Intervals Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) @@ -79,6 +81,22 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.Intervals Read(ref System continue; } + if (reader.ValueTextEquals(VariantRange)) + { + variantType = VariantRange.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + + if (reader.ValueTextEquals(VariantRegexp)) + { + variantType = VariantRegexp.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + if (reader.ValueTextEquals(VariantWildcard)) { variantType = VariantWildcard.Value; @@ -126,6 +144,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien case "prefix": writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsPrefix)value.Variant, null, null); break; + case "range": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange)value.Variant, null, null); + break; + case "regexp": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp)value.Variant, null, null); + break; case "wildcard": writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsWildcard)value.Variant, null, null); break; @@ -192,6 +216,8 @@ internal Intervals(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSe /// /// public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsPrefix? Prefix { get => GetVariant("prefix"); set => SetVariant("prefix", value); } + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange? Range { get => GetVariant("range"); set => SetVariant("range", value); } + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp? Regexp { get => GetVariant("regexp"); set => SetVariant("regexp", value); } /// /// @@ -205,6 +231,8 @@ internal Intervals(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSe public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.Intervals(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFuzzy value) => new Elastic.Clients.Elasticsearch.QueryDsl.Intervals { Fuzzy = value }; public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.Intervals(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsMatch value) => new Elastic.Clients.Elasticsearch.QueryDsl.Intervals { Match = value }; public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.Intervals(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsPrefix value) => new Elastic.Clients.Elasticsearch.QueryDsl.Intervals { Prefix = value }; + public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.Intervals(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange value) => new Elastic.Clients.Elasticsearch.QueryDsl.Intervals { Range = value }; + public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.Intervals(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp value) => new Elastic.Clients.Elasticsearch.QueryDsl.Intervals { Regexp = value }; public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.Intervals(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsWildcard value) => new Elastic.Clients.Elasticsearch.QueryDsl.Intervals { Wildcard = value }; [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] @@ -355,6 +383,36 @@ public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Pre return this; } + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Range(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange? value) + { + Instance.Range = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Range() + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(null); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Range(System.Action>? action) + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Regexp(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp? value) + { + Instance.Regexp = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Regexp(System.Action> action) + { + Instance.Regexp = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor.Build(action); + return this; + } + /// /// /// Matches terms using a wildcard pattern. @@ -570,6 +628,48 @@ public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Prefix(Syst return this; } + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Range(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange? value) + { + Instance.Range = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Range() + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(null); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Range(System.Action? action) + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Range(System.Action>? action) + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Regexp(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp? value) + { + Instance.Regexp = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Regexp(System.Action action) + { + Instance.Regexp = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsDescriptor Regexp(System.Action> action) + { + Instance.Regexp = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor.Build(action); + return this; + } + /// /// /// Matches terms using a wildcard pattern. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs index 32c726ec3a1..f1dc1fb023f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsAllOf.g.cs @@ -49,12 +49,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsAllOf Read(ref S continue; } - if (propMaxGaps.TryReadProperty(ref reader, options, PropMaxGaps, null)) + if (propMaxGaps.TryReadProperty(ref reader, options, PropMaxGaps, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrdered.TryReadProperty(ref reader, options, PropOrdered, null)) + if (propOrdered.TryReadProperty(ref reader, options, PropOrdered, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,8 +83,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFilter, value.Filter, null, null); writer.WriteProperty(options, PropIntervals, value.Intervals, 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, PropMaxGaps, value.MaxGaps, null, null); - writer.WriteProperty(options, PropOrdered, value.Ordered, null, null); + writer.WriteProperty(options, PropMaxGaps, value.MaxGaps, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrdered, value.Ordered, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsFuzzy.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsFuzzy.g.cs index dca4c85cd89..72a3f510a05 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsFuzzy.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsFuzzy.g.cs @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFuzzy Read(ref S continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -63,7 +63,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsFuzzy Read(ref S continue; } - if (propTranspositions.TryReadProperty(ref reader, options, PropTranspositions, null)) + if (propTranspositions.TryReadProperty(ref reader, options, PropTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,9 +99,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); writer.WriteProperty(options, PropFuzziness, value.Fuzziness, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTerm, value.Term, null, null); - writer.WriteProperty(options, PropTranspositions, value.Transpositions, null, null); + writer.WriteProperty(options, PropTranspositions, value.Transpositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropUseField, value.UseField, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsMatch.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsMatch.g.cs index 800a6c26a73..d7f656a56f3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsMatch.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsMatch.g.cs @@ -53,12 +53,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsMatch Read(ref S continue; } - if (propMaxGaps.TryReadProperty(ref reader, options, PropMaxGaps, null)) + if (propMaxGaps.TryReadProperty(ref reader, options, PropMaxGaps, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOrdered.TryReadProperty(ref reader, options, PropOrdered, null)) + if (propOrdered.TryReadProperty(ref reader, options, PropOrdered, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,8 +99,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); writer.WriteProperty(options, PropFilter, value.Filter, null, null); - writer.WriteProperty(options, PropMaxGaps, value.MaxGaps, null, null); - writer.WriteProperty(options, PropOrdered, value.Ordered, null, null); + writer.WriteProperty(options, PropMaxGaps, value.MaxGaps, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOrdered, value.Ordered, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropUseField, value.UseField, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsQuery.g.cs index daf99ae5fbb..61eac390441 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsQuery.g.cs @@ -32,6 +32,8 @@ internal sealed partial class IntervalsQueryConverter : System.Text.Json.Seriali private static readonly System.Text.Json.JsonEncodedText VariantFuzzy = System.Text.Json.JsonEncodedText.Encode("fuzzy"); private static readonly System.Text.Json.JsonEncodedText VariantMatch = System.Text.Json.JsonEncodedText.Encode("match"); private static readonly System.Text.Json.JsonEncodedText VariantPrefix = System.Text.Json.JsonEncodedText.Encode("prefix"); + private static readonly System.Text.Json.JsonEncodedText VariantRange = System.Text.Json.JsonEncodedText.Encode("range"); + private static readonly System.Text.Json.JsonEncodedText VariantRegexp = System.Text.Json.JsonEncodedText.Encode("regexp"); private static readonly System.Text.Json.JsonEncodedText VariantWildcard = System.Text.Json.JsonEncodedText.Encode("wildcard"); public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQuery Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) @@ -39,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQuery Read(ref S reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -48,7 +50,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQuery Read(ref S object? variant = null; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,6 +100,22 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQuery Read(ref S continue; } + if (reader.ValueTextEquals(VariantRange)) + { + variantType = VariantRange.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + + if (reader.ValueTextEquals(VariantRegexp)) + { + variantType = VariantRegexp.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + if (reader.ValueTextEquals(VariantWildcard)) { variantType = VariantWildcard.Value; @@ -131,7 +149,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQuery Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); switch (value.VariantType) { @@ -152,6 +170,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien case "prefix": writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsPrefix)value.Variant, null, null); break; + case "range": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange)value.Variant, null, null); + break; + case "regexp": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp)value.Variant, null, null); + break; case "wildcard": writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.QueryDsl.IntervalsWildcard)value.Variant, null, null); break; @@ -159,7 +183,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQuery)}'."); } - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); writer.WriteEndObject(); @@ -222,6 +246,8 @@ internal IntervalsQuery(Elastic.Clients.Elasticsearch.Serialization.JsonConstruc /// /// public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsPrefix? Prefix { get => GetVariant("prefix"); set => SetVariant("prefix", value); } + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange? Range { get => GetVariant("range"); set => SetVariant("range", value); } + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp? Regexp { get => GetVariant("regexp"); set => SetVariant("regexp", value); } /// /// @@ -394,6 +420,36 @@ public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Range(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange? value) + { + Instance.Range = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Range() + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(null); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Range(System.Action>? action) + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Regexp(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp? value) + { + Instance.Regexp = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Regexp(System.Action> action) + { + Instance.Regexp = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor.Build(action); + return this; + } + /// /// /// Matches terms using a wildcard pattern. @@ -641,6 +697,48 @@ public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Prefix return this; } + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Range(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange? value) + { + Instance.Range = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Range() + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(null); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Range(System.Action? action) + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Range(System.Action>? action) + { + Instance.Range = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Regexp(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp? value) + { + Instance.Regexp = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Regexp(System.Action action) + { + Instance.Regexp = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor.Build(action); + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsQueryDescriptor Regexp(System.Action> action) + { + Instance.Regexp = Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor.Build(action); + return this; + } + /// /// /// Matches terms using a wildcard pattern. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsRange.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsRange.g.cs new file mode 100644 index 00000000000..cc4dce9a79d --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsRange.g.cs @@ -0,0 +1,395 @@ +// 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.QueryDsl; + +internal sealed partial class IntervalsRangeConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropAnalyzer = System.Text.Json.JsonEncodedText.Encode("analyzer"); + private static readonly System.Text.Json.JsonEncodedText PropGt = System.Text.Json.JsonEncodedText.Encode("gt"); + private static readonly System.Text.Json.JsonEncodedText PropGte = System.Text.Json.JsonEncodedText.Encode("gte"); + private static readonly System.Text.Json.JsonEncodedText PropLt = System.Text.Json.JsonEncodedText.Encode("lt"); + private static readonly System.Text.Json.JsonEncodedText PropLte = System.Text.Json.JsonEncodedText.Encode("lte"); + private static readonly System.Text.Json.JsonEncodedText PropUseField = System.Text.Json.JsonEncodedText.Encode("use_field"); + + public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propAnalyzer = default; + LocalJsonValue propGt = default; + LocalJsonValue propGte = default; + LocalJsonValue propLt = default; + LocalJsonValue propLte = default; + LocalJsonValue propUseField = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propAnalyzer.TryReadProperty(ref reader, options, PropAnalyzer, null)) + { + continue; + } + + if (propGt.TryReadProperty(ref reader, options, PropGt, null)) + { + continue; + } + + if (propGte.TryReadProperty(ref reader, options, PropGte, null)) + { + continue; + } + + if (propLt.TryReadProperty(ref reader, options, PropLt, null)) + { + continue; + } + + if (propLte.TryReadProperty(ref reader, options, PropLte, null)) + { + continue; + } + + if (propUseField.TryReadProperty(ref reader, options, PropUseField, 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.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Analyzer = propAnalyzer.Value, + Gt = propGt.Value, + Gte = propGte.Value, + Lt = propLt.Value, + Lte = propLte.Value, + UseField = propUseField.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); + writer.WriteProperty(options, PropGt, value.Gt, null, null); + writer.WriteProperty(options, PropGte, value.Gte, null, null); + writer.WriteProperty(options, PropLt, value.Lt, null, null); + writer.WriteProperty(options, PropLte, value.Lte, null, null); + writer.WriteProperty(options, PropUseField, value.UseField, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeConverter))] +public sealed partial class IntervalsRange +{ +#if NET7_0_OR_GREATER + public IntervalsRange() + { + } +#endif +#if !NET7_0_OR_GREATER + public IntervalsRange() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// Analyzer used to analyze the prefix. + /// + /// + public string? Analyzer { get; set; } + + /// + /// + /// Lower term, either gte or gt must be provided. + /// + /// + public string? Gt { get; set; } + + /// + /// + /// Lower term, either gte or gt must be provided. + /// + /// + public string? Gte { get; set; } + + /// + /// + /// Upper term, either lte or lt must be provided. + /// + /// + public string? Lt { get; set; } + + /// + /// + /// Upper term, either lte or lt must be provided. + /// + /// + public string? Lte { get; set; } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.Field? UseField { get; set; } +} + +public readonly partial struct IntervalsRangeDescriptor +{ + internal Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRangeDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRangeDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange instance) => new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Analyzer used to analyze the prefix. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Analyzer(string? value) + { + Instance.Analyzer = value; + return this; + } + + /// + /// + /// Lower term, either gte or gt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Gt(string? value) + { + Instance.Gt = value; + return this; + } + + /// + /// + /// Lower term, either gte or gt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Gte(string? value) + { + Instance.Gte = value; + return this; + } + + /// + /// + /// Upper term, either lte or lt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Lt(string? value) + { + Instance.Lt = value; + return this; + } + + /// + /// + /// Upper term, either lte or lt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Lte(string? value) + { + Instance.Lte = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor UseField(Elastic.Clients.Elasticsearch.Field? value) + { + Instance.UseField = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor UseField(System.Linq.Expressions.Expression> value) + { + Instance.UseField = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange Build(System.Action>? action) + { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + var builder = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor(new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} + +public readonly partial struct IntervalsRangeDescriptor +{ + internal Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRangeDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRangeDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange instance) => new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Analyzer used to analyze the prefix. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Analyzer(string? value) + { + Instance.Analyzer = value; + return this; + } + + /// + /// + /// Lower term, either gte or gt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Gt(string? value) + { + Instance.Gt = value; + return this; + } + + /// + /// + /// Lower term, either gte or gt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Gte(string? value) + { + Instance.Gte = value; + return this; + } + + /// + /// + /// Upper term, either lte or lt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Lt(string? value) + { + Instance.Lt = value; + return this; + } + + /// + /// + /// Upper term, either lte or lt must be provided. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor Lte(string? value) + { + Instance.Lte = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor UseField(Elastic.Clients.Elasticsearch.Field? value) + { + Instance.UseField = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor UseField(System.Linq.Expressions.Expression> value) + { + Instance.UseField = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange Build(System.Action? action) + { + if (action is null) + { + return new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + var builder = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRangeDescriptor(new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRange(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/QueryDsl/IntervalsRegexp.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsRegexp.g.cs new file mode 100644 index 00000000000..e80b18399bd --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/IntervalsRegexp.g.cs @@ -0,0 +1,281 @@ +// 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.QueryDsl; + +internal sealed partial class IntervalsRegexpConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropAnalyzer = System.Text.Json.JsonEncodedText.Encode("analyzer"); + private static readonly System.Text.Json.JsonEncodedText PropPattern = System.Text.Json.JsonEncodedText.Encode("pattern"); + private static readonly System.Text.Json.JsonEncodedText PropUseField = System.Text.Json.JsonEncodedText.Encode("use_field"); + + public override Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propAnalyzer = default; + LocalJsonValue propPattern = default; + LocalJsonValue propUseField = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propAnalyzer.TryReadProperty(ref reader, options, PropAnalyzer, null)) + { + continue; + } + + if (propPattern.TryReadProperty(ref reader, options, PropPattern, null)) + { + continue; + } + + if (propUseField.TryReadProperty(ref reader, options, PropUseField, 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.QueryDsl.IntervalsRegexp(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Analyzer = propAnalyzer.Value, + Pattern = propPattern.Value, + UseField = propUseField.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); + writer.WriteProperty(options, PropPattern, value.Pattern, null, null); + writer.WriteProperty(options, PropUseField, value.UseField, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpConverter))] +public sealed partial class IntervalsRegexp +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRegexp(string pattern) + { + Pattern = pattern; + } +#if NET7_0_OR_GREATER + public IntervalsRegexp() + { + } +#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 IntervalsRegexp() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal IntervalsRegexp(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// Analyzer used to analyze the prefix. + /// + /// + public string? Analyzer { get; set; } + + /// + /// + /// Regex pattern. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + string Pattern { get; set; } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.Field? UseField { get; set; } +} + +public readonly partial struct IntervalsRegexpDescriptor +{ + internal Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRegexpDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRegexpDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp instance) => new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Analyzer used to analyze the prefix. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor Analyzer(string? value) + { + Instance.Analyzer = value; + return this; + } + + /// + /// + /// Regex pattern. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor Pattern(string value) + { + Instance.Pattern = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor UseField(Elastic.Clients.Elasticsearch.Field? value) + { + Instance.UseField = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor UseField(System.Linq.Expressions.Expression> value) + { + Instance.UseField = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp Build(System.Action> action) + { + var builder = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor(new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} + +public readonly partial struct IntervalsRegexpDescriptor +{ + internal Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRegexpDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public IntervalsRegexpDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp instance) => new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp(Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Analyzer used to analyze the prefix. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor Analyzer(string? value) + { + Instance.Analyzer = value; + return this; + } + + /// + /// + /// Regex pattern. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor Pattern(string value) + { + Instance.Pattern = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor UseField(Elastic.Clients.Elasticsearch.Field? value) + { + Instance.UseField = value; + return this; + } + + /// + /// + /// If specified, match intervals from this field rather than the top-level field. + /// The prefix is normalized using the search analyzer from this field, unless analyzer is specified separately. + /// + /// + public Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor UseField(System.Linq.Expressions.Expression> value) + { + Instance.UseField = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexpDescriptor(new Elastic.Clients.Elasticsearch.QueryDsl.IntervalsRegexp(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/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/LikeDocument.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs index 3b00df20070..9384a6ee7c2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/LikeDocument.g.cs @@ -77,12 +77,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.LikeDocument Read(ref Sys continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, null)) + if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, static Elastic.Clients.Elasticsearch.VersionType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -119,8 +119,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropIndex, value.Index, null, null); writer.WriteProperty(options, PropPerFieldAnalyzer, value.PerFieldAnalyzer, 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, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropVersionType, value.VersionType, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionType, value.VersionType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.VersionType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchAllQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchAllQuery.g.cs index 8387034c1f5..ff7dff9f253 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchAllQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchAllQuery.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchAllQuery Read(ref Sy LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchAllQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.MatchAllQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs index 341261a8d6b..b4ef31aaecd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchBoolPrefixQuery.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchBoolPrefixQuery Read reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -74,7 +74,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchBoolPrefixQuery Read continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,12 +89,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchBoolPrefixQuery Read continue; } - if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, null)) + if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, null)) + if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,12 +104,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchBoolPrefixQuery Read continue; } - if (propOperator.TryReadProperty(ref reader, options, PropOperator, null)) + if (propOperator.TryReadProperty(ref reader, options, PropOperator, static Elastic.Clients.Elasticsearch.QueryDsl.Operator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -156,17 +156,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchBoolPrefixQuery Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.MatchBoolPrefixQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFuzziness, value.Fuzziness, null, null); writer.WriteProperty(options, PropFuzzyRewrite, value.FuzzyRewrite, null, null); - writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, null); - writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, null); + writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); - writer.WriteProperty(options, PropOperator, value.Operator, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); + writer.WriteProperty(options, PropOperator, value.Operator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.Operator? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs index d675eb01e36..0d65ccc58c8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchNoneQuery.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchNoneQuery Read(ref S LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchNoneQuery Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.MatchNoneQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs index ab695bd426f..cce84a4dacb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhrasePrefixQuery.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhrasePrefixQuery Re reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -66,12 +66,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhrasePrefixQuery Re continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, null)) + if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -86,12 +86,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhrasePrefixQuery Re continue; } - if (propSlop.TryReadProperty(ref reader, options, PropSlop, null)) + if (propSlop.TryReadProperty(ref reader, options, PropSlop, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, null)) + if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, static Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,15 +124,15 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhrasePrefixQuery Re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.MatchPhrasePrefixQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropSlop, value.Slop, null, null); - writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, null); + writer.WriteProperty(options, PropSlop, value.Slop, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs index 4250d0d893e..01cf8f6abfe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchPhraseQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhraseQuery Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhraseQuery Read(ref continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -79,12 +79,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhraseQuery Read(ref continue; } - if (propSlop.TryReadProperty(ref reader, options, PropSlop, null)) + if (propSlop.TryReadProperty(ref reader, options, PropSlop, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, null)) + if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, static Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,14 +116,14 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchPhraseQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.MatchPhraseQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropSlop, value.Slop, null, null); - writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, null); + writer.WriteProperty(options, PropSlop, value.Slop, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchQuery.g.cs index 435a43bf959..114be26107e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MatchQuery.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchQuery Read(ref Syste reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -82,17 +82,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchQuery Read(ref Syste continue; } - if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, null)) + if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCutoffFrequency.TryReadProperty(ref reader, options, PropCutoffFrequency, null)) + if (propCutoffFrequency.TryReadProperty(ref reader, options, PropCutoffFrequency, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,17 +107,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchQuery Read(ref Syste continue; } - if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, null)) + if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLenient.TryReadProperty(ref reader, options, PropLenient, null)) + if (propLenient.TryReadProperty(ref reader, options, PropLenient, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, null)) + if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -127,12 +127,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchQuery Read(ref Syste continue; } - if (propOperator.TryReadProperty(ref reader, options, PropOperator, null)) + if (propOperator.TryReadProperty(ref reader, options, PropOperator, static Elastic.Clients.Elasticsearch.QueryDsl.Operator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -147,7 +147,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchQuery Read(ref Syste continue; } - if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, null)) + if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, static Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -191,26 +191,26 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MatchQuery Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.MatchQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); #pragma warning disable CS0618 - writer.WriteProperty(options, PropCutoffFrequency, value.CutoffFrequency, null, null) + writer.WriteProperty(options, PropCutoffFrequency, value.CutoffFrequency, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)) #pragma warning restore CS0618 ; writer.WriteProperty(options, PropFuzziness, value.Fuzziness, null, null); writer.WriteProperty(options, PropFuzzyRewrite, value.FuzzyRewrite, null, null); - writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, null); - writer.WriteProperty(options, PropLenient, value.Lenient, null, null); - writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, null); + writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLenient, value.Lenient, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); - writer.WriteProperty(options, PropOperator, value.Operator, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); + writer.WriteProperty(options, PropOperator, value.Operator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.Operator? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, null); + writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs index 4e3aa59ecc3..807e8458960 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MoreLikeThisQuery.g.cs @@ -76,17 +76,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MoreLikeThisQuery Read(re continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoostTerms.TryReadProperty(ref reader, options, PropBoostTerms, null)) + if (propBoostTerms.TryReadProperty(ref reader, options, PropBoostTerms, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFailOnUnsupportedField.TryReadProperty(ref reader, options, PropFailOnUnsupportedField, null)) + if (propFailOnUnsupportedField.TryReadProperty(ref reader, options, PropFailOnUnsupportedField, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -96,7 +96,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MoreLikeThisQuery Read(re continue; } - if (propInclude.TryReadProperty(ref reader, options, PropInclude, null)) + if (propInclude.TryReadProperty(ref reader, options, PropInclude, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,22 +106,22 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MoreLikeThisQuery Read(re continue; } - if (propMaxDocFreq.TryReadProperty(ref reader, options, PropMaxDocFreq, null)) + if (propMaxDocFreq.TryReadProperty(ref reader, options, PropMaxDocFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxQueryTerms.TryReadProperty(ref reader, options, PropMaxQueryTerms, null)) + if (propMaxQueryTerms.TryReadProperty(ref reader, options, PropMaxQueryTerms, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxWordLength.TryReadProperty(ref reader, options, PropMaxWordLength, null)) + if (propMaxWordLength.TryReadProperty(ref reader, options, PropMaxWordLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, null)) + if (propMinDocFreq.TryReadProperty(ref reader, options, PropMinDocFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -131,12 +131,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MoreLikeThisQuery Read(re continue; } - if (propMinTermFreq.TryReadProperty(ref reader, options, PropMinTermFreq, null)) + if (propMinTermFreq.TryReadProperty(ref reader, options, PropMinTermFreq, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, null)) + if (propMinWordLength.TryReadProperty(ref reader, options, PropMinWordLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -161,12 +161,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MoreLikeThisQuery Read(re continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, null)) + if (propVersionType.TryReadProperty(ref reader, options, PropVersionType, static Elastic.Clients.Elasticsearch.VersionType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -210,25 +210,25 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropBoostTerms, value.BoostTerms, null, null); - writer.WriteProperty(options, PropFailOnUnsupportedField, value.FailOnUnsupportedField, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoostTerms, value.BoostTerms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFailOnUnsupportedField, value.FailOnUnsupportedField, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropInclude, value.Include, null, null); + writer.WriteProperty(options, PropInclude, value.Include, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLike, value.Like, 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, PropMaxDocFreq, value.MaxDocFreq, null, null); - writer.WriteProperty(options, PropMaxQueryTerms, value.MaxQueryTerms, null, null); - writer.WriteProperty(options, PropMaxWordLength, value.MaxWordLength, null, null); - writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, null); + writer.WriteProperty(options, PropMaxDocFreq, value.MaxDocFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxQueryTerms, value.MaxQueryTerms, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxWordLength, value.MaxWordLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinDocFreq, value.MinDocFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); - writer.WriteProperty(options, PropMinTermFreq, value.MinTermFreq, null, null); - writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, null); + writer.WriteProperty(options, PropMinTermFreq, value.MinTermFreq, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinWordLength, value.MinWordLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropRouting, value.Routing, 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, PropUnlike, value.Unlike, 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, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropVersionType, value.VersionType, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropVersionType, value.VersionType, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.VersionType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs index 5a3b609c678..b1e385c7ad3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/MultiMatchQuery.g.cs @@ -74,17 +74,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MultiMatchQuery Read(ref continue; } - if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, null)) + if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCutoffFrequency.TryReadProperty(ref reader, options, PropCutoffFrequency, null)) + if (propCutoffFrequency.TryReadProperty(ref reader, options, PropCutoffFrequency, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -104,17 +104,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MultiMatchQuery Read(ref continue; } - if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, null)) + if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLenient.TryReadProperty(ref reader, options, PropLenient, null)) + if (propLenient.TryReadProperty(ref reader, options, PropLenient, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, null)) + if (propMaxExpansions.TryReadProperty(ref reader, options, PropMaxExpansions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,12 +124,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MultiMatchQuery Read(ref continue; } - if (propOperator.TryReadProperty(ref reader, options, PropOperator, null)) + if (propOperator.TryReadProperty(ref reader, options, PropOperator, static Elastic.Clients.Elasticsearch.QueryDsl.Operator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, null)) + if (propPrefixLength.TryReadProperty(ref reader, options, PropPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -144,22 +144,22 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.MultiMatchQuery Read(ref continue; } - if (propSlop.TryReadProperty(ref reader, options, PropSlop, null)) + if (propSlop.TryReadProperty(ref reader, options, PropSlop, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTieBreaker.TryReadProperty(ref reader, options, PropTieBreaker, null)) + if (propTieBreaker.TryReadProperty(ref reader, options, PropTieBreaker, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.QueryDsl.TextQueryType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, null)) + if (propZeroTermsQuery.TryReadProperty(ref reader, options, PropZeroTermsQuery, static Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -205,27 +205,27 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); #pragma warning disable CS0618 - writer.WriteProperty(options, PropCutoffFrequency, value.CutoffFrequency, null, null) + writer.WriteProperty(options, PropCutoffFrequency, value.CutoffFrequency, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)) #pragma warning restore CS0618 ; writer.WriteProperty(options, PropFields, value.Fields, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Fields? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.SingleOrManyFieldsMarker))); writer.WriteProperty(options, PropFuzziness, value.Fuzziness, null, null); writer.WriteProperty(options, PropFuzzyRewrite, value.FuzzyRewrite, null, null); - writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, null); - writer.WriteProperty(options, PropLenient, value.Lenient, null, null); - writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, null); + writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLenient, value.Lenient, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxExpansions, value.MaxExpansions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); - writer.WriteProperty(options, PropOperator, value.Operator, null, null); - writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, null); + writer.WriteProperty(options, PropOperator, value.Operator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.Operator? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPrefixLength, value.PrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropSlop, value.Slop, null, null); - writer.WriteProperty(options, PropTieBreaker, value.TieBreaker, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); - writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, null); + writer.WriteProperty(options, PropSlop, value.Slop, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTieBreaker, value.TieBreaker, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.TextQueryType? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropZeroTermsQuery, value.ZeroTermsQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.ZeroTermsQuery? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs index ff09150b73d..840560e882a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NestedQuery.g.cs @@ -45,12 +45,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NestedQuery Read(ref Syst LocalJsonValue propScoreMode = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NestedQuery Read(ref Syst continue; } - if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, null)) + if (propScoreMode.TryReadProperty(ref reader, options, PropScoreMode, static Elastic.Clients.Elasticsearch.QueryDsl.ChildScoreMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,13 +105,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NestedQuery Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.NestedQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropInnerHits, value.InnerHits, null, null); writer.WriteProperty(options, PropPath, value.Path, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, null); + writer.WriteProperty(options, PropScoreMode, value.ScoreMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.ChildScoreMode? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs index 5facaf08a84..663b95f3f6b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumberRangeQuery.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQuery Read(ref reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -54,12 +54,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQuery Read(ref LocalJsonValue propTo = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFrom.TryReadProperty(ref reader, options, PropFrom, null)) + if (propFrom.TryReadProperty(ref reader, options, PropFrom, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,12 +89,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQuery Read(ref continue; } - if (propRelation.TryReadProperty(ref reader, options, PropRelation, null)) + if (propRelation.TryReadProperty(ref reader, options, PropRelation, static Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTo.TryReadProperty(ref reader, options, PropTo, null)) + if (propTo.TryReadProperty(ref reader, options, PropTo, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,17 +129,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.NumberRangeQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropFrom, value.From, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFrom, value.From, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropGt, value.Gt, null, null); writer.WriteProperty(options, PropGte, value.Gte, null, null); writer.WriteProperty(options, PropLt, value.Lt, null, null); writer.WriteProperty(options, PropLte, value.Lte, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropRelation, value.Relation, null, null); - writer.WriteProperty(options, PropTo, value.To, null, null); + writer.WriteProperty(options, PropRelation, value.Relation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTo, value.To, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumericDecayFunction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumericDecayFunction.g.cs index ddbf89dac18..9d287da02a0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumericDecayFunction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/NumericDecayFunction.g.cs @@ -35,13 +35,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NumericDecayFunction Read LocalJsonValue> propPlacement = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, null)) + if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, static Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propPlacement.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propPlacement.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propPlacement.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -56,8 +56,8 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.NumericDecayFunction Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.NumericDecayFunction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, null); - writer.WriteProperty(options, value.Field, value.Placement, null, null); + writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.Placement, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ParentIdQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ParentIdQuery.g.cs index fafb54237ac..37b96ccb17b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ParentIdQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ParentIdQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ParentIdQuery Read(ref Sy LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ParentIdQuery Read(ref Sy continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,9 +89,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ParentIdQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.ParentIdQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PercolateQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PercolateQuery.g.cs index fe7c7e1e82e..70844b65115 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PercolateQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PercolateQuery.g.cs @@ -53,7 +53,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PercolateQuery Read(ref S LocalJsonValue propVersion = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -103,7 +103,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PercolateQuery Read(ref S continue; } - if (propVersion.TryReadProperty(ref reader, options, PropVersion, null)) + if (propVersion.TryReadProperty(ref reader, options, PropVersion, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -137,7 +137,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PercolateQuery Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.PercolateQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDocument, value.Document, null, null); writer.WriteProperty(options, PropDocuments, value.Documents, 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, PropField, value.Field, null, null); @@ -147,7 +147,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropPreference, value.Preference, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropRouting, value.Routing, null, null); - writer.WriteProperty(options, PropVersion, value.Version, null, null); + writer.WriteProperty(options, PropVersion, value.Version, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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/PinnedQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs index 369ae9d7b7d..11213aeb9ef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PinnedQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PinnedQuery Read(ref Syst object? variant = null; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -109,7 +109,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.QueryDsl.PinnedQuery)}'."); } - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOrganic, value.Organic, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PrefixQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PrefixQuery.g.cs index 8cadf02b325..67094e1feef 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PrefixQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/PrefixQuery.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PrefixQuery Read(ref Syst reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -57,12 +57,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PrefixQuery Read(ref Syst LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, null)) + if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -108,10 +108,10 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.PrefixQuery Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.PrefixQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropRewrite, value.Rewrite, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryStringQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryStringQuery.g.cs index 9afc585991c..9c6cfb2546b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryStringQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/QueryStringQuery.g.cs @@ -85,7 +85,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowLeadingWildcard.TryReadProperty(ref reader, options, PropAllowLeadingWildcard, null)) + if (propAllowLeadingWildcard.TryReadProperty(ref reader, options, PropAllowLeadingWildcard, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -95,17 +95,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref continue; } - if (propAnalyzeWildcard.TryReadProperty(ref reader, options, PropAnalyzeWildcard, null)) + if (propAnalyzeWildcard.TryReadProperty(ref reader, options, PropAnalyzeWildcard, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, null)) + if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -115,17 +115,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref continue; } - if (propDefaultOperator.TryReadProperty(ref reader, options, PropDefaultOperator, null)) + if (propDefaultOperator.TryReadProperty(ref reader, options, PropDefaultOperator, static Elastic.Clients.Elasticsearch.QueryDsl.Operator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEnablePositionIncrements.TryReadProperty(ref reader, options, PropEnablePositionIncrements, null)) + if (propEnablePositionIncrements.TryReadProperty(ref reader, options, PropEnablePositionIncrements, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propEscape.TryReadProperty(ref reader, options, PropEscape, null)) + if (propEscape.TryReadProperty(ref reader, options, PropEscape, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -140,12 +140,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref continue; } - if (propFuzzyMaxExpansions.TryReadProperty(ref reader, options, PropFuzzyMaxExpansions, null)) + if (propFuzzyMaxExpansions.TryReadProperty(ref reader, options, PropFuzzyMaxExpansions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFuzzyPrefixLength.TryReadProperty(ref reader, options, PropFuzzyPrefixLength, null)) + if (propFuzzyPrefixLength.TryReadProperty(ref reader, options, PropFuzzyPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -155,17 +155,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref continue; } - if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, null)) + if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLenient.TryReadProperty(ref reader, options, PropLenient, null)) + if (propLenient.TryReadProperty(ref reader, options, PropLenient, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxDeterminizedStates.TryReadProperty(ref reader, options, PropMaxDeterminizedStates, null)) + if (propMaxDeterminizedStates.TryReadProperty(ref reader, options, PropMaxDeterminizedStates, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -175,7 +175,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref continue; } - if (propPhraseSlop.TryReadProperty(ref reader, options, PropPhraseSlop, null)) + if (propPhraseSlop.TryReadProperty(ref reader, options, PropPhraseSlop, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -205,7 +205,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref continue; } - if (propTieBreaker.TryReadProperty(ref reader, options, PropTieBreaker, null)) + if (propTieBreaker.TryReadProperty(ref reader, options, PropTieBreaker, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -215,7 +215,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.QueryDsl.TextQueryType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -265,33 +265,33 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.QueryStringQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowLeadingWildcard, value.AllowLeadingWildcard, null, null); + writer.WriteProperty(options, PropAllowLeadingWildcard, value.AllowLeadingWildcard, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropAnalyzeWildcard, value.AnalyzeWildcard, null, null); - writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropAnalyzeWildcard, value.AnalyzeWildcard, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDefaultField, value.DefaultField, null, null); - writer.WriteProperty(options, PropDefaultOperator, value.DefaultOperator, null, null); - writer.WriteProperty(options, PropEnablePositionIncrements, value.EnablePositionIncrements, null, null); - writer.WriteProperty(options, PropEscape, value.Escape, null, null); + writer.WriteProperty(options, PropDefaultOperator, value.DefaultOperator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.Operator? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEnablePositionIncrements, value.EnablePositionIncrements, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropEscape, value.Escape, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); writer.WriteProperty(options, PropFuzziness, value.Fuzziness, null, null); - writer.WriteProperty(options, PropFuzzyMaxExpansions, value.FuzzyMaxExpansions, null, null); - writer.WriteProperty(options, PropFuzzyPrefixLength, value.FuzzyPrefixLength, null, null); + writer.WriteProperty(options, PropFuzzyMaxExpansions, value.FuzzyMaxExpansions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFuzzyPrefixLength, value.FuzzyPrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFuzzyRewrite, value.FuzzyRewrite, null, null); - writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, null); - writer.WriteProperty(options, PropLenient, value.Lenient, null, null); - writer.WriteProperty(options, PropMaxDeterminizedStates, value.MaxDeterminizedStates, null, null); + writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLenient, value.Lenient, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxDeterminizedStates, value.MaxDeterminizedStates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); - writer.WriteProperty(options, PropPhraseSlop, value.PhraseSlop, null, null); + writer.WriteProperty(options, PropPhraseSlop, value.PhraseSlop, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropQuoteAnalyzer, value.QuoteAnalyzer, null, null); writer.WriteProperty(options, PropQuoteFieldSuffix, value.QuoteFieldSuffix, null, null); writer.WriteProperty(options, PropRewrite, value.Rewrite, null, null); - writer.WriteProperty(options, PropTieBreaker, value.TieBreaker, null, null); + writer.WriteProperty(options, PropTieBreaker, value.TieBreaker, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeZone, value.TimeZone, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.TextQueryType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureFunctionSaturation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureFunctionSaturation.g.cs index a96d6fd63ac..0ae08f26668 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureFunctionSaturation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureFunctionSaturation.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureFunctionSatura LocalJsonValue propPivot = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propPivot.TryReadProperty(ref reader, options, PropPivot, null)) + if (propPivot.TryReadProperty(ref reader, options, PropPivot, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureFunctionSatura public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureFunctionSaturation value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropPivot, value.Pivot, null, null); + writer.WriteProperty(options, PropPivot, value.Pivot, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs index 64ad3c18046..1a10c040f69 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RankFeatureQuery.g.cs @@ -45,7 +45,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureQuery Read(ref LocalJsonValue propSigmoid = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,7 +105,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.RankFeatureQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropLinear, value.Linear, null, null); writer.WriteProperty(options, PropLog, value.Log, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RegexpQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RegexpQuery.g.cs index ab93b14e809..4f98aa2d9ea 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RegexpQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RegexpQuery.g.cs @@ -38,7 +38,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RegexpQuery Read(ref Syst reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -61,12 +61,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RegexpQuery Read(ref Syst LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, null)) + if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RegexpQuery Read(ref Syst continue; } - if (propMaxDeterminizedStates.TryReadProperty(ref reader, options, PropMaxDeterminizedStates, null)) + if (propMaxDeterminizedStates.TryReadProperty(ref reader, options, PropMaxDeterminizedStates, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,12 +124,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RegexpQuery Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.RegexpQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFlags, value.Flags, null, null); - writer.WriteProperty(options, PropMaxDeterminizedStates, value.MaxDeterminizedStates, null, null); + writer.WriteProperty(options, PropMaxDeterminizedStates, value.MaxDeterminizedStates, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropRewrite, value.Rewrite, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RuleQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RuleQuery.g.cs index 0c3c74d149f..f52e4f2baa5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RuleQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/RuleQuery.g.cs @@ -29,6 +29,7 @@ internal sealed partial class RuleQueryConverter : System.Text.Json.Serializatio private static readonly System.Text.Json.JsonEncodedText PropMatchCriteria = System.Text.Json.JsonEncodedText.Encode("match_criteria"); private static readonly System.Text.Json.JsonEncodedText PropOrganic = System.Text.Json.JsonEncodedText.Encode("organic"); private static readonly System.Text.Json.JsonEncodedText PropQueryName = System.Text.Json.JsonEncodedText.Encode("_name"); + private static readonly System.Text.Json.JsonEncodedText PropRulesetId = System.Text.Json.JsonEncodedText.Encode("ruleset_id"); private static readonly System.Text.Json.JsonEncodedText PropRulesetIds = System.Text.Json.JsonEncodedText.Encode("ruleset_ids"); public override Elastic.Clients.Elasticsearch.QueryDsl.RuleQuery Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) @@ -38,10 +39,11 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RuleQuery Read(ref System LocalJsonValue propMatchCriteria = default; LocalJsonValue propOrganic = default; LocalJsonValue propQueryName = default; - LocalJsonValue> propRulesetIds = default; + LocalJsonValue propRulesetId = default; + LocalJsonValue?> propRulesetIds = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +63,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RuleQuery Read(ref System continue; } - if (propRulesetIds.TryReadProperty(ref reader, options, PropRulesetIds, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) + if (propRulesetId.TryReadProperty(ref reader, options, PropRulesetId, null)) + { + continue; + } + + if (propRulesetIds.TryReadProperty(ref reader, options, PropRulesetIds, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null))) { continue; } @@ -82,6 +89,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RuleQuery Read(ref System MatchCriteria = propMatchCriteria.Value, Organic = propOrganic.Value, QueryName = propQueryName.Value, + RulesetId = propRulesetId.Value, RulesetIds = propRulesetIds.Value }; } @@ -89,11 +97,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.RuleQuery Read(ref System public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.RuleQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMatchCriteria, value.MatchCriteria, null, null); writer.WriteProperty(options, PropOrganic, value.Organic, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropRulesetIds, value.RulesetIds, 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, PropRulesetId, value.RulesetId, null, null); + writer.WriteProperty(options, PropRulesetIds, value.RulesetIds, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection? v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteEndObject(); } } @@ -102,11 +111,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien public sealed partial class RuleQuery { [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] - public RuleQuery(object matchCriteria, Elastic.Clients.Elasticsearch.QueryDsl.Query organic, System.Collections.Generic.ICollection rulesetIds) + public RuleQuery(object matchCriteria, Elastic.Clients.Elasticsearch.QueryDsl.Query organic) { MatchCriteria = matchCriteria; Organic = organic; - RulesetIds = rulesetIds; } #if NET7_0_OR_GREATER public RuleQuery() @@ -145,11 +153,8 @@ internal RuleQuery(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSe #endif Elastic.Clients.Elasticsearch.QueryDsl.Query Organic { get; set; } public string? QueryName { get; set; } - public -#if NET7_0_OR_GREATER - required -#endif - System.Collections.Generic.ICollection RulesetIds { get; set; } + public string? RulesetId { get; set; } + public System.Collections.Generic.ICollection? RulesetIds { get; set; } } public readonly partial struct RuleQueryDescriptor @@ -209,7 +214,13 @@ public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor Que return this; } - public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor RulesetIds(System.Collections.Generic.ICollection value) + public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor RulesetId(string? value) + { + Instance.RulesetId = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor RulesetIds(System.Collections.Generic.ICollection? value) { Instance.RulesetIds = value; return this; @@ -293,7 +304,13 @@ public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor QueryName(stri return this; } - public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor RulesetIds(System.Collections.Generic.ICollection value) + public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor RulesetId(string? value) + { + Instance.RulesetId = value; + return this; + } + + public Elastic.Clients.Elasticsearch.QueryDsl.RuleQueryDescriptor RulesetIds(System.Collections.Generic.ICollection? value) { Instance.RulesetIds = value; return this; diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptQuery.g.cs index 02c477b11fd..03b14ea52d5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ScriptQuery Read(ref Syst LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ScriptQuery Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.ScriptQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs index 6aee73013f5..4b20194eea5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ScriptScoreQuery.g.cs @@ -41,12 +41,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ScriptScoreQuery Read(ref LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,8 +89,8 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ScriptScoreQuery Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.ScriptScoreQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropScript, value.Script, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SemanticQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SemanticQuery.g.cs index 1baa42a0d02..5f52f21f987 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SemanticQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SemanticQuery.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SemanticQuery Read(ref Sy LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SemanticQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SemanticQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeFieldQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeFieldQuery.g.cs index 511c29975d7..b40125ea88b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeFieldQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeFieldQuery.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ShapeFieldQuery Read(ref continue; } - if (propRelation.TryReadProperty(ref reader, options, PropRelation, null)) + if (propRelation.TryReadProperty(ref reader, options, PropRelation, static Elastic.Clients.Elasticsearch.GeoShapeRelation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -74,7 +74,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropIndexedShape, value.IndexedShape, null, null); - writer.WriteProperty(options, PropRelation, value.Relation, null, null); + writer.WriteProperty(options, PropRelation, value.Relation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.GeoShapeRelation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropShape, value.Shape, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeQuery.g.cs index 476ab5d1838..4dc1ced7e59 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/ShapeQuery.g.cs @@ -39,12 +39,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ShapeQuery Read(ref Syste LocalJsonValue propShape = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, null)) + if (propIgnoreUnmapped.TryReadProperty(ref reader, options, PropIgnoreUnmapped, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ShapeQuery Read(ref Syste } propField.Initialized = propShape.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propShape.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propShape.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -72,10 +72,10 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.ShapeQuery Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.ShapeQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIgnoreUnmapped, value.IgnoreUnmapped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, value.Field, value.Shape, null, null); + writer.WriteProperty(options, value.Field, value.Shape, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs index 79131858d88..015951a04e2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SimpleQueryStringQuery.g.cs @@ -66,22 +66,22 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SimpleQueryStringQuery Re continue; } - if (propAnalyzeWildcard.TryReadProperty(ref reader, options, PropAnalyzeWildcard, null)) + if (propAnalyzeWildcard.TryReadProperty(ref reader, options, PropAnalyzeWildcard, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, null)) + if (propAutoGenerateSynonymsPhraseQuery.TryReadProperty(ref reader, options, PropAutoGenerateSynonymsPhraseQuery, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDefaultOperator.TryReadProperty(ref reader, options, PropDefaultOperator, null)) + if (propDefaultOperator.TryReadProperty(ref reader, options, PropDefaultOperator, static Elastic.Clients.Elasticsearch.QueryDsl.Operator? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,27 +91,27 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SimpleQueryStringQuery Re continue; } - if (propFlags.TryReadProperty(ref reader, options, PropFlags, null)) + if (propFlags.TryReadProperty(ref reader, options, PropFlags, static Elastic.Clients.Elasticsearch.QueryDsl.SimpleQueryStringFlags? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFuzzyMaxExpansions.TryReadProperty(ref reader, options, PropFuzzyMaxExpansions, null)) + if (propFuzzyMaxExpansions.TryReadProperty(ref reader, options, PropFuzzyMaxExpansions, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFuzzyPrefixLength.TryReadProperty(ref reader, options, PropFuzzyPrefixLength, null)) + if (propFuzzyPrefixLength.TryReadProperty(ref reader, options, PropFuzzyPrefixLength, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, null)) + if (propFuzzyTranspositions.TryReadProperty(ref reader, options, PropFuzzyTranspositions, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLenient.TryReadProperty(ref reader, options, PropLenient, null)) + if (propLenient.TryReadProperty(ref reader, options, PropLenient, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -170,16 +170,16 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAnalyzer, value.Analyzer, null, null); - writer.WriteProperty(options, PropAnalyzeWildcard, value.AnalyzeWildcard, null, null); - writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropDefaultOperator, value.DefaultOperator, null, null); + writer.WriteProperty(options, PropAnalyzeWildcard, value.AnalyzeWildcard, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropAutoGenerateSynonymsPhraseQuery, value.AutoGenerateSynonymsPhraseQuery, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDefaultOperator, value.DefaultOperator, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.Operator? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFields, value.Fields, null, null); - writer.WriteProperty(options, PropFlags, value.Flags, null, null); - writer.WriteProperty(options, PropFuzzyMaxExpansions, value.FuzzyMaxExpansions, null, null); - writer.WriteProperty(options, PropFuzzyPrefixLength, value.FuzzyPrefixLength, null, null); - writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, null); - writer.WriteProperty(options, PropLenient, value.Lenient, null, null); + writer.WriteProperty(options, PropFlags, value.Flags, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.SimpleQueryStringFlags? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFuzzyMaxExpansions, value.FuzzyMaxExpansions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFuzzyPrefixLength, value.FuzzyPrefixLength, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFuzzyTranspositions, value.FuzzyTranspositions, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLenient, value.Lenient, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs index 5b089e0fbdb..a64036b0bb8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanContainingQuery.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanContainingQuery Read( continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBig, value.Big, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLittle, value.Little, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs index 0ffcd92c68e..fe187fffa63 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFieldMaskingQuery.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanFieldMaskingQuery Rea LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanFieldMaskingQuery Rea public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SpanFieldMaskingQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs index ba660394ce2..37de58f2440 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanFirstQuery.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanFirstQuery Read(ref S LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanFirstQuery Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SpanFirstQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropEnd, value.End, null, null); writer.WriteProperty(options, PropMatch, value.Match, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs index 3f5d9da6351..2078e299b65 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanMultiTermQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanMultiTermQuery Read(r LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanMultiTermQuery Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SpanMultiTermQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMatch, value.Match, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNearQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNearQuery.g.cs index 2c0e6444b43..6466d7a49dc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNearQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNearQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanNearQuery Read(ref Sy LocalJsonValue propSlop = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanNearQuery Read(ref Sy continue; } - if (propInOrder.TryReadProperty(ref reader, options, PropInOrder, null)) + if (propInOrder.TryReadProperty(ref reader, options, PropInOrder, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanNearQuery Read(ref Sy continue; } - if (propSlop.TryReadProperty(ref reader, options, PropSlop, null)) + if (propSlop.TryReadProperty(ref reader, options, PropSlop, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanNearQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SpanNearQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropClauses, value.Clauses, 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, PropInOrder, value.InOrder, null, null); + writer.WriteProperty(options, PropInOrder, value.InOrder, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropSlop, value.Slop, null, null); + writer.WriteProperty(options, PropSlop, value.Slop, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNotQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNotQuery.g.cs index 93a7fab4a82..e3be13405af 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNotQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanNotQuery.g.cs @@ -45,12 +45,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanNotQuery Read(ref Sys LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDist.TryReadProperty(ref reader, options, PropDist, null)) + if (propDist.TryReadProperty(ref reader, options, PropDist, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,12 +65,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanNotQuery Read(ref Sys continue; } - if (propPost.TryReadProperty(ref reader, options, PropPost, null)) + if (propPost.TryReadProperty(ref reader, options, PropPost, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPre.TryReadProperty(ref reader, options, PropPre, null)) + if (propPre.TryReadProperty(ref reader, options, PropPre, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,12 +105,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanNotQuery Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SpanNotQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropDist, value.Dist, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDist, value.Dist, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropExclude, value.Exclude, null, null); writer.WriteProperty(options, PropInclude, value.Include, null, null); - writer.WriteProperty(options, PropPost, value.Post, null, null); - writer.WriteProperty(options, PropPre, value.Pre, null, null); + writer.WriteProperty(options, PropPost, value.Post, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPre, value.Pre, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanOrQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanOrQuery.g.cs index 0bb8c1d4c29..b36393e4a3a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanOrQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanOrQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanOrQuery Read(ref Syst LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanOrQuery Read(ref Syst public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SpanOrQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropClauses, value.Clauses, 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, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); 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..81fc9064405 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanTermQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanTermQuery.g.cs @@ -28,18 +28,17 @@ 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) { reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); 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,10 +50,10 @@ 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)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -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; } @@ -93,9 +92,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.SpanTermQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); writer.WriteEndObject(); @@ -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/SpanWithinQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanWithinQuery.g.cs index bc30350a122..9f75c66a26b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanWithinQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SpanWithinQuery.g.cs @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SpanWithinQuery Read(ref continue; } - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,7 +82,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropBig, value.Big, null, null); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLittle, value.Little, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SparseVectorQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SparseVectorQuery.g.cs index c62b0df0ee0..cf4fec81b22 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SparseVectorQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/SparseVectorQuery.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SparseVectorQuery Read(re object? variant = null; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -56,7 +56,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.SparseVectorQuery Read(re continue; } - if (propPrune.TryReadProperty(ref reader, options, PropPrune, null)) + if (propPrune.TryReadProperty(ref reader, options, PropPrune, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -121,9 +121,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien throw new System.Text.Json.JsonException($"Variant '{value.VariantType}' is not supported for type '{nameof(Elastic.Clients.Elasticsearch.QueryDsl.SparseVectorQuery)}'."); } - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); - writer.WriteProperty(options, PropPrune, value.Prune, null, null); + writer.WriteProperty(options, PropPrune, value.Prune, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPruningConfig, value.PruningConfig, null, null); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); 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..e40e0e08133 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermQuery.g.cs @@ -35,19 +35,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermQuery Read(ref System reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); 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; @@ -55,12 +45,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermQuery Read(ref System LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, null)) + if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -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); @@ -100,10 +97,10 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermQuery Read(ref System public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.TermQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermRangeQuery.g.cs index c096df4a21a..c7472a6d326 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermRangeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermRangeQuery.g.cs @@ -40,7 +40,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQuery Read(ref S reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -54,7 +54,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQuery Read(ref S LocalJsonValue propTo = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQuery Read(ref S continue; } - if (propRelation.TryReadProperty(ref reader, options, PropRelation, null)) + if (propRelation.TryReadProperty(ref reader, options, PropRelation, static Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -129,16 +129,16 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQuery Read(ref S public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.TermRangeQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFrom, value.From, null, null); writer.WriteProperty(options, PropGt, value.Gt, null, null); writer.WriteProperty(options, PropGte, value.Gte, null, null); writer.WriteProperty(options, PropLt, value.Lt, null, null); writer.WriteProperty(options, PropLte, value.Lte, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropRelation, value.Relation, null, null); + writer.WriteProperty(options, PropRelation, value.Relation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTo, value.To, null, null); writer.WriteEndObject(); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsQuery.g.cs index ca8e81625c8..6df7b35d035 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermsQuery Read(ref Syste LocalJsonValue propTerms = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -48,7 +48,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermsQuery Read(ref Syste } propField.Initialized = propTerms.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propTerms.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propTerms.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -64,9 +64,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermsQuery Read(ref Syste public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.TermsQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, value.Field, value.Terms, null, null); + writer.WriteProperty(options, value.Field, value.Terms, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } 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..4c3930820e6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TermsSetQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQuery Read(ref Sy reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -45,10 +45,10 @@ 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)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -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; } @@ -105,14 +105,14 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.TermsSetQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMinimumShouldMatch, value.MinimumShouldMatch, null, null); 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/QueryDsl/TextExpansionQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs index 5af194ed7b9..8d13ed985b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TextExpansionQuery.g.cs @@ -36,7 +36,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TextExpansionQuery Read(r reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TextExpansionQuery Read(r LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,9 +97,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TextExpansionQuery Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.TextExpansionQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropModelId, value.ModelId, null, null); writer.WriteProperty(options, PropModelText, value.ModelText, null, null); writer.WriteProperty(options, PropPruningConfig, value.PruningConfig, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TokenPruningConfig.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TokenPruningConfig.g.cs index 6d7eda07928..462ad1f0976 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TokenPruningConfig.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TokenPruningConfig.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TokenPruningConfig Read(r LocalJsonValue propTokensWeightThreshold = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propOnlyScorePrunedTokens.TryReadProperty(ref reader, options, PropOnlyScorePrunedTokens, null)) + if (propOnlyScorePrunedTokens.TryReadProperty(ref reader, options, PropOnlyScorePrunedTokens, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTokensFreqRatioThreshold.TryReadProperty(ref reader, options, PropTokensFreqRatioThreshold, null)) + if (propTokensFreqRatioThreshold.TryReadProperty(ref reader, options, PropTokensFreqRatioThreshold, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTokensWeightThreshold.TryReadProperty(ref reader, options, PropTokensWeightThreshold, null)) + if (propTokensWeightThreshold.TryReadProperty(ref reader, options, PropTokensWeightThreshold, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TokenPruningConfig Read(r public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.TokenPruningConfig value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropOnlyScorePrunedTokens, value.OnlyScorePrunedTokens, null, null); - writer.WriteProperty(options, PropTokensFreqRatioThreshold, value.TokensFreqRatioThreshold, null, null); - writer.WriteProperty(options, PropTokensWeightThreshold, value.TokensWeightThreshold, null, null); + writer.WriteProperty(options, PropOnlyScorePrunedTokens, value.OnlyScorePrunedTokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTokensFreqRatioThreshold, value.TokensFreqRatioThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTokensWeightThreshold, value.TokensWeightThreshold, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TypeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TypeQuery.g.cs index 527d9d711b2..7c8c9b71df8 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TypeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/TypeQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TypeQuery Read(ref System LocalJsonValue propValue = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.TypeQuery Read(ref System public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.TypeQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDecayFunction.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDecayFunction.g.cs index 4e7f947ae19..e2756365268 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDecayFunction.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDecayFunction.g.cs @@ -35,13 +35,13 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedDecayFunction Read LocalJsonValue> propPlacement = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, null)) + if (propMultiValueMode.TryReadProperty(ref reader, options, PropMultiValueMode, static Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } propField.Initialized = propPlacement.Initialized = true; - reader.ReadProperty(options, out propField.Value, out propPlacement.Value, null, null); + reader.ReadProperty(options, out propField.Value, out propPlacement.Value, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o), null); } reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject); @@ -56,8 +56,8 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedDecayFunction Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.UntypedDecayFunction value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, null); - writer.WriteProperty(options, value.Field, value.Placement, null, null); + writer.WriteProperty(options, PropMultiValueMode, value.MultiValueMode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.MultiValueMode? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, value.Field, value.Placement, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v), null); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDistanceFeatureQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDistanceFeatureQuery.g.cs index 3ee0b466432..d2ca74d5faf 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDistanceFeatureQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedDistanceFeatureQuery.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedDistanceFeatureQue LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedDistanceFeatureQue public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.UntypedDistanceFeatureQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropField, value.Field, null, null); writer.WriteProperty(options, PropOrigin, value.Origin, null, null); writer.WriteProperty(options, PropPivot, value.Pivot, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedRangeQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedRangeQuery.g.cs index 77bc5431175..49f00b90e2f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedRangeQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/UntypedRangeQuery.g.cs @@ -42,7 +42,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQuery Read(re reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -58,7 +58,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQuery Read(re LocalJsonValue propTo = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,7 +98,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQuery Read(re continue; } - if (propRelation.TryReadProperty(ref reader, options, PropRelation, null)) + if (propRelation.TryReadProperty(ref reader, options, PropRelation, static Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -145,9 +145,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQuery Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.UntypedRangeQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropFormat, value.Format, null, null); writer.WriteProperty(options, PropFrom, value.From, null, null); writer.WriteProperty(options, PropGt, value.Gt, null, null); @@ -155,7 +155,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropLt, value.Lt, null, null); writer.WriteProperty(options, PropLte, value.Lte, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); - writer.WriteProperty(options, PropRelation, value.Relation, null, null); + writer.WriteProperty(options, PropRelation, value.Relation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.QueryDsl.RangeRelation? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTimeZone, value.TimeZone, null, null); writer.WriteProperty(options, PropTo, value.To, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WeightedTokensQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WeightedTokensQuery.g.cs index 387bd281b0c..afa9b02f95c 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WeightedTokensQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WeightedTokensQuery.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WeightedTokensQuery Read( reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propBoost = default; @@ -44,7 +44,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WeightedTokensQuery Read( LocalJsonValue> propTokens = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,9 +89,9 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WeightedTokensQuery Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.WeightedTokensQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPruningConfig, value.PruningConfig, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropTokens, value.Tokens, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IDictionary v) => w.WriteDictionaryValue(o, v, null, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WildcardQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WildcardQuery.g.cs index f3aa63bca5c..134be008ca3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WildcardQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WildcardQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WildcardQuery Read(ref Sy reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue propField = default; reader.Read(); - propField.ReadPropertyName(ref reader, options, null); + propField.ReadPropertyName(ref reader, options, static Elastic.Clients.Elasticsearch.Field (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)); reader.Read(); if (reader.TokenType is not System.Text.Json.JsonTokenType.StartObject) { @@ -59,12 +59,12 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WildcardQuery Read(ref Sy LocalJsonValue propWildcard = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, null)) + if (propCaseInsensitive.TryReadProperty(ref reader, options, PropCaseInsensitive, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -116,10 +116,10 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WildcardQuery Read(ref Sy public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.WildcardQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WritePropertyName(options, value.Field, null); + writer.WritePropertyName(options, value.Field, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Field v) => w.WritePropertyName(o, v)); writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); - writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropCaseInsensitive, value.CaseInsensitive, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteProperty(options, PropRewrite, value.Rewrite, null, null); writer.WriteProperty(options, PropValue, value.Value, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WrapperQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WrapperQuery.g.cs index f72bda4553f..4f16f9a5335 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WrapperQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryDsl/WrapperQuery.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WrapperQuery Read(ref Sys LocalJsonValue propQueryName = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBoost.TryReadProperty(ref reader, options, PropBoost, null)) + if (propBoost.TryReadProperty(ref reader, options, PropBoost, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.QueryDsl.WrapperQuery Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.QueryDsl.WrapperQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBoost, value.Boost, null, null); + writer.WriteProperty(options, PropBoost, value.Boost, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQuery, value.Query, null, null); writer.WriteProperty(options, PropQueryName, value.QueryName, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRule.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRule.g.cs index a8f71cdbfcc..f5fdf9fe241 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRule.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/QueryRules/QueryRule.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.QueryRules.QueryRule Read(ref Syst continue; } - if (propPriority.TryReadProperty(ref reader, options, PropPriority, null)) + if (propPriority.TryReadProperty(ref reader, options, PropPriority, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropActions, value.Actions, null, null); writer.WriteProperty(options, PropCriteria, value.Criteria, 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, PropPriority, value.Priority, null, null); + writer.WriteProperty(options, PropPriority, value.Priority, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRuleId, value.RuleId, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RRFRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RRFRetriever.g.cs index 842bb5964c5..46439d71722 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RRFRetriever.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RRFRetriever.g.cs @@ -27,6 +27,7 @@ internal sealed partial class RRFRetrieverConverter : System.Text.Json.Serializa { private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); private static readonly System.Text.Json.JsonEncodedText PropRankConstant = System.Text.Json.JsonEncodedText.Encode("rank_constant"); private static readonly System.Text.Json.JsonEncodedText PropRankWindowSize = System.Text.Json.JsonEncodedText.Encode("rank_window_size"); private static readonly System.Text.Json.JsonEncodedText PropRetrievers = System.Text.Json.JsonEncodedText.Encode("retrievers"); @@ -36,6 +37,7 @@ public override Elastic.Clients.Elasticsearch.RRFRetriever Read(ref System.Text. reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); LocalJsonValue?> propFilter = default; LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; LocalJsonValue propRankConstant = default; LocalJsonValue propRankWindowSize = default; LocalJsonValue> propRetrievers = default; @@ -46,17 +48,22 @@ public override Elastic.Clients.Elasticsearch.RRFRetriever Read(ref System.Text. continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRankConstant.TryReadProperty(ref reader, options, PropRankConstant, null)) + if (propName.TryReadProperty(ref reader, options, PropName, null)) { continue; } - if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, null)) + if (propRankConstant.TryReadProperty(ref reader, options, PropRankConstant, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -80,6 +87,7 @@ public override Elastic.Clients.Elasticsearch.RRFRetriever Read(ref System.Text. { Filter = propFilter.Value, MinScore = propMinScore.Value, + Name = propName.Value, RankConstant = propRankConstant.Value, RankWindowSize = propRankWindowSize.Value, Retrievers = propRetrievers.Value @@ -90,9 +98,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFilter, value.Filter, 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, PropMinScore, value.MinScore, null, null); - writer.WriteProperty(options, PropRankConstant, value.RankConstant, null, null); - writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); + writer.WriteProperty(options, PropRankConstant, value.RankConstant, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRetrievers, value.Retrievers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); } @@ -137,6 +146,13 @@ internal RRFRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructo /// public float? MinScore { get; set; } + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + /// /// /// This value determines how much influence documents in individual result sets per query have over the final ranked result set. @@ -232,6 +248,17 @@ public Elastic.Clients.Elasticsearch.RrfRetrieverDescriptor MinScore( return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.RrfRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// This value determines how much influence documents in individual result sets per query have over the final ranked result set. @@ -388,6 +415,17 @@ public Elastic.Clients.Elasticsearch.RrfRetrieverDescriptor MinScore(float? valu return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.RrfRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// This value determines how much influence documents in individual result sets per query have over the final ranked result set. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RescorerRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RescorerRetriever.g.cs new file mode 100644 index 00000000000..9c14a9f9919 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RescorerRetriever.g.cs @@ -0,0 +1,473 @@ +// 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; + +internal sealed partial class RescorerRetrieverConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); + private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); + 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"); + + public override Elastic.Clients.Elasticsearch.RescorerRetriever Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue?> propFilter = default; + LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; + LocalJsonValue> propRescore = default; + LocalJsonValue propRetriever = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propFilter.TryReadProperty(ref reader, options, PropFilter, static System.Collections.Generic.ICollection? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null))) + { + continue; + } + + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propName.TryReadProperty(ref reader, options, PropName, 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 (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.RescorerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Filter = propFilter.Value, + MinScore = propMinScore.Value, + Name = propName.Value, + Rescore = propRescore.Value, + Retriever = propRetriever.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.RescorerRetriever value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropFilter, value.Filter, 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, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, 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.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.RescorerRetrieverConverter))] +public sealed partial class RescorerRetriever +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RescorerRetriever(System.Collections.Generic.ICollection rescore, Elastic.Clients.Elasticsearch.Retriever retriever) + { + Rescore = rescore; + Retriever = retriever; + } +#if NET7_0_OR_GREATER + public RescorerRetriever() + { + } +#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 RescorerRetriever() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal RescorerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public System.Collections.Generic.ICollection? Filter { get; set; } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public float? MinScore { get; set; } + + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + System.Collections.Generic.ICollection Rescore { get; set; } + + /// + /// + /// Inner retriever. + /// + /// + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Retriever Retriever { get; set; } +} + +public readonly partial struct RescorerRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.RescorerRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RescorerRetrieverDescriptor(Elastic.Clients.Elasticsearch.RescorerRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RescorerRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.RescorerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor(Elastic.Clients.Elasticsearch.RescorerRetriever instance) => new Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.RescorerRetriever(Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Filter(System.Collections.Generic.ICollection? value) + { + Instance.Filter = value; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Filter(params Elastic.Clients.Elasticsearch.QueryDsl.Query[] values) + { + Instance.Filter = [.. values]; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Filter(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor MinScore(float? value) + { + Instance.MinScore = value; + return this; + } + + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Rescore(System.Collections.Generic.ICollection value) + { + Instance.Rescore = value; + return this; + } + + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Rescore(params Elastic.Clients.Elasticsearch.Core.Search.Rescore[] values) + { + Instance.Rescore = [.. values]; + return this; + } + + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Rescore(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.Core.Search.RescoreDescriptor.Build(action)); + } + + Instance.Rescore = items; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever value) + { + Instance.Retriever = value; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Retriever(System.Action> action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.RescorerRetriever Build(System.Action> action) + { + var builder = new Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor(new Elastic.Clients.Elasticsearch.RescorerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)); + action.Invoke(builder); + return builder.Instance; + } +} + +public readonly partial struct RescorerRetrieverDescriptor +{ + internal Elastic.Clients.Elasticsearch.RescorerRetriever Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RescorerRetrieverDescriptor(Elastic.Clients.Elasticsearch.RescorerRetriever instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public RescorerRetrieverDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.RescorerRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor(Elastic.Clients.Elasticsearch.RescorerRetriever instance) => new Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.RescorerRetriever(Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor descriptor) => descriptor.Instance; + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Filter(System.Collections.Generic.ICollection? value) + { + Instance.Filter = value; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Filter(params Elastic.Clients.Elasticsearch.QueryDsl.Query[] values) + { + Instance.Filter = [.. values]; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Filter(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + /// + /// + /// Query to filter the documents that can match. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Filter(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.QueryDsl.QueryDescriptor.Build(action)); + } + + Instance.Filter = items; + return this; + } + + /// + /// + /// Minimum _score for matching documents. Documents with a lower _score are not included in the top documents. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor MinScore(float? value) + { + Instance.MinScore = value; + return this; + } + + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Rescore(System.Collections.Generic.ICollection value) + { + Instance.Rescore = value; + return this; + } + + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Rescore(params Elastic.Clients.Elasticsearch.Core.Search.Rescore[] values) + { + Instance.Rescore = [.. values]; + return this; + } + + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Rescore(params System.Action[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.Core.Search.RescoreDescriptor.Build(action)); + } + + Instance.Rescore = items; + return this; + } + + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Rescore(params System.Action>[] actions) + { + var items = new System.Collections.Generic.List(); + foreach (var action in actions) + { + items.Add(Elastic.Clients.Elasticsearch.Core.Search.RescoreDescriptor.Build(action)); + } + + Instance.Rescore = items; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Retriever(Elastic.Clients.Elasticsearch.Retriever value) + { + Instance.Retriever = value; + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Retriever(System.Action action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// Inner retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor Retriever(System.Action> action) + { + Instance.Retriever = Elastic.Clients.Elasticsearch.RetrieverDescriptor.Build(action); + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.RescorerRetriever Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor(new Elastic.Clients.Elasticsearch.RescorerRetriever(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/Retriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Retriever.g.cs index f7d1e6f2f9c..073cc728a65 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Retriever.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Retriever.g.cs @@ -26,6 +26,9 @@ namespace Elastic.Clients.Elasticsearch; internal sealed partial class RetrieverConverter : System.Text.Json.Serialization.JsonConverter { private static readonly System.Text.Json.JsonEncodedText VariantKnn = System.Text.Json.JsonEncodedText.Encode("knn"); + private static readonly System.Text.Json.JsonEncodedText VariantLinear = System.Text.Json.JsonEncodedText.Encode("linear"); + private static readonly System.Text.Json.JsonEncodedText VariantPinned = System.Text.Json.JsonEncodedText.Encode("pinned"); + private static readonly System.Text.Json.JsonEncodedText VariantRescorer = System.Text.Json.JsonEncodedText.Encode("rescorer"); private static readonly System.Text.Json.JsonEncodedText VariantRrf = System.Text.Json.JsonEncodedText.Encode("rrf"); private static readonly System.Text.Json.JsonEncodedText VariantRule = System.Text.Json.JsonEncodedText.Encode("rule"); private static readonly System.Text.Json.JsonEncodedText VariantStandard = System.Text.Json.JsonEncodedText.Encode("standard"); @@ -46,6 +49,30 @@ public override Elastic.Clients.Elasticsearch.Retriever Read(ref System.Text.Jso continue; } + if (reader.ValueTextEquals(VariantLinear)) + { + variantType = VariantLinear.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + + if (reader.ValueTextEquals(VariantPinned)) + { + variantType = VariantPinned.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + + if (reader.ValueTextEquals(VariantRescorer)) + { + variantType = VariantRescorer.Value; + reader.Read(); + variant = reader.ReadValue(options, null); + continue; + } + if (reader.ValueTextEquals(VariantRrf)) { variantType = VariantRrf.Value; @@ -105,6 +132,15 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien case "knn": writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.KnnRetriever)value.Variant, null, null); break; + case "linear": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.LinearRetriever)value.Variant, null, null); + break; + case "pinned": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.PinnedRetriever)value.Variant, null, null); + break; + case "rescorer": + writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.RescorerRetriever)value.Variant, null, null); + break; case "rrf": writer.WriteProperty(options, value.VariantType, (Elastic.Clients.Elasticsearch.RRFRetriever)value.Variant, null, null); break; @@ -153,6 +189,28 @@ internal Retriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSe /// public Elastic.Clients.Elasticsearch.KnnRetriever? Knn { get => GetVariant("knn"); set => SetVariant("knn", value); } + /// + /// + /// A retriever that supports the combination of different retrievers through a weighted linear combination. + /// + /// + public Elastic.Clients.Elasticsearch.LinearRetriever? Linear { get => GetVariant("linear"); set => SetVariant("linear", value); } + + /// + /// + /// A pinned retriever applies pinned documents to the underlying retriever. + /// This retriever will rewrite to a PinnedQueryBuilder. + /// + /// + public Elastic.Clients.Elasticsearch.PinnedRetriever? Pinned { get => GetVariant("pinned"); set => SetVariant("pinned", value); } + + /// + /// + /// A retriever that re-scores only the results produced by its child retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RescorerRetriever? Rescorer { get => GetVariant("rescorer"); set => SetVariant("rescorer", value); } + /// /// /// A retriever that produces top documents from reciprocal rank fusion (RRF). @@ -182,6 +240,9 @@ internal Retriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSe public Elastic.Clients.Elasticsearch.TextSimilarityReranker? TextSimilarityReranker { get => GetVariant("text_similarity_reranker"); set => SetVariant("text_similarity_reranker", value); } public static implicit operator Elastic.Clients.Elasticsearch.Retriever(Elastic.Clients.Elasticsearch.KnnRetriever value) => new Elastic.Clients.Elasticsearch.Retriever { Knn = value }; + public static implicit operator Elastic.Clients.Elasticsearch.Retriever(Elastic.Clients.Elasticsearch.LinearRetriever value) => new Elastic.Clients.Elasticsearch.Retriever { Linear = value }; + public static implicit operator Elastic.Clients.Elasticsearch.Retriever(Elastic.Clients.Elasticsearch.PinnedRetriever value) => new Elastic.Clients.Elasticsearch.Retriever { Pinned = value }; + public static implicit operator Elastic.Clients.Elasticsearch.Retriever(Elastic.Clients.Elasticsearch.RescorerRetriever value) => new Elastic.Clients.Elasticsearch.Retriever { Rescorer = value }; public static implicit operator Elastic.Clients.Elasticsearch.Retriever(Elastic.Clients.Elasticsearch.RRFRetriever value) => new Elastic.Clients.Elasticsearch.Retriever { Rrf = value }; public static implicit operator Elastic.Clients.Elasticsearch.Retriever(Elastic.Clients.Elasticsearch.RuleRetriever value) => new Elastic.Clients.Elasticsearch.Retriever { Rule = value }; public static implicit operator Elastic.Clients.Elasticsearch.Retriever(Elastic.Clients.Elasticsearch.StandardRetriever value) => new Elastic.Clients.Elasticsearch.Retriever { Standard = value }; @@ -247,6 +308,74 @@ public Elastic.Clients.Elasticsearch.RetrieverDescriptor Knn(System.A return this; } + /// + /// + /// A retriever that supports the combination of different retrievers through a weighted linear combination. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Linear(Elastic.Clients.Elasticsearch.LinearRetriever? value) + { + Instance.Linear = value; + return this; + } + + /// + /// + /// A retriever that supports the combination of different retrievers through a weighted linear combination. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Linear(System.Action> action) + { + Instance.Linear = Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// A pinned retriever applies pinned documents to the underlying retriever. + /// This retriever will rewrite to a PinnedQueryBuilder. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Pinned(Elastic.Clients.Elasticsearch.PinnedRetriever? value) + { + Instance.Pinned = value; + return this; + } + + /// + /// + /// A pinned retriever applies pinned documents to the underlying retriever. + /// This retriever will rewrite to a PinnedQueryBuilder. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Pinned(System.Action> action) + { + Instance.Pinned = Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// A retriever that re-scores only the results produced by its child retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Rescorer(Elastic.Clients.Elasticsearch.RescorerRetriever? value) + { + Instance.Rescorer = value; + return this; + } + + /// + /// + /// A retriever that re-scores only the results produced by its child retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Rescorer(System.Action> action) + { + Instance.Rescorer = Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor.Build(action); + return this; + } + /// /// /// A retriever that produces top documents from reciprocal rank fusion (RRF). @@ -407,6 +536,108 @@ public Elastic.Clients.Elasticsearch.RetrieverDescriptor Knn(System.Action + /// + /// A retriever that supports the combination of different retrievers through a weighted linear combination. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Linear(Elastic.Clients.Elasticsearch.LinearRetriever? value) + { + Instance.Linear = value; + return this; + } + + /// + /// + /// A retriever that supports the combination of different retrievers through a weighted linear combination. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Linear(System.Action action) + { + Instance.Linear = Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// A retriever that supports the combination of different retrievers through a weighted linear combination. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Linear(System.Action> action) + { + Instance.Linear = Elastic.Clients.Elasticsearch.LinearRetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// A pinned retriever applies pinned documents to the underlying retriever. + /// This retriever will rewrite to a PinnedQueryBuilder. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Pinned(Elastic.Clients.Elasticsearch.PinnedRetriever? value) + { + Instance.Pinned = value; + return this; + } + + /// + /// + /// A pinned retriever applies pinned documents to the underlying retriever. + /// This retriever will rewrite to a PinnedQueryBuilder. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Pinned(System.Action action) + { + Instance.Pinned = Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// A pinned retriever applies pinned documents to the underlying retriever. + /// This retriever will rewrite to a PinnedQueryBuilder. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Pinned(System.Action> action) + { + Instance.Pinned = Elastic.Clients.Elasticsearch.PinnedRetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// A retriever that re-scores only the results produced by its child retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Rescorer(Elastic.Clients.Elasticsearch.RescorerRetriever? value) + { + Instance.Rescorer = value; + return this; + } + + /// + /// + /// A retriever that re-scores only the results produced by its child retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Rescorer(System.Action action) + { + Instance.Rescorer = Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor.Build(action); + return this; + } + + /// + /// + /// A retriever that re-scores only the results produced by its child retriever. + /// + /// + public Elastic.Clients.Elasticsearch.RetrieverDescriptor Rescorer(System.Action> action) + { + Instance.Rescorer = Elastic.Clients.Elasticsearch.RescorerRetrieverDescriptor.Build(action); + return this; + } + /// /// /// A retriever that produces top documents from reciprocal rank fusion (RRF). diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupJobStatus.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupJobStatus.g.cs index bf00bb6fa71..2eb518d0398 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupJobStatus.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Rollup/RollupJobStatus.g.cs @@ -47,7 +47,7 @@ public override Elastic.Clients.Elasticsearch.Rollup.RollupJobStatus Read(ref Sy continue; } - if (propUpgradedDocId.TryReadProperty(ref reader, options, PropUpgradedDocId, null)) + if (propUpgradedDocId.TryReadProperty(ref reader, options, PropUpgradedDocId, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCurrentPosition, value.CurrentPosition, 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, PropJobState, value.JobState, null, null); - writer.WriteProperty(options, PropUpgradedDocId, value.UpgradedDocId, null, null); + writer.WriteProperty(options, PropUpgradedDocId, value.UpgradedDocId, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RrfRank.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RrfRank.g.cs index 07f5fc92086..be20a9713aa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RrfRank.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RrfRank.g.cs @@ -35,12 +35,12 @@ public override Elastic.Clients.Elasticsearch.RrfRank Read(ref System.Text.Json. LocalJsonValue propRankWindowSize = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propRankConstant.TryReadProperty(ref reader, options, PropRankConstant, null)) + if (propRankConstant.TryReadProperty(ref reader, options, PropRankConstant, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, null)) + if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,8 +65,8 @@ public override Elastic.Clients.Elasticsearch.RrfRank Read(ref System.Text.Json. public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.RrfRank value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropRankConstant, value.RankConstant, null, null); - writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, null); + writer.WriteProperty(options, PropRankConstant, value.RankConstant, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RuleRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RuleRetriever.g.cs index d28da52f8dd..a6d838fd184 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/RuleRetriever.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/RuleRetriever.g.cs @@ -28,6 +28,7 @@ internal sealed partial class RuleRetrieverConverter : System.Text.Json.Serializ private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); private static readonly System.Text.Json.JsonEncodedText PropMatchCriteria = System.Text.Json.JsonEncodedText.Encode("match_criteria"); private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); private static readonly System.Text.Json.JsonEncodedText PropRankWindowSize = System.Text.Json.JsonEncodedText.Encode("rank_window_size"); private static readonly System.Text.Json.JsonEncodedText PropRetriever = System.Text.Json.JsonEncodedText.Encode("retriever"); private static readonly System.Text.Json.JsonEncodedText PropRulesetIds = System.Text.Json.JsonEncodedText.Encode("ruleset_ids"); @@ -38,6 +39,7 @@ public override Elastic.Clients.Elasticsearch.RuleRetriever Read(ref System.Text LocalJsonValue?> propFilter = default; LocalJsonValue propMatchCriteria = default; LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; LocalJsonValue propRankWindowSize = default; LocalJsonValue propRetriever = default; LocalJsonValue> propRulesetIds = default; @@ -53,12 +55,17 @@ public override Elastic.Clients.Elasticsearch.RuleRetriever Read(ref System.Text continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, null)) + if (propName.TryReadProperty(ref reader, options, PropName, null)) + { + continue; + } + + if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.RuleRetriever Read(ref System.Text continue; } - if (propRulesetIds.TryReadProperty(ref reader, options, PropRulesetIds, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadCollectionValue(o, null)!)) + if (propRulesetIds.TryReadProperty(ref reader, options, PropRulesetIds, static System.Collections.Generic.ICollection (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadSingleOrManyCollectionValue(o, null)!)) { continue; } @@ -88,6 +95,7 @@ public override Elastic.Clients.Elasticsearch.RuleRetriever Read(ref System.Text Filter = propFilter.Value, MatchCriteria = propMatchCriteria.Value, MinScore = propMinScore.Value, + Name = propName.Value, RankWindowSize = propRankWindowSize.Value, Retriever = propRetriever.Value, RulesetIds = propRulesetIds.Value @@ -99,10 +107,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFilter, value.Filter, 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, PropMatchCriteria, value.MatchCriteria, null, null); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); - writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); + writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRetriever, value.Retriever, null, null); - writer.WriteProperty(options, PropRulesetIds, value.RulesetIds, 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, PropRulesetIds, value.RulesetIds, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.ICollection v) => w.WriteSingleOrManyCollectionValue(o, v, null)); writer.WriteEndObject(); } } @@ -159,6 +168,13 @@ internal RuleRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConstruct /// public float? MinScore { get; set; } + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + /// /// /// This value determines the size of the individual result set. @@ -269,6 +285,17 @@ public Elastic.Clients.Elasticsearch.RuleRetrieverDescriptor MinScore return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.RuleRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// This value determines the size of the individual result set. @@ -430,6 +457,17 @@ public Elastic.Clients.Elasticsearch.RuleRetrieverDescriptor MinScore(float? val return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.RuleRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// This value determines the size of the individual result set. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScoreSort.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScoreSort.g.cs index 2c746ec1963..366334209c5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScoreSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScoreSort.g.cs @@ -33,7 +33,7 @@ public override Elastic.Clients.Elasticsearch.ScoreSort Read(ref System.Text.Jso LocalJsonValue propOrder = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.ScoreSort Read(ref System.Text.Jso public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ScoreSort value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropOrder, value.Order, null, null); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Script.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Script.g.cs index 0ff4bb31a8e..3d8e0af5615 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Script.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Script.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.Script Read(ref System.Text.Json.U continue; } - if (propLang.TryReadProperty(ref reader, options, PropLang, null)) + if (propLang.TryReadProperty(ref reader, options, PropLang, static Elastic.Clients.Elasticsearch.ScriptLanguage? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -99,7 +99,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropId, value.Id, null, null); - writer.WriteProperty(options, PropLang, value.Lang, null, null); + writer.WriteProperty(options, PropLang, value.Lang, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.ScriptLanguage? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOptions, value.Options, 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, PropParams, value.Params, 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, PropSource, value.Source, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptField.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptField.g.cs index 3d72f6596cf..2aed450990f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptField.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptField.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.ScriptField Read(ref System.Text.J LocalJsonValue propScript = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, null)) + if (propIgnoreFailure.TryReadProperty(ref reader, options, PropIgnoreFailure, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.ScriptField Read(ref System.Text.J public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ScriptField value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, null); + writer.WriteProperty(options, PropIgnoreFailure, value.IgnoreFailure, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptSort.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptSort.g.cs index 47eadc2edf3..90041477fd7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptSort.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ScriptSort.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.ScriptSort Read(ref System.Text.Js LocalJsonValue propType = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propMode.TryReadProperty(ref reader, options, PropMode, null)) + if (propMode.TryReadProperty(ref reader, options, PropMode, static Elastic.Clients.Elasticsearch.SortMode? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.ScriptSort Read(ref System.Text.Js continue; } - if (propOrder.TryReadProperty(ref reader, options, PropOrder, null)) + if (propOrder.TryReadProperty(ref reader, options, PropOrder, static Elastic.Clients.Elasticsearch.SortOrder? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.ScriptSort Read(ref System.Text.Js continue; } - if (propType.TryReadProperty(ref reader, options, PropType, null)) + if (propType.TryReadProperty(ref reader, options, PropType, static Elastic.Clients.Elasticsearch.ScriptSortType? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,11 +89,11 @@ public override Elastic.Clients.Elasticsearch.ScriptSort Read(ref System.Text.Js public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.ScriptSort value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropMode, value.Mode, null, null); + writer.WriteProperty(options, PropMode, value.Mode, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortMode? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNested, value.Nested, null, null); - writer.WriteProperty(options, PropOrder, value.Order, null, null); + writer.WriteProperty(options, PropOrder, value.Order, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.SortOrder? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropScript, value.Script, null, null); - writer.WriteProperty(options, PropType, value.Type, null, null); + writer.WriteProperty(options, PropType, value.Type, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.ScriptSortType? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchStats.g.cs index 956170445cd..b30afe6cb3a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SearchStats.g.cs @@ -92,7 +92,7 @@ public override Elastic.Clients.Elasticsearch.SearchStats Read(ref System.Text.J continue; } - if (propOpenContexts.TryReadProperty(ref reader, options, PropOpenContexts, null)) + if (propOpenContexts.TryReadProperty(ref reader, options, PropOpenContexts, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -198,7 +198,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropFetchTimeInMillis, value.FetchTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); writer.WriteProperty(options, PropFetchTotal, value.FetchTotal, null, null); writer.WriteProperty(options, PropGroups, value.Groups, 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, PropOpenContexts, value.OpenContexts, null, null); + writer.WriteProperty(options, PropOpenContexts, value.OpenContexts, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropQueryCurrent, value.QueryCurrent, null, null); writer.WriteProperty(options, PropQueryTime, value.QueryTime, null, null); writer.WriteProperty(options, PropQueryTimeInMillis, value.QueryTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKey.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKey.g.cs index f8acfd0daa7..9bc31550b1e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKey.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKey.g.cs @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.Security.ApiKey Read(ref System.Te continue; } - if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propExpiration.TryReadProperty(ref reader, options, PropExpiration, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -88,7 +88,7 @@ public override Elastic.Clients.Elasticsearch.Security.ApiKey Read(ref System.Te continue; } - if (propInvalidation.TryReadProperty(ref reader, options, PropInvalidation, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propInvalidation.TryReadProperty(ref reader, options, PropInvalidation, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -179,10 +179,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAccess, value.Access, null, null); writer.WriteProperty(options, PropCreation, value.Creation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropExpiration, value.Expiration, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropExpiration, value.Expiration, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropId, value.Id, null, null); writer.WriteProperty(options, PropInvalidated, value.Invalidated, null, null); - writer.WriteProperty(options, PropInvalidation, value.Invalidation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropInvalidation, value.Invalidation, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropLimitedBy, value.LimitedBy, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection>? v) => w.WriteCollectionValue>(o, v, 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, PropMetadata, value.Metadata, 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, PropName, value.Name, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyFiltersAggregation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyFiltersAggregation.g.cs index dfa954dfe67..de4f121fb88 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyFiltersAggregation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ApiKeyFiltersAggregation.g.cs @@ -44,12 +44,12 @@ public override Elastic.Clients.Elasticsearch.Security.ApiKeyFiltersAggregation continue; } - if (propKeyed.TryReadProperty(ref reader, options, PropKeyed, null)) + if (propKeyed.TryReadProperty(ref reader, options, PropKeyed, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOtherBucket.TryReadProperty(ref reader, options, PropOtherBucket, null)) + if (propOtherBucket.TryReadProperty(ref reader, options, PropOtherBucket, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -82,8 +82,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropFilters, value.Filters, null, null); - writer.WriteProperty(options, PropKeyed, value.Keyed, null, null); - writer.WriteProperty(options, PropOtherBucket, value.OtherBucket, null, null); + writer.WriteProperty(options, PropKeyed, value.Keyed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOtherBucket, value.OtherBucket, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOtherBucketKey, value.OtherBucketKey, null, null); writer.WriteEndObject(); } 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/IndexPrivilegesCheck.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndexPrivilegesCheck.g.cs index 26d37cc0d4e..53238be937a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndexPrivilegesCheck.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndexPrivilegesCheck.g.cs @@ -37,7 +37,7 @@ public override Elastic.Clients.Elasticsearch.Security.IndexPrivilegesCheck Read LocalJsonValue> propPrivileges = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, null)) + if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,7 +73,7 @@ public override Elastic.Clients.Elasticsearch.Security.IndexPrivilegesCheck Read public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.IndexPrivilegesCheck value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, null); + writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNames, value.Names, null, 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.WriteEndObject(); 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..ac14f9cbfdc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndicesPrivileges.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/IndicesPrivileges.g.cs @@ -41,7 +41,7 @@ public override Elastic.Clients.Elasticsearch.Security.IndicesPrivileges Read(re LocalJsonValue propQuery = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, null)) + if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -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; } @@ -89,9 +89,9 @@ public override Elastic.Clients.Elasticsearch.Security.IndicesPrivileges Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.IndicesPrivileges value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, null); + writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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..f42c8c85a63 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteIndicesPrivileges.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RemoteIndicesPrivileges.g.cs @@ -43,7 +43,7 @@ public override Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivileges R LocalJsonValue propQuery = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, null)) + if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -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; } @@ -97,10 +97,10 @@ public override Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivileges R public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.RemoteIndicesPrivileges value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, null); + writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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/ReplicationAccess.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ReplicationAccess.g.cs index 27b21e26992..03458bc56b7 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ReplicationAccess.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/ReplicationAccess.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Security.ReplicationAccess Read(re LocalJsonValue> propNames = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, null)) + if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Security.ReplicationAccess Read(re public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.ReplicationAccess value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, null); + writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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.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/RoleTemplate.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleTemplate.g.cs index 2440efb702e..c1cc0c08b05 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleTemplate.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/RoleTemplate.g.cs @@ -35,7 +35,7 @@ public override Elastic.Clients.Elasticsearch.Security.RoleTemplate Read(ref Sys LocalJsonValue propTemplate = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propFormat.TryReadProperty(ref reader, options, PropFormat, null)) + if (propFormat.TryReadProperty(ref reader, options, PropFormat, static Elastic.Clients.Elasticsearch.Security.TemplateFormat? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -65,7 +65,7 @@ public override Elastic.Clients.Elasticsearch.Security.RoleTemplate Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.RoleTemplate value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropFormat, value.Format, null, null); + writer.WriteProperty(options, PropFormat, value.Format, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, Elastic.Clients.Elasticsearch.Security.TemplateFormat? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTemplate, value.Template, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/SearchAccess.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/SearchAccess.g.cs index 4f329afeb36..c9e7822df35 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/SearchAccess.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/SearchAccess.g.cs @@ -39,7 +39,7 @@ public override Elastic.Clients.Elasticsearch.Security.SearchAccess Read(ref Sys LocalJsonValue propQuery = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, null)) + if (propAllowRestrictedIndices.TryReadProperty(ref reader, options, PropAllowRestrictedIndices, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,7 +81,7 @@ public override Elastic.Clients.Elasticsearch.Security.SearchAccess Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Security.SearchAccess value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, null); + writer.WriteProperty(options, PropAllowRestrictedIndices, value.AllowRestrictedIndices, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropQuery, value.Query, null, null); 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/Security/UserProfile.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfile.g.cs index 09f134ea338..861d13d5f68 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfile.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfile.g.cs @@ -46,7 +46,7 @@ public override Elastic.Clients.Elasticsearch.Security.UserProfile Read(ref Syst continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -90,7 +90,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropData, value.Data, 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, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLabels, value.Labels, 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, PropUid, value.Uid, null, null); writer.WriteProperty(options, PropUser, value.User, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfileWithMetadata.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfileWithMetadata.g.cs index ce64bfae5c6..87e0405d6b3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfileWithMetadata.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Security/UserProfileWithMetadata.g.cs @@ -55,7 +55,7 @@ public override Elastic.Clients.Elasticsearch.Security.UserProfileWithMetadata R continue; } - if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, null)) + if (propEnabled.TryReadProperty(ref reader, options, PropEnabled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,7 +107,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropData, value.Data, 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, PropDoc, value.Doc, null, null); - writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); + writer.WriteProperty(options, PropEnabled, value.Enabled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLabels, value.Labels, 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, PropLastSynchronized, value.LastSynchronized, null, null); writer.WriteProperty(options, PropUid, value.Uid, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs index e77280ab225..d87428ad2bb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SegmentsStats.g.cs @@ -109,7 +109,7 @@ public override Elastic.Clients.Elasticsearch.SegmentsStats Read(ref System.Text continue; } - if (propIndexWriterMaxMemoryInBytes.TryReadProperty(ref reader, options, PropIndexWriterMaxMemoryInBytes, null)) + if (propIndexWriterMaxMemoryInBytes.TryReadProperty(ref reader, options, PropIndexWriterMaxMemoryInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -247,7 +247,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropFileSizes, value.FileSizes, 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, PropFixedBitSet, value.FixedBitSet, null, null); writer.WriteProperty(options, PropFixedBitSetMemoryInBytes, value.FixedBitSetMemoryInBytes, null, null); - writer.WriteProperty(options, PropIndexWriterMaxMemoryInBytes, value.IndexWriterMaxMemoryInBytes, null, null); + writer.WriteProperty(options, PropIndexWriterMaxMemoryInBytes, value.IndexWriterMaxMemoryInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexWriterMemory, value.IndexWriterMemory, null, null); writer.WriteProperty(options, PropIndexWriterMemoryInBytes, value.IndexWriterMemoryInBytes, null, null); writer.WriteProperty(options, PropMaxUnsafeAutoIdTimestamp, value.MaxUnsafeAutoIdTimestamp, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStatistics.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStatistics.g.cs index 12f0024f2c7..c2554ee2d28 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStatistics.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/ShardStatistics.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.ShardStatistics Read(ref System.Te continue; } - if (propSkipped.TryReadProperty(ref reader, options, PropSkipped, null)) + if (propSkipped.TryReadProperty(ref reader, options, PropSkipped, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,7 +91,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropFailed, value.Failed, null, null); writer.WriteProperty(options, PropFailures, value.Failures, 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, PropSkipped, value.Skipped, null, null); + writer.WriteProperty(options, PropSkipped, value.Skipped, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropSuccessful, value.Successful, null, null); writer.WriteProperty(options, PropTotal, value.Total, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Simulate/IngestDocumentSimulation.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Simulate/IngestDocumentSimulation.g.cs index 0310dba2d67..0b244f0dc31 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Simulate/IngestDocumentSimulation.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Simulate/IngestDocumentSimulation.g.cs @@ -82,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.Simulate.IngestDocumentSimulation } propMetadata ??= new System.Collections.Generic.Dictionary(); - reader.ReadProperty(options, out string key, out string value, null, null); + reader.ReadProperty(options, out string key, out string value, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!, static string (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadPropertyName(o)!); propMetadata[key] = value; } @@ -114,7 +114,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { foreach (var item in value.Metadata) { - writer.WriteProperty(options, item.Key, item.Value, null, null); + writer.WriteProperty(options, item.Key, item.Value, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, string v) => w.WritePropertyName(o, v), null); } } 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..d0df7ee1758 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; @@ -68,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings R continue; } - if (propCompress.TryReadProperty(ref reader, options, PropCompress, null)) + if (propCompress.TryReadProperty(ref reader, options, PropCompress, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -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; @@ -103,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.AzureRepositorySettings R continue; } - if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, null)) + if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { 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 @@ -140,14 +124,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropBasePath, value.BasePath, null, null); 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, PropCompress, value.Compress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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); + writer.WriteProperty(options, PropReadonly, value.Readonly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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/DetailsInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/DetailsInfo.g.cs index 3618b89fa58..ca8dbdd3b32 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/DetailsInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/DetailsInfo.g.cs @@ -57,7 +57,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.DetailsInfo Read(ref Syst continue; } - if (propOverwriteElapsedNanos.TryReadProperty(ref reader, options, PropOverwriteElapsedNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) + if (propOverwriteElapsedNanos.TryReadProperty(ref reader, options, PropOverwriteElapsedNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) { continue; } @@ -115,7 +115,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropBlob, value.Blob, null, null); writer.WriteProperty(options, PropOverwriteElapsed, value.OverwriteElapsed, null, null); - writer.WriteProperty(options, PropOverwriteElapsedNanos, value.OverwriteElapsedNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); + writer.WriteProperty(options, PropOverwriteElapsedNanos, value.OverwriteElapsedNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); writer.WriteProperty(options, PropWriteElapsed, value.WriteElapsed, null, null); writer.WriteProperty(options, PropWriteElapsedNanos, value.WriteElapsedNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); writer.WriteProperty(options, PropWriterNode, value.WriterNode, null, null); 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..07dcaf7d3e6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/GcsRepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/GcsRepositorySettings.g.cs @@ -74,7 +74,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettings Rea continue; } - if (propCompress.TryReadProperty(ref reader, options, PropCompress, null)) + if (propCompress.TryReadProperty(ref reader, options, PropCompress, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.GcsRepositorySettings Rea continue; } - if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, null)) + if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -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,18 +121,15 @@ 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); writer.WriteProperty(options, PropClient, value.Client, null, null); - writer.WriteProperty(options, PropCompress, value.Compress, null, null); + writer.WriteProperty(options, PropCompress, value.Compress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropReadonly, value.Readonly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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/ReadBlobDetails.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadBlobDetails.g.cs index db02f1ff1dd..c2c57a4d9f3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadBlobDetails.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadBlobDetails.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.ReadBlobDetails Read(ref LocalJsonValue propThrottledNanos = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propBeforeWriteComplete.TryReadProperty(ref reader, options, PropBeforeWriteComplete, null)) + if (propBeforeWriteComplete.TryReadProperty(ref reader, options, PropBeforeWriteComplete, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -59,7 +59,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.ReadBlobDetails Read(ref continue; } - if (propElapsedNanos.TryReadProperty(ref reader, options, PropElapsedNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) + if (propElapsedNanos.TryReadProperty(ref reader, options, PropElapsedNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) { continue; } @@ -89,7 +89,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.ReadBlobDetails Read(ref continue; } - if (propThrottledNanos.TryReadProperty(ref reader, options, PropThrottledNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) + if (propThrottledNanos.TryReadProperty(ref reader, options, PropThrottledNanos, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker)))) { continue; } @@ -121,15 +121,15 @@ public override Elastic.Clients.Elasticsearch.Snapshot.ReadBlobDetails Read(ref public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Snapshot.ReadBlobDetails value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropBeforeWriteComplete, value.BeforeWriteComplete, null, null); + writer.WriteProperty(options, PropBeforeWriteComplete, value.BeforeWriteComplete, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropElapsed, value.Elapsed, null, null); - writer.WriteProperty(options, PropElapsedNanos, value.ElapsedNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); + writer.WriteProperty(options, PropElapsedNanos, value.ElapsedNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); writer.WriteProperty(options, PropFirstByteTime, value.FirstByteTime, null, null); writer.WriteProperty(options, PropFirstByteTimeNanos, value.FirstByteTimeNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); writer.WriteProperty(options, PropFound, value.Found, null, null); writer.WriteProperty(options, PropNode, value.Node, null, null); writer.WriteProperty(options, PropThrottled, value.Throttled, null, null); - writer.WriteProperty(options, PropThrottledNanos, value.ThrottledNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); + writer.WriteProperty(options, PropThrottledNanos, value.ThrottledNanos, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanNanosMarker))); writer.WriteEndObject(); } } 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..9d0952347ee 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadOnlyUrlRepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/ReadOnlyUrlRepositorySettings.g.cs @@ -52,12 +52,12 @@ public override Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySett continue; } - if (propCompress.TryReadProperty(ref reader, options, PropCompress, null)) + if (propCompress.TryReadProperty(ref reader, options, PropCompress, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propHttpMaxRetries.TryReadProperty(ref reader, options, PropHttpMaxRetries, null)) + if (propHttpMaxRetries.TryReadProperty(ref reader, options, PropHttpMaxRetries, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.ReadOnlyUrlRepositorySett continue; } - if (propMaxNumberOfSnapshots.TryReadProperty(ref reader, options, PropMaxNumberOfSnapshots, null)) + if (propMaxNumberOfSnapshots.TryReadProperty(ref reader, options, PropMaxNumberOfSnapshots, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -114,10 +114,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropChunkSize, value.ChunkSize, null, null); - writer.WriteProperty(options, PropCompress, value.Compress, null, null); - writer.WriteProperty(options, PropHttpMaxRetries, value.HttpMaxRetries, null, null); + writer.WriteProperty(options, PropCompress, value.Compress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropHttpMaxRetries, value.HttpMaxRetries, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropHttpSocketTimeout, value.HttpSocketTimeout, null, null); - writer.WriteProperty(options, PropMaxNumberOfSnapshots, value.MaxNumberOfSnapshots, null, null); + writer.WriteProperty(options, PropMaxNumberOfSnapshots, value.MaxNumberOfSnapshots, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropMaxRestoreBytesPerSec, value.MaxRestoreBytesPerSec, null, null); writer.WriteProperty(options, PropMaxSnapshotBytesPerSec, value.MaxSnapshotBytesPerSec, null, null); writer.WriteProperty(options, PropUrl, value.Url, null, null); @@ -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..c69ce9c016c 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)) @@ -99,27 +85,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings Read continue; } - if (propCompress.TryReadProperty(ref reader, options, PropCompress, null)) - { - 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)) + if (propCompress.TryReadProperty(ref reader, options, PropCompress, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -134,12 +100,12 @@ public override Elastic.Clients.Elasticsearch.Snapshot.S3RepositorySettings Read continue; } - if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, null)) + if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propServerSideEncryption.TryReadProperty(ref reader, options, PropServerSideEncryption, null)) + if (propServerSideEncryption.TryReadProperty(ref reader, options, PropServerSideEncryption, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { 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 }; } @@ -207,19 +151,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCannedAcl, value.CannedAcl, null, null); 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, PropCompress, value.Compress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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, PropReadonly, value.Readonly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropServerSideEncryption, value.ServerSideEncryption, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); 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..1c7adb713bd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SharedFileSystemRepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SharedFileSystemRepositorySettings.g.cs @@ -50,7 +50,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositor continue; } - if (propCompress.TryReadProperty(ref reader, options, PropCompress, null)) + if (propCompress.TryReadProperty(ref reader, options, PropCompress, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -60,7 +60,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositor continue; } - if (propMaxNumberOfSnapshots.TryReadProperty(ref reader, options, PropMaxNumberOfSnapshots, null)) + if (propMaxNumberOfSnapshots.TryReadProperty(ref reader, options, PropMaxNumberOfSnapshots, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SharedFileSystemRepositor continue; } - if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, null)) + if (propReadonly.TryReadProperty(ref reader, options, PropReadonly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -106,12 +106,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropChunkSize, value.ChunkSize, null, null); - writer.WriteProperty(options, PropCompress, value.Compress, null, null); + writer.WriteProperty(options, PropCompress, value.Compress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropLocation, value.Location, null, null); - writer.WriteProperty(options, PropMaxNumberOfSnapshots, value.MaxNumberOfSnapshots, null, null); + writer.WriteProperty(options, PropMaxNumberOfSnapshots, value.MaxNumberOfSnapshots, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropReadonly, value.Readonly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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/SnapshotInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotInfo.g.cs index f9d744ae28b..770edd990a3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SnapshotInfo.g.cs @@ -83,17 +83,17 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SnapshotInfo Read(ref Sys continue; } - if (propDurationInMillis.TryReadProperty(ref reader, options, PropDurationInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propDurationInMillis.TryReadProperty(ref reader, options, PropDurationInMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propEndTime.TryReadProperty(ref reader, options, PropEndTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propEndTime.TryReadProperty(ref reader, options, PropEndTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propEndTimeInMillis.TryReadProperty(ref reader, options, PropEndTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propEndTimeInMillis.TryReadProperty(ref reader, options, PropEndTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -108,7 +108,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SnapshotInfo Read(ref Sys continue; } - if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, null)) + if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -148,12 +148,12 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SnapshotInfo Read(ref Sys 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)))) + if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propStartTimeInMillis.TryReadProperty(ref reader, options, PropStartTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propStartTimeInMillis.TryReadProperty(ref reader, options, PropStartTimeInMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -173,7 +173,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SnapshotInfo Read(ref Sys continue; } - if (propVersionId.TryReadProperty(ref reader, options, PropVersionId, null)) + if (propVersionId.TryReadProperty(ref reader, options, PropVersionId, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -219,12 +219,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDataStreams, value.DataStreams, 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, PropDuration, value.Duration, null, null); - writer.WriteProperty(options, PropDurationInMillis, value.DurationInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - 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, PropEndTimeInMillis, value.EndTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropDurationInMillis, value.DurationInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropEndTime, value.EndTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropEndTimeInMillis, value.EndTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropFailures, value.Failures, 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, PropFeatureStates, value.FeatureStates, 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, PropIncludeGlobalState, value.IncludeGlobalState, null, null); + writer.WriteProperty(options, PropIncludeGlobalState, value.IncludeGlobalState, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndexDetails, value.IndexDetails, 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, PropIndices, value.Indices, 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, PropMetadata, value.Metadata, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary? v) => w.WriteDictionaryValue(o, v, null, null)); @@ -232,12 +232,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropRepository, value.Repository, null, null); writer.WriteProperty(options, PropShards, value.Shards, null, null); writer.WriteProperty(options, PropSnapshot, value.Snapshot, 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.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropStartTime, value.StartTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropState, value.State, null, null); writer.WriteProperty(options, PropUuid, value.Uuid, null, null); writer.WriteProperty(options, PropVersion, value.Version, null, null); - writer.WriteProperty(options, PropVersionId, value.VersionId, null, null); + writer.WriteProperty(options, PropVersionId, value.VersionId, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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..124b3e15101 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SourceOnlyRepositorySettings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Snapshot/SourceOnlyRepositorySettings.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySetti continue; } - if (propCompress.TryReadProperty(ref reader, options, PropCompress, null)) + if (propCompress.TryReadProperty(ref reader, options, PropCompress, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySetti continue; } - if (propMaxNumberOfSnapshots.TryReadProperty(ref reader, options, PropMaxNumberOfSnapshots, null)) + if (propMaxNumberOfSnapshots.TryReadProperty(ref reader, options, PropMaxNumberOfSnapshots, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.Snapshot.SourceOnlyRepositorySetti continue; } - if (propReadOnly.TryReadProperty(ref reader, options, PropReadOnly, null) || propReadOnly.TryReadProperty(ref reader, options, PropReadOnly1, null)) + if (propReadOnly.TryReadProperty(ref reader, options, PropReadOnly, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propReadOnly.TryReadProperty(ref reader, options, PropReadOnly1, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -107,12 +107,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropChunkSize, value.ChunkSize, null, null); - writer.WriteProperty(options, PropCompress, value.Compress, null, null); + writer.WriteProperty(options, PropCompress, value.Compress, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDelegateType, value.DelegateType, null, null); - writer.WriteProperty(options, PropMaxNumberOfSnapshots, value.MaxNumberOfSnapshots, null, null); + writer.WriteProperty(options, PropMaxNumberOfSnapshots, value.MaxNumberOfSnapshots, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); 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, PropReadOnly, value.ReadOnly, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -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/SnapshotLifecycleManagement/SlmConfiguration.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SlmConfiguration.g.cs index 8a058289062..6cc46819e7a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SlmConfiguration.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SlmConfiguration.g.cs @@ -48,12 +48,12 @@ public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.SlmCon continue; } - if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, null)) + if (propIgnoreUnavailable.TryReadProperty(ref reader, options, PropIgnoreUnavailable, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, null)) + if (propIncludeGlobalState.TryReadProperty(ref reader, options, PropIncludeGlobalState, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.SlmCon continue; } - if (propPartial.TryReadProperty(ref reader, options, PropPartial, null)) + if (propPartial.TryReadProperty(ref reader, options, PropPartial, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -98,11 +98,11 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); 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); + writer.WriteProperty(options, PropIgnoreUnavailable, value.IgnoreUnavailable, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropIncludeGlobalState, value.IncludeGlobalState, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndices, value.Indices, null, null); writer.WriteProperty(options, PropMetadata, value.Metadata, 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, PropPartial, value.Partial, null, null); + writer.WriteProperty(options, PropPartial, value.Partial, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs index 4275e774da4..8d8c6982e2f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotLifecycle.g.cs @@ -66,7 +66,7 @@ public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.Snapsh continue; } - if (propModifiedDate.TryReadProperty(ref reader, options, PropModifiedDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propModifiedDate.TryReadProperty(ref reader, options, PropModifiedDate, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -76,7 +76,7 @@ public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.Snapsh continue; } - if (propNextExecution.TryReadProperty(ref reader, options, PropNextExecution, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propNextExecution.TryReadProperty(ref reader, options, PropNextExecution, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -132,9 +132,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropInProgress, value.InProgress, null, null); writer.WriteProperty(options, PropLastFailure, value.LastFailure, null, null); writer.WriteProperty(options, PropLastSuccess, value.LastSuccess, null, null); - writer.WriteProperty(options, PropModifiedDate, value.ModifiedDate, 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, PropModifiedDate, value.ModifiedDate, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropModifiedDateMillis, value.ModifiedDateMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropNextExecution, value.NextExecution, 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, PropNextExecution, value.NextExecution, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropNextExecutionMillis, value.NextExecutionMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropPolicy, value.Policy, null, null); writer.WriteProperty(options, PropStats, value.Stats, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotPolicyStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotPolicyStats.g.cs new file mode 100644 index 00000000000..e0f931fce93 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/SnapshotPolicyStats.g.cs @@ -0,0 +1,155 @@ +// 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.SnapshotLifecycleManagement; + +internal sealed partial class SnapshotPolicyStatsConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropPolicy = System.Text.Json.JsonEncodedText.Encode("policy"); + private static readonly System.Text.Json.JsonEncodedText PropSnapshotDeletionFailures = System.Text.Json.JsonEncodedText.Encode("snapshot_deletion_failures"); + private static readonly System.Text.Json.JsonEncodedText PropSnapshotsDeleted = System.Text.Json.JsonEncodedText.Encode("snapshots_deleted"); + private static readonly System.Text.Json.JsonEncodedText PropSnapshotsFailed = System.Text.Json.JsonEncodedText.Encode("snapshots_failed"); + private static readonly System.Text.Json.JsonEncodedText PropSnapshotsTaken = System.Text.Json.JsonEncodedText.Encode("snapshots_taken"); + + public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.SnapshotPolicyStats Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propPolicy = default; + LocalJsonValue propSnapshotDeletionFailures = default; + LocalJsonValue propSnapshotsDeleted = default; + LocalJsonValue propSnapshotsFailed = default; + LocalJsonValue propSnapshotsTaken = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propPolicy.TryReadProperty(ref reader, options, PropPolicy, null)) + { + continue; + } + + if (propSnapshotDeletionFailures.TryReadProperty(ref reader, options, PropSnapshotDeletionFailures, null)) + { + continue; + } + + if (propSnapshotsDeleted.TryReadProperty(ref reader, options, PropSnapshotsDeleted, null)) + { + continue; + } + + if (propSnapshotsFailed.TryReadProperty(ref reader, options, PropSnapshotsFailed, null)) + { + continue; + } + + if (propSnapshotsTaken.TryReadProperty(ref reader, options, PropSnapshotsTaken, 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.SnapshotLifecycleManagement.SnapshotPolicyStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Policy = propPolicy.Value, + SnapshotDeletionFailures = propSnapshotDeletionFailures.Value, + SnapshotsDeleted = propSnapshotsDeleted.Value, + SnapshotsFailed = propSnapshotsFailed.Value, + SnapshotsTaken = propSnapshotsTaken.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.SnapshotPolicyStats value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropPolicy, value.Policy, null, null); + writer.WriteProperty(options, PropSnapshotDeletionFailures, value.SnapshotDeletionFailures, null, null); + writer.WriteProperty(options, PropSnapshotsDeleted, value.SnapshotsDeleted, null, null); + writer.WriteProperty(options, PropSnapshotsFailed, value.SnapshotsFailed, null, null); + writer.WriteProperty(options, PropSnapshotsTaken, value.SnapshotsTaken, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.SnapshotPolicyStatsConverter))] +public sealed partial class SnapshotPolicyStats +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SnapshotPolicyStats(string policy, long snapshotDeletionFailures, long snapshotsDeleted, long snapshotsFailed, long snapshotsTaken) + { + Policy = policy; + SnapshotDeletionFailures = snapshotDeletionFailures; + SnapshotsDeleted = snapshotsDeleted; + SnapshotsFailed = snapshotsFailed; + SnapshotsTaken = snapshotsTaken; + } +#if NET7_0_OR_GREATER + public SnapshotPolicyStats() + { + } +#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 SnapshotPolicyStats() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal SnapshotPolicyStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + string Policy { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long SnapshotDeletionFailures { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long SnapshotsDeleted { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long SnapshotsFailed { get; set; } + public +#if NET7_0_OR_GREATER + required +#endif + long SnapshotsTaken { get; set; } +} \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/Statistics.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/Statistics.g.cs index aa89a668523..f9eb24c1db6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/Statistics.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SnapshotLifecycleManagement/Statistics.g.cs @@ -65,42 +65,42 @@ public override Elastic.Clients.Elasticsearch.SnapshotLifecycleManagement.Statis continue; } - if (propRetentionDeletionTimeMillis.TryReadProperty(ref reader, options, PropRetentionDeletionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) + if (propRetentionDeletionTimeMillis.TryReadProperty(ref reader, options, PropRetentionDeletionTimeMillis, static System.TimeSpan? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker)))) { continue; } - if (propRetentionFailed.TryReadProperty(ref reader, options, PropRetentionFailed, null)) + if (propRetentionFailed.TryReadProperty(ref reader, options, PropRetentionFailed, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRetentionRuns.TryReadProperty(ref reader, options, PropRetentionRuns, null)) + if (propRetentionRuns.TryReadProperty(ref reader, options, PropRetentionRuns, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRetentionTimedOut.TryReadProperty(ref reader, options, PropRetentionTimedOut, null)) + if (propRetentionTimedOut.TryReadProperty(ref reader, options, PropRetentionTimedOut, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalSnapshotDeletionFailures.TryReadProperty(ref reader, options, PropTotalSnapshotDeletionFailures, null) || propTotalSnapshotDeletionFailures.TryReadProperty(ref reader, options, PropTotalSnapshotDeletionFailures1, null)) + if (propTotalSnapshotDeletionFailures.TryReadProperty(ref reader, options, PropTotalSnapshotDeletionFailures, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propTotalSnapshotDeletionFailures.TryReadProperty(ref reader, options, PropTotalSnapshotDeletionFailures1, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalSnapshotsDeleted.TryReadProperty(ref reader, options, PropTotalSnapshotsDeleted, null) || propTotalSnapshotsDeleted.TryReadProperty(ref reader, options, PropTotalSnapshotsDeleted1, null)) + if (propTotalSnapshotsDeleted.TryReadProperty(ref reader, options, PropTotalSnapshotsDeleted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propTotalSnapshotsDeleted.TryReadProperty(ref reader, options, PropTotalSnapshotsDeleted1, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalSnapshotsFailed.TryReadProperty(ref reader, options, PropTotalSnapshotsFailed, null) || propTotalSnapshotsFailed.TryReadProperty(ref reader, options, PropTotalSnapshotsFailed1, null)) + if (propTotalSnapshotsFailed.TryReadProperty(ref reader, options, PropTotalSnapshotsFailed, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propTotalSnapshotsFailed.TryReadProperty(ref reader, options, PropTotalSnapshotsFailed1, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalSnapshotsTaken.TryReadProperty(ref reader, options, PropTotalSnapshotsTaken, null) || propTotalSnapshotsTaken.TryReadProperty(ref reader, options, PropTotalSnapshotsTaken1, null)) + if (propTotalSnapshotsTaken.TryReadProperty(ref reader, options, PropTotalSnapshotsTaken, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o)) || propTotalSnapshotsTaken.TryReadProperty(ref reader, options, PropTotalSnapshotsTaken1, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -135,14 +135,14 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropPolicy, value.Policy, null, null); writer.WriteProperty(options, PropRetentionDeletionTime, value.RetentionDeletionTime, null, null); - writer.WriteProperty(options, PropRetentionDeletionTimeMillis, value.RetentionDeletionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); - writer.WriteProperty(options, PropRetentionFailed, value.RetentionFailed, null, null); - writer.WriteProperty(options, PropRetentionRuns, value.RetentionRuns, null, null); - writer.WriteProperty(options, PropRetentionTimedOut, value.RetentionTimedOut, null, null); - writer.WriteProperty(options, PropTotalSnapshotDeletionFailures, value.TotalSnapshotDeletionFailures, null, null); - writer.WriteProperty(options, PropTotalSnapshotsDeleted, value.TotalSnapshotsDeleted, null, null); - writer.WriteProperty(options, PropTotalSnapshotsFailed, value.TotalSnapshotsFailed, null, null); - writer.WriteProperty(options, PropTotalSnapshotsTaken, value.TotalSnapshotsTaken, null, null); + writer.WriteProperty(options, PropRetentionDeletionTimeMillis, value.RetentionDeletionTimeMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); + writer.WriteProperty(options, PropRetentionFailed, value.RetentionFailed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRetentionRuns, value.RetentionRuns, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRetentionTimedOut, value.RetentionTimedOut, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalSnapshotDeletionFailures, value.TotalSnapshotDeletionFailures, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalSnapshotsDeleted, value.TotalSnapshotsDeleted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalSnapshotsFailed, value.TotalSnapshotsFailed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalSnapshotsTaken, value.TotalSnapshotsTaken, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/SpecifiedDocument.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SpecifiedDocument.g.cs new file mode 100644 index 00000000000..985dc03f097 --- /dev/null +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/SpecifiedDocument.g.cs @@ -0,0 +1,145 @@ +// 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; + +internal sealed partial class SpecifiedDocumentConverter : System.Text.Json.Serialization.JsonConverter +{ + private static readonly System.Text.Json.JsonEncodedText PropId = System.Text.Json.JsonEncodedText.Encode("id"); + private static readonly System.Text.Json.JsonEncodedText PropIndex = System.Text.Json.JsonEncodedText.Encode("index"); + + public override Elastic.Clients.Elasticsearch.SpecifiedDocument Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) + { + reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject); + LocalJsonValue propId = default; + LocalJsonValue propIndex = default; + while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) + { + if (propId.TryReadProperty(ref reader, options, PropId, null)) + { + continue; + } + + if (propIndex.TryReadProperty(ref reader, options, PropIndex, 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.SpecifiedDocument(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance) + { + Id = propId.Value, + Index = propIndex.Value + }; + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.SpecifiedDocument value, System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteProperty(options, PropId, value.Id, null, null); + writer.WriteProperty(options, PropIndex, value.Index, null, null); + writer.WriteEndObject(); + } +} + +[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.SpecifiedDocumentConverter))] +public sealed partial class SpecifiedDocument +{ + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SpecifiedDocument(Elastic.Clients.Elasticsearch.Id id) + { + Id = id; + } +#if NET7_0_OR_GREATER + public SpecifiedDocument() + { + } +#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 SpecifiedDocument() + { + } +#endif + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + internal SpecifiedDocument(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel) + { + _ = sentinel; + } + + public +#if NET7_0_OR_GREATER + required +#endif + Elastic.Clients.Elasticsearch.Id Id { get; set; } + public Elastic.Clients.Elasticsearch.IndexName? Index { get; set; } +} + +public readonly partial struct SpecifiedDocumentDescriptor +{ + internal Elastic.Clients.Elasticsearch.SpecifiedDocument Instance { get; init; } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SpecifiedDocumentDescriptor(Elastic.Clients.Elasticsearch.SpecifiedDocument instance) + { + Instance = instance; + } + + [System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public SpecifiedDocumentDescriptor() + { + Instance = new Elastic.Clients.Elasticsearch.SpecifiedDocument(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance); + } + + public static explicit operator Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor(Elastic.Clients.Elasticsearch.SpecifiedDocument instance) => new Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor(instance); + public static implicit operator Elastic.Clients.Elasticsearch.SpecifiedDocument(Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor descriptor) => descriptor.Instance; + + public Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor Id(Elastic.Clients.Elasticsearch.Id value) + { + Instance.Id = value; + return this; + } + + public Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor Index(Elastic.Clients.Elasticsearch.IndexName? value) + { + Instance.Index = value; + return this; + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + internal static Elastic.Clients.Elasticsearch.SpecifiedDocument Build(System.Action action) + { + var builder = new Elastic.Clients.Elasticsearch.SpecifiedDocumentDescriptor(new Elastic.Clients.Elasticsearch.SpecifiedDocument(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/StandardRetriever.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StandardRetriever.g.cs index 621665cb133..d8653cfcb36 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StandardRetriever.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StandardRetriever.g.cs @@ -28,6 +28,7 @@ internal sealed partial class StandardRetrieverConverter : System.Text.Json.Seri private static readonly System.Text.Json.JsonEncodedText PropCollapse = System.Text.Json.JsonEncodedText.Encode("collapse"); private static readonly System.Text.Json.JsonEncodedText PropFilter = System.Text.Json.JsonEncodedText.Encode("filter"); private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); private static readonly System.Text.Json.JsonEncodedText PropQuery = System.Text.Json.JsonEncodedText.Encode("query"); private static readonly System.Text.Json.JsonEncodedText PropSearchAfter = System.Text.Json.JsonEncodedText.Encode("search_after"); private static readonly System.Text.Json.JsonEncodedText PropSort = System.Text.Json.JsonEncodedText.Encode("sort"); @@ -39,6 +40,7 @@ public override Elastic.Clients.Elasticsearch.StandardRetriever Read(ref System. LocalJsonValue propCollapse = default; LocalJsonValue?> propFilter = default; LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; LocalJsonValue propQuery = default; LocalJsonValue?> propSearchAfter = default; LocalJsonValue?> propSort = default; @@ -55,7 +57,12 @@ public override Elastic.Clients.Elasticsearch.StandardRetriever Read(ref System. continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) + { + continue; + } + + if (propName.TryReadProperty(ref reader, options, PropName, null)) { continue; } @@ -75,7 +82,7 @@ public override Elastic.Clients.Elasticsearch.StandardRetriever Read(ref System. continue; } - if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, null)) + if (propTerminateAfter.TryReadProperty(ref reader, options, PropTerminateAfter, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -95,6 +102,7 @@ public override Elastic.Clients.Elasticsearch.StandardRetriever Read(ref System. Collapse = propCollapse.Value, Filter = propFilter.Value, MinScore = propMinScore.Value, + Name = propName.Value, Query = propQuery.Value, SearchAfter = propSearchAfter.Value, Sort = propSort.Value, @@ -107,11 +115,12 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCollapse, value.Collapse, null, null); writer.WriteProperty(options, PropFilter, value.Filter, 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, PropMinScore, value.MinScore, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); writer.WriteProperty(options, PropQuery, value.Query, 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, 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, PropTerminateAfter, value.TerminateAfter, null, null); + writer.WriteProperty(options, PropTerminateAfter, value.TerminateAfter, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } @@ -156,6 +165,13 @@ internal StandardRetriever(Elastic.Clients.Elasticsearch.Serialization.JsonConst /// public float? MinScore { get; set; } + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + /// /// /// Defines a query to retrieve a set of top documents. @@ -276,6 +292,17 @@ public Elastic.Clients.Elasticsearch.StandardRetrieverDescriptor MinS return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.StandardRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// Defines a query to retrieve a set of top documents. @@ -503,6 +530,17 @@ public Elastic.Clients.Elasticsearch.StandardRetrieverDescriptor MinScore(float? return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.StandardRetrieverDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// Defines a query to retrieve a set of top documents. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoreStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoreStats.g.cs index 9e7c058cfe0..4e324ed688b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoreStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/StoreStats.g.cs @@ -68,7 +68,7 @@ public override Elastic.Clients.Elasticsearch.StoreStats Read(ref System.Text.Js continue; } - if (propTotalDataSetSizeInBytes.TryReadProperty(ref reader, options, PropTotalDataSetSizeInBytes, null)) + if (propTotalDataSetSizeInBytes.TryReadProperty(ref reader, options, PropTotalDataSetSizeInBytes, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -102,7 +102,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropSize, value.Size, null, null); writer.WriteProperty(options, PropSizeInBytes, value.SizeInBytes, null, null); writer.WriteProperty(options, PropTotalDataSetSize, value.TotalDataSetSize, null, null); - writer.WriteProperty(options, PropTotalDataSetSizeInBytes, value.TotalDataSetSizeInBytes, null, null); + writer.WriteProperty(options, PropTotalDataSetSizeInBytes, value.TotalDataSetSizeInBytes, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } 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/Tasks/ParentTaskInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/ParentTaskInfo.g.cs index 840375157f5..68d6298a20a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/ParentTaskInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/ParentTaskInfo.g.cs @@ -69,7 +69,7 @@ public override Elastic.Clients.Elasticsearch.Tasks.ParentTaskInfo Read(ref Syst continue; } - if (propCancelled.TryReadProperty(ref reader, options, PropCancelled, null)) + if (propCancelled.TryReadProperty(ref reader, options, PropCancelled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -163,7 +163,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAction, value.Action, null, null); writer.WriteProperty(options, PropCancellable, value.Cancellable, null, null); - writer.WriteProperty(options, PropCancelled, value.Cancelled, null, null); + writer.WriteProperty(options, PropCancelled, value.Cancelled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropChildren, value.Children, 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, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropHeaders, value.Headers, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyDictionary v) => w.WriteDictionaryValue(o, v, null, null)); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfo.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfo.g.cs index 80fd06c5dfd..38bc50022b0 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfo.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Tasks/TaskInfo.g.cs @@ -67,7 +67,7 @@ public override Elastic.Clients.Elasticsearch.Tasks.TaskInfo Read(ref System.Tex continue; } - if (propCancelled.TryReadProperty(ref reader, options, PropCancelled, null)) + if (propCancelled.TryReadProperty(ref reader, options, PropCancelled, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -155,7 +155,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAction, value.Action, null, null); writer.WriteProperty(options, PropCancellable, value.Cancellable, null, null); - writer.WriteProperty(options, PropCancelled, value.Cancelled, null, null); + writer.WriteProperty(options, PropCancelled, value.Cancelled, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropHeaders, value.Headers, 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, PropId, value.Id, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextSimilarityReranker.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextSimilarityReranker.g.cs index ec5f68359d5..02af0a23895 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextSimilarityReranker.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextSimilarityReranker.g.cs @@ -30,6 +30,7 @@ internal sealed partial class TextSimilarityRerankerConverter : System.Text.Json private static readonly System.Text.Json.JsonEncodedText PropInferenceId = System.Text.Json.JsonEncodedText.Encode("inference_id"); private static readonly System.Text.Json.JsonEncodedText PropInferenceText = System.Text.Json.JsonEncodedText.Encode("inference_text"); private static readonly System.Text.Json.JsonEncodedText PropMinScore = System.Text.Json.JsonEncodedText.Encode("min_score"); + private static readonly System.Text.Json.JsonEncodedText PropName = System.Text.Json.JsonEncodedText.Encode("_name"); private static readonly System.Text.Json.JsonEncodedText PropRankWindowSize = System.Text.Json.JsonEncodedText.Encode("rank_window_size"); private static readonly System.Text.Json.JsonEncodedText PropRetriever = System.Text.Json.JsonEncodedText.Encode("retriever"); @@ -41,6 +42,7 @@ public override Elastic.Clients.Elasticsearch.TextSimilarityReranker Read(ref Sy LocalJsonValue propInferenceId = default; LocalJsonValue propInferenceText = default; LocalJsonValue propMinScore = default; + LocalJsonValue propName = default; LocalJsonValue propRankWindowSize = default; LocalJsonValue propRetriever = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) @@ -65,12 +67,17 @@ public override Elastic.Clients.Elasticsearch.TextSimilarityReranker Read(ref Sy continue; } - if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, null)) + if (propMinScore.TryReadProperty(ref reader, options, PropMinScore, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, null)) + if (propName.TryReadProperty(ref reader, options, PropName, null)) + { + continue; + } + + if (propRankWindowSize.TryReadProperty(ref reader, options, PropRankWindowSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,6 +104,7 @@ public override Elastic.Clients.Elasticsearch.TextSimilarityReranker Read(ref Sy InferenceId = propInferenceId.Value, InferenceText = propInferenceText.Value, MinScore = propMinScore.Value, + Name = propName.Value, RankWindowSize = propRankWindowSize.Value, Retriever = propRetriever.Value }; @@ -109,8 +117,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropFilter, value.Filter, 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, PropInferenceId, value.InferenceId, null, null); writer.WriteProperty(options, PropInferenceText, value.InferenceText, null, null); - writer.WriteProperty(options, PropMinScore, value.MinScore, null, null); - writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, null); + writer.WriteProperty(options, PropMinScore, value.MinScore, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropName, value.Name, null, null); + writer.WriteProperty(options, PropRankWindowSize, value.RankWindowSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropRetriever, value.Retriever, null, null); writer.WriteEndObject(); } @@ -176,6 +185,13 @@ internal TextSimilarityReranker(Elastic.Clients.Elasticsearch.Serialization.Json /// public float? MinScore { get; set; } + /// + /// + /// Retriever name. + /// + /// + public string? Name { get; set; } + /// /// /// This value determines how many documents we will consider from the nested retriever. @@ -297,6 +313,17 @@ public Elastic.Clients.Elasticsearch.TextSimilarityRerankerDescriptor return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.TextSimilarityRerankerDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// This value determines how many documents we will consider from the nested retriever. @@ -458,6 +485,17 @@ public Elastic.Clients.Elasticsearch.TextSimilarityRerankerDescriptor MinScore(f return this; } + /// + /// + /// Retriever name. + /// + /// + public Elastic.Clients.Elasticsearch.TextSimilarityRerankerDescriptor Name(string? value) + { + Instance.Name = value; + return this; + } + /// /// /// This value determines how many documents we will consider from the nested retriever. diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextStructure/FieldStat.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextStructure/FieldStat.g.cs index a1753e74641..9cf5488b3d9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextStructure/FieldStat.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TextStructure/FieldStat.g.cs @@ -69,22 +69,22 @@ public override Elastic.Clients.Elasticsearch.TextStructure.FieldStat Read(ref S continue; } - if (propMaxValue.TryReadProperty(ref reader, options, PropMaxValue, null)) + if (propMaxValue.TryReadProperty(ref reader, options, PropMaxValue, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMeanValue.TryReadProperty(ref reader, options, PropMeanValue, null)) + if (propMeanValue.TryReadProperty(ref reader, options, PropMeanValue, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMedianValue.TryReadProperty(ref reader, options, PropMedianValue, null)) + if (propMedianValue.TryReadProperty(ref reader, options, PropMedianValue, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMinValue.TryReadProperty(ref reader, options, PropMinValue, null)) + if (propMinValue.TryReadProperty(ref reader, options, PropMinValue, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -125,10 +125,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropCount, value.Count, null, null); writer.WriteProperty(options, PropEarliest, value.Earliest, null, null); writer.WriteProperty(options, PropLatest, value.Latest, null, null); - writer.WriteProperty(options, PropMaxValue, value.MaxValue, null, null); - writer.WriteProperty(options, PropMeanValue, value.MeanValue, null, null); - writer.WriteProperty(options, PropMedianValue, value.MedianValue, null, null); - writer.WriteProperty(options, PropMinValue, value.MinValue, null, null); + writer.WriteProperty(options, PropMaxValue, value.MaxValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMeanValue, value.MeanValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMedianValue, value.MedianValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMinValue, value.MinValue, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTopHits, value.TopHits, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.Collections.Generic.IReadOnlyCollection v) => w.WriteCollectionValue(o, v, null)); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/CheckpointStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/CheckpointStats.g.cs index 3685030fc5a..35c259d0c87 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/CheckpointStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/CheckpointStats.g.cs @@ -53,22 +53,22 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.CheckpointStat continue; } - if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propTimestamp.TryReadProperty(ref reader, options, PropTimestamp, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propTimestampMillis.TryReadProperty(ref reader, options, PropTimestampMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propTimestampMillis.TryReadProperty(ref reader, options, PropTimestampMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propTimeUpperBound.TryReadProperty(ref reader, options, PropTimeUpperBound, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propTimeUpperBound.TryReadProperty(ref reader, options, PropTimeUpperBound, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propTimeUpperBoundMillis.TryReadProperty(ref reader, options, PropTimeUpperBoundMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propTimeUpperBoundMillis.TryReadProperty(ref reader, options, PropTimeUpperBoundMillis, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -99,10 +99,10 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCheckpoint, value.Checkpoint, null, null); writer.WriteProperty(options, PropCheckpointProgress, value.CheckpointProgress, null, null); - writer.WriteProperty(options, PropTimestamp, value.Timestamp, 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, PropTimestampMillis, value.TimestampMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropTimeUpperBound, value.TimeUpperBound, 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, PropTimeUpperBoundMillis, value.TimeUpperBoundMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropTimestamp, value.Timestamp, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropTimestampMillis, value.TimestampMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropTimeUpperBound, value.TimeUpperBound, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropTimeUpperBoundMillis, value.TimeUpperBoundMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Checkpointing.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Checkpointing.g.cs index b6229179118..b3854e24e57 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Checkpointing.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Checkpointing.g.cs @@ -45,12 +45,12 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.Checkpointing LocalJsonValue propOperationsBehind = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propChangesLastDetectedAt.TryReadProperty(ref reader, options, PropChangesLastDetectedAt, null)) + if (propChangesLastDetectedAt.TryReadProperty(ref reader, options, PropChangesLastDetectedAt, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propChangesLastDetectedAtString.TryReadProperty(ref reader, options, PropChangesLastDetectedAtString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propChangesLastDetectedAtString.TryReadProperty(ref reader, options, PropChangesLastDetectedAtString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -60,12 +60,12 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.Checkpointing continue; } - if (propLastSearchTime.TryReadProperty(ref reader, options, PropLastSearchTime, null)) + if (propLastSearchTime.TryReadProperty(ref reader, options, PropLastSearchTime, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propLastSearchTimeString.TryReadProperty(ref reader, options, PropLastSearchTimeString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propLastSearchTimeString.TryReadProperty(ref reader, options, PropLastSearchTimeString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -75,7 +75,7 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.Checkpointing continue; } - if (propOperationsBehind.TryReadProperty(ref reader, options, PropOperationsBehind, null)) + if (propOperationsBehind.TryReadProperty(ref reader, options, PropOperationsBehind, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -105,13 +105,13 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.Checkpointing public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.TransformManagement.Checkpointing value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropChangesLastDetectedAt, value.ChangesLastDetectedAt, null, null); - writer.WriteProperty(options, PropChangesLastDetectedAtString, value.ChangesLastDetectedAtString, 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, PropChangesLastDetectedAt, value.ChangesLastDetectedAt, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropChangesLastDetectedAtString, value.ChangesLastDetectedAtString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropLast, value.Last, null, null); - writer.WriteProperty(options, PropLastSearchTime, value.LastSearchTime, null, null); - writer.WriteProperty(options, PropLastSearchTimeString, value.LastSearchTimeString, 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, PropLastSearchTime, value.LastSearchTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropLastSearchTimeString, value.LastSearchTimeString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropNext, value.Next, null, null); - writer.WriteProperty(options, PropOperationsBehind, value.OperationsBehind, null, null); + writer.WriteProperty(options, PropOperationsBehind, value.OperationsBehind, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Settings.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Settings.g.cs index 758a9c88a74..b56d4c54394 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Settings.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/Settings.g.cs @@ -43,32 +43,32 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.Settings Read( LocalJsonValue propUnattended = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propAlignCheckpoints.TryReadProperty(ref reader, options, PropAlignCheckpoints, null)) + if (propAlignCheckpoints.TryReadProperty(ref reader, options, PropAlignCheckpoints, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDatesAsEpochMillis.TryReadProperty(ref reader, options, PropDatesAsEpochMillis, null)) + if (propDatesAsEpochMillis.TryReadProperty(ref reader, options, PropDatesAsEpochMillis, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDeduceMappings.TryReadProperty(ref reader, options, PropDeduceMappings, null)) + if (propDeduceMappings.TryReadProperty(ref reader, options, PropDeduceMappings, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propDocsPerSecond.TryReadProperty(ref reader, options, PropDocsPerSecond, null)) + if (propDocsPerSecond.TryReadProperty(ref reader, options, PropDocsPerSecond, static float? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propMaxPageSearchSize.TryReadProperty(ref reader, options, PropMaxPageSearchSize, null)) + if (propMaxPageSearchSize.TryReadProperty(ref reader, options, PropMaxPageSearchSize, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propUnattended.TryReadProperty(ref reader, options, PropUnattended, null)) + if (propUnattended.TryReadProperty(ref reader, options, PropUnattended, static bool? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -97,12 +97,12 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.Settings Read( public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.TransformManagement.Settings value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropAlignCheckpoints, value.AlignCheckpoints, null, null); - writer.WriteProperty(options, PropDatesAsEpochMillis, value.DatesAsEpochMillis, null, null); - writer.WriteProperty(options, PropDeduceMappings, value.DeduceMappings, null, null); - writer.WriteProperty(options, PropDocsPerSecond, value.DocsPerSecond, null, null); - writer.WriteProperty(options, PropMaxPageSearchSize, value.MaxPageSearchSize, null, null); - writer.WriteProperty(options, PropUnattended, value.Unattended, null, null); + writer.WriteProperty(options, PropAlignCheckpoints, value.AlignCheckpoints, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDatesAsEpochMillis, value.DatesAsEpochMillis, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDeduceMappings, value.DeduceMappings, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropDocsPerSecond, value.DocsPerSecond, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, float? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropMaxPageSearchSize, value.MaxPageSearchSize, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropUnattended, value.Unattended, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, bool? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformHealthIssue.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformHealthIssue.g.cs index 7caaf185ba6..5204bfb64fe 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformHealthIssue.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformHealthIssue.g.cs @@ -53,12 +53,12 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.TransformHealt continue; } - if (propFirstOccurenceString.TryReadProperty(ref reader, options, PropFirstOccurenceString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propFirstOccurenceString.TryReadProperty(ref reader, options, PropFirstOccurenceString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } - if (propFirstOccurrence.TryReadProperty(ref reader, options, PropFirstOccurrence, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propFirstOccurrence.TryReadProperty(ref reader, options, PropFirstOccurrence, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } @@ -99,8 +99,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropCount, value.Count, null, null); writer.WriteProperty(options, PropDetails, value.Details, null, null); - writer.WriteProperty(options, PropFirstOccurenceString, value.FirstOccurenceString, 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, PropFirstOccurrence, value.FirstOccurrence, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropFirstOccurenceString, value.FirstOccurenceString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); + writer.WriteProperty(options, PropFirstOccurrence, value.FirstOccurrence, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); writer.WriteProperty(options, PropIssue, value.Issue, null, null); writer.WriteProperty(options, PropType, value.Type, null, null); writer.WriteEndObject(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformIndexerStats.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformIndexerStats.g.cs index cdd25615ced..1feebb61d6b 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformIndexerStats.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformIndexerStats.g.cs @@ -65,12 +65,12 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.TransformIndex LocalJsonValue propTriggerCount = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propDeleteTimeInMs.TryReadProperty(ref reader, options, PropDeleteTimeInMs, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propDeleteTimeInMs.TryReadProperty(ref reader, options, PropDeleteTimeInMs, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propDocumentsDeleted.TryReadProperty(ref reader, options, PropDocumentsDeleted, null)) + if (propDocumentsDeleted.TryReadProperty(ref reader, options, PropDocumentsDeleted, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -185,8 +185,8 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.TransformIndex public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.TransformManagement.TransformIndexerStats value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropDeleteTimeInMs, value.DeleteTimeInMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropDocumentsDeleted, value.DocumentsDeleted, null, null); + writer.WriteProperty(options, PropDeleteTimeInMs, value.DeleteTimeInMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropDocumentsDeleted, value.DocumentsDeleted, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropDocumentsIndexed, value.DocumentsIndexed, null, null); writer.WriteProperty(options, PropDocumentsProcessed, value.DocumentsProcessed, null, null); writer.WriteProperty(options, PropExponentialAvgCheckpointDurationMs, value.ExponentialAvgCheckpointDurationMs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.TimeSpan v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.TimeSpanMillisMarker))); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformProgress.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformProgress.g.cs index d4a0026b3a6..722cdc1551a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformProgress.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformProgress.g.cs @@ -51,17 +51,17 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.TransformProgr continue; } - if (propDocsRemaining.TryReadProperty(ref reader, options, PropDocsRemaining, null)) + if (propDocsRemaining.TryReadProperty(ref reader, options, PropDocsRemaining, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPercentComplete.TryReadProperty(ref reader, options, PropPercentComplete, null)) + if (propPercentComplete.TryReadProperty(ref reader, options, PropPercentComplete, static double? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotalDocs.TryReadProperty(ref reader, options, PropTotalDocs, null)) + if (propTotalDocs.TryReadProperty(ref reader, options, PropTotalDocs, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropDocsIndexed, value.DocsIndexed, null, null); writer.WriteProperty(options, PropDocsProcessed, value.DocsProcessed, null, null); - writer.WriteProperty(options, PropDocsRemaining, value.DocsRemaining, null, null); - writer.WriteProperty(options, PropPercentComplete, value.PercentComplete, null, null); - writer.WriteProperty(options, PropTotalDocs, value.TotalDocs, null, null); + writer.WriteProperty(options, PropDocsRemaining, value.DocsRemaining, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPercentComplete, value.PercentComplete, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, double? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotalDocs, value.TotalDocs, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformSummary.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformSummary.g.cs index eae1a5fc558..c7500d8e625 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformSummary.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/TransformManagement/TransformSummary.g.cs @@ -66,12 +66,12 @@ public override Elastic.Clients.Elasticsearch.TransformManagement.TransformSumma continue; } - if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) + if (propCreateTime.TryReadProperty(ref reader, options, PropCreateTime, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker)))) { continue; } - if (propCreateTimeString.TryReadProperty(ref reader, options, PropCreateTimeString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) + if (propCreateTimeString.TryReadProperty(ref reader, options, PropCreateTimeString, static System.DateTimeOffset? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValueEx(o, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker)))) { continue; } @@ -170,8 +170,8 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien { writer.WriteStartObject(); writer.WriteProperty(options, PropAuthorization, value.Authorization, null, null); - writer.WriteProperty(options, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); - writer.WriteProperty(options, PropCreateTimeString, value.CreateTimeString, 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, PropCreateTime, value.CreateTime, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMillisMarker))); + writer.WriteProperty(options, PropCreateTimeString, value.CreateTimeString, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, System.DateTimeOffset? v) => w.WriteNullableValueEx(o, v, typeof(Elastic.Clients.Elasticsearch.Serialization.DateTimeMarker))); writer.WriteProperty(options, PropDescription, value.Description, null, null); writer.WriteProperty(options, PropDest, value.Dest, null, null); writer.WriteProperty(options, PropFrequency, value.Frequency, null, null); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/AnalyticsStatistics.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/AnalyticsStatistics.g.cs index 441b1e7ebab..ace85cd9744 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/AnalyticsStatistics.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/AnalyticsStatistics.g.cs @@ -64,7 +64,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.AnalyticsStatistics Read(ref continue; } - if (propMultiTermsUsage.TryReadProperty(ref reader, options, PropMultiTermsUsage, null)) + if (propMultiTermsUsage.TryReadProperty(ref reader, options, PropMultiTermsUsage, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -124,7 +124,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropBoxplotUsage, value.BoxplotUsage, null, null); writer.WriteProperty(options, PropCumulativeCardinalityUsage, value.CumulativeCardinalityUsage, null, null); writer.WriteProperty(options, PropMovingPercentilesUsage, value.MovingPercentilesUsage, null, null); - writer.WriteProperty(options, PropMultiTermsUsage, value.MultiTermsUsage, null, null); + writer.WriteProperty(options, PropMultiTermsUsage, value.MultiTermsUsage, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropNormalizeUsage, value.NormalizeUsage, null, null); writer.WriteProperty(options, PropRateUsage, value.RateUsage, null, null); writer.WriteProperty(options, PropStringStatsUsage, value.StringStatsUsage, null, null); 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/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsAnalysis.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsAnalysis.g.cs index fcc9656279c..9d7f26a6056 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsAnalysis.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlDataFrameAnalyticsJobsAnalysis.g.cs @@ -37,17 +37,17 @@ public override Elastic.Clients.Elasticsearch.Xpack.MlDataFrameAnalyticsJobsAnal LocalJsonValue propRegression = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propClassification.TryReadProperty(ref reader, options, PropClassification, null)) + if (propClassification.TryReadProperty(ref reader, options, PropClassification, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propOutlierDetection.TryReadProperty(ref reader, options, PropOutlierDetection, null)) + if (propOutlierDetection.TryReadProperty(ref reader, options, PropOutlierDetection, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propRegression.TryReadProperty(ref reader, options, PropRegression, null)) + if (propRegression.TryReadProperty(ref reader, options, PropRegression, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -73,9 +73,9 @@ public override Elastic.Clients.Elasticsearch.Xpack.MlDataFrameAnalyticsJobsAnal public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Xpack.MlDataFrameAnalyticsJobsAnalysis value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropClassification, value.Classification, null, null); - writer.WriteProperty(options, PropOutlierDetection, value.OutlierDetection, null, null); - writer.WriteProperty(options, PropRegression, value.Regression, null, null); + writer.WriteProperty(options, PropClassification, value.Classification, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropOutlierDetection, value.OutlierDetection, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropRegression, value.Regression, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlInferenceTrainedModelsCount.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlInferenceTrainedModelsCount.g.cs index 5fbeca6e4c4..df1d5468283 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlInferenceTrainedModelsCount.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/MlInferenceTrainedModelsCount.g.cs @@ -47,12 +47,12 @@ public override Elastic.Clients.Elasticsearch.Xpack.MlInferenceTrainedModelsCoun LocalJsonValue propTotal = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propClassification.TryReadProperty(ref reader, options, PropClassification, null)) + if (propClassification.TryReadProperty(ref reader, options, PropClassification, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propNer.TryReadProperty(ref reader, options, PropNer, null)) + if (propNer.TryReadProperty(ref reader, options, PropNer, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -62,7 +62,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.MlInferenceTrainedModelsCoun continue; } - if (propPassThrough.TryReadProperty(ref reader, options, PropPassThrough, null)) + if (propPassThrough.TryReadProperty(ref reader, options, PropPassThrough, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -72,12 +72,12 @@ public override Elastic.Clients.Elasticsearch.Xpack.MlInferenceTrainedModelsCoun continue; } - if (propRegression.TryReadProperty(ref reader, options, PropRegression, null)) + if (propRegression.TryReadProperty(ref reader, options, PropRegression, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTextEmbedding.TryReadProperty(ref reader, options, PropTextEmbedding, null)) + if (propTextEmbedding.TryReadProperty(ref reader, options, PropTextEmbedding, static long? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -113,13 +113,13 @@ public override Elastic.Clients.Elasticsearch.Xpack.MlInferenceTrainedModelsCoun public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Xpack.MlInferenceTrainedModelsCount value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropClassification, value.Classification, null, null); - writer.WriteProperty(options, PropNer, value.Ner, null, null); + writer.WriteProperty(options, PropClassification, value.Classification, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropNer, value.Ner, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropOther, value.Other, null, null); - writer.WriteProperty(options, PropPassThrough, value.PassThrough, null, null); + writer.WriteProperty(options, PropPassThrough, value.PassThrough, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPrepackaged, value.Prepackaged, null, null); - writer.WriteProperty(options, PropRegression, value.Regression, null, null); - writer.WriteProperty(options, PropTextEmbedding, value.TextEmbedding, null, null); + writer.WriteProperty(options, PropRegression, value.Regression, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTextEmbedding, value.TextEmbedding, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, long? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropTotal, value.Total, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/SearchableSnapshots.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/SearchableSnapshots.g.cs index d01e42f8558..633eb8922aa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/SearchableSnapshots.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/SearchableSnapshots.g.cs @@ -51,7 +51,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.SearchableSnapshots Read(ref continue; } - if (propFullCopyIndicesCount.TryReadProperty(ref reader, options, PropFullCopyIndicesCount, null)) + if (propFullCopyIndicesCount.TryReadProperty(ref reader, options, PropFullCopyIndicesCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.SearchableSnapshots Read(ref continue; } - if (propSharedCacheIndicesCount.TryReadProperty(ref reader, options, PropSharedCacheIndicesCount, null)) + if (propSharedCacheIndicesCount.TryReadProperty(ref reader, options, PropSharedCacheIndicesCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -91,9 +91,9 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAvailable, value.Available, null, null); writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); - writer.WriteProperty(options, PropFullCopyIndicesCount, value.FullCopyIndicesCount, null, null); + writer.WriteProperty(options, PropFullCopyIndicesCount, value.FullCopyIndicesCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropIndicesCount, value.IndicesCount, null, null); - writer.WriteProperty(options, PropSharedCacheIndicesCount, value.SharedCacheIndicesCount, null, null); + writer.WriteProperty(options, PropSharedCacheIndicesCount, value.SharedCacheIndicesCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Slm.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Slm.g.cs index 8347f67e75e..3ba22abb89e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Slm.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Slm.g.cs @@ -49,7 +49,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.Slm Read(ref System.Text.Jso continue; } - if (propPolicyCount.TryReadProperty(ref reader, options, PropPolicyCount, null)) + if (propPolicyCount.TryReadProperty(ref reader, options, PropPolicyCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -83,7 +83,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteStartObject(); writer.WriteProperty(options, PropAvailable, value.Available, null, null); writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); - writer.WriteProperty(options, PropPolicyCount, value.PolicyCount, null, null); + writer.WriteProperty(options, PropPolicyCount, value.PolicyCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteProperty(options, PropPolicyStats, value.PolicyStats, null, null); writer.WriteEndObject(); } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Vector.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Vector.g.cs index e67fd9d6660..035cc0095eb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Vector.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/Vector.g.cs @@ -61,7 +61,7 @@ public override Elastic.Clients.Elasticsearch.Xpack.Vector Read(ref System.Text. continue; } - if (propSparseVectorFieldsCount.TryReadProperty(ref reader, options, PropSparseVectorFieldsCount, null)) + if (propSparseVectorFieldsCount.TryReadProperty(ref reader, options, PropSparseVectorFieldsCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -93,7 +93,7 @@ public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clien writer.WriteProperty(options, PropDenseVectorDimsAvgCount, value.DenseVectorDimsAvgCount, null, null); writer.WriteProperty(options, PropDenseVectorFieldsCount, value.DenseVectorFieldsCount, null, null); writer.WriteProperty(options, PropEnabled, value.Enabled, null, null); - writer.WriteProperty(options, PropSparseVectorFieldsCount, value.SparseVectorFieldsCount, null, null); + writer.WriteProperty(options, PropSparseVectorFieldsCount, value.SparseVectorFieldsCount, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/XpackUsageQuery.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/XpackUsageQuery.g.cs index 06af498146f..4440acd34a9 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/XpackUsageQuery.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Xpack/XpackUsageQuery.g.cs @@ -39,22 +39,22 @@ public override Elastic.Clients.Elasticsearch.Xpack.XpackUsageQuery Read(ref Sys LocalJsonValue propTotal = default; while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName) { - if (propCount.TryReadProperty(ref reader, options, PropCount, null)) + if (propCount.TryReadProperty(ref reader, options, PropCount, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propFailed.TryReadProperty(ref reader, options, PropFailed, null)) + if (propFailed.TryReadProperty(ref reader, options, PropFailed, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propPaging.TryReadProperty(ref reader, options, PropPaging, null)) + if (propPaging.TryReadProperty(ref reader, options, PropPaging, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } - if (propTotal.TryReadProperty(ref reader, options, PropTotal, null)) + if (propTotal.TryReadProperty(ref reader, options, PropTotal, static int? (ref System.Text.Json.Utf8JsonReader r, System.Text.Json.JsonSerializerOptions o) => r.ReadNullableValue(o))) { continue; } @@ -81,10 +81,10 @@ public override Elastic.Clients.Elasticsearch.Xpack.XpackUsageQuery Read(ref Sys public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.Xpack.XpackUsageQuery value, System.Text.Json.JsonSerializerOptions options) { writer.WriteStartObject(); - writer.WriteProperty(options, PropCount, value.Count, null, null); - writer.WriteProperty(options, PropFailed, value.Failed, null, null); - writer.WriteProperty(options, PropPaging, value.Paging, null, null); - writer.WriteProperty(options, PropTotal, value.Total, null, null); + writer.WriteProperty(options, PropCount, value.Count, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropFailed, value.Failed, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropPaging, value.Paging, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); + writer.WriteProperty(options, PropTotal, value.Total, null, static (System.Text.Json.Utf8JsonWriter w, System.Text.Json.JsonSerializerOptions o, int? v) => w.WriteNullableValue(o, v)); writer.WriteEndObject(); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Api/BulkRequest.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Api/BulkRequest.cs index 46570f4d86f..8b0bd587792 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Api/BulkRequest.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Api/BulkRequest.cs @@ -77,6 +77,17 @@ public async Task SerializeAsync(Stream stream, IElasticsearchClientSettings set [StructLayout(LayoutKind.Auto)] public readonly partial struct BulkRequestDescriptor { + /// + /// + /// The name of the data stream, index, or index alias to perform bulk actions on. + /// + /// + public BulkRequestDescriptor Index(string? value) + { + Instance.Index = value; + return this; + } + public BulkRequestDescriptor Create(TSource document, Action>? configure = null) { var descriptor = new BulkCreateOperationDescriptor(document); 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/Client/ElasticsearchClient.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchClient.cs index afda07d6c1a..5399abd131a 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchClient.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Client/ElasticsearchClient.cs @@ -6,12 +6,9 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using System.Runtime.CompilerServices; -using System.Text.Json; using System.Threading.Tasks; using System.Threading; using Elastic.Transport; -using Elastic.Transport.Diagnostics; using Elastic.Clients.Elasticsearch.Requests; @@ -28,18 +25,23 @@ public partial class ElasticsearchClient private const string OpenTelemetrySchemaVersion = "https://opentelemetry.io/schemas/1.21.0"; private readonly ITransport _transport; - internal static ConditionalWeakTable SettingsTable { get; } = new(); /// /// Creates a client configured to connect to http://localhost:9200. /// - public ElasticsearchClient() : this(new ElasticsearchClientSettings(new Uri("http://localhost:9200"))) { } + public ElasticsearchClient() : + this(new ElasticsearchClientSettings(new Uri("http://localhost:9200"))) + { + } /// /// Creates a client configured to connect to a node reachable at the provided . /// /// The to connect to. - public ElasticsearchClient(Uri uri) : this(new ElasticsearchClientSettings(uri)) { } + public ElasticsearchClient(Uri uri) : + this(new ElasticsearchClientSettings(uri)) + { + } /// /// Creates a client configured to communicate with Elastic Cloud using the provided . @@ -51,8 +53,8 @@ public ElasticsearchClient(Uri uri) : this(new ElasticsearchClientSettings(uri)) /// /// The Cloud ID of an Elastic Cloud deployment. /// The credentials to use for the connection. - public ElasticsearchClient(string cloudId, AuthorizationHeader credentials) : this( - new ElasticsearchClientSettings(cloudId, credentials)) + public ElasticsearchClient(string cloudId, AuthorizationHeader credentials) : + this(new ElasticsearchClientSettings(cloudId, credentials)) { } @@ -69,8 +71,7 @@ internal ElasticsearchClient(ITransport transport) { transport.ThrowIfNull(nameof(transport)); transport.Configuration.ThrowIfNull(nameof(transport.Configuration)); - transport.Configuration.RequestResponseSerializer.ThrowIfNull( - nameof(transport.Configuration.RequestResponseSerializer)); + transport.Configuration.RequestResponseSerializer.ThrowIfNull(nameof(transport.Configuration.RequestResponseSerializer)); transport.Configuration.Inferrer.ThrowIfNull(nameof(transport.Configuration.Inferrer)); _transport = transport; @@ -96,47 +97,38 @@ private enum ProductCheckStatus private partial void SetupNamespaces(); - internal TResponse DoRequest(TRequest request) - where TRequest : Request - where TResponse : TransportResponse, new() - where TRequestParameters : RequestParameters, new() => - DoRequest(request, null); - internal TResponse DoRequest( - TRequest request, - Action? forceConfiguration) + TRequest request) where TRequest : Request where TResponse : TransportResponse, new() where TRequestParameters : RequestParameters, new() - => DoRequestCoreAsync(false, request, forceConfiguration).EnsureCompleted(); - - internal Task DoRequestAsync( - TRequest request, - CancellationToken cancellationToken = default) - where TRequest : Request - where TResponse : TransportResponse, new() - where TRequestParameters : RequestParameters, new() - => DoRequestAsync(request, null, cancellationToken); + { + return DoRequestCoreAsync(false, request).EnsureCompleted(); + } internal Task DoRequestAsync( TRequest request, - Action? forceConfiguration, CancellationToken cancellationToken = default) where TRequest : Request where TResponse : TransportResponse, new() where TRequestParameters : RequestParameters, new() - => DoRequestCoreAsync(true, request, forceConfiguration, cancellationToken).AsTask(); + { + return DoRequestCoreAsync(true, request, cancellationToken).AsTask(); + } private ValueTask DoRequestCoreAsync( bool isAsync, TRequest request, - Action? forceConfiguration, CancellationToken cancellationToken = default) where TRequest : Request where TResponse : TransportResponse, new() where TRequestParameters : RequestParameters, new() { - // The product check modifies request parameters and therefore must not be executed concurrently. + if (request is null) + { + throw new ArgumentNullException(nameof(request)); + } + // We use a lockless CAS approach to make sure that only a single product check request is executed at a time. // We do not guarantee that the product check is always performed on the first request. @@ -157,12 +149,12 @@ private ValueTask DoRequestCoreAsync SendRequest() { - var (endpointPath, resolvedRouteValues, postData) = PrepareRequest(request); - var openTelemetryDataMutator = GetOpenTelemetryDataMutator(request, resolvedRouteValues); + PrepareRequest(request, out var endpointPath, out var postData, out var requestConfiguration, out var routeValues); + var openTelemetryDataMutator = GetOpenTelemetryDataMutator(request, routeValues); return isAsync - ? new ValueTask(_transport.RequestAsync(endpointPath, postData, openTelemetryDataMutator, request.RequestConfiguration, cancellationToken)) - : new ValueTask(_transport.Request(endpointPath, postData, openTelemetryDataMutator, request.RequestConfiguration)); + ? new ValueTask(_transport.RequestAsync(endpointPath, postData, openTelemetryDataMutator, requestConfiguration, cancellationToken)) + : new ValueTask(_transport.Request(endpointPath, postData, openTelemetryDataMutator, requestConfiguration)); } async ValueTask SendRequestWithProductCheck() @@ -178,7 +170,9 @@ async ValueTask SendRequestWithProductCheck() // 32-bit read/write operations are atomic and due to the initial memory barrier, we can be sure that // no other thread executes the product check at the same time. Locked access is not required here. if (_productCheckStatus is (int)ProductCheckStatus.InProgress) + { _productCheckStatus = (int)ProductCheckStatus.NotChecked; + } throw; } @@ -186,26 +180,25 @@ async ValueTask SendRequestWithProductCheck() async ValueTask SendRequestWithProductCheckCore() { + PrepareRequest(request, out var endpointPath, out var postData, out var requestConfiguration, out var routeValues); + var openTelemetryDataMutator = GetOpenTelemetryDataMutator(request, routeValues); + // Attach product check header - // TODO: The copy constructor should accept null values - var requestConfig = (request.RequestConfiguration is null) - ? new RequestConfiguration() + var requestConfig = (requestConfiguration is null) + ? new RequestConfiguration { ResponseHeadersToParse = new HeadersList("x-elastic-product") } - : new RequestConfiguration(request.RequestConfiguration) + : new RequestConfiguration(requestConfiguration) { - ResponseHeadersToParse = (request.RequestConfiguration.ResponseHeadersToParse is { Count: > 0 }) - ? new HeadersList(request.RequestConfiguration.ResponseHeadersToParse, "x-elastic-product") + ResponseHeadersToParse = (requestConfiguration.ResponseHeadersToParse is { Count: > 0 }) + ? new HeadersList(requestConfiguration.ResponseHeadersToParse, "x-elastic-product") : new HeadersList("x-elastic-product") }; // Send request - var (endpointPath, resolvedRouteValues, postData) = PrepareRequest(request); - var openTelemetryDataMutator = GetOpenTelemetryDataMutator(request, resolvedRouteValues); - TResponse response; if (isAsync) @@ -239,7 +232,9 @@ async ValueTask SendRequestWithProductCheckCore() : (int)ProductCheckStatus.Failed; if (_productCheckStatus == (int)ProductCheckStatus.Failed) + { throw new UnsupportedProductException(UnsupportedProductException.InvalidProductError); + } return response; } @@ -249,15 +244,17 @@ async ValueTask SendRequestWithProductCheckCore() where TRequest : Request where TRequestParameters : RequestParameters, new() { - // If there are no subscribed listeners, we avoid some work and allocations + // If there are no subscribed listeners, we avoid some work and allocations. if (!Elastic.Transport.Diagnostics.OpenTelemetry.ElasticTransportActivitySourceHasListeners) + { return null; + } return OpenTelemetryDataMutator; void OpenTelemetryDataMutator(Activity activity) { - // We fall back to a general operation name in cases where the derived request fails to override the property + // We fall back to a general operation name in cases where the derived request fails to override the property. var operationName = !string.IsNullOrEmpty(request.OperationName) ? request.OperationName : request.HttpMethod.GetStringValue(); // TODO: Optimisation: We should consider caching these, either for cases where resolvedRouteValues is null, or @@ -267,7 +264,7 @@ void OpenTelemetryDataMutator(Activity activity) // The latter may bloat the cache as some combinations of path parts may rarely re-occur. activity.DisplayName = operationName; - + activity.SetTag(OpenTelemetry.SemanticConventions.DbOperation, !string.IsNullOrEmpty(request.OperationName) ? request.OperationName : "unknown"); activity.SetTag($"{OpenTelemetrySpanAttributePrefix}schema_url", OpenTelemetrySchemaVersion); @@ -282,21 +279,26 @@ void OpenTelemetryDataMutator(Activity activity) } } - private (EndpointPath endpointPath, Dictionary? resolvedRouteValues, PostData data) PrepareRequest(TRequest request) + private void PrepareRequest( + TRequest request, + out EndpointPath endpointPath, + out PostData? postData, + out IRequestConfiguration? requestConfiguration, + out Dictionary? routeValues) where TRequest : Request where TRequestParameters : RequestParameters, new() { - request.ThrowIfNull(nameof(request), "A request is required."); - - var (resolvedUrl, _, routeValues) = request.GetUrl(ElasticsearchClientSettings); + var (resolvedUrl, _, resolvedRouteValues) = request.GetUrl(ElasticsearchClientSettings); var pathAndQuery = request.RequestParameters.CreatePathWithQueryStrings(resolvedUrl, ElasticsearchClientSettings); - var postData = - request.HttpMethod == HttpMethod.GET || - request.HttpMethod == HttpMethod.HEAD || !request.SupportsBody + routeValues = resolvedRouteValues; + endpointPath = new EndpointPath(request.HttpMethod, pathAndQuery); + postData = + request.HttpMethod is HttpMethod.GET or HttpMethod.HEAD || !request.SupportsBody ? null : PostData.Serializable(request); - return (new EndpointPath(request.HttpMethod, pathAndQuery), routeValues, postData); + requestConfiguration = request.RequestConfiguration; + ElasticsearchClientSettings.OnBeforeRequest?.Invoke(this, request, endpointPath, ref postData, ref requestConfiguration); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Client/NamespacedClientProxy.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Client/NamespacedClientProxy.cs index 65b32e91a8a..b7aeacb4fcc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Client/NamespacedClientProxy.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Client/NamespacedClientProxy.cs @@ -5,15 +5,16 @@ using System; using System.Threading; using System.Threading.Tasks; + using Elastic.Clients.Elasticsearch.Requests; using Elastic.Transport; -using Elastic.Transport.Products.Elasticsearch; namespace Elastic.Clients.Elasticsearch; public abstract class NamespacedClientProxy { - private const string InvalidOperation = "The client has not been initialised for proper usage as may have been partially mocked. Ensure you are using a " + + private const string InvalidOperation = + "The client has not been initialised for proper usage as may have been partially mocked. Ensure you are using a " + "new instance of ElasticsearchClient to perform requests over a network to Elasticsearch."; protected ElasticsearchClient Client { get; } @@ -21,27 +22,24 @@ public abstract class NamespacedClientProxy /// /// Initializes a new instance for mocking. /// - protected NamespacedClientProxy() { } + protected NamespacedClientProxy() + { + } internal NamespacedClientProxy(ElasticsearchClient client) => Client = client; - internal TResponse DoRequest(TRequest request) - where TRequest : Request - where TResponse : TransportResponse, new() - where TRequestParameters : RequestParameters, new() - => DoRequest(request, null); - internal TResponse DoRequest( - TRequest request, - Action? forceConfiguration) + TRequest request) where TRequest : Request where TResponse : TransportResponse, new() where TRequestParameters : RequestParameters, new() { if (Client is null) - ThrowHelper.ThrowInvalidOperationException(InvalidOperation); + { + throw new InvalidOperationException(InvalidOperation); + } - return Client.DoRequest(request, forceConfiguration); + return Client.DoRequest(request); } internal Task DoRequestAsync( @@ -49,20 +47,13 @@ internal Task DoRequestAsync CancellationToken cancellationToken = default) where TRequest : Request where TResponse : TransportResponse, new() - where TRequestParameters : RequestParameters, new() - => DoRequestAsync(request, null, cancellationToken); - - internal Task DoRequestAsync( - TRequest request, - Action? forceConfiguration, - CancellationToken cancellationToken = default) - where TRequest : Request - where TResponse : TransportResponse, new() where TRequestParameters : RequestParameters, new() { if (Client is null) - ThrowHelper.ThrowInvalidOperationException(InvalidOperation); + { + throw new InvalidOperationException(InvalidOperation); + } - return Client.DoRequestAsync(request, forceConfiguration, cancellationToken); + return Client.DoRequestAsync(request, cancellationToken); } } diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/ElasticsearchClientSettings.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/ElasticsearchClientSettings.cs index 4c655162fd6..9b5197a4b95 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/ElasticsearchClientSettings.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/ElasticsearchClientSettings.cs @@ -8,9 +8,10 @@ using System.Linq; using System.Linq.Expressions; using System.Reflection; +using System.Runtime.InteropServices; using Elastic.Clients.Elasticsearch.Esql; - +using Elastic.Clients.Elasticsearch.Requests; using Elastic.Clients.Elasticsearch.Serialization; using Elastic.Transport; @@ -110,6 +111,7 @@ public abstract class ElasticsearchClientSettingsBase : private readonly FluentDictionary _propertyMappings = new(); private readonly FluentDictionary _routeProperties = new(); private readonly Serializer _sourceSerializer; + private BeforeRequestEvent? _onBeforeRequest; private bool _experimentalEnableSerializeNullInferredValues; private ExperimentalSettings _experimentalSettings = new(); @@ -158,7 +160,7 @@ protected ElasticsearchClientSettingsBase( FluentDictionary IElasticsearchClientSettings.RouteProperties => _routeProperties; Serializer IElasticsearchClientSettings.SourceSerializer => _sourceSerializer; - + BeforeRequestEvent? IElasticsearchClientSettings.OnBeforeRequest => _onBeforeRequest; ExperimentalSettings IElasticsearchClientSettings.Experimental => _experimentalSettings; bool IElasticsearchClientSettings.ExperimentalEnableSerializeNullInferredValues => _experimentalEnableSerializeNullInferredValues; @@ -322,6 +324,20 @@ public TConnectionSettings DefaultMappingFor(IEnumerable typeMap return (TConnectionSettings)this; } + + /// + public TConnectionSettings OnBeforeRequest(BeforeRequestEvent handler) + { + return Assign(handler, static (a, v) => a._onBeforeRequest += v ?? DefaultBeforeRequestHandler); + } + + private static void DefaultBeforeRequestHandler(ElasticsearchClient client, + Request request, + EndpointPath endpointPath, + ref PostData? postData, + ref IRequestConfiguration? requestConfiguration) + { + } } /// diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/IElasticsearchClientSettings.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/IElasticsearchClientSettings.cs index 37bf49198a6..ffda6461b83 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/IElasticsearchClientSettings.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Configuration/IElasticsearchClientSettings.cs @@ -5,10 +5,26 @@ using System; using System.Collections.Generic; using System.Reflection; +using Elastic.Clients.Elasticsearch.Requests; using Elastic.Transport; namespace Elastic.Clients.Elasticsearch; +/// +/// An event that is fired before a request is sent. +/// +/// The instance used to send the request. +/// The request. +/// The endpoint path. +/// The post data. +/// The request configuration. +public delegate void BeforeRequestEvent( + ElasticsearchClient client, + Request request, + EndpointPath endpointPath, + ref PostData? postData, + ref IRequestConfiguration? requestConfiguration); + /// /// Provides the connection settings for Elastic.Clients.Elasticsearch's high level /// @@ -91,6 +107,14 @@ public interface IElasticsearchClientSettings : ITransportConfiguration /// Serializer SourceSerializer { get; } + /// + /// A callback that is invoked immediately before a request is sent. + /// + /// Allows to dynamically update the and . + /// + /// + BeforeRequestEvent? OnBeforeRequest { get; } + /// /// This is an advanced setting which controls serialization behaviour for inferred properies such as ID, routing and index name. /// When enabled, it may reduce allocations on serialisation paths where the cost can be more significant, such as in bulk operations. diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/Request.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/Request.cs index f748358cf9d..cb269041d2f 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/Request.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/Request/Request.cs @@ -57,7 +57,8 @@ protected virtual (string ResolvedUrl, string UrlTemplate, Dictionary? resolvedRouteValues) GetUrl(IElasticsearchClientSettings settings) => ResolveUrl(RouteValues, settings); diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Username/Username.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Username/Username.cs index 91ecae63213..6333625e868 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Username/Username.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Core/UrlParameters/Username/Username.cs @@ -79,16 +79,16 @@ public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? prov } internal sealed class UsernameConverter : - JsonConverter + JsonConverter { - public override Name? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override Username? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { reader.ValidateToken(JsonTokenType.String); return reader.GetString()!; } - public override Name ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, + public override Username ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { reader.ValidateToken(JsonTokenType.PropertyName); @@ -96,7 +96,7 @@ public override Name ReadAsPropertyName(ref Utf8JsonReader reader, Type typeToCo return reader.GetString()!; } - public override void Write(Utf8JsonWriter writer, Name value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, Username value, JsonSerializerOptions options) { if (value?.Value is null) { @@ -106,7 +106,7 @@ public override void Write(Utf8JsonWriter writer, Name value, JsonSerializerOpti writer.WriteStringValue(value.Value); } - public override void WriteAsPropertyName(Utf8JsonWriter writer, Name value, JsonSerializerOptions options) + public override void WriteAsPropertyName(Utf8JsonWriter writer, Username value, JsonSerializerOptions options) { if (value?.Value is null) { diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonReaderExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonReaderExtensions.cs index dabde32cdf4..4dfffcc7df4 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonReaderExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonReaderExtensions.cs @@ -157,6 +157,56 @@ static bool CompareToSequence(ref Utf8JsonReader reader, ReadOnlySpan othe return converter.Read(ref reader, typeof(T), options); } + /// + /// Reads a nullable value-type value from a given instance using the default + /// for the type . + /// + /// The type of the value to read. + /// A reference to the instance. + /// The to use. + /// The value read from the instance. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T? ReadNullableValue(this ref Utf8JsonReader reader, JsonSerializerOptions options) + where T : struct + { + // TODO: Support custom `T?` converters with `HandleNull`. + var converter = options.GetConverter(null); + + if (reader.TokenType is JsonTokenType.Null) + { + return null; + } + + return converter.Read(ref reader, typeof(T), options); + } + + /// + /// Reads a nullable value-type value from a given instance using a specific + /// that is retrieved from the based on . + /// + /// The type of the value to read. + /// A reference to the instance. + /// The to use. + /// + /// The marker type that is used to retrieve a specific from the given . + /// + /// The value read from the instance. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T? ReadNullableValueEx(this ref Utf8JsonReader reader, JsonSerializerOptions options, + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type markerType) + where T : struct + { + // TODO: Support custom `T?` converters with `HandleNull`. + var converter = options.GetConverter(markerType); + + if (reader.TokenType is JsonTokenType.Null) + { + return null; + } + + return converter.Read(ref reader, typeof(T), options); + } + /// /// Reads a property name value from a given instance using the default /// for the type . diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonWriterExtensions.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonWriterExtensions.cs index 2e2f7ced77d..30eb808398d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonWriterExtensions.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Next/JsonWriterExtensions.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Collections; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; @@ -52,40 +51,42 @@ public static void WriteValue(this Utf8JsonWriter writer, JsonSerializerOptio } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void WriteValue(this Utf8JsonWriter writer, JsonSerializerOptions options, T? value) - where T : struct + public static void WriteValueEx(this Utf8JsonWriter writer, JsonSerializerOptions options, T? value, + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type markerType) { - var converter = options.GetConverter(null); + var converter = options.GetConverter(markerType); - if (value is null) + if ((value is null) && !converter.HandleNull) { writer.WriteNullValue(); return; } - converter.Write(writer, value!.Value, options); + converter.Write(writer, value, options); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void WriteValueEx(this Utf8JsonWriter writer, JsonSerializerOptions options, T? value, - [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type markerType) + public static void WriteNullableValue(this Utf8JsonWriter writer, JsonSerializerOptions options, T? value) + where T : struct { - var converter = options.GetConverter(markerType); + // TODO: Support custom `T?` converters with `HandleNull`. + var converter = options.GetConverter(null); - if ((value is null) && !converter.HandleNull) + if (value is null) { writer.WriteNullValue(); return; } - converter.Write(writer, value, options); + converter.Write(writer, value!.Value, options); } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void WriteValueEx(this Utf8JsonWriter writer, JsonSerializerOptions options, T? value, + public static void WriteNullableValueEx(this Utf8JsonWriter writer, JsonSerializerOptions options, T? value, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type markerType) where T : struct { + // TODO: Support custom `T?` converters with `HandleNull`. var converter = options.GetConverter(markerType); if (value is null) diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DefaultRequestResponseSerializer.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DefaultRequestResponseSerializer.cs index c08aa351e96..0f2680282a1 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DefaultRequestResponseSerializer.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Serialization/DefaultRequestResponseSerializer.cs @@ -151,8 +151,8 @@ private static void MutateOptions(JsonSerializerOptions options) ); #pragma warning restore IL2026, IL3050 + options.MaxDepth = 512; options.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull; - options.IncludeFields = true; options.NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.AllowNamedFloatingPointLiterals; options.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; } diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/BucketsPath.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/BucketsPath.cs index 2a68eb2bf8d..c44849da3e2 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/BucketsPath.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/Aggregations/BucketsPath.cs @@ -19,7 +19,7 @@ namespace Elastic.Clients.Elasticsearch.Aggregations; /// Buckets path can be expressed in different ways, and an aggregation may accept some or all of these
forms depending on its type. Please refer to each aggregation's documentation to know what buckets
path forms they accept.
///
[JsonConverter(typeof(BucketsPathConverter))] -public sealed partial class BucketsPath : IComplexUnion +public sealed class BucketsPath : IComplexUnion { public enum Kind { 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; diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/GeoBounds.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/GeoBounds.cs index 2307706f29b..10ecb87b245 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/GeoBounds.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/GeoBounds.cs @@ -19,9 +19,70 @@ public sealed partial class GeoBounds internal sealed class GeoBoundsConverter : JsonConverter { + // Coordinates. + + private static readonly JsonEncodedText PropBottom = JsonEncodedText.Encode("bottom"); + private static readonly JsonEncodedText PropLeft = JsonEncodedText.Encode("left"); + private static readonly JsonEncodedText PropRight = JsonEncodedText.Encode("right"); + private static readonly JsonEncodedText PropTop = JsonEncodedText.Encode("top"); + + // TopLeftBottomRight. + + private static readonly JsonEncodedText PropBottomRight = JsonEncodedText.Encode("bottom_right"); + private static readonly JsonEncodedText PropTopLeft = JsonEncodedText.Encode("top_left"); + + // TopRightBottomLeft. + + private static readonly JsonEncodedText PropBottomLeft = JsonEncodedText.Encode("bottom_left"); + private static readonly JsonEncodedText PropTopRight = JsonEncodedText.Encode("top_right"); + + // WKT. + + private static readonly JsonEncodedText PropWkt = JsonEncodedText.Encode("wkt"); + public override GeoBounds? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - throw new InvalidOperationException(); + reader.ValidateToken(JsonTokenType.StartObject); + + var readerSnapshot = reader; + reader.Read(); + + GeoBounds.Kind? kind = null; + if (reader.TokenType is JsonTokenType.PropertyName) + { + if (reader.ValueTextEquals(PropBottom) || reader.ValueTextEquals(PropLeft) || + reader.ValueTextEquals(PropRight) || reader.ValueTextEquals(PropTop)) + { + kind = GeoBounds.Kind.Coordinates; + } + + if (reader.ValueTextEquals(PropBottomRight) || reader.ValueTextEquals(PropTopLeft)) + { + kind = GeoBounds.Kind.TopLeftBottomRight; + } + + if (reader.ValueTextEquals(PropBottomLeft) || reader.ValueTextEquals(PropTopRight)) + { + kind = GeoBounds.Kind.TopRightBottomLeft; + } + + if (reader.ValueTextEquals(PropWkt)) + { + kind = GeoBounds.Kind.Wkt; + } + } + + reader = readerSnapshot; + + return kind switch + { + GeoBounds.Kind.Coordinates => new(reader.ReadValue(options)), + GeoBounds.Kind.TopLeftBottomRight => new(reader.ReadValue(options)), + GeoBounds.Kind.TopRightBottomLeft => new(reader.ReadValue(options)), + GeoBounds.Kind.Wkt => new(reader.ReadValue(options)), + null => throw new JsonException($"Unrecognized '{typeof(GeoBounds)}' variant."), + _ => throw new InvalidOperationException("unreachable") + }; } public override void Write(Utf8JsonWriter writer, GeoBounds value, JsonSerializerOptions options) diff --git a/src/Elastic.Clients.Elasticsearch/_Shared/Types/GeoLocation.cs b/src/Elastic.Clients.Elasticsearch/_Shared/Types/GeoLocation.cs index 2b32d158871..ab2829f04fa 100644 --- a/src/Elastic.Clients.Elasticsearch/_Shared/Types/GeoLocation.cs +++ b/src/Elastic.Clients.Elasticsearch/_Shared/Types/GeoLocation.cs @@ -21,9 +21,58 @@ public partial class GeoLocation internal sealed class GeoLocationConverter : JsonConverter { + // LatitudeLongitude. + + private static readonly JsonEncodedText PropLat = JsonEncodedText.Encode("lat"); + private static readonly JsonEncodedText PropLon = JsonEncodedText.Encode("lon"); + + // GeoHash. + + private static readonly JsonEncodedText PropGeoHash = JsonEncodedText.Encode("geohash"); + public override GeoLocation? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - throw new InvalidOperationException(); + if (reader.TokenType is JsonTokenType.String) + { + return new GeoLocation(reader.GetString()!); + } + + if (reader.TokenType is JsonTokenType.StartArray) + { + return new GeoLocation(reader.ReadCollectionValue(options, null)!); + } + + if (reader.TokenType is JsonTokenType.StartObject) + { + var readerSnapshot = reader; + reader.Read(); + + GeoLocation.Kind? kind = null; + if (reader.TokenType is JsonTokenType.PropertyName) + { + if (reader.ValueTextEquals(PropLat) || reader.ValueTextEquals(PropLon)) + { + kind = GeoLocation.Kind.LatitudeLongitude; + } + + if (reader.ValueTextEquals(PropGeoHash)) + { + kind = GeoLocation.Kind.GeoHash; + } + } + + reader = readerSnapshot; + + return kind switch + { + GeoLocation.Kind.LatitudeLongitude => new(reader.ReadValue(options)), + GeoLocation.Kind.GeoHash => new(reader.ReadValue(options)), + null => throw new JsonException($"Unrecognized '{typeof(GeoLocation)}' variant."), + _ => throw new InvalidOperationException("unreachable") + }; + } + + throw new JsonException($"Unrecognized '{typeof(GeoLocation)}' variant."); } public override void Write(Utf8JsonWriter writer, GeoLocation value, JsonSerializerOptions options) diff --git a/src/Playground/Playground.csproj b/src/Playground/Playground.csproj index 7028e3859b3..5e1fb0a86ed 100644 --- a/src/Playground/Playground.csproj +++ b/src/Playground/Playground.csproj @@ -13,7 +13,7 @@ - +