From 4c4e89e2c9f3d62b44a5ce541fcce0f7e9074853 Mon Sep 17 00:00:00 2001 From: Emily S Date: Wed, 13 Nov 2024 18:18:34 +0100 Subject: [PATCH 1/3] Otel docs updates (#683) --- docs/setup/open-telemetry.asciidoc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/setup/open-telemetry.asciidoc b/docs/setup/open-telemetry.asciidoc index dd34fe8f0..92a4d749d 100644 --- a/docs/setup/open-telemetry.asciidoc +++ b/docs/setup/open-telemetry.asciidoc @@ -1,29 +1,30 @@ [[opentelemetry]] === Using OpenTelemetry -You can use https://opentelemetry.io/[OpenTelemetry] to monitor the performance and behavior of your Elasticsearch requests through the Java API Client. +You can use https://opentelemetry.io/[OpenTelemetry] to monitor the performance and behavior of your {es} requests through the Java API Client. The Java API Client comes with built-in OpenTelemetry instrumentation that emits https://www.elastic.co/guide/en/apm/guide/current/apm-distributed-tracing.html[distributed tracing spans] by default. -With that, applications https://opentelemetry.io/docs/instrumentation/java/manual/[instrumented with OpenTelemetry] or running the https://opentelemetry.io/docs/instrumentation/java/automatic/[OpenTelemetry Java Agent] are inherently enriched with additional spans that contain insightful information about the execution of the Elasticsearch requests. +With that, applications https://opentelemetry.io/docs/instrumentation/java/manual/[instrumented with OpenTelemetry] or running the https://opentelemetry.io/docs/instrumentation/java/automatic/[OpenTelemetry Java Agent] are inherently enriched with additional spans that contain insightful information about the execution of the {es} requests. -The native instrumentation in the Java API Client follows the https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/[OpenTelemetry Semantic Conventions for Elasticsearch]. In particular, the instrumentation in the client covers the logical Elasticsearch request layer, thus, creates a single span per request the service executes against the Java API Client. The following image shows a resulting trace in which three different Elasticsearch requests are executed, i.e. an `index`, `get` and a search `request`: +The native instrumentation in the Java API Client follows the https://opentelemetry.io/docs/specs/semconv/database/elasticsearch/[OpenTelemetry Semantic Conventions for {es}]. In particular, the instrumentation in the client covers the logical layer of {es} requests. A single span per request is created that is processed by the service through the Java API Client. The following image shows a trace that records the handling of three different {es} requests: an `index`, `get` and a search `request`: [role="screenshot"] -image::images/otel-waterfall-instrumented-without-http.jpg[alt="Distributed trace with Elasticsearch spans",align="center"] +image::images/otel-waterfall-instrumented-without-http.jpg[alt="Distributed trace with {es} spans",align="center"] -Usually, OpenTelemetry agents and auto-instrumentation modules come with instrumentation support for HTTP-level communication. In this case, in addition to the logical Elasticsearch client requests, spans will be captured for the physical HTTP requests emitted by the client. The following image shows a trace with both, Elasticsearch spans (in blue) and the corresponding HTTP-level spans (in red): +Usually, OpenTelemetry agents and auto-instrumentation modules come with instrumentation support for HTTP-level communication. In this case, in addition to the logical {es} client requests, spans will be captured for the physical HTTP requests emitted by the client. The following image shows a trace with both, {es} spans (in blue) and the corresponding HTTP-level spans (in red): [role="screenshot"] -image::images/otel-waterfall-instrumented.jpg[alt="Distributed trace with Elasticsearch and HTTP spans",align="center"] +image::images/otel-waterfall-instrumented.jpg[alt="Distributed trace with {es} and HTTP spans",align="center"] -Advanced Java API Client behavior such as nodes round-robin and request retries are revealed through the combination of logical Elasticsearch spans and the physical HTTP spans. The following example shows an `index` request in a scenario with two Elasticsearch nodes: +Advanced Java API Client behavior such as nodes round-robin and request retries are revealed through the combination of logical {es} spans and the physical HTTP spans. The following example shows an `index` request in a scenario with two {es} nodes: [role="screenshot"] image::images/otel-waterfall-retries.jpg[alt="Distributed trace with request retries",align="center"] -The first node is unavailable and results in an HTTP error, while the retry to the second node succeeds. Both HTTP requests are subsumed by the logical Elasticsearch request span (in blue). +The first node is unavailable and results in an HTTP error, while the retry to the second node succeeds. Both HTTP requests are subsumed by the logical {es} request span (in blue). [discrete] ==== Setup the OpenTelemetry instrumentation + When using the https://opentelemetry.io/docs/instrumentation/java/manual[OpenTelemetry Java SDK manually] or using the https://opentelemetry.io/docs/instrumentation/java/automatic/[OpenTelemetry Java Agent], the Java API Client's OpenTelemetry instrumentation is enabled by default and uses the _globally_ registered OpenTelemetry SDK instance (i.e. `GlobalOpenTelemetry`). So, if you don't use a custom, local OpenTelemetry SDK instance, there is no explicit setup required to use the Java API Client's OpenTelemetry instrumentation. [discrete] @@ -57,7 +58,7 @@ With this configuration option you can enable (default) or disable the built-in [discrete] ===== Capture search request bodies -Per default, the built-in OpenTelemetry instrumentation does not capture request bodies because of data privacy reasons. You can use this option to enable capturing of search queries from the the request bodies of Elasticsearch search requests in case you wish to capture this information, regardless. +Per default, the built-in OpenTelemetry instrumentation does not capture request bodies due to data privacy considerations. You can use this option to enable capturing of search queries from the the request bodies of {es} search requests in case you wish to gather this information regardless. **Default:** `false` @@ -68,6 +69,7 @@ Per default, the built-in OpenTelemetry instrumentation does not capture request [discrete] ==== Overhead + The OpenTelemetry instrumentation (as any other monitoring approach) may come with a little overhead on CPU, memory and/or latency. The overhead may only occur when the instrumentation is enabled (default) and an OpenTelemetry SDK (or an OpenTelemetry Agent) is active in the target application. In case that either the instrumentation is disabled or no OpenTelemetry SDK (or OpenTelemetry Agent) is active with the target application, there is no monitoring overhead expected when using the client. Even when the instrumentation is enabled and is being actively used (by an OpenTelemetry SDK), in the vast majority of cases the overhead is very small and negligible. In edge cases in which there is a noticable overhead the <> to eliminate any potential overhead effect of the instrumentation. From 062eb1701d66cfdfc800eeec2827cdf4194af367 Mon Sep 17 00:00:00 2001 From: Srikanth Manvi Date: Wed, 13 Nov 2024 12:20:00 -0500 Subject: [PATCH 2/3] Update readme (#604) --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 59a78fb39..30e100ab7 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ Elastic logo # Elasticsearch Java Client +Elasticsearch is a distributed, RESTful search engine optimized for speed and relevance on production-scale workloads. You can use Elasticsearch to perform real-time search over massive datasets for applications including Vector search, Full-text search, Logs, Metrics, Application Performance Monitoring, Security Logs and more ! -The official Java client for [Elasticsearch](https://github.com/elastic/elasticsearch). +This repo has the official Java client for [Elasticsearch](https://github.com/elastic/elasticsearch). The Java client for Elasticsearch provides strongly typed requests and responses for all Elasticsearch APIs. It delegates protocol handling to an http client such as the [Elasticsearch Low Level REST client](https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/java-rest-low.html) that takes care of all transport-level concerns (http connection establishment and pooling, retries, etc). From 7001d645e98f3f70c908f050df25d2e8ec5eeab4 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Thu, 14 Nov 2024 13:03:41 +0100 Subject: [PATCH 3/3] [codegen] update to latest spec --- .../ElasticsearchAsyncClient.java | 277 +++++++++--- .../elasticsearch/ElasticsearchClient.java | 277 +++++++++--- .../elasticsearch/_types/Retriever.java | 62 +++ .../elasticsearch/_types/RetrieverBase.java | 36 ++ .../_types/RetrieverBuilders.java | 37 ++ .../elasticsearch/_types/RuleRetriever.java | 279 +++++++++++++ .../_types/StandardRetriever.java | 36 -- .../_types/TextSimilarityReranker.java | 303 ++++++++++++++ .../AsyncSearchStatusRequest.java | 10 +- .../DeleteAsyncSearchRequest.java | 13 +- .../ElasticsearchAsyncSearchAsyncClient.java | 122 +++--- .../ElasticsearchAsyncSearchClient.java | 122 +++--- .../async_search/GetAsyncSearchRequest.java | 10 +- .../async_search/SubmitRequest.java | 35 +- .../autoscaling/AutoscalingPolicy.java | 6 +- .../DeleteAutoscalingPolicyRequest.java | 7 +- .../ElasticsearchAutoscalingAsyncClient.java | 65 ++- .../ElasticsearchAutoscalingClient.java | 65 ++- .../GetAutoscalingCapacityRequest.java | 23 +- .../GetAutoscalingPolicyRequest.java | 7 +- .../PutAutoscalingPolicyRequest.java | 7 +- .../elasticsearch/cat/AllocationRequest.java | 39 ++ .../cat/ComponentTemplatesRequest.java | 39 ++ .../cat/ElasticsearchCatAsyncClient.java | 162 ++++++- .../cat/ElasticsearchCatClient.java | 163 +++++++- .../elasticsearch/cat/MasterRequest.java | 77 +++- .../elasticsearch/cat/NodeattrsRequest.java | 77 +++- .../cat/PendingTasksRequest.java | 77 +++- .../elasticsearch/cat/PluginsRequest.java | 77 +++- .../elasticsearch/cat/SegmentsRequest.java | 39 ++ .../elasticsearch/cat/TemplatesRequest.java | 39 ++ .../elasticsearch/cat/ThreadPoolRequest.java | 39 ++ .../core/ClearScrollRequest.java | 4 +- .../core/ClosePointInTimeRequest.java | 9 +- .../elasticsearch/core/FieldCapsRequest.java | 13 +- .../elasticsearch/core/KnnSearchRequest.java | 20 +- .../core/MsearchTemplateRequest.java | 2 +- .../core/OpenPointInTimeRequest.java | 12 +- .../elasticsearch/core/RankEvalRequest.java | 6 +- .../core/RenderSearchTemplateRequest.java | 4 +- .../elasticsearch/core/SearchMvtRequest.java | 4 +- .../elasticsearch/core/SearchRequest.java | 40 +- .../core/SearchShardsRequest.java | 8 +- .../core/SearchTemplateRequest.java | 2 +- .../core/TermvectorsRequest.java | 6 +- .../elasticsearch/doc-files/api-spec.html | 210 +++++----- .../fleet/FleetSearchRequest.java | 26 -- .../indices/ExistsAliasRequest.java | 32 -- .../indices/GetAliasRequest.java | 32 -- .../indices/SegmentsRequest.java | 30 -- .../ingest/IpLocationProcessor.java | 394 ++++++++++++++++++ .../elasticsearch/ingest/Processor.java | 31 ++ .../ingest/ProcessorBuilders.java | 18 + .../ml/ElasticsearchMlAsyncClient.java | 22 +- .../ml/ElasticsearchMlClient.java | 22 +- .../elasticsearch/ml/PutDatafeedRequest.java | 11 +- .../elasticsearch/security/Access.java | 253 +++++++++++ .../CreateCrossClusterApiKeyRequest.java | 377 +++++++++++++++++ .../CreateCrossClusterApiKeyResponse.java | 284 +++++++++++++ .../ElasticsearchSecurityAsyncClient.java | 126 ++++++ .../security/ElasticsearchSecurityClient.java | 128 ++++++ .../security/ReplicationAccess.java | 184 ++++++++ .../elasticsearch/security/SearchAccess.java | 317 ++++++++++++++ .../UpdateCrossClusterApiKeyRequest.java | 371 +++++++++++++++++ .../UpdateCrossClusterApiKeyResponse.java | 163 ++++++++ .../elasticsearch/tasks/ListRequest.java | 34 +- .../elasticsearch/xpack/info/Features.java | 31 ++ 67 files changed, 5162 insertions(+), 691 deletions(-) create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RuleRetriever.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/_types/TextSimilarityReranker.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/IpLocationProcessor.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/security/Access.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateCrossClusterApiKeyRequest.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateCrossClusterApiKeyResponse.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/security/ReplicationAccess.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/security/SearchAccess.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateCrossClusterApiKeyRequest.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateCrossClusterApiKeyResponse.java diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java index a4417f811..57c716250 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java @@ -403,7 +403,9 @@ public CompletableFuture bulk() { // ----- Endpoint: clear_scroll /** - * Clears the search context and results for a scrolling search. + * Clear a scrolling search. + *

+ * Clear the search context and results for a scrolling search. * * @see Documentation @@ -418,7 +420,9 @@ public CompletableFuture clearScroll(ClearScrollRequest req } /** - * Clears the search context and results for a scrolling search. + * Clear a scrolling search. + *

+ * Clear the search context and results for a scrolling search. * * @param fn * a function that initializes a builder to create the @@ -434,7 +438,9 @@ public final CompletableFuture clearScroll( } /** - * Clears the search context and results for a scrolling search. + * Clear a scrolling search. + *

+ * Clear the search context and results for a scrolling search. * * @see Documentation @@ -449,7 +455,14 @@ public CompletableFuture clearScroll() { // ----- Endpoint: close_point_in_time /** - * Closes a point-in-time. + * Close a point in time. + *

+ * A point in time must be opened explicitly before being used in search + * requests. The keep_alive parameter tells Elasticsearch how long + * it should persist. A point in time is automatically closed when the + * keep_alive period has elapsed. However, keeping points in time + * has a cost; close them as soon as they are no longer required for search + * requests. * * @see Documentation @@ -464,7 +477,14 @@ public CompletableFuture closePointInTime(ClosePointIn } /** - * Closes a point-in-time. + * Close a point in time. + *

+ * A point in time must be opened explicitly before being used in search + * requests. The keep_alive parameter tells Elasticsearch how long + * it should persist. A point in time is automatically closed when the + * keep_alive period has elapsed. However, keeping points in time + * has a cost; close them as soon as they are no longer required for search + * requests. * * @param fn * a function that initializes a builder to create the @@ -852,11 +872,14 @@ public final CompletableFuture> explain( // ----- Endpoint: field_caps /** - * The field capabilities API returns the information about the capabilities of - * fields among multiple indices. The field capabilities API returns runtime - * fields like any other field. For example, a runtime field with a type of - * keyword is returned as any other field that belongs to the - * keyword family. + * Get the field capabilities. + *

+ * Get information about the capabilities of fields among multiple indices. + *

+ * For data streams, the API returns field capabilities among the stream’s + * backing indices. It returns runtime fields like any other field. For example, + * a runtime field with a type of keyword is returned the same as any other + * field that belongs to the keyword family. * * @see Documentation @@ -871,11 +894,14 @@ public CompletableFuture fieldCaps(FieldCapsRequest request) } /** - * The field capabilities API returns the information about the capabilities of - * fields among multiple indices. The field capabilities API returns runtime - * fields like any other field. For example, a runtime field with a type of - * keyword is returned as any other field that belongs to the - * keyword family. + * Get the field capabilities. + *

+ * Get information about the capabilities of fields among multiple indices. + *

+ * For data streams, the API returns field capabilities among the stream’s + * backing indices. It returns runtime fields like any other field. For example, + * a runtime field with a type of keyword is returned the same as any other + * field that belongs to the keyword family. * * @param fn * a function that initializes a builder to create the @@ -891,11 +917,14 @@ public final CompletableFuture fieldCaps( } /** - * The field capabilities API returns the information about the capabilities of - * fields among multiple indices. The field capabilities API returns runtime - * fields like any other field. For example, a runtime field with a type of - * keyword is returned as any other field that belongs to the - * keyword family. + * Get the field capabilities. + *

+ * Get information about the capabilities of fields among multiple indices. + *

+ * For data streams, the API returns field capabilities among the stream’s + * backing indices. It returns runtime fields like any other field. For example, + * a runtime field with a type of keyword is returned the same as any other + * field that belongs to the keyword family. * * @see Documentation @@ -1218,7 +1247,22 @@ public CompletableFuture info() { // ----- Endpoint: knn_search /** - * Performs a kNN search. + * Run a knn search. + *

+ * NOTE: The kNN search API has been replaced by the knn option in + * the search API. + *

+ * Perform a k-nearest neighbor (kNN) search on a dense_vector field and return + * the matching documents. Given a query vector, the API finds the k closest + * vectors and returns those documents as search hits. + *

+ * Elasticsearch uses the HNSW algorithm to support efficient kNN search. Like + * most kNN algorithms, HNSW is an approximate method that sacrifices result + * accuracy for improved search speed. This means the results returned are not + * always the true k closest neighbors. + *

+ * The kNN search API supports restricting the search using a filter. The search + * will return the top k documents that also match the filter query. * * @see Documentation @@ -1237,7 +1281,22 @@ public CompletableFuture> knnSearch(Knn } /** - * Performs a kNN search. + * Run a knn search. + *

+ * NOTE: The kNN search API has been replaced by the knn option in + * the search API. + *

+ * Perform a k-nearest neighbor (kNN) search on a dense_vector field and return + * the matching documents. Given a query vector, the API finds the k closest + * vectors and returns those documents as search hits. + *

+ * Elasticsearch uses the HNSW algorithm to support efficient kNN search. Like + * most kNN algorithms, HNSW is an approximate method that sacrifices result + * accuracy for improved search speed. This means the results returned are not + * always the true k closest neighbors. + *

+ * The kNN search API supports restricting the search using a filter. The search + * will return the top k documents that also match the filter query. * * @param fn * a function that initializes a builder to create the @@ -1253,7 +1312,22 @@ public final CompletableFuture> knnSear } /** - * Performs a kNN search. + * Run a knn search. + *

+ * NOTE: The kNN search API has been replaced by the knn option in + * the search API. + *

+ * Perform a k-nearest neighbor (kNN) search on a dense_vector field and return + * the matching documents. Given a query vector, the API finds the k closest + * vectors and returns those documents as search hits. + *

+ * Elasticsearch uses the HNSW algorithm to support efficient kNN search. Like + * most kNN algorithms, HNSW is an approximate method that sacrifices result + * accuracy for improved search speed. This means the results returned are not + * always the true k closest neighbors. + *

+ * The kNN search API supports restricting the search using a filter. The search + * will return the top k documents that also match the filter query. * * @see Documentation @@ -1272,7 +1346,22 @@ public CompletableFuture> knnSearch(Knn } /** - * Performs a kNN search. + * Run a knn search. + *

+ * NOTE: The kNN search API has been replaced by the knn option in + * the search API. + *

+ * Perform a k-nearest neighbor (kNN) search on a dense_vector field and return + * the matching documents. Given a query vector, the API finds the k closest + * vectors and returns those documents as search hits. + *

+ * Elasticsearch uses the HNSW algorithm to support efficient kNN search. Like + * most kNN algorithms, HNSW is an approximate method that sacrifices result + * accuracy for improved search speed. This means the results returned are not + * always the true k closest neighbors. + *

+ * The kNN search API supports restricting the search using a filter. The search + * will return the top k documents that also match the filter query. * * @param fn * a function that initializes a builder to create the @@ -1529,7 +1618,7 @@ public final CompletableFuture> msearch( // ----- Endpoint: msearch_template /** - * Runs multiple templated searches with a single request. + * Run multiple templated searches. * * @see Documentation @@ -1548,7 +1637,7 @@ public CompletableFuture> msearch } /** - * Runs multiple templated searches with a single request. + * Run multiple templated searches. * * @param fn * a function that initializes a builder to create the @@ -1565,7 +1654,7 @@ public final CompletableFuture> m } /** - * Runs multiple templated searches with a single request. + * Run multiple templated searches. * * @see Documentation @@ -1584,7 +1673,7 @@ public CompletableFuture> msearch } /** - * Runs multiple templated searches with a single request. + * Run multiple templated searches. * * @param fn * a function that initializes a builder to create the @@ -1666,14 +1755,20 @@ public CompletableFuture mtermvectors() { // ----- Endpoint: open_point_in_time /** - * A search request by default executes against the most recent visible data of - * the target indices, which is called point in time. Elasticsearch pit (point - * in time) is a lightweight view into the state of the data as it existed when + * Open a point in time. + *

+ * A search request by default runs against the most recent visible data of the + * target indices, which is called point in time. Elasticsearch pit (point in + * time) is a lightweight view into the state of the data as it existed when * initiated. In some cases, it’s preferred to perform multiple search requests * using the same point in time. For example, if refreshes happen between * search_after requests, then the results of those requests might * not be consistent as changes happening between searches are only visible to * the more recent point in time. + *

+ * A point in time must be opened explicitly before being used in search + * requests. The keep_alive parameter tells Elasticsearch how long + * it should persist. * * @see Documentation @@ -1688,14 +1783,20 @@ public CompletableFuture openPointInTime(OpenPointInTim } /** - * A search request by default executes against the most recent visible data of - * the target indices, which is called point in time. Elasticsearch pit (point - * in time) is a lightweight view into the state of the data as it existed when + * Open a point in time. + *

+ * A search request by default runs against the most recent visible data of the + * target indices, which is called point in time. Elasticsearch pit (point in + * time) is a lightweight view into the state of the data as it existed when * initiated. In some cases, it’s preferred to perform multiple search requests * using the same point in time. For example, if refreshes happen between * search_after requests, then the results of those requests might * not be consistent as changes happening between searches are only visible to * the more recent point in time. + *

+ * A point in time must be opened explicitly before being used in search + * requests. The keep_alive parameter tells Elasticsearch how long + * it should persist. * * @param fn * a function that initializes a builder to create the @@ -1761,8 +1862,10 @@ public final CompletableFuture putScript( // ----- Endpoint: rank_eval /** - * Enables you to evaluate the quality of ranked search results over a set of - * typical search queries. + * Evaluate ranked search results. + *

+ * Evaluate the quality of ranked search results over a set of typical search + * queries. * * @see Documentation @@ -1777,8 +1880,10 @@ public CompletableFuture rankEval(RankEvalRequest request) { } /** - * Enables you to evaluate the quality of ranked search results over a set of - * typical search queries. + * Evaluate ranked search results. + *

+ * Evaluate the quality of ranked search results over a set of typical search + * queries. * * @param fn * a function that initializes a builder to create the @@ -1872,7 +1977,9 @@ public final CompletableFuture reindexRethrottle( // ----- Endpoint: render_search_template /** - * Renders a search template as a search request body. + * Render a search template. + *

+ * Render a search template as a search request body. * * @see Documentation @@ -1887,7 +1994,9 @@ public CompletableFuture renderSearchTemplate(Rend } /** - * Renders a search template as a search request body. + * Render a search template. + *

+ * Render a search template as a search request body. * * @param fn * a function that initializes a builder to create the @@ -1903,7 +2012,9 @@ public final CompletableFuture renderSearchTemplat } /** - * Renders a search template as a search request body. + * Render a search template. + *

+ * Render a search template as a search request body. * * @see Documentation @@ -2149,9 +2260,11 @@ public final CompletableFuture> scroll( // ----- Endpoint: search /** - * Returns search hits that match the query defined in the request. You can - * provide search queries using the q query string parameter or the - * request body. If both are specified, only the query parameter is used. + * Run a search. + *

+ * Get search hits that match the query defined in the request. You can provide + * search queries using the q query string parameter or the request + * body. If both are specified, only the query parameter is used. * * @see Documentation @@ -2169,9 +2282,11 @@ public CompletableFuture> search(SearchReq } /** - * Returns search hits that match the query defined in the request. You can - * provide search queries using the q query string parameter or the - * request body. If both are specified, only the query parameter is used. + * Run a search. + *

+ * Get search hits that match the query defined in the request. You can provide + * search queries using the q query string parameter or the request + * body. If both are specified, only the query parameter is used. * * @param fn * a function that initializes a builder to create the @@ -2187,9 +2302,11 @@ public final CompletableFuture> search( } /** - * Returns search hits that match the query defined in the request. You can - * provide search queries using the q query string parameter or the - * request body. If both are specified, only the query parameter is used. + * Run a search. + *

+ * Get search hits that match the query defined in the request. You can provide + * search queries using the q query string parameter or the request + * body. If both are specified, only the query parameter is used. * * @see Documentation @@ -2206,9 +2323,11 @@ public CompletableFuture> search(SearchReq } /** - * Returns search hits that match the query defined in the request. You can - * provide search queries using the q query string parameter or the - * request body. If both are specified, only the query parameter is used. + * Run a search. + *

+ * Get search hits that match the query defined in the request. You can provide + * search queries using the q query string parameter or the request + * body. If both are specified, only the query parameter is used. * * @param fn * a function that initializes a builder to create the @@ -2226,7 +2345,9 @@ public final CompletableFuture> search( // ----- Endpoint: search_mvt /** - * Search a vector tile. Searches a vector tile for geospatial values. + * Search a vector tile. + *

+ * Search a vector tile for geospatial values. * * @see Documentation @@ -2241,7 +2362,9 @@ public CompletableFuture searchMvt(SearchMvtRequest request) { } /** - * Search a vector tile. Searches a vector tile for geospatial values. + * Search a vector tile. + *

+ * Search a vector tile for geospatial values. * * @param fn * a function that initializes a builder to create the @@ -2259,8 +2382,12 @@ public final CompletableFuture searchMvt( // ----- Endpoint: search_shards /** - * Returns information about the indices and shards that a search request would - * be executed against. + * Get the search shards. + *

+ * Get the indices and shards that a search request would be run against. This + * information can be useful for working out issues or planning optimizations + * with routing and shard preferences. When filtered aliases are used, the + * filter is returned as part of the indices section. * * @see Documentation @@ -2275,8 +2402,12 @@ public CompletableFuture searchShards(SearchShardsRequest } /** - * Returns information about the indices and shards that a search request would - * be executed against. + * Get the search shards. + *

+ * Get the indices and shards that a search request would be run against. This + * information can be useful for working out issues or planning optimizations + * with routing and shard preferences. When filtered aliases are used, the + * filter is returned as part of the indices section. * * @param fn * a function that initializes a builder to create the @@ -2292,8 +2423,12 @@ public final CompletableFuture searchShards( } /** - * Returns information about the indices and shards that a search request would - * be executed against. + * Get the search shards. + *

+ * Get the indices and shards that a search request would be run against. This + * information can be useful for working out issues or planning optimizations + * with routing and shard preferences. When filtered aliases are used, the + * filter is returned as part of the indices section. * * @see Documentation @@ -2308,7 +2443,7 @@ public CompletableFuture searchShards() { // ----- Endpoint: search_template /** - * Runs a search with a search template. + * Run a search with a search template. * * @see Documentation @@ -2327,7 +2462,7 @@ public CompletableFuture> searchTe } /** - * Runs a search with a search template. + * Run a search with a search template. * * @param fn * a function that initializes a builder to create the @@ -2344,7 +2479,7 @@ public final CompletableFuture> se } /** - * Runs a search with a search template. + * Run a search with a search template. * * @see Documentation @@ -2363,7 +2498,7 @@ public CompletableFuture> searchTe } /** - * Runs a search with a search template. + * Run a search with a search template. * * @param fn * a function that initializes a builder to create the @@ -2440,8 +2575,10 @@ public final CompletableFuture termsEnum( // ----- Endpoint: termvectors /** - * Get term vector information. Returns information and statistics about terms - * in the fields of a particular document. + * Get term vector information. + *

+ * Get information and statistics about terms in the fields of a particular + * document. * * @see Documentation @@ -2456,8 +2593,10 @@ public CompletableFuture termvectors(Termvector } /** - * Get term vector information. Returns information and statistics about terms - * in the fields of a particular document. + * Get term vector information. + *

+ * Get information and statistics about terms in the fields of a particular + * document. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java index c7d8262b8..8502c784c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java @@ -405,7 +405,9 @@ public BulkResponse bulk() throws IOException, ElasticsearchException { // ----- Endpoint: clear_scroll /** - * Clears the search context and results for a scrolling search. + * Clear a scrolling search. + *

+ * Clear the search context and results for a scrolling search. * * @see Documentation @@ -420,7 +422,9 @@ public ClearScrollResponse clearScroll(ClearScrollRequest request) throws IOExce } /** - * Clears the search context and results for a scrolling search. + * Clear a scrolling search. + *

+ * Clear the search context and results for a scrolling search. * * @param fn * a function that initializes a builder to create the @@ -437,7 +441,9 @@ public final ClearScrollResponse clearScroll( } /** - * Clears the search context and results for a scrolling search. + * Clear a scrolling search. + *

+ * Clear the search context and results for a scrolling search. * * @see Documentation @@ -452,7 +458,14 @@ public ClearScrollResponse clearScroll() throws IOException, ElasticsearchExcept // ----- Endpoint: close_point_in_time /** - * Closes a point-in-time. + * Close a point in time. + *

+ * A point in time must be opened explicitly before being used in search + * requests. The keep_alive parameter tells Elasticsearch how long + * it should persist. A point in time is automatically closed when the + * keep_alive period has elapsed. However, keeping points in time + * has a cost; close them as soon as they are no longer required for search + * requests. * * @see Documentation @@ -468,7 +481,14 @@ public ClosePointInTimeResponse closePointInTime(ClosePointInTimeRequest request } /** - * Closes a point-in-time. + * Close a point in time. + *

+ * A point in time must be opened explicitly before being used in search + * requests. The keep_alive parameter tells Elasticsearch how long + * it should persist. A point in time is automatically closed when the + * keep_alive period has elapsed. However, keeping points in time + * has a cost; close them as soon as they are no longer required for search + * requests. * * @param fn * a function that initializes a builder to create the @@ -866,11 +886,14 @@ public final ExplainResponse explain( // ----- Endpoint: field_caps /** - * The field capabilities API returns the information about the capabilities of - * fields among multiple indices. The field capabilities API returns runtime - * fields like any other field. For example, a runtime field with a type of - * keyword is returned as any other field that belongs to the - * keyword family. + * Get the field capabilities. + *

+ * Get information about the capabilities of fields among multiple indices. + *

+ * For data streams, the API returns field capabilities among the stream’s + * backing indices. It returns runtime fields like any other field. For example, + * a runtime field with a type of keyword is returned the same as any other + * field that belongs to the keyword family. * * @see Documentation @@ -885,11 +908,14 @@ public FieldCapsResponse fieldCaps(FieldCapsRequest request) throws IOException, } /** - * The field capabilities API returns the information about the capabilities of - * fields among multiple indices. The field capabilities API returns runtime - * fields like any other field. For example, a runtime field with a type of - * keyword is returned as any other field that belongs to the - * keyword family. + * Get the field capabilities. + *

+ * Get information about the capabilities of fields among multiple indices. + *

+ * For data streams, the API returns field capabilities among the stream’s + * backing indices. It returns runtime fields like any other field. For example, + * a runtime field with a type of keyword is returned the same as any other + * field that belongs to the keyword family. * * @param fn * a function that initializes a builder to create the @@ -905,11 +931,14 @@ public final FieldCapsResponse fieldCaps(Functionkeyword family. + * Get the field capabilities. + *

+ * Get information about the capabilities of fields among multiple indices. + *

+ * For data streams, the API returns field capabilities among the stream’s + * backing indices. It returns runtime fields like any other field. For example, + * a runtime field with a type of keyword is returned the same as any other + * field that belongs to the keyword family. * * @see Documentation @@ -1237,7 +1266,22 @@ public InfoResponse info() throws IOException, ElasticsearchException { // ----- Endpoint: knn_search /** - * Performs a kNN search. + * Run a knn search. + *

+ * NOTE: The kNN search API has been replaced by the knn option in + * the search API. + *

+ * Perform a k-nearest neighbor (kNN) search on a dense_vector field and return + * the matching documents. Given a query vector, the API finds the k closest + * vectors and returns those documents as search hits. + *

+ * Elasticsearch uses the HNSW algorithm to support efficient kNN search. Like + * most kNN algorithms, HNSW is an approximate method that sacrifices result + * accuracy for improved search speed. This means the results returned are not + * always the true k closest neighbors. + *

+ * The kNN search API supports restricting the search using a filter. The search + * will return the top k documents that also match the filter query. * * @see Documentation @@ -1256,7 +1300,22 @@ public KnnSearchResponse knnSearch(KnnSearchRequest reque } /** - * Performs a kNN search. + * Run a knn search. + *

+ * NOTE: The kNN search API has been replaced by the knn option in + * the search API. + *

+ * Perform a k-nearest neighbor (kNN) search on a dense_vector field and return + * the matching documents. Given a query vector, the API finds the k closest + * vectors and returns those documents as search hits. + *

+ * Elasticsearch uses the HNSW algorithm to support efficient kNN search. Like + * most kNN algorithms, HNSW is an approximate method that sacrifices result + * accuracy for improved search speed. This means the results returned are not + * always the true k closest neighbors. + *

+ * The kNN search API supports restricting the search using a filter. The search + * will return the top k documents that also match the filter query. * * @param fn * a function that initializes a builder to create the @@ -1273,7 +1332,22 @@ public final KnnSearchResponse knnSearch( } /** - * Performs a kNN search. + * Run a knn search. + *

+ * NOTE: The kNN search API has been replaced by the knn option in + * the search API. + *

+ * Perform a k-nearest neighbor (kNN) search on a dense_vector field and return + * the matching documents. Given a query vector, the API finds the k closest + * vectors and returns those documents as search hits. + *

+ * Elasticsearch uses the HNSW algorithm to support efficient kNN search. Like + * most kNN algorithms, HNSW is an approximate method that sacrifices result + * accuracy for improved search speed. This means the results returned are not + * always the true k closest neighbors. + *

+ * The kNN search API supports restricting the search using a filter. The search + * will return the top k documents that also match the filter query. * * @see Documentation @@ -1292,7 +1366,22 @@ public KnnSearchResponse knnSearch(KnnSearchRequest reque } /** - * Performs a kNN search. + * Run a knn search. + *

+ * NOTE: The kNN search API has been replaced by the knn option in + * the search API. + *

+ * Perform a k-nearest neighbor (kNN) search on a dense_vector field and return + * the matching documents. Given a query vector, the API finds the k closest + * vectors and returns those documents as search hits. + *

+ * Elasticsearch uses the HNSW algorithm to support efficient kNN search. Like + * most kNN algorithms, HNSW is an approximate method that sacrifices result + * accuracy for improved search speed. This means the results returned are not + * always the true k closest neighbors. + *

+ * The kNN search API supports restricting the search using a filter. The search + * will return the top k documents that also match the filter query. * * @param fn * a function that initializes a builder to create the @@ -1553,7 +1642,7 @@ public final MsearchResponse msearch( // ----- Endpoint: msearch_template /** - * Runs multiple templated searches with a single request. + * Run multiple templated searches. * * @see Documentation @@ -1572,7 +1661,7 @@ public MsearchTemplateResponse msearchTemplate(MsearchTem } /** - * Runs multiple templated searches with a single request. + * Run multiple templated searches. * * @param fn * a function that initializes a builder to create the @@ -1589,7 +1678,7 @@ public final MsearchTemplateResponse msearchTemplate( } /** - * Runs multiple templated searches with a single request. + * Run multiple templated searches. * * @see Documentation @@ -1608,7 +1697,7 @@ public MsearchTemplateResponse msearchTemplate(MsearchTem } /** - * Runs multiple templated searches with a single request. + * Run multiple templated searches. * * @param fn * a function that initializes a builder to create the @@ -1692,14 +1781,20 @@ public MtermvectorsResponse mtermvectors() throws IOException, ElasticsearchExce // ----- Endpoint: open_point_in_time /** - * A search request by default executes against the most recent visible data of - * the target indices, which is called point in time. Elasticsearch pit (point - * in time) is a lightweight view into the state of the data as it existed when + * Open a point in time. + *

+ * A search request by default runs against the most recent visible data of the + * target indices, which is called point in time. Elasticsearch pit (point in + * time) is a lightweight view into the state of the data as it existed when * initiated. In some cases, it’s preferred to perform multiple search requests * using the same point in time. For example, if refreshes happen between * search_after requests, then the results of those requests might * not be consistent as changes happening between searches are only visible to * the more recent point in time. + *

+ * A point in time must be opened explicitly before being used in search + * requests. The keep_alive parameter tells Elasticsearch how long + * it should persist. * * @see Documentation @@ -1715,14 +1810,20 @@ public OpenPointInTimeResponse openPointInTime(OpenPointInTimeRequest request) } /** - * A search request by default executes against the most recent visible data of - * the target indices, which is called point in time. Elasticsearch pit (point - * in time) is a lightweight view into the state of the data as it existed when + * Open a point in time. + *

+ * A search request by default runs against the most recent visible data of the + * target indices, which is called point in time. Elasticsearch pit (point in + * time) is a lightweight view into the state of the data as it existed when * initiated. In some cases, it’s preferred to perform multiple search requests * using the same point in time. For example, if refreshes happen between * search_after requests, then the results of those requests might * not be consistent as changes happening between searches are only visible to * the more recent point in time. + *

+ * A point in time must be opened explicitly before being used in search + * requests. The keep_alive parameter tells Elasticsearch how long + * it should persist. * * @param fn * a function that initializes a builder to create the @@ -1789,8 +1890,10 @@ public final PutScriptResponse putScript(Function + * Evaluate the quality of ranked search results over a set of typical search + * queries. * * @see Documentation @@ -1805,8 +1908,10 @@ public RankEvalResponse rankEval(RankEvalRequest request) throws IOException, El } /** - * Enables you to evaluate the quality of ranked search results over a set of - * typical search queries. + * Evaluate ranked search results. + *

+ * Evaluate the quality of ranked search results over a set of typical search + * queries. * * @param fn * a function that initializes a builder to create the @@ -1902,7 +2007,9 @@ public final ReindexRethrottleResponse reindexRethrottle( // ----- Endpoint: render_search_template /** - * Renders a search template as a search request body. + * Render a search template. + *

+ * Render a search template as a search request body. * * @see Documentation @@ -1918,7 +2025,9 @@ public RenderSearchTemplateResponse renderSearchTemplate(RenderSearchTemplateReq } /** - * Renders a search template as a search request body. + * Render a search template. + *

+ * Render a search template as a search request body. * * @param fn * a function that initializes a builder to create the @@ -1935,7 +2044,9 @@ public final RenderSearchTemplateResponse renderSearchTemplate( } /** - * Renders a search template as a search request body. + * Render a search template. + *

+ * Render a search template as a search request body. * * @see Documentation @@ -2185,9 +2296,11 @@ public final ScrollResponse scroll( // ----- Endpoint: search /** - * Returns search hits that match the query defined in the request. You can - * provide search queries using the q query string parameter or the - * request body. If both are specified, only the query parameter is used. + * Run a search. + *

+ * Get search hits that match the query defined in the request. You can provide + * search queries using the q query string parameter or the request + * body. If both are specified, only the query parameter is used. * * @see Documentation @@ -2205,9 +2318,11 @@ public SearchResponse search(SearchRequest request, Class } /** - * Returns search hits that match the query defined in the request. You can - * provide search queries using the q query string parameter or the - * request body. If both are specified, only the query parameter is used. + * Run a search. + *

+ * Get search hits that match the query defined in the request. You can provide + * search queries using the q query string parameter or the request + * body. If both are specified, only the query parameter is used. * * @param fn * a function that initializes a builder to create the @@ -2224,9 +2339,11 @@ public final SearchResponse search( } /** - * Returns search hits that match the query defined in the request. You can - * provide search queries using the q query string parameter or the - * request body. If both are specified, only the query parameter is used. + * Run a search. + *

+ * Get search hits that match the query defined in the request. You can provide + * search queries using the q query string parameter or the request + * body. If both are specified, only the query parameter is used. * * @see Documentation @@ -2244,9 +2361,11 @@ public SearchResponse search(SearchRequest request, Type } /** - * Returns search hits that match the query defined in the request. You can - * provide search queries using the q query string parameter or the - * request body. If both are specified, only the query parameter is used. + * Run a search. + *

+ * Get search hits that match the query defined in the request. You can provide + * search queries using the q query string parameter or the request + * body. If both are specified, only the query parameter is used. * * @param fn * a function that initializes a builder to create the @@ -2265,7 +2384,9 @@ public final SearchResponse search( // ----- Endpoint: search_mvt /** - * Search a vector tile. Searches a vector tile for geospatial values. + * Search a vector tile. + *

+ * Search a vector tile for geospatial values. * * @see Documentation @@ -2280,7 +2401,9 @@ public BinaryResponse searchMvt(SearchMvtRequest request) throws IOException, El } /** - * Search a vector tile. Searches a vector tile for geospatial values. + * Search a vector tile. + *

+ * Search a vector tile for geospatial values. * * @param fn * a function that initializes a builder to create the @@ -2298,8 +2421,12 @@ public final BinaryResponse searchMvt(Function + * Get the indices and shards that a search request would be run against. This + * information can be useful for working out issues or planning optimizations + * with routing and shard preferences. When filtered aliases are used, the + * filter is returned as part of the indices section. * * @see Documentation @@ -2314,8 +2441,12 @@ public SearchShardsResponse searchShards(SearchShardsRequest request) throws IOE } /** - * Returns information about the indices and shards that a search request would - * be executed against. + * Get the search shards. + *

+ * Get the indices and shards that a search request would be run against. This + * information can be useful for working out issues or planning optimizations + * with routing and shard preferences. When filtered aliases are used, the + * filter is returned as part of the indices section. * * @param fn * a function that initializes a builder to create the @@ -2332,8 +2463,12 @@ public final SearchShardsResponse searchShards( } /** - * Returns information about the indices and shards that a search request would - * be executed against. + * Get the search shards. + *

+ * Get the indices and shards that a search request would be run against. This + * information can be useful for working out issues or planning optimizations + * with routing and shard preferences. When filtered aliases are used, the + * filter is returned as part of the indices section. * * @see Documentation @@ -2348,7 +2483,7 @@ public SearchShardsResponse searchShards() throws IOException, ElasticsearchExce // ----- Endpoint: search_template /** - * Runs a search with a search template. + * Run a search with a search template. * * @see Documentation @@ -2367,7 +2502,7 @@ public SearchTemplateResponse searchTemplate(SearchTempla } /** - * Runs a search with a search template. + * Run a search with a search template. * * @param fn * a function that initializes a builder to create the @@ -2384,7 +2519,7 @@ public final SearchTemplateResponse searchTemplate( } /** - * Runs a search with a search template. + * Run a search with a search template. * * @see Documentation @@ -2403,7 +2538,7 @@ public SearchTemplateResponse searchTemplate(SearchTempla } /** - * Runs a search with a search template. + * Run a search with a search template. * * @param fn * a function that initializes a builder to create the @@ -2481,8 +2616,10 @@ public final TermsEnumResponse termsEnum(Function + * Get information and statistics about terms in the fields of a particular + * document. * * @see Documentation @@ -2498,8 +2635,10 @@ public TermvectorsResponse termvectors(TermvectorsRequest } /** - * Get term vector information. Returns information and statistics about terms - * in the fields of a particular document. + * Get term vector information. + *

+ * Get information and statistics about terms in the fields of a particular + * document. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/Retriever.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/Retriever.java index 478fdc197..40b0649e0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/Retriever.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/Retriever.java @@ -77,6 +77,10 @@ public enum Kind implements JsonEnum { Rrf("rrf"), + TextSimilarityReranker("text_similarity_reranker"), + + Rule("rule"), + ; private final String jsonValue; @@ -173,6 +177,41 @@ public RRFRetriever rrf() { return TaggedUnionUtils.get(this, Kind.Rrf); } + /** + * Is this variant instance of kind {@code text_similarity_reranker}? + */ + public boolean isTextSimilarityReranker() { + return _kind == Kind.TextSimilarityReranker; + } + + /** + * Get the {@code text_similarity_reranker} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the + * {@code text_similarity_reranker} kind. + */ + public TextSimilarityReranker textSimilarityReranker() { + return TaggedUnionUtils.get(this, Kind.TextSimilarityReranker); + } + + /** + * Is this variant instance of kind {@code rule}? + */ + public boolean isRule() { + return _kind == Kind.Rule; + } + + /** + * Get the {@code rule} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code rule} kind. + */ + public RuleRetriever rule() { + return TaggedUnionUtils.get(this, Kind.Rule); + } + @Override @SuppressWarnings("unchecked") public void serialize(JsonGenerator generator, JsonpMapper mapper) { @@ -232,6 +271,27 @@ public ObjectBuilder rrf(Function textSimilarityReranker(TextSimilarityReranker v) { + this._kind = Kind.TextSimilarityReranker; + this._value = v; + return this; + } + + public ObjectBuilder textSimilarityReranker( + Function> fn) { + return this.textSimilarityReranker(fn.apply(new TextSimilarityReranker.Builder()).build()); + } + + public ObjectBuilder rule(RuleRetriever v) { + this._kind = Kind.Rule; + this._value = v; + return this; + } + + public ObjectBuilder rule(Function> fn) { + return this.rule(fn.apply(new RuleRetriever.Builder()).build()); + } + public Retriever build() { _checkSingleUse(); return new Retriever(this); @@ -244,6 +304,8 @@ protected static void setupRetrieverDeserializer(ObjectDeserializer op) op.add(Builder::standard, StandardRetriever._DESERIALIZER, "standard"); op.add(Builder::knn, KnnRetriever._DESERIALIZER, "knn"); op.add(Builder::rrf, RRFRetriever._DESERIALIZER, "rrf"); + op.add(Builder::textSimilarityReranker, TextSimilarityReranker._DESERIALIZER, "text_similarity_reranker"); + op.add(Builder::rule, RuleRetriever._DESERIALIZER, "rule"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RetrieverBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RetrieverBase.java index 6ceefd82f..8b085c951 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RetrieverBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RetrieverBase.java @@ -31,6 +31,7 @@ import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import java.lang.Float; import java.util.List; import java.util.Objects; import java.util.function.Function; @@ -62,11 +63,15 @@ public abstract class RetrieverBase implements JsonpSerializable { private final List filter; + @Nullable + private final Float minScore; + // --------------------------------------------------------------------------------------------- protected RetrieverBase(AbstractBuilder builder) { this.filter = ApiTypeHelper.unmodifiable(builder.filter); + this.minScore = builder.minScore; } @@ -79,6 +84,17 @@ public final List filter() { return this.filter; } + /** + * Minimum _score for matching documents. Documents with a lower _score are not + * included in the top documents. + *

+ * API name: {@code min_score} + */ + @Nullable + public final Float minScore() { + return this.minScore; + } + /** * Serialize this object to JSON. */ @@ -100,6 +116,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } + if (this.minScore != null) { + generator.writeKey("min_score"); + generator.write(this.minScore); + + } } @@ -114,6 +135,9 @@ public abstract static class AbstractBuilder filter; + @Nullable + private Float minScore; + /** * Query to filter the documents that can match. *

@@ -149,6 +173,17 @@ public final BuilderT filter(Function> fn) { return filter(fn.apply(new Query.Builder()).build()); } + /** + * Minimum _score for matching documents. Documents with a lower _score are not + * included in the top documents. + *

+ * API name: {@code min_score} + */ + public final BuilderT minScore(@Nullable Float value) { + this.minScore = value; + return self(); + } + protected abstract BuilderT self(); } @@ -158,6 +193,7 @@ protected static > void setupRetrieve ObjectDeserializer op) { op.add(AbstractBuilder::filter, JsonpDeserializer.arrayDeserializer(Query._DESERIALIZER), "filter"); + op.add(AbstractBuilder::minScore, JsonpDeserializer.floatDeserializer(), "min_score"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RetrieverBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RetrieverBuilders.java index 5a3625e40..b3d22f0ba 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RetrieverBuilders.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RetrieverBuilders.java @@ -96,4 +96,41 @@ public static Retriever rrf(Function> fn) { + Retriever.Builder builder = new Retriever.Builder(); + builder.textSimilarityReranker(fn.apply(new TextSimilarityReranker.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link RuleRetriever rule} {@code Retriever} + * variant. + */ + public static RuleRetriever.Builder rule() { + return new RuleRetriever.Builder(); + } + + /** + * Creates a Retriever of the {@link RuleRetriever rule} {@code Retriever} + * variant. + */ + public static Retriever rule(Function> fn) { + Retriever.Builder builder = new Retriever.Builder(); + builder.rule(fn.apply(new RuleRetriever.Builder()).build()); + return builder.build(); + } + } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RuleRetriever.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RuleRetriever.java new file mode 100644 index 000000000..849f4d826 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/RuleRetriever.java @@ -0,0 +1,279 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types; + +import co.elastic.clients.json.JsonData; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.RuleRetriever + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class RuleRetriever extends RetrieverBase implements RetrieverVariant { + private final List rulesetIds; + + private final JsonData matchCriteria; + + private final Retriever retriever; + + @Nullable + private final Integer rankWindowSize; + + // --------------------------------------------------------------------------------------------- + + private RuleRetriever(Builder builder) { + super(builder); + + this.rulesetIds = ApiTypeHelper.unmodifiableRequired(builder.rulesetIds, this, "rulesetIds"); + this.matchCriteria = ApiTypeHelper.requireNonNull(builder.matchCriteria, this, "matchCriteria"); + this.retriever = ApiTypeHelper.requireNonNull(builder.retriever, this, "retriever"); + this.rankWindowSize = builder.rankWindowSize; + + } + + public static RuleRetriever of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Retriever variant kind. + */ + @Override + public Retriever.Kind _retrieverKind() { + return Retriever.Kind.Rule; + } + + /** + * Required - The ruleset IDs containing the rules this retriever is evaluating + * against. + *

+ * API name: {@code ruleset_ids} + */ + public final List rulesetIds() { + return this.rulesetIds; + } + + /** + * Required - The match criteria that will determine if a rule in the provided + * rulesets should be applied. + *

+ * API name: {@code match_criteria} + */ + public final JsonData matchCriteria() { + return this.matchCriteria; + } + + /** + * Required - The retriever whose results rules should be applied to. + *

+ * API name: {@code retriever} + */ + public final Retriever retriever() { + return this.retriever; + } + + /** + * This value determines the size of the individual result set. + *

+ * API name: {@code rank_window_size} + */ + @Nullable + public final Integer rankWindowSize() { + return this.rankWindowSize; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + if (ApiTypeHelper.isDefined(this.rulesetIds)) { + generator.writeKey("ruleset_ids"); + generator.writeStartArray(); + for (String item0 : this.rulesetIds) { + generator.write(item0); + + } + generator.writeEnd(); + + } + generator.writeKey("match_criteria"); + this.matchCriteria.serialize(generator, mapper); + + generator.writeKey("retriever"); + this.retriever.serialize(generator, mapper); + + if (this.rankWindowSize != null) { + generator.writeKey("rank_window_size"); + generator.write(this.rankWindowSize); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RuleRetriever}. + */ + + public static class Builder extends RetrieverBase.AbstractBuilder implements ObjectBuilder { + private List rulesetIds; + + private JsonData matchCriteria; + + private Retriever retriever; + + @Nullable + private Integer rankWindowSize; + + /** + * Required - The ruleset IDs containing the rules this retriever is evaluating + * against. + *

+ * API name: {@code ruleset_ids} + *

+ * Adds all elements of list to rulesetIds. + */ + public final Builder rulesetIds(List list) { + this.rulesetIds = _listAddAll(this.rulesetIds, list); + return this; + } + + /** + * Required - The ruleset IDs containing the rules this retriever is evaluating + * against. + *

+ * API name: {@code ruleset_ids} + *

+ * Adds one or more values to rulesetIds. + */ + public final Builder rulesetIds(String value, String... values) { + this.rulesetIds = _listAdd(this.rulesetIds, value, values); + return this; + } + + /** + * Required - The match criteria that will determine if a rule in the provided + * rulesets should be applied. + *

+ * API name: {@code match_criteria} + */ + public final Builder matchCriteria(JsonData value) { + this.matchCriteria = value; + return this; + } + + /** + * Required - The retriever whose results rules should be applied to. + *

+ * API name: {@code retriever} + */ + public final Builder retriever(Retriever value) { + this.retriever = value; + return this; + } + + /** + * Required - The retriever whose results rules should be applied to. + *

+ * API name: {@code retriever} + */ + public final Builder retriever(Function> fn) { + return this.retriever(fn.apply(new Retriever.Builder()).build()); + } + + /** + * This value determines the size of the individual result set. + *

+ * API name: {@code rank_window_size} + */ + public final Builder rankWindowSize(@Nullable Integer value) { + this.rankWindowSize = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link RuleRetriever}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public RuleRetriever build() { + _checkSingleUse(); + + return new RuleRetriever(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RuleRetriever} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + RuleRetriever::setupRuleRetrieverDeserializer); + + protected static void setupRuleRetrieverDeserializer(ObjectDeserializer op) { + RetrieverBase.setupRetrieverBaseDeserializer(op); + op.add(Builder::rulesetIds, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "ruleset_ids"); + op.add(Builder::matchCriteria, JsonData._DESERIALIZER, "match_criteria"); + op.add(Builder::retriever, Retriever._DESERIALIZER, "retriever"); + op.add(Builder::rankWindowSize, JsonpDeserializer.integerDeserializer(), "rank_window_size"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/StandardRetriever.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/StandardRetriever.java index 58dc3347e..cff330e81 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/StandardRetriever.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/StandardRetriever.java @@ -29,7 +29,6 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; -import java.lang.Float; import java.lang.Integer; import java.util.ArrayList; import java.util.List; @@ -71,9 +70,6 @@ public class StandardRetriever extends RetrieverBase implements RetrieverVariant private final List sort; - @Nullable - private final Float minScore; - @Nullable private final FieldCollapse collapse; @@ -86,7 +82,6 @@ private StandardRetriever(Builder builder) { this.searchAfter = ApiTypeHelper.unmodifiable(builder.searchAfter); this.terminateAfter = builder.terminateAfter; this.sort = ApiTypeHelper.unmodifiable(builder.sort); - this.minScore = builder.minScore; this.collapse = builder.collapse; } @@ -141,17 +136,6 @@ public final List sort() { return this.sort; } - /** - * Minimum _score for matching documents. Documents with a lower _score are not - * included in the top documents. - *

- * API name: {@code min_score} - */ - @Nullable - public final Float minScore() { - return this.minScore; - } - /** * Collapses the top documents by a specified key into a single top document per * key. @@ -195,11 +179,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); - } - if (this.minScore != null) { - generator.writeKey("min_score"); - generator.write(this.minScore); - } if (this.collapse != null) { generator.writeKey("collapse"); @@ -230,9 +209,6 @@ public static class Builder extends RetrieverBase.AbstractBuilder @Nullable private List sort; - @Nullable - private Float minScore; - @Nullable private FieldCollapse collapse; @@ -403,17 +379,6 @@ public final Builder sort(Function - * API name: {@code min_score} - */ - public final Builder minScore(@Nullable Float value) { - this.minScore = value; - return this; - } - /** * Collapses the top documents by a specified key into a single top document per * key. @@ -467,7 +432,6 @@ protected static void setupStandardRetrieverDeserializer(ObjectDeserializerAPI + * specification + */ +@JsonpDeserializable +public class TextSimilarityReranker extends RetrieverBase implements RetrieverVariant { + private final Retriever retriever; + + @Nullable + private final Integer rankWindowSize; + + @Nullable + private final String inferenceId; + + @Nullable + private final String inferenceText; + + @Nullable + private final String field; + + // --------------------------------------------------------------------------------------------- + + private TextSimilarityReranker(Builder builder) { + super(builder); + + this.retriever = ApiTypeHelper.requireNonNull(builder.retriever, this, "retriever"); + this.rankWindowSize = builder.rankWindowSize; + this.inferenceId = builder.inferenceId; + this.inferenceText = builder.inferenceText; + this.field = builder.field; + + } + + public static TextSimilarityReranker of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Retriever variant kind. + */ + @Override + public Retriever.Kind _retrieverKind() { + return Retriever.Kind.TextSimilarityReranker; + } + + /** + * Required - The nested retriever which will produce the first-level results, + * that will later be used for reranking. + *

+ * API name: {@code retriever} + */ + public final Retriever retriever() { + return this.retriever; + } + + /** + * This value determines how many documents we will consider from the nested + * retriever. + *

+ * API name: {@code rank_window_size} + */ + @Nullable + public final Integer rankWindowSize() { + return this.rankWindowSize; + } + + /** + * Unique identifier of the inference endpoint created using the inference API. + *

+ * API name: {@code inference_id} + */ + @Nullable + public final String inferenceId() { + return this.inferenceId; + } + + /** + * The text snippet used as the basis for similarity comparison + *

+ * API name: {@code inference_text} + */ + @Nullable + public final String inferenceText() { + return this.inferenceText; + } + + /** + * The document field to be used for text similarity comparisons. This field + * should contain the text that will be evaluated against the inference_text + *

+ * API name: {@code field} + */ + @Nullable + public final String field() { + return this.field; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + generator.writeKey("retriever"); + this.retriever.serialize(generator, mapper); + + if (this.rankWindowSize != null) { + generator.writeKey("rank_window_size"); + generator.write(this.rankWindowSize); + + } + if (this.inferenceId != null) { + generator.writeKey("inference_id"); + generator.write(this.inferenceId); + + } + if (this.inferenceText != null) { + generator.writeKey("inference_text"); + generator.write(this.inferenceText); + + } + if (this.field != null) { + generator.writeKey("field"); + generator.write(this.field); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link TextSimilarityReranker}. + */ + + public static class Builder extends RetrieverBase.AbstractBuilder + implements + ObjectBuilder { + private Retriever retriever; + + @Nullable + private Integer rankWindowSize; + + @Nullable + private String inferenceId; + + @Nullable + private String inferenceText; + + @Nullable + private String field; + + /** + * Required - The nested retriever which will produce the first-level results, + * that will later be used for reranking. + *

+ * API name: {@code retriever} + */ + public final Builder retriever(Retriever value) { + this.retriever = value; + return this; + } + + /** + * Required - The nested retriever which will produce the first-level results, + * that will later be used for reranking. + *

+ * API name: {@code retriever} + */ + public final Builder retriever(Function> fn) { + return this.retriever(fn.apply(new Retriever.Builder()).build()); + } + + /** + * This value determines how many documents we will consider from the nested + * retriever. + *

+ * API name: {@code rank_window_size} + */ + public final Builder rankWindowSize(@Nullable Integer value) { + this.rankWindowSize = value; + return this; + } + + /** + * Unique identifier of the inference endpoint created using the inference API. + *

+ * API name: {@code inference_id} + */ + public final Builder inferenceId(@Nullable String value) { + this.inferenceId = value; + return this; + } + + /** + * The text snippet used as the basis for similarity comparison + *

+ * API name: {@code inference_text} + */ + public final Builder inferenceText(@Nullable String value) { + this.inferenceText = value; + return this; + } + + /** + * The document field to be used for text similarity comparisons. This field + * should contain the text that will be evaluated against the inference_text + *

+ * API name: {@code field} + */ + public final Builder field(@Nullable String value) { + this.field = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link TextSimilarityReranker}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public TextSimilarityReranker build() { + _checkSingleUse(); + + return new TextSimilarityReranker(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link TextSimilarityReranker} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, TextSimilarityReranker::setupTextSimilarityRerankerDeserializer); + + protected static void setupTextSimilarityRerankerDeserializer( + ObjectDeserializer op) { + RetrieverBase.setupRetrieverBaseDeserializer(op); + op.add(Builder::retriever, Retriever._DESERIALIZER, "retriever"); + op.add(Builder::rankWindowSize, JsonpDeserializer.integerDeserializer(), "rank_window_size"); + op.add(Builder::inferenceId, JsonpDeserializer.stringDeserializer(), "inference_id"); + op.add(Builder::inferenceText, JsonpDeserializer.stringDeserializer(), "inference_text"); + op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusRequest.java index 1ca202ca8..eca1c109a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusRequest.java @@ -56,10 +56,12 @@ // typedef: async_search.status.Request /** - * Get async search status. Retrieve the status of a previously submitted async - * search request given its identifier, without retrieving search results. If - * the Elasticsearch security features are enabled, use of this API is - * restricted to the monitoring_user role. + * Get the async search status. + *

+ * Get the status of a previously submitted async search request given its + * identifier, without retrieving search results. If the Elasticsearch security + * features are enabled, use of this API is restricted to the + * monitoring_user role. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/DeleteAsyncSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/DeleteAsyncSearchRequest.java index b6ca9db8f..996d4a6ea 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/DeleteAsyncSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/DeleteAsyncSearchRequest.java @@ -56,12 +56,13 @@ // typedef: async_search.delete.Request /** - * Delete an async search. If the asynchronous search is still running, it is - * cancelled. Otherwise, the saved search results are deleted. If the - * Elasticsearch security features are enabled, the deletion of a specific async - * search is restricted to: the authenticated user that submitted the original - * search request; users that have the cancel_task cluster - * privilege. + * Delete an async search. + *

+ * If the asynchronous search is still running, it is cancelled. Otherwise, the + * saved search results are deleted. If the Elasticsearch security features are + * enabled, the deletion of a specific async search is restricted to: the + * authenticated user that submitted the original search request; users that + * have the cancel_task cluster privilege. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchAsyncClient.java index cf2ce1e16..8c01cb403 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchAsyncClient.java @@ -72,12 +72,13 @@ public ElasticsearchAsyncSearchAsyncClient withTransportOptions(@Nullable Transp // ----- Endpoint: async_search.delete /** - * Delete an async search. If the asynchronous search is still running, it is - * cancelled. Otherwise, the saved search results are deleted. If the - * Elasticsearch security features are enabled, the deletion of a specific async - * search is restricted to: the authenticated user that submitted the original - * search request; users that have the cancel_task cluster - * privilege. + * Delete an async search. + *

+ * If the asynchronous search is still running, it is cancelled. Otherwise, the + * saved search results are deleted. If the Elasticsearch security features are + * enabled, the deletion of a specific async search is restricted to: the + * authenticated user that submitted the original search request; users that + * have the cancel_task cluster privilege. * * @see Documentation @@ -92,12 +93,13 @@ public CompletableFuture delete(DeleteAsyncSearchRequ } /** - * Delete an async search. If the asynchronous search is still running, it is - * cancelled. Otherwise, the saved search results are deleted. If the - * Elasticsearch security features are enabled, the deletion of a specific async - * search is restricted to: the authenticated user that submitted the original - * search request; users that have the cancel_task cluster - * privilege. + * Delete an async search. + *

+ * If the asynchronous search is still running, it is cancelled. Otherwise, the + * saved search results are deleted. If the Elasticsearch security features are + * enabled, the deletion of a specific async search is restricted to: the + * authenticated user that submitted the original search request; users that + * have the cancel_task cluster privilege. * * @param fn * a function that initializes a builder to create the @@ -115,10 +117,12 @@ public final CompletableFuture delete( // ----- Endpoint: async_search.get /** - * Get async search results. Retrieve the results of a previously submitted - * asynchronous search request. If the Elasticsearch security features are - * enabled, access to the results of a specific async search is restricted to - * the user or API key that submitted it. + * Get async search results. + *

+ * Retrieve the results of a previously submitted asynchronous search request. + * If the Elasticsearch security features are enabled, access to the results of + * a specific async search is restricted to the user or API key that submitted + * it. * * @see Documentation @@ -136,10 +140,12 @@ public CompletableFuture> get(GetA } /** - * Get async search results. Retrieve the results of a previously submitted - * asynchronous search request. If the Elasticsearch security features are - * enabled, access to the results of a specific async search is restricted to - * the user or API key that submitted it. + * Get async search results. + *

+ * Retrieve the results of a previously submitted asynchronous search request. + * If the Elasticsearch security features are enabled, access to the results of + * a specific async search is restricted to the user or API key that submitted + * it. * * @param fn * a function that initializes a builder to create the @@ -156,10 +162,12 @@ public final CompletableFuture> ge } /** - * Get async search results. Retrieve the results of a previously submitted - * asynchronous search request. If the Elasticsearch security features are - * enabled, access to the results of a specific async search is restricted to - * the user or API key that submitted it. + * Get async search results. + *

+ * Retrieve the results of a previously submitted asynchronous search request. + * If the Elasticsearch security features are enabled, access to the results of + * a specific async search is restricted to the user or API key that submitted + * it. * * @see Documentation @@ -177,10 +185,12 @@ public CompletableFuture> get(GetA } /** - * Get async search results. Retrieve the results of a previously submitted - * asynchronous search request. If the Elasticsearch security features are - * enabled, access to the results of a specific async search is restricted to - * the user or API key that submitted it. + * Get async search results. + *

+ * Retrieve the results of a previously submitted asynchronous search request. + * If the Elasticsearch security features are enabled, access to the results of + * a specific async search is restricted to the user or API key that submitted + * it. * * @param fn * a function that initializes a builder to create the @@ -198,10 +208,12 @@ public final CompletableFuture> ge // ----- Endpoint: async_search.status /** - * Get async search status. Retrieve the status of a previously submitted async - * search request given its identifier, without retrieving search results. If - * the Elasticsearch security features are enabled, use of this API is - * restricted to the monitoring_user role. + * Get the async search status. + *

+ * Get the status of a previously submitted async search request given its + * identifier, without retrieving search results. If the Elasticsearch security + * features are enabled, use of this API is restricted to the + * monitoring_user role. * * @see Documentation @@ -216,10 +228,12 @@ public CompletableFuture status(AsyncSearchStatusRequ } /** - * Get async search status. Retrieve the status of a previously submitted async - * search request given its identifier, without retrieving search results. If - * the Elasticsearch security features are enabled, use of this API is - * restricted to the monitoring_user role. + * Get the async search status. + *

+ * Get the status of a previously submitted async search request given its + * identifier, without retrieving search results. If the Elasticsearch security + * features are enabled, use of this API is restricted to the + * monitoring_user role. * * @param fn * a function that initializes a builder to create the @@ -237,10 +251,11 @@ public final CompletableFuture status( // ----- Endpoint: async_search.submit /** - * Run an async search. When the primary sort of the results is an indexed - * field, shards get sorted based on minimum and maximum value that they hold - * for that field. Partial results become available following the sort criteria - * that was requested. + * Run an async search. + *

+ * When the primary sort of the results is an indexed field, shards get sorted + * based on minimum and maximum value that they hold for that field. Partial + * results become available following the sort criteria that was requested. *

* Warning: Asynchronous search does not support scroll or search requests that * include only the suggest section. @@ -268,10 +283,11 @@ public CompletableFuture> submit(SubmitReq } /** - * Run an async search. When the primary sort of the results is an indexed - * field, shards get sorted based on minimum and maximum value that they hold - * for that field. Partial results become available following the sort criteria - * that was requested. + * Run an async search. + *

+ * When the primary sort of the results is an indexed field, shards get sorted + * based on minimum and maximum value that they hold for that field. Partial + * results become available following the sort criteria that was requested. *

* Warning: Asynchronous search does not support scroll or search requests that * include only the suggest section. @@ -296,10 +312,11 @@ public final CompletableFuture> submit( } /** - * Run an async search. When the primary sort of the results is an indexed - * field, shards get sorted based on minimum and maximum value that they hold - * for that field. Partial results become available following the sort criteria - * that was requested. + * Run an async search. + *

+ * When the primary sort of the results is an indexed field, shards get sorted + * based on minimum and maximum value that they hold for that field. Partial + * results become available following the sort criteria that was requested. *

* Warning: Asynchronous search does not support scroll or search requests that * include only the suggest section. @@ -326,10 +343,11 @@ public CompletableFuture> submit(SubmitReq } /** - * Run an async search. When the primary sort of the results is an indexed - * field, shards get sorted based on minimum and maximum value that they hold - * for that field. Partial results become available following the sort criteria - * that was requested. + * Run an async search. + *

+ * When the primary sort of the results is an indexed field, shards get sorted + * based on minimum and maximum value that they hold for that field. Partial + * results become available following the sort criteria that was requested. *

* Warning: Asynchronous search does not support scroll or search requests that * include only the suggest section. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchClient.java index 1dada7bd2..e71c8284e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/ElasticsearchAsyncSearchClient.java @@ -71,12 +71,13 @@ public ElasticsearchAsyncSearchClient withTransportOptions(@Nullable TransportOp // ----- Endpoint: async_search.delete /** - * Delete an async search. If the asynchronous search is still running, it is - * cancelled. Otherwise, the saved search results are deleted. If the - * Elasticsearch security features are enabled, the deletion of a specific async - * search is restricted to: the authenticated user that submitted the original - * search request; users that have the cancel_task cluster - * privilege. + * Delete an async search. + *

+ * If the asynchronous search is still running, it is cancelled. Otherwise, the + * saved search results are deleted. If the Elasticsearch security features are + * enabled, the deletion of a specific async search is restricted to: the + * authenticated user that submitted the original search request; users that + * have the cancel_task cluster privilege. * * @see Documentation @@ -92,12 +93,13 @@ public DeleteAsyncSearchResponse delete(DeleteAsyncSearchRequest request) } /** - * Delete an async search. If the asynchronous search is still running, it is - * cancelled. Otherwise, the saved search results are deleted. If the - * Elasticsearch security features are enabled, the deletion of a specific async - * search is restricted to: the authenticated user that submitted the original - * search request; users that have the cancel_task cluster - * privilege. + * Delete an async search. + *

+ * If the asynchronous search is still running, it is cancelled. Otherwise, the + * saved search results are deleted. If the Elasticsearch security features are + * enabled, the deletion of a specific async search is restricted to: the + * authenticated user that submitted the original search request; users that + * have the cancel_task cluster privilege. * * @param fn * a function that initializes a builder to create the @@ -116,10 +118,12 @@ public final DeleteAsyncSearchResponse delete( // ----- Endpoint: async_search.get /** - * Get async search results. Retrieve the results of a previously submitted - * asynchronous search request. If the Elasticsearch security features are - * enabled, access to the results of a specific async search is restricted to - * the user or API key that submitted it. + * Get async search results. + *

+ * Retrieve the results of a previously submitted asynchronous search request. + * If the Elasticsearch security features are enabled, access to the results of + * a specific async search is restricted to the user or API key that submitted + * it. * * @see Documentation @@ -137,10 +141,12 @@ public GetAsyncSearchResponse get(GetAsyncSearchRequest r } /** - * Get async search results. Retrieve the results of a previously submitted - * asynchronous search request. If the Elasticsearch security features are - * enabled, access to the results of a specific async search is restricted to - * the user or API key that submitted it. + * Get async search results. + *

+ * Retrieve the results of a previously submitted asynchronous search request. + * If the Elasticsearch security features are enabled, access to the results of + * a specific async search is restricted to the user or API key that submitted + * it. * * @param fn * a function that initializes a builder to create the @@ -157,10 +163,12 @@ public final GetAsyncSearchResponse get( } /** - * Get async search results. Retrieve the results of a previously submitted - * asynchronous search request. If the Elasticsearch security features are - * enabled, access to the results of a specific async search is restricted to - * the user or API key that submitted it. + * Get async search results. + *

+ * Retrieve the results of a previously submitted asynchronous search request. + * If the Elasticsearch security features are enabled, access to the results of + * a specific async search is restricted to the user or API key that submitted + * it. * * @see Documentation @@ -178,10 +186,12 @@ public GetAsyncSearchResponse get(GetAsyncSearchRequest r } /** - * Get async search results. Retrieve the results of a previously submitted - * asynchronous search request. If the Elasticsearch security features are - * enabled, access to the results of a specific async search is restricted to - * the user or API key that submitted it. + * Get async search results. + *

+ * Retrieve the results of a previously submitted asynchronous search request. + * If the Elasticsearch security features are enabled, access to the results of + * a specific async search is restricted to the user or API key that submitted + * it. * * @param fn * a function that initializes a builder to create the @@ -200,10 +210,12 @@ public final GetAsyncSearchResponse get( // ----- Endpoint: async_search.status /** - * Get async search status. Retrieve the status of a previously submitted async - * search request given its identifier, without retrieving search results. If - * the Elasticsearch security features are enabled, use of this API is - * restricted to the monitoring_user role. + * Get the async search status. + *

+ * Get the status of a previously submitted async search request given its + * identifier, without retrieving search results. If the Elasticsearch security + * features are enabled, use of this API is restricted to the + * monitoring_user role. * * @see Documentation @@ -219,10 +231,12 @@ public AsyncSearchStatusResponse status(AsyncSearchStatusRequest request) } /** - * Get async search status. Retrieve the status of a previously submitted async - * search request given its identifier, without retrieving search results. If - * the Elasticsearch security features are enabled, use of this API is - * restricted to the monitoring_user role. + * Get the async search status. + *

+ * Get the status of a previously submitted async search request given its + * identifier, without retrieving search results. If the Elasticsearch security + * features are enabled, use of this API is restricted to the + * monitoring_user role. * * @param fn * a function that initializes a builder to create the @@ -241,10 +255,11 @@ public final AsyncSearchStatusResponse status( // ----- Endpoint: async_search.submit /** - * Run an async search. When the primary sort of the results is an indexed - * field, shards get sorted based on minimum and maximum value that they hold - * for that field. Partial results become available following the sort criteria - * that was requested. + * Run an async search. + *

+ * When the primary sort of the results is an indexed field, shards get sorted + * based on minimum and maximum value that they hold for that field. Partial + * results become available following the sort criteria that was requested. *

* Warning: Asynchronous search does not support scroll or search requests that * include only the suggest section. @@ -272,10 +287,11 @@ public SubmitResponse submit(SubmitRequest request, Class } /** - * Run an async search. When the primary sort of the results is an indexed - * field, shards get sorted based on minimum and maximum value that they hold - * for that field. Partial results become available following the sort criteria - * that was requested. + * Run an async search. + *

+ * When the primary sort of the results is an indexed field, shards get sorted + * based on minimum and maximum value that they hold for that field. Partial + * results become available following the sort criteria that was requested. *

* Warning: Asynchronous search does not support scroll or search requests that * include only the suggest section. @@ -301,10 +317,11 @@ public final SubmitResponse submit( } /** - * Run an async search. When the primary sort of the results is an indexed - * field, shards get sorted based on minimum and maximum value that they hold - * for that field. Partial results become available following the sort criteria - * that was requested. + * Run an async search. + *

+ * When the primary sort of the results is an indexed field, shards get sorted + * based on minimum and maximum value that they hold for that field. Partial + * results become available following the sort criteria that was requested. *

* Warning: Asynchronous search does not support scroll or search requests that * include only the suggest section. @@ -332,10 +349,11 @@ public SubmitResponse submit(SubmitRequest request, Type } /** - * Run an async search. When the primary sort of the results is an indexed - * field, shards get sorted based on minimum and maximum value that they hold - * for that field. Partial results become available following the sort criteria - * that was requested. + * Run an async search. + *

+ * When the primary sort of the results is an indexed field, shards get sorted + * based on minimum and maximum value that they hold for that field. Partial + * results become available following the sort criteria that was requested. *

* Warning: Asynchronous search does not support scroll or search requests that * include only the suggest section. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/GetAsyncSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/GetAsyncSearchRequest.java index fbd4cbbd5..c4e0cb522 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/GetAsyncSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/GetAsyncSearchRequest.java @@ -56,10 +56,12 @@ // typedef: async_search.get.Request /** - * Get async search results. Retrieve the results of a previously submitted - * asynchronous search request. If the Elasticsearch security features are - * enabled, access to the results of a specific async search is restricted to - * the user or API key that submitted it. + * Get async search results. + *

+ * Retrieve the results of a previously submitted asynchronous search request. + * If the Elasticsearch security features are enabled, access to the results of + * a specific async search is restricted to the user or API key that submitted + * it. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java index a655d7413..2c9ac8899 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java @@ -85,10 +85,11 @@ // typedef: async_search.submit.Request /** - * Run an async search. When the primary sort of the results is an indexed - * field, shards get sorted based on minimum and maximum value that they hold - * for that field. Partial results become available following the sort criteria - * that was requested. + * Run an async search. + *

+ * When the primary sort of the results is an indexed field, shards get sorted + * based on minimum and maximum value that they hold for that field. Partial + * results become available following the sort criteria that was requested. *

* Warning: Asynchronous search does not support scroll or search requests that * include only the suggest section. @@ -177,9 +178,6 @@ public class SubmitRequest extends RequestBase implements JsonpSerializable { @Nullable private final Long maxConcurrentShardRequests; - @Nullable - private final String minCompatibleShardNode; - @Nullable private final Double minScore; @@ -291,7 +289,6 @@ private SubmitRequest(Builder builder) { this.knn = ApiTypeHelper.unmodifiable(builder.knn); this.lenient = builder.lenient; this.maxConcurrentShardRequests = builder.maxConcurrentShardRequests; - this.minCompatibleShardNode = builder.minCompatibleShardNode; this.minScore = builder.minScore; this.pit = builder.pit; this.postFilter = builder.postFilter; @@ -607,14 +604,6 @@ public final Long maxConcurrentShardRequests() { return this.maxConcurrentShardRequests; } - /** - * API name: {@code min_compatible_shard_node} - */ - @Nullable - public final String minCompatibleShardNode() { - return this.minCompatibleShardNode; - } - /** * Minimum _score for matching documents. Documents with a lower _score are not * included in the search results. @@ -1253,9 +1242,6 @@ public static class Builder extends RequestBase.AbstractBuilder impleme @Nullable private Long maxConcurrentShardRequests; - @Nullable - private String minCompatibleShardNode; - @Nullable private Double minScore; @@ -1822,14 +1808,6 @@ public final Builder maxConcurrentShardRequests(@Nullable Long value) { return this; } - /** - * API name: {@code min_compatible_shard_node} - */ - public final Builder minCompatibleShardNode(@Nullable String value) { - this.minCompatibleShardNode = value; - return this; - } - /** * Minimum _score for matching documents. Documents with a lower _score are not * included in the search results. @@ -2546,9 +2524,6 @@ protected static void setupSubmitRequestDeserializer(ObjectDeserializer roles() { } /** - * Required - Decider settings + * Required - Decider settings. *

* API name: {@code deciders} */ @@ -191,7 +191,7 @@ public final BuilderT roles(String value, String... values) { } /** - * Required - Decider settings + * Required - Decider settings. *

* API name: {@code deciders} *

@@ -203,7 +203,7 @@ public final BuilderT deciders(Map map) { } /** - * Required - Decider settings + * Required - Decider settings. *

* API name: {@code deciders} *

diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/DeleteAutoscalingPolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/DeleteAutoscalingPolicyRequest.java index b5c9d4b58..4127dc762 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/DeleteAutoscalingPolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/DeleteAutoscalingPolicyRequest.java @@ -56,8 +56,11 @@ // typedef: autoscaling.delete_autoscaling_policy.Request /** - * Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. - * Direct use is not supported. + * Delete an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingAsyncClient.java index c56b29662..c2bb7b04b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingAsyncClient.java @@ -70,8 +70,11 @@ public ElasticsearchAutoscalingAsyncClient withTransportOptions(@Nullable Transp // ----- Endpoint: autoscaling.delete_autoscaling_policy /** - * Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. - * Direct use is not supported. + * Delete an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @see Documentation @@ -87,8 +90,11 @@ public CompletableFuture deleteAutoscalingPolic } /** - * Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. - * Direct use is not supported. + * Delete an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @param fn * a function that initializes a builder to create the @@ -106,9 +112,28 @@ public final CompletableFuture deleteAutoscalin // ----- Endpoint: autoscaling.get_autoscaling_capacity /** - * Gets the current autoscaling capacity based on the configured autoscaling - * policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not + * Get the autoscaling capacity. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not * supported. + *

+ * This API gets the current autoscaling capacity based on the configured + * autoscaling policy. It will return information to size the cluster + * appropriately to the current workload. + *

+ * The required_capacity is calculated as the maximum of the + * required_capacity result of all individual deciders that are + * enabled for the policy. + *

+ * The operator should verify that the current_nodes match the + * operator’s knowledge of the cluster to avoid making autoscaling decisions + * based on stale or incomplete information. + *

+ * The response contains decider-specific information you can use to diagnose + * how and why autoscaling determined a certain capacity was required. This + * information is provided for diagnosis only. Do not use this information to + * make autoscaling decisions. * * @see Documentation @@ -122,8 +147,11 @@ public CompletableFuture getAutoscalingCapacity( // ----- Endpoint: autoscaling.get_autoscaling_policy /** - * Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and - * ECK. Direct use is not supported. + * Get an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @see Documentation @@ -138,8 +166,11 @@ public CompletableFuture getAutoscalingPolicy(GetA } /** - * Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and - * ECK. Direct use is not supported. + * Get an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @param fn * a function that initializes a builder to create the @@ -157,8 +188,11 @@ public final CompletableFuture getAutoscalingPolic // ----- Endpoint: autoscaling.put_autoscaling_policy /** - * Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and - * ECK. Direct use is not supported. + * Create or update an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @see Documentation @@ -173,8 +207,11 @@ public CompletableFuture putAutoscalingPolicy(PutA } /** - * Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and - * ECK. Direct use is not supported. + * Create or update an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingClient.java index 346fe88cd..c98f8d2b9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingClient.java @@ -69,8 +69,11 @@ public ElasticsearchAutoscalingClient withTransportOptions(@Nullable TransportOp // ----- Endpoint: autoscaling.delete_autoscaling_policy /** - * Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. - * Direct use is not supported. + * Delete an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @see Documentation @@ -86,8 +89,11 @@ public DeleteAutoscalingPolicyResponse deleteAutoscalingPolicy(DeleteAutoscaling } /** - * Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. - * Direct use is not supported. + * Delete an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @param fn * a function that initializes a builder to create the @@ -106,9 +112,28 @@ public final DeleteAutoscalingPolicyResponse deleteAutoscalingPolicy( // ----- Endpoint: autoscaling.get_autoscaling_capacity /** - * Gets the current autoscaling capacity based on the configured autoscaling - * policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not + * Get the autoscaling capacity. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not * supported. + *

+ * This API gets the current autoscaling capacity based on the configured + * autoscaling policy. It will return information to size the cluster + * appropriately to the current workload. + *

+ * The required_capacity is calculated as the maximum of the + * required_capacity result of all individual deciders that are + * enabled for the policy. + *

+ * The operator should verify that the current_nodes match the + * operator’s knowledge of the cluster to avoid making autoscaling decisions + * based on stale or incomplete information. + *

+ * The response contains decider-specific information you can use to diagnose + * how and why autoscaling determined a certain capacity was required. This + * information is provided for diagnosis only. Do not use this information to + * make autoscaling decisions. * * @see Documentation @@ -122,8 +147,11 @@ public GetAutoscalingCapacityResponse getAutoscalingCapacity() throws IOExceptio // ----- Endpoint: autoscaling.get_autoscaling_policy /** - * Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and - * ECK. Direct use is not supported. + * Get an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @see Documentation @@ -139,8 +167,11 @@ public GetAutoscalingPolicyResponse getAutoscalingPolicy(GetAutoscalingPolicyReq } /** - * Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and - * ECK. Direct use is not supported. + * Get an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @param fn * a function that initializes a builder to create the @@ -159,8 +190,11 @@ public final GetAutoscalingPolicyResponse getAutoscalingPolicy( // ----- Endpoint: autoscaling.put_autoscaling_policy /** - * Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and - * ECK. Direct use is not supported. + * Create or update an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @see Documentation @@ -176,8 +210,11 @@ public PutAutoscalingPolicyResponse putAutoscalingPolicy(PutAutoscalingPolicyReq } /** - * Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and - * ECK. Direct use is not supported. + * Create or update an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityRequest.java index b96f1c13c..40d0c71a6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityRequest.java @@ -50,9 +50,28 @@ // typedef: autoscaling.get_autoscaling_capacity.Request /** - * Gets the current autoscaling capacity based on the configured autoscaling - * policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not + * Get the autoscaling capacity. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not * supported. + *

+ * This API gets the current autoscaling capacity based on the configured + * autoscaling policy. It will return information to size the cluster + * appropriately to the current workload. + *

+ * The required_capacity is calculated as the maximum of the + * required_capacity result of all individual deciders that are + * enabled for the policy. + *

+ * The operator should verify that the current_nodes match the + * operator’s knowledge of the cluster to avoid making autoscaling decisions + * based on stale or incomplete information. + *

+ * The response contains decider-specific information you can use to diagnose + * how and why autoscaling determined a certain capacity was required. This + * information is provided for diagnosis only. Do not use this information to + * make autoscaling decisions. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java index 192c97fc6..ad1047dfc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java @@ -56,8 +56,11 @@ // typedef: autoscaling.get_autoscaling_policy.Request /** - * Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and - * ECK. Direct use is not supported. + * Get an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java index 7e5ed9a77..e639e46c6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java @@ -59,8 +59,11 @@ // typedef: autoscaling.put_autoscaling_policy.Request /** - * Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and - * ECK. Direct use is not supported. + * Create or update an autoscaling policy. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java index 540b168ea..5b7c6dbf7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java @@ -30,6 +30,7 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.lang.String; import java.util.HashMap; import java.util.List; @@ -70,6 +71,9 @@ public class AllocationRequest extends CatRequestBase { @Nullable private final Bytes bytes; + @Nullable + private final Boolean local; + private final List nodeId; // --------------------------------------------------------------------------------------------- @@ -77,6 +81,7 @@ public class AllocationRequest extends CatRequestBase { private AllocationRequest(Builder builder) { this.bytes = builder.bytes; + this.local = builder.local; this.nodeId = ApiTypeHelper.unmodifiable(builder.nodeId); } @@ -95,6 +100,20 @@ public final Bytes bytes() { return this.bytes; } + /** + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} + */ + @Nullable + public final Boolean local() { + return this.local; + } + /** * Comma-separated list of node identifiers or names used to limit the returned * information. @@ -117,6 +136,9 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private Bytes bytes; + @Nullable + private Boolean local; + @Nullable private List nodeId; @@ -130,6 +152,20 @@ public final Builder bytes(@Nullable Bytes value) { return this; } + /** + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} + */ + public final Builder local(@Nullable Boolean value) { + this.local = value; + return this; + } + /** * Comma-separated list of node identifiers or names used to limit the returned * information. @@ -241,6 +277,9 @@ public AllocationRequest build() { if (request.bytes != null) { params.put("bytes", request.bytes.jsonValue()); } + if (request.local != null) { + params.put("local", String.valueOf(request.local)); + } return params; }, SimpleEndpoint.emptyMap(), false, AllocationResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java index 631a94d7c..ef0891a3a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java @@ -28,6 +28,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.lang.String; import java.util.HashMap; import java.util.Map; @@ -66,6 +67,9 @@ */ public class ComponentTemplatesRequest extends CatRequestBase { + @Nullable + private final Boolean local; + @Nullable private final String name; @@ -73,6 +77,7 @@ public class ComponentTemplatesRequest extends CatRequestBase { private ComponentTemplatesRequest(Builder builder) { + this.local = builder.local; this.name = builder.name; } @@ -81,6 +86,20 @@ public static ComponentTemplatesRequest of(Functiontrue, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} + */ + @Nullable + public final Boolean local() { + return this.local; + } + /** * The name of the component template. Accepts wildcard expressions. If omitted, * all component templates are returned. @@ -101,9 +120,26 @@ public final String name() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Boolean local; + @Nullable private String name; + /** + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} + */ + public final Builder local(@Nullable Boolean value) { + this.local = value; + return this; + } + /** * The name of the component template. Accepts wildcard expressions. If omitted, * all component templates are returned. @@ -196,6 +232,9 @@ public ComponentTemplatesRequest build() { request -> { Map params = new HashMap<>(); params.put("format", "json"); + if (request.local != null) { + params.put("local", String.valueOf(request.local)); + } return params; }, SimpleEndpoint.emptyMap(), false, ComponentTemplatesResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java index de4162029..d37c93a62 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java @@ -579,8 +579,46 @@ public CompletableFuture indices() { * "https://www.elastic.co/guide/en/elasticsearch/reference/9.0/cat-master.html">Documentation * on elastic.co */ + + public CompletableFuture master(MasterRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) MasterRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns information about the master node, including the ID, bound IP + * address, and name. IMPORTANT: cat APIs are only intended for human + * consumption using the command line or Kibana console. They are not intended + * for use by applications. For application consumption, use the nodes info API. + * + * @param fn + * a function that initializes a builder to create the + * {@link MasterRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture master( + Function> fn) { + return master(fn.apply(new MasterRequest.Builder()).build()); + } + + /** + * Returns information about the master node, including the ID, bound IP + * address, and name. IMPORTANT: cat APIs are only intended for human + * consumption using the command line or Kibana console. They are not intended + * for use by applications. For application consumption, use the nodes info API. + * + * @see Documentation + * on elastic.co + */ + public CompletableFuture master() { - return this.transport.performRequestAsync(MasterRequest._INSTANCE, MasterRequest._ENDPOINT, + return this.transport.performRequestAsync(new MasterRequest.Builder().build(), MasterRequest._ENDPOINT, this.transportOptions); } @@ -858,8 +896,46 @@ public CompletableFuture mlTrainedModels() { * "https://www.elastic.co/guide/en/elasticsearch/reference/9.0/cat-nodeattrs.html">Documentation * on elastic.co */ + + public CompletableFuture nodeattrs(NodeattrsRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) NodeattrsRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns information about custom node attributes. IMPORTANT: cat APIs are + * only intended for human consumption using the command line or Kibana console. + * They are not intended for use by applications. For application consumption, + * use the nodes info API. + * + * @param fn + * a function that initializes a builder to create the + * {@link NodeattrsRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture nodeattrs( + Function> fn) { + return nodeattrs(fn.apply(new NodeattrsRequest.Builder()).build()); + } + + /** + * Returns information about custom node attributes. IMPORTANT: cat APIs are + * only intended for human consumption using the command line or Kibana console. + * They are not intended for use by applications. For application consumption, + * use the nodes info API. + * + * @see Documentation + * on elastic.co + */ + public CompletableFuture nodeattrs() { - return this.transport.performRequestAsync(NodeattrsRequest._INSTANCE, NodeattrsRequest._ENDPOINT, + return this.transport.performRequestAsync(new NodeattrsRequest.Builder().build(), NodeattrsRequest._ENDPOINT, this.transportOptions); } @@ -930,9 +1006,47 @@ public CompletableFuture nodes() { * "https://www.elastic.co/guide/en/elasticsearch/reference/9.0/cat-pending-tasks.html">Documentation * on elastic.co */ + + public CompletableFuture pendingTasks(PendingTasksRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PendingTasksRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns cluster-level changes that have not yet been executed. IMPORTANT: cat + * APIs are only intended for human consumption using the command line or Kibana + * console. They are not intended for use by applications. For application + * consumption, use the pending cluster tasks API. + * + * @param fn + * a function that initializes a builder to create the + * {@link PendingTasksRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture pendingTasks( + Function> fn) { + return pendingTasks(fn.apply(new PendingTasksRequest.Builder()).build()); + } + + /** + * Returns cluster-level changes that have not yet been executed. IMPORTANT: cat + * APIs are only intended for human consumption using the command line or Kibana + * console. They are not intended for use by applications. For application + * consumption, use the pending cluster tasks API. + * + * @see Documentation + * on elastic.co + */ + public CompletableFuture pendingTasks() { - return this.transport.performRequestAsync(PendingTasksRequest._INSTANCE, PendingTasksRequest._ENDPOINT, - this.transportOptions); + return this.transport.performRequestAsync(new PendingTasksRequest.Builder().build(), + PendingTasksRequest._ENDPOINT, this.transportOptions); } // ----- Endpoint: cat.plugins @@ -947,8 +1061,46 @@ public CompletableFuture pendingTasks() { * "https://www.elastic.co/guide/en/elasticsearch/reference/9.0/cat-plugins.html">Documentation * on elastic.co */ + + public CompletableFuture plugins(PluginsRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PluginsRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Returns a list of plugins running on each node of a cluster. IMPORTANT: cat + * APIs are only intended for human consumption using the command line or Kibana + * console. They are not intended for use by applications. For application + * consumption, use the nodes info API. + * + * @param fn + * a function that initializes a builder to create the + * {@link PluginsRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture plugins( + Function> fn) { + return plugins(fn.apply(new PluginsRequest.Builder()).build()); + } + + /** + * Returns a list of plugins running on each node of a cluster. IMPORTANT: cat + * APIs are only intended for human consumption using the command line or Kibana + * console. They are not intended for use by applications. For application + * consumption, use the nodes info API. + * + * @see Documentation + * on elastic.co + */ + public CompletableFuture plugins() { - return this.transport.performRequestAsync(PluginsRequest._INSTANCE, PluginsRequest._ENDPOINT, + return this.transport.performRequestAsync(new PluginsRequest.Builder().build(), PluginsRequest._ENDPOINT, this.transportOptions); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java index 927d8e4d5..8138deefb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java @@ -582,8 +582,47 @@ public IndicesResponse indices() throws IOException, ElasticsearchException { * "https://www.elastic.co/guide/en/elasticsearch/reference/9.0/cat-master.html">Documentation * on elastic.co */ + + public MasterResponse master(MasterRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) MasterRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns information about the master node, including the ID, bound IP + * address, and name. IMPORTANT: cat APIs are only intended for human + * consumption using the command line or Kibana console. They are not intended + * for use by applications. For application consumption, use the nodes info API. + * + * @param fn + * a function that initializes a builder to create the + * {@link MasterRequest} + * @see Documentation + * on elastic.co + */ + + public final MasterResponse master(Function> fn) + throws IOException, ElasticsearchException { + return master(fn.apply(new MasterRequest.Builder()).build()); + } + + /** + * Returns information about the master node, including the ID, bound IP + * address, and name. IMPORTANT: cat APIs are only intended for human + * consumption using the command line or Kibana console. They are not intended + * for use by applications. For application consumption, use the nodes info API. + * + * @see Documentation + * on elastic.co + */ + public MasterResponse master() throws IOException, ElasticsearchException { - return this.transport.performRequest(MasterRequest._INSTANCE, MasterRequest._ENDPOINT, this.transportOptions); + return this.transport.performRequest(new MasterRequest.Builder().build(), MasterRequest._ENDPOINT, + this.transportOptions); } // ----- Endpoint: cat.ml_data_frame_analytics @@ -865,8 +904,46 @@ public MlTrainedModelsResponse mlTrainedModels() throws IOException, Elasticsear * "https://www.elastic.co/guide/en/elasticsearch/reference/9.0/cat-nodeattrs.html">Documentation * on elastic.co */ + + public NodeattrsResponse nodeattrs(NodeattrsRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) NodeattrsRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns information about custom node attributes. IMPORTANT: cat APIs are + * only intended for human consumption using the command line or Kibana console. + * They are not intended for use by applications. For application consumption, + * use the nodes info API. + * + * @param fn + * a function that initializes a builder to create the + * {@link NodeattrsRequest} + * @see Documentation + * on elastic.co + */ + + public final NodeattrsResponse nodeattrs(Function> fn) + throws IOException, ElasticsearchException { + return nodeattrs(fn.apply(new NodeattrsRequest.Builder()).build()); + } + + /** + * Returns information about custom node attributes. IMPORTANT: cat APIs are + * only intended for human consumption using the command line or Kibana console. + * They are not intended for use by applications. For application consumption, + * use the nodes info API. + * + * @see Documentation + * on elastic.co + */ + public NodeattrsResponse nodeattrs() throws IOException, ElasticsearchException { - return this.transport.performRequest(NodeattrsRequest._INSTANCE, NodeattrsRequest._ENDPOINT, + return this.transport.performRequest(new NodeattrsRequest.Builder().build(), NodeattrsRequest._ENDPOINT, this.transportOptions); } @@ -937,8 +1014,47 @@ public NodesResponse nodes() throws IOException, ElasticsearchException { * "https://www.elastic.co/guide/en/elasticsearch/reference/9.0/cat-pending-tasks.html">Documentation * on elastic.co */ + + public PendingTasksResponse pendingTasks(PendingTasksRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PendingTasksRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns cluster-level changes that have not yet been executed. IMPORTANT: cat + * APIs are only intended for human consumption using the command line or Kibana + * console. They are not intended for use by applications. For application + * consumption, use the pending cluster tasks API. + * + * @param fn + * a function that initializes a builder to create the + * {@link PendingTasksRequest} + * @see Documentation + * on elastic.co + */ + + public final PendingTasksResponse pendingTasks( + Function> fn) + throws IOException, ElasticsearchException { + return pendingTasks(fn.apply(new PendingTasksRequest.Builder()).build()); + } + + /** + * Returns cluster-level changes that have not yet been executed. IMPORTANT: cat + * APIs are only intended for human consumption using the command line or Kibana + * console. They are not intended for use by applications. For application + * consumption, use the pending cluster tasks API. + * + * @see Documentation + * on elastic.co + */ + public PendingTasksResponse pendingTasks() throws IOException, ElasticsearchException { - return this.transport.performRequest(PendingTasksRequest._INSTANCE, PendingTasksRequest._ENDPOINT, + return this.transport.performRequest(new PendingTasksRequest.Builder().build(), PendingTasksRequest._ENDPOINT, this.transportOptions); } @@ -954,8 +1070,47 @@ public PendingTasksResponse pendingTasks() throws IOException, ElasticsearchExce * "https://www.elastic.co/guide/en/elasticsearch/reference/9.0/cat-plugins.html">Documentation * on elastic.co */ + + public PluginsResponse plugins(PluginsRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) PluginsRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Returns a list of plugins running on each node of a cluster. IMPORTANT: cat + * APIs are only intended for human consumption using the command line or Kibana + * console. They are not intended for use by applications. For application + * consumption, use the nodes info API. + * + * @param fn + * a function that initializes a builder to create the + * {@link PluginsRequest} + * @see Documentation + * on elastic.co + */ + + public final PluginsResponse plugins(Function> fn) + throws IOException, ElasticsearchException { + return plugins(fn.apply(new PluginsRequest.Builder()).build()); + } + + /** + * Returns a list of plugins running on each node of a cluster. IMPORTANT: cat + * APIs are only intended for human consumption using the command line or Kibana + * console. They are not intended for use by applications. For application + * consumption, use the nodes info API. + * + * @see Documentation + * on elastic.co + */ + public PluginsResponse plugins() throws IOException, ElasticsearchException { - return this.transport.performRequest(PluginsRequest._INSTANCE, PluginsRequest._ENDPOINT, this.transportOptions); + return this.transport.performRequest(new PluginsRequest.Builder().build(), PluginsRequest._ENDPOINT, + this.transportOptions); } // ----- Endpoint: cat.recovery diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java index a09b64c8c..a0a61756f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java @@ -28,10 +28,13 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; //---------------------------------------------------------------- // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. @@ -61,13 +64,78 @@ */ public class MasterRequest extends CatRequestBase { - public MasterRequest() { + @Nullable + private final Boolean local; + + // --------------------------------------------------------------------------------------------- + + private MasterRequest(Builder builder) { + + this.local = builder.local; + + } + + public static MasterRequest of(Function> fn) { + return fn.apply(new Builder()).build(); } /** - * Singleton instance for {@link MasterRequest}. + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} */ - public static final MasterRequest _INSTANCE = new MasterRequest(); + @Nullable + public final Boolean local() { + return this.local; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link MasterRequest}. + */ + + public static class Builder extends CatRequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private Boolean local; + + /** + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} + */ + public final Builder local(@Nullable Boolean value) { + this.local = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link MasterRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public MasterRequest build() { + _checkSingleUse(); + + return new MasterRequest(this); + } + } // --------------------------------------------------------------------------------------------- @@ -98,6 +166,9 @@ public MasterRequest() { request -> { Map params = new HashMap<>(); params.put("format", "json"); + if (request.local != null) { + params.put("local", String.valueOf(request.local)); + } return params; }, SimpleEndpoint.emptyMap(), false, MasterResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java index ff67cd5ba..b457e5782 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java @@ -28,10 +28,13 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; //---------------------------------------------------------------- // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. @@ -61,13 +64,78 @@ */ public class NodeattrsRequest extends CatRequestBase { - public NodeattrsRequest() { + @Nullable + private final Boolean local; + + // --------------------------------------------------------------------------------------------- + + private NodeattrsRequest(Builder builder) { + + this.local = builder.local; + + } + + public static NodeattrsRequest of(Function> fn) { + return fn.apply(new Builder()).build(); } /** - * Singleton instance for {@link NodeattrsRequest}. + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} */ - public static final NodeattrsRequest _INSTANCE = new NodeattrsRequest(); + @Nullable + public final Boolean local() { + return this.local; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link NodeattrsRequest}. + */ + + public static class Builder extends CatRequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private Boolean local; + + /** + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} + */ + public final Builder local(@Nullable Boolean value) { + this.local = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link NodeattrsRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public NodeattrsRequest build() { + _checkSingleUse(); + + return new NodeattrsRequest(this); + } + } // --------------------------------------------------------------------------------------------- @@ -98,6 +166,9 @@ public NodeattrsRequest() { request -> { Map params = new HashMap<>(); params.put("format", "json"); + if (request.local != null) { + params.put("local", String.valueOf(request.local)); + } return params; }, SimpleEndpoint.emptyMap(), false, NodeattrsResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java index 7095174f4..926e50a56 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java @@ -28,10 +28,13 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; //---------------------------------------------------------------- // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. @@ -61,13 +64,78 @@ */ public class PendingTasksRequest extends CatRequestBase { - public PendingTasksRequest() { + @Nullable + private final Boolean local; + + // --------------------------------------------------------------------------------------------- + + private PendingTasksRequest(Builder builder) { + + this.local = builder.local; + + } + + public static PendingTasksRequest of(Function> fn) { + return fn.apply(new Builder()).build(); } /** - * Singleton instance for {@link PendingTasksRequest}. + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} */ - public static final PendingTasksRequest _INSTANCE = new PendingTasksRequest(); + @Nullable + public final Boolean local() { + return this.local; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PendingTasksRequest}. + */ + + public static class Builder extends CatRequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private Boolean local; + + /** + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} + */ + public final Builder local(@Nullable Boolean value) { + this.local = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PendingTasksRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PendingTasksRequest build() { + _checkSingleUse(); + + return new PendingTasksRequest(this); + } + } // --------------------------------------------------------------------------------------------- @@ -98,6 +166,9 @@ public PendingTasksRequest() { request -> { Map params = new HashMap<>(); params.put("format", "json"); + if (request.local != null) { + params.put("local", String.valueOf(request.local)); + } return params; }, SimpleEndpoint.emptyMap(), false, PendingTasksResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java index ffd877211..0385c8a95 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java @@ -28,10 +28,13 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; //---------------------------------------------------------------- // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. @@ -61,13 +64,78 @@ */ public class PluginsRequest extends CatRequestBase { - public PluginsRequest() { + @Nullable + private final Boolean local; + + // --------------------------------------------------------------------------------------------- + + private PluginsRequest(Builder builder) { + + this.local = builder.local; + + } + + public static PluginsRequest of(Function> fn) { + return fn.apply(new Builder()).build(); } /** - * Singleton instance for {@link PluginsRequest}. + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} */ - public static final PluginsRequest _INSTANCE = new PluginsRequest(); + @Nullable + public final Boolean local() { + return this.local; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PluginsRequest}. + */ + + public static class Builder extends CatRequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private Boolean local; + + /** + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} + */ + public final Builder local(@Nullable Boolean value) { + this.local = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PluginsRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PluginsRequest build() { + _checkSingleUse(); + + return new PluginsRequest(this); + } + } // --------------------------------------------------------------------------------------------- @@ -98,6 +166,9 @@ public PluginsRequest() { request -> { Map params = new HashMap<>(); params.put("format", "json"); + if (request.local != null) { + params.put("local", String.valueOf(request.local)); + } return params; }, SimpleEndpoint.emptyMap(), false, PluginsResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java index a6f59451c..c5591ae86 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java @@ -30,6 +30,7 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.lang.String; import java.util.HashMap; import java.util.List; @@ -73,12 +74,16 @@ public class SegmentsRequest extends CatRequestBase { private final List index; + @Nullable + private final Boolean local; + // --------------------------------------------------------------------------------------------- private SegmentsRequest(Builder builder) { this.bytes = builder.bytes; this.index = ApiTypeHelper.unmodifiable(builder.index); + this.local = builder.local; } @@ -107,6 +112,20 @@ public final List index() { return this.index; } + /** + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} + */ + @Nullable + public final Boolean local() { + return this.local; + } + // --------------------------------------------------------------------------------------------- /** @@ -122,6 +141,9 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private List index; + @Nullable + private Boolean local; + /** * The unit used to display byte values. *

@@ -160,6 +182,20 @@ public final Builder index(String value, String... values) { return this; } + /** + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} + */ + public final Builder local(@Nullable Boolean value) { + this.local = value; + return this; + } + @Override protected Builder self() { return this; @@ -244,6 +280,9 @@ public SegmentsRequest build() { if (request.bytes != null) { params.put("bytes", request.bytes.jsonValue()); } + if (request.local != null) { + params.put("local", String.valueOf(request.local)); + } return params; }, SimpleEndpoint.emptyMap(), false, SegmentsResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java index 1267256b7..77aad9f0e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java @@ -28,6 +28,7 @@ import co.elastic.clients.transport.endpoints.SimpleEndpoint; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.lang.String; import java.util.HashMap; import java.util.Map; @@ -64,6 +65,9 @@ */ public class TemplatesRequest extends CatRequestBase { + @Nullable + private final Boolean local; + @Nullable private final String name; @@ -71,6 +75,7 @@ public class TemplatesRequest extends CatRequestBase { private TemplatesRequest(Builder builder) { + this.local = builder.local; this.name = builder.name; } @@ -79,6 +84,20 @@ public static TemplatesRequest of(Functiontrue, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} + */ + @Nullable + public final Boolean local() { + return this.local; + } + /** * The name of the template to return. Accepts wildcard expressions. If omitted, * all templates are returned. @@ -99,9 +118,26 @@ public final String name() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Boolean local; + @Nullable private String name; + /** + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} + */ + public final Builder local(@Nullable Boolean value) { + this.local = value; + return this; + } + /** * The name of the template to return. Accepts wildcard expressions. If omitted, * all templates are returned. @@ -194,6 +230,9 @@ public TemplatesRequest build() { request -> { Map params = new HashMap<>(); params.put("format", "json"); + if (request.local != null) { + params.put("local", String.valueOf(request.local)); + } return params; }, SimpleEndpoint.emptyMap(), false, TemplatesResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java index d7637ab97..f44ee12a7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java @@ -30,6 +30,7 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.lang.String; import java.util.HashMap; import java.util.List; @@ -68,6 +69,9 @@ */ public class ThreadPoolRequest extends CatRequestBase { + @Nullable + private final Boolean local; + private final List threadPoolPatterns; @Nullable @@ -77,6 +81,7 @@ public class ThreadPoolRequest extends CatRequestBase { private ThreadPoolRequest(Builder builder) { + this.local = builder.local; this.threadPoolPatterns = ApiTypeHelper.unmodifiable(builder.threadPoolPatterns); this.time = builder.time; @@ -86,6 +91,20 @@ public static ThreadPoolRequest of(Functiontrue, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} + */ + @Nullable + public final Boolean local() { + return this.local; + } + /** * A comma-separated list of thread pool names used to limit the request. * Accepts wildcard expressions. @@ -115,12 +134,29 @@ public final TimeUnit time() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Boolean local; + @Nullable private List threadPoolPatterns; @Nullable private TimeUnit time; + /** + * If true, the request computes the list of selected nodes from + * the local cluster state. If false the list of selected nodes are + * computed from the cluster state of the master node. In both cases the + * coordinating node will send requests for further information to each selected + * node. + *

+ * API name: {@code local} + */ + public final Builder local(@Nullable Boolean value) { + this.local = value; + return this; + } + /** * A comma-separated list of thread pool names used to limit the request. * Accepts wildcard expressions. @@ -243,6 +279,9 @@ public ThreadPoolRequest build() { if (request.time != null) { params.put("time", request.time.jsonValue()); } + if (request.local != null) { + params.put("local", String.valueOf(request.local)); + } return params; }, SimpleEndpoint.emptyMap(), false, ThreadPoolResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java index 31e9ba08f..b5dde92f7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClearScrollRequest.java @@ -57,7 +57,9 @@ // typedef: _global.clear_scroll.Request /** - * Clears the search context and results for a scrolling search. + * Clear a scrolling search. + *

+ * Clear the search context and results for a scrolling search. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java index b867d3d3c..733803252 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ClosePointInTimeRequest.java @@ -56,7 +56,14 @@ // typedef: _global.close_point_in_time.Request /** - * Closes a point-in-time. + * Close a point in time. + *

+ * A point in time must be opened explicitly before being used in search + * requests. The keep_alive parameter tells Elasticsearch how long + * it should persist. A point in time is automatically closed when the + * keep_alive period has elapsed. However, keeping points in time + * has a cost; close them as soon as they are no longer required for search + * requests. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsRequest.java index 1bc9ceb3c..49835f35f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsRequest.java @@ -63,11 +63,14 @@ // typedef: _global.field_caps.Request /** - * The field capabilities API returns the information about the capabilities of - * fields among multiple indices. The field capabilities API returns runtime - * fields like any other field. For example, a runtime field with a type of - * keyword is returned as any other field that belongs to the - * keyword family. + * Get the field capabilities. + *

+ * Get information about the capabilities of fields among multiple indices. + *

+ * For data streams, the API returns field capabilities among the stream’s + * backing indices. It returns runtime fields like any other field. For example, + * a runtime field with a type of keyword is returned the same as any other + * field that belongs to the keyword family. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/KnnSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/KnnSearchRequest.java index 08ef95662..de8f79bee 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/KnnSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/KnnSearchRequest.java @@ -63,11 +63,27 @@ // typedef: _global.knn_search.Request /** - * Performs a kNN search. + * Run a knn search. + *

+ * NOTE: The kNN search API has been replaced by the knn option in + * the search API. + *

+ * Perform a k-nearest neighbor (kNN) search on a dense_vector field and return + * the matching documents. Given a query vector, the API finds the k closest + * vectors and returns those documents as search hits. + *

+ * Elasticsearch uses the HNSW algorithm to support efficient kNN search. Like + * most kNN algorithms, HNSW is an approximate method that sacrifices result + * accuracy for improved search speed. This means the results returned are not + * always the true k closest neighbors. + *

+ * The kNN search API supports restricting the search using a filter. The search + * will return the top k documents that also match the filter query. * * @see API * specification - * @deprecated 8.4.0 + * @deprecated 8.4.0 The kNN search API has been replaced by the + * knn option in the search API. */ @Deprecated @JsonpDeserializable diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java index 8f023d59d..ca78618da 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchTemplateRequest.java @@ -65,7 +65,7 @@ // typedef: _global.msearch_template.Request /** - * Runs multiple templated searches with a single request. + * Run multiple templated searches. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java index b0db07d74..1701d0acb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java @@ -63,14 +63,20 @@ // typedef: _global.open_point_in_time.Request /** - * A search request by default executes against the most recent visible data of - * the target indices, which is called point in time. Elasticsearch pit (point - * in time) is a lightweight view into the state of the data as it existed when + * Open a point in time. + *

+ * A search request by default runs against the most recent visible data of the + * target indices, which is called point in time. Elasticsearch pit (point in + * time) is a lightweight view into the state of the data as it existed when * initiated. In some cases, it’s preferred to perform multiple search requests * using the same point in time. For example, if refreshes happen between * search_after requests, then the results of those requests might * not be consistent as changes happening between searches are only visible to * the more recent point in time. + *

+ * A point in time must be opened explicitly before being used in search + * requests. The keep_alive parameter tells Elasticsearch how long + * it should persist. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalRequest.java index d1a40f192..4d9ab42ee 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalRequest.java @@ -63,8 +63,10 @@ // typedef: _global.rank_eval.Request /** - * Enables you to evaluate the quality of ranked search results over a set of - * typical search queries. + * Evaluate ranked search results. + *

+ * Evaluate the quality of ranked search results over a set of typical search + * queries. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java index 702555736..9622a469b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RenderSearchTemplateRequest.java @@ -59,7 +59,9 @@ // typedef: _global.render_search_template.Request /** - * Renders a search template as a search request body. + * Render a search template. + *

+ * Render a search template as a search request body. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java index e72cf5742..45afb9ef6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchMvtRequest.java @@ -71,7 +71,9 @@ // typedef: _global.search_mvt.Request /** - * Search a vector tile. Searches a vector tile for geospatial values. + * Search a vector tile. + *

+ * Search a vector tile for geospatial values. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java index 4a1b0b677..1d39e93b8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java @@ -87,9 +87,11 @@ // typedef: _global.search.Request /** - * Returns search hits that match the query defined in the request. You can - * provide search queries using the q query string parameter or the - * request body. If both are specified, only the query parameter is used. + * Run a search. + *

+ * Get search hits that match the query defined in the request. You can provide + * search queries using the q query string parameter or the request + * body. If both are specified, only the query parameter is used. * * @see API * specification @@ -166,9 +168,6 @@ public class SearchRequest extends RequestBase implements JsonpSerializable { @Nullable private final Long maxConcurrentShardRequests; - @Nullable - private final String minCompatibleShardNode; - @Nullable private final Double minScore; @@ -282,7 +281,6 @@ private SearchRequest(Builder builder) { this.knn = ApiTypeHelper.unmodifiable(builder.knn); this.lenient = builder.lenient; this.maxConcurrentShardRequests = builder.maxConcurrentShardRequests; - this.minCompatibleShardNode = builder.minCompatibleShardNode; this.minScore = builder.minScore; this.pit = builder.pit; this.postFilter = builder.postFilter; @@ -611,17 +609,6 @@ public final Long maxConcurrentShardRequests() { return this.maxConcurrentShardRequests; } - /** - * The minimum version of the node that can handle the request Any handling node - * with a lower version will fail the request. - *

- * API name: {@code min_compatible_shard_node} - */ - @Nullable - public final String minCompatibleShardNode() { - return this.minCompatibleShardNode; - } - /** * Minimum _score for matching documents. Documents with a lower * _score are not included in the search results. @@ -1332,9 +1319,6 @@ public static class Builder extends RequestBase.AbstractBuilder impleme @Nullable private Long maxConcurrentShardRequests; - @Nullable - private String minCompatibleShardNode; - @Nullable private Double minScore; @@ -1922,17 +1906,6 @@ public final Builder maxConcurrentShardRequests(@Nullable Long 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. - *

- * API name: {@code min_compatible_shard_node} - */ - public final Builder minCompatibleShardNode(@Nullable String value) { - this.minCompatibleShardNode = value; - return this; - } - /** * Minimum _score for matching documents. Documents with a lower * _score are not included in the search results. @@ -2771,9 +2744,6 @@ protected static void setupSearchRequestDeserializer(ObjectDeserializer + * Get the indices and shards that a search request would be run against. This + * information can be useful for working out issues or planning optimizations + * with routing and shard preferences. When filtered aliases are used, the + * filter is returned as part of the indices section. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java index 64bc1b3c8..fcf729ccb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java @@ -64,7 +64,7 @@ // typedef: _global.search_template.Request /** - * Runs a search with a search template. + * Run a search with a search template. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java index a5e09f675..6aa697c67 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermvectorsRequest.java @@ -67,8 +67,10 @@ // typedef: _global.termvectors.Request /** - * Get term vector information. Returns information and statistics about terms - * in the fields of a particular document. + * Get term vector information. + *

+ * Get information and statistics about terms in the fields of a particular + * document. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html index 1f550796a..c680732e3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html @@ -16,9 +16,9 @@ '_global.bulk.UpdateAction': '_global/bulk/types.ts#L169-L205', '_global.bulk.UpdateOperation': '_global/bulk/types.ts#L136-L143', '_global.bulk.WriteOperation': '_global/bulk/types.ts#L109-L128', -'_global.clear_scroll.Request': '_global/clear_scroll/ClearScrollRequest.ts#L23-L46', +'_global.clear_scroll.Request': '_global/clear_scroll/ClearScrollRequest.ts#L23-L48', '_global.clear_scroll.Response': '_global/clear_scroll/ClearScrollResponse.ts#L22-L36', -'_global.close_point_in_time.Request': '_global/close_point_in_time/ClosePointInTimeRequest.ts#L23-L38', +'_global.close_point_in_time.Request': '_global/close_point_in_time/ClosePointInTimeRequest.ts#L23-L43', '_global.close_point_in_time.Response': '_global/close_point_in_time/ClosePointInTimeResponse.ts#L22-L36', '_global.count.Request': '_global/count/CountRequest.ts#L26-L121', '_global.count.Response': '_global/count/CountResponse.ts#L23-L25', @@ -39,7 +39,7 @@ '_global.explain.Request': '_global/explain/ExplainRequest.ts#L26-L107', '_global.explain.Response': '_global/explain/ExplainResponse.ts#L23-L31', '_global.field_caps.FieldCapability': '_global/field_caps/types.ts#L23-L81', -'_global.field_caps.Request': '_global/field_caps/FieldCapabilitiesRequest.ts#L25-L107', +'_global.field_caps.Request': '_global/field_caps/FieldCapabilitiesRequest.ts#L25-L111', '_global.field_caps.Response': '_global/field_caps/FieldCapabilitiesResponse.ts#L24-L35', '_global.get.GetResult': '_global/get/types.ts#L25-L36', '_global.get.Request': '_global/get/GetRequest.ts#L31-L101', @@ -91,7 +91,7 @@ '_global.index.Response': '_global/index/IndexResponse.ts#L22-L24', '_global.info.Request': '_global/info/RootNodeInfoRequest.ts#L22-L29', '_global.info.Response': '_global/info/RootNodeInfoResponse.ts#L23-L31', -'_global.knn_search.Request': '_global/knn_search/KnnSearchRequest.ts#L26-L83', +'_global.knn_search.Request': '_global/knn_search/KnnSearchRequest.ts#L26-L96', '_global.knn_search.Response': '_global/knn_search/KnnSearchResponse.ts#L26-L54', '_global.knn_search._types.Query': '_global/knn_search/_types/Knn.ts#L24-L33', '_global.mget.MultiGetError': '_global/mget/types.ts#L62-L66', @@ -106,14 +106,14 @@ '_global.msearch.Request': '_global/msearch/MultiSearchRequest.ts#L25-L124', '_global.msearch.Response': '_global/msearch/MultiSearchResponse.ts#L25-L27', '_global.msearch.ResponseItem': '_global/msearch/types.ts#L211-L214', -'_global.msearch_template.Request': '_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L71', +'_global.msearch_template.Request': '_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L72', '_global.msearch_template.Response': '_global/msearch_template/MultiSearchTemplateResponse.ts#L22-L24', '_global.msearch_template.TemplateConfig': '_global/msearch_template/types.ts#L28-L54', '_global.mtermvectors.Operation': '_global/mtermvectors/types.ts#L35-L94', '_global.mtermvectors.Request': '_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L116', '_global.mtermvectors.Response': '_global/mtermvectors/MultiTermVectorsResponse.ts#L22-L24', '_global.mtermvectors.TermVectorsResult': '_global/mtermvectors/types.ts#L96-L104', -'_global.open_point_in_time.Request': '_global/open_point_in_time/OpenPointInTimeRequest.ts#L25-L76', +'_global.open_point_in_time.Request': '_global/open_point_in_time/OpenPointInTimeRequest.ts#L25-L81', '_global.open_point_in_time.Response': '_global/open_point_in_time/OpenPointInTimeResponse.ts#L23-L29', '_global.ping.Request': '_global/ping/PingRequest.ts#L22-L30', '_global.put_script.Request': '_global/put_script/PutScriptRequest.ts#L25-L66', @@ -132,7 +132,7 @@ '_global.rank_eval.RankEvalMetricRecall': '_global/rank_eval/types.ts#L54-L58', '_global.rank_eval.RankEvalQuery': '_global/rank_eval/types.ts#L111-L117', '_global.rank_eval.RankEvalRequestItem': '_global/rank_eval/types.ts#L98-L109', -'_global.rank_eval.Request': '_global/rank_eval/RankEvalRequest.ts#L24-L62', +'_global.rank_eval.Request': '_global/rank_eval/RankEvalRequest.ts#L24-L64', '_global.rank_eval.Response': '_global/rank_eval/RankEvalResponse.ts#L26-L34', '_global.rank_eval.UnratedDocument': '_global/rank_eval/types.ts#L150-L153', '_global.reindex.Destination': '_global/reindex/types.ts#L39-L64', @@ -145,14 +145,14 @@ '_global.reindex_rethrottle.ReindexTask': '_global/reindex_rethrottle/types.ts#L87-L98', '_global.reindex_rethrottle.Request': '_global/reindex_rethrottle/ReindexRethrottleRequest.ts#L24-L46', '_global.reindex_rethrottle.Response': '_global/reindex_rethrottle/ReindexRethrottleResponse.ts#L23-L25', -'_global.render_search_template.Request': '_global/render_search_template/RenderSearchTemplateRequest.ts#L25-L56', +'_global.render_search_template.Request': '_global/render_search_template/RenderSearchTemplateRequest.ts#L25-L58', '_global.render_search_template.Response': '_global/render_search_template/RenderSearchTemplateResponse.ts#L23-L25', '_global.scripts_painless_execute.PainlessContextSetup': '_global/scripts_painless_execute/types.ts#L25-L39', '_global.scripts_painless_execute.Request': '_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts#L24-L48', '_global.scripts_painless_execute.Response': '_global/scripts_painless_execute/ExecutePainlessScriptResponse.ts#L20-L24', '_global.scroll.Request': '_global/scroll/ScrollRequest.ts#L24-L75', '_global.scroll.Response': '_global/scroll/ScrollResponse.ts#L22-L24', -'_global.search.Request': '_global/search/SearchRequest.ts#L54-L529', +'_global.search.Request': '_global/search/SearchRequest.ts#L53-L525', '_global.search.Response': '_global/search/SearchResponse.ts#L34-L36', '_global.search.ResponseBody': '_global/search/SearchResponse.ts#L38-L54', '_global.search._types.AggregationBreakdown': '_global/search/_types/profile.ts#L26-L39', @@ -229,21 +229,21 @@ '_global.search._types.TotalHits': '_global/search/_types/hits.ts#L96-L99', '_global.search._types.TotalHitsRelation': '_global/search/_types/hits.ts#L101-L106', '_global.search._types.TrackHits': '_global/search/_types/hits.ts#L144-L152', -'_global.search_mvt.Request': '_global/search_mvt/SearchMvtRequest.ts#L33-L192', +'_global.search_mvt.Request': '_global/search_mvt/SearchMvtRequest.ts#L33-L193', '_global.search_mvt.Response': '_global/search_mvt/SearchMvtResponse.ts#L22-L25', '_global.search_mvt._types.GridAggregationType': '_global/search_mvt/_types/GridType.ts#L30-L33', '_global.search_mvt._types.GridType': '_global/search_mvt/_types/GridType.ts#L20-L28', -'_global.search_shards.Request': '_global/search_shards/SearchShardsRequest.ts#L23-L71', +'_global.search_shards.Request': '_global/search_shards/SearchShardsRequest.ts#L23-L76', '_global.search_shards.Response': '_global/search_shards/SearchShardsResponse.ts#L34-L40', '_global.search_shards.SearchShardsNodeAttributes': '_global/search_shards/SearchShardsResponse.ts#L42-L60', '_global.search_shards.ShardStoreIndex': '_global/search_shards/SearchShardsResponse.ts#L62-L65', -'_global.search_template.Request': '_global/search_template/SearchTemplateRequest.ts#L32-L135', +'_global.search_template.Request': '_global/search_template/SearchTemplateRequest.ts#L32-L136', '_global.search_template.Response': '_global/search_template/SearchTemplateResponse.ts#L30-L48', '_global.terms_enum.Request': '_global/terms_enum/TermsEnumRequest.ts#L26-L75', '_global.terms_enum.Response': '_global/terms_enum/TermsEnumResponse.ts#L22-L28', '_global.termvectors.FieldStatistics': '_global/termvectors/types.ts#L28-L32', '_global.termvectors.Filter': '_global/termvectors/types.ts#L49-L86', -'_global.termvectors.Request': '_global/termvectors/TermVectorsRequest.ts#L33-L121', +'_global.termvectors.Request': '_global/termvectors/TermVectorsRequest.ts#L33-L122', '_global.termvectors.Response': '_global/termvectors/TermVectorsResponse.ts#L25-L34', '_global.termvectors.Term': '_global/termvectors/types.ts#L34-L40', '_global.termvectors.TermVector': '_global/termvectors/types.ts#L23-L26', @@ -302,7 +302,7 @@ '_types.IndicesResponseBase': '_types/Base.ts#L87-L89', '_types.InlineGet': '_types/common.ts#L321-L334', '_types.KnnQuery': '_types/Knn.ts#L54-L72', -'_types.KnnRetriever': '_types/Retriever.ts#L58-L71', +'_types.KnnRetriever': '_types/Retriever.ts#L64-L77', '_types.KnnSearch': '_types/Knn.ts#L30-L52', '_types.LatLonGeoLocation': '_types/Geo.ts#L120-L129', '_types.Level': '_types/common.ts#L250-L254', @@ -318,7 +318,7 @@ '_types.PluginStats': '_types/Stats.ts#L180-L190', '_types.QueryCacheStats': '_types/Stats.ts#L192-L226', '_types.QueryVectorBuilder': '_types/Knn.ts#L74-L77', -'_types.RRFRetriever': '_types/Retriever.ts#L73-L80', +'_types.RRFRetriever': '_types/Retriever.ts#L79-L86', '_types.RankBase': '_types/Rank.ts#L30-L30', '_types.RankContainer': '_types/Rank.ts#L22-L28', '_types.RecoveryStats': '_types/Stats.ts#L228-L233', @@ -329,9 +329,10 @@ '_types.RequestCacheStats': '_types/Stats.ts#L244-L250', '_types.Result': '_types/Result.ts#L20-L26', '_types.Retries': '_types/Retries.ts#L22-L25', -'_types.RetrieverBase': '_types/Retriever.ts#L38-L41', -'_types.RetrieverContainer': '_types/Retriever.ts#L26-L36', +'_types.RetrieverBase': '_types/Retriever.ts#L44-L49', +'_types.RetrieverContainer': '_types/Retriever.ts#L28-L42', '_types.RrfRank': '_types/Rank.ts#L32-L37', +'_types.RuleRetriever': '_types/Retriever.ts#L101-L110', '_types.ScoreSort': '_types/sort.ts#L54-L56', '_types.Script': '_types/Scripting.ts#L73-L97', '_types.ScriptField': '_types/Scripting.ts#L99-L102', @@ -352,12 +353,13 @@ '_types.SortMode': '_types/sort.ts#L108-L117', '_types.SortOptions': '_types/sort.ts#L86-L96', '_types.SortOrder': '_types/sort.ts#L119-L128', -'_types.StandardRetriever': '_types/Retriever.ts#L43-L56', +'_types.StandardRetriever': '_types/Retriever.ts#L51-L62', '_types.StoreStats': '_types/Stats.ts#L368-L395', '_types.StoredScript': '_types/Scripting.ts#L47-L57', '_types.SuggestMode': '_types/common.ts#L283-L296', '_types.TaskFailure': '_types/Errors.ts#L68-L73', '_types.TextEmbedding': '_types/Knn.ts#L79-L82', +'_types.TextSimilarityReranker': '_types/Retriever.ts#L88-L99', '_types.ThreadType': '_types/common.ts#L298-L304', '_types.TimeUnit': '_types/Time.ts#L69-L77', '_types.TopLeftBottomRightGeoBounds': '_types/Geo.ts#L161-L164', @@ -988,28 +990,28 @@ 'async_search._types.AsyncSearch': 'async_search/_types/AsyncSearch.ts#L30-L56', 'async_search._types.AsyncSearchDocumentResponseBase': 'async_search/_types/AsyncSearchResponseBase.ts#L50-L54', 'async_search._types.AsyncSearchResponseBase': 'async_search/_types/AsyncSearchResponseBase.ts#L24-L49', -'async_search.delete.Request': 'async_search/delete/AsyncSearchDeleteRequest.ts#L23-L39', +'async_search.delete.Request': 'async_search/delete/AsyncSearchDeleteRequest.ts#L23-L40', 'async_search.delete.Response': 'async_search/delete/AsyncSearchDeleteResponse.ts#L22-L24', -'async_search.get.Request': 'async_search/get/AsyncSearchGetRequest.ts#L24-L56', +'async_search.get.Request': 'async_search/get/AsyncSearchGetRequest.ts#L24-L57', 'async_search.get.Response': 'async_search/get/AsyncSearchGetResponse.ts#L22-L24', -'async_search.status.Request': 'async_search/status/AsyncSearchStatusRequest.ts#L23-L38', +'async_search.status.Request': 'async_search/status/AsyncSearchStatusRequest.ts#L23-L39', 'async_search.status.Response': 'async_search/status/AsyncSearchStatusResponse.ts#L39-L41', 'async_search.status.StatusResponseBase': 'async_search/status/AsyncSearchStatusResponse.ts#L24-L38', -'async_search.submit.Request': 'async_search/submit/AsyncSearchSubmitRequest.ts#L55-L289', +'async_search.submit.Request': 'async_search/submit/AsyncSearchSubmitRequest.ts#L54-L288', 'async_search.submit.Response': 'async_search/submit/AsyncSearchSubmitResponse.ts#L22-L24', -'autoscaling._types.AutoscalingPolicy': 'autoscaling/_types/AutoscalingPolicy.ts#L23-L27', -'autoscaling.delete_autoscaling_policy.Request': 'autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyRequest.ts#L23-L32', +'autoscaling._types.AutoscalingPolicy': 'autoscaling/_types/AutoscalingPolicy.ts#L23-L30', +'autoscaling.delete_autoscaling_policy.Request': 'autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyRequest.ts#L23-L36', 'autoscaling.delete_autoscaling_policy.Response': 'autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyResponse.ts#L22-L24', 'autoscaling.get_autoscaling_capacity.AutoscalingCapacity': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L38-L41', 'autoscaling.get_autoscaling_capacity.AutoscalingDecider': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L52-L56', 'autoscaling.get_autoscaling_capacity.AutoscalingDeciders': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L31-L36', 'autoscaling.get_autoscaling_capacity.AutoscalingNode': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L48-L50', 'autoscaling.get_autoscaling_capacity.AutoscalingResources': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L43-L46', -'autoscaling.get_autoscaling_capacity.Request': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityRequest.ts#L22-L27', +'autoscaling.get_autoscaling_capacity.Request': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityRequest.ts#L22-L42', 'autoscaling.get_autoscaling_capacity.Response': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L25-L29', -'autoscaling.get_autoscaling_policy.Request': 'autoscaling/get_autoscaling_policy/GetAutoscalingPolicyRequest.ts#L23-L32', +'autoscaling.get_autoscaling_policy.Request': 'autoscaling/get_autoscaling_policy/GetAutoscalingPolicyRequest.ts#L23-L36', 'autoscaling.get_autoscaling_policy.Response': 'autoscaling/get_autoscaling_policy/GetAutoscalingPolicyResponse.ts#L22-L24', -'autoscaling.put_autoscaling_policy.Request': 'autoscaling/put_autoscaling_policy/PutAutoscalingPolicyRequest.ts#L24-L35', +'autoscaling.put_autoscaling_policy.Request': 'autoscaling/put_autoscaling_policy/PutAutoscalingPolicyRequest.ts#L24-L39', 'autoscaling.put_autoscaling_policy.Response': 'autoscaling/put_autoscaling_policy/PutAutoscalingPolicyResponse.ts#L22-L24', 'cat._types.CatAnomalyDetectorColumn': 'cat/_types/CatBase.ts#L32-L401', 'cat._types.CatDatafeedColumn': 'cat/_types/CatBase.ts#L405-L471', @@ -1021,10 +1023,10 @@ 'cat.aliases.Request': 'cat/aliases/CatAliasesRequest.ts#L23-L43', 'cat.aliases.Response': 'cat/aliases/CatAliasesResponse.ts#L22-L24', 'cat.allocation.AllocationRecord': 'cat/allocation/types.ts#L25-L99', -'cat.allocation.Request': 'cat/allocation/CatAllocationRequest.ts#L23-L41', +'cat.allocation.Request': 'cat/allocation/CatAllocationRequest.ts#L23-L49', 'cat.allocation.Response': 'cat/allocation/CatAllocationResponse.ts#L22-L24', 'cat.component_templates.ComponentTemplate': 'cat/component_templates/types.ts#L20-L28', -'cat.component_templates.Request': 'cat/component_templates/CatComponentTemplatesRequest.ts#L22-L39', +'cat.component_templates.Request': 'cat/component_templates/CatComponentTemplatesRequest.ts#L22-L49', 'cat.component_templates.Response': 'cat/component_templates/CatComponentTemplatesResponse.ts#L22-L24', 'cat.count.CountRecord': 'cat/count/types.ts#L23-L39', 'cat.count.Request': 'cat/count/CatCountRequest.ts#L23-L44', @@ -1042,7 +1044,7 @@ 'cat.indices.Request': 'cat/indices/CatIndicesRequest.ts#L24-L77', 'cat.indices.Response': 'cat/indices/CatIndicesResponse.ts#L22-L24', 'cat.master.MasterRecord': 'cat/master/types.ts#L20-L39', -'cat.master.Request': 'cat/master/CatMasterRequest.ts#L22-L31', +'cat.master.Request': 'cat/master/CatMasterRequest.ts#L22-L42', 'cat.master.Response': 'cat/master/CatMasterResponse.ts#L22-L24', 'cat.ml_data_frame_analytics.DataFrameAnalyticsRecord': 'cat/ml_data_frame_analytics/types.ts#L22-L102', 'cat.ml_data_frame_analytics.Request': 'cat/ml_data_frame_analytics/CatDataFrameAnalyticsRequest.ts#L24-L59', @@ -1057,16 +1059,16 @@ 'cat.ml_trained_models.Response': 'cat/ml_trained_models/CatTrainedModelsResponse.ts#L22-L24', 'cat.ml_trained_models.TrainedModelsRecord': 'cat/ml_trained_models/types.ts#L23-L115', 'cat.nodeattrs.NodeAttributesRecord': 'cat/nodeattrs/types.ts#L20-L55', -'cat.nodeattrs.Request': 'cat/nodeattrs/CatNodeAttributesRequest.ts#L22-L31', +'cat.nodeattrs.Request': 'cat/nodeattrs/CatNodeAttributesRequest.ts#L22-L42', 'cat.nodeattrs.Response': 'cat/nodeattrs/CatNodeAttributesResponse.ts#L22-L24', 'cat.nodes.NodesRecord': 'cat/nodes/types.ts#L23-L542', 'cat.nodes.Request': 'cat/nodes/CatNodesRequest.ts#L23-L49', 'cat.nodes.Response': 'cat/nodes/CatNodesResponse.ts#L22-L24', 'cat.pending_tasks.PendingTasksRecord': 'cat/pending_tasks/types.ts#L20-L41', -'cat.pending_tasks.Request': 'cat/pending_tasks/CatPendingTasksRequest.ts#L22-L31', +'cat.pending_tasks.Request': 'cat/pending_tasks/CatPendingTasksRequest.ts#L22-L42', 'cat.pending_tasks.Response': 'cat/pending_tasks/CatPendingTasksResponse.ts#L22-L24', 'cat.plugins.PluginsRecord': 'cat/plugins/types.ts#L22-L52', -'cat.plugins.Request': 'cat/plugins/CatPluginsRequest.ts#L22-L31', +'cat.plugins.Request': 'cat/plugins/CatPluginsRequest.ts#L22-L42', 'cat.plugins.Response': 'cat/plugins/CatPluginsResponse.ts#L22-L24', 'cat.recovery.RecoveryRecord': 'cat/recovery/types.ts#L24-L155', 'cat.recovery.Request': 'cat/recovery/CatRecoveryRequest.ts#L23-L59', @@ -1074,7 +1076,7 @@ 'cat.repositories.RepositoriesRecord': 'cat/repositories/types.ts#L20-L31', 'cat.repositories.Request': 'cat/repositories/CatRepositoriesRequest.ts#L22-L31', 'cat.repositories.Response': 'cat/repositories/CatRepositoriesResponse.ts#L22-L24', -'cat.segments.Request': 'cat/segments/CatSegmentsRequest.ts#L23-L49', +'cat.segments.Request': 'cat/segments/CatSegmentsRequest.ts#L23-L57', 'cat.segments.Response': 'cat/segments/CatSegmentsResponse.ts#L22-L24', 'cat.segments.SegmentsRecord': 'cat/segments/types.ts#L22-L107', 'cat.shards.Request': 'cat/shards/CatShardsRequest.ts#L23-L49', @@ -1086,10 +1088,10 @@ 'cat.tasks.Request': 'cat/tasks/CatTasksRequest.ts#L22-L47', 'cat.tasks.Response': 'cat/tasks/CatTasksResponse.ts#L22-L24', 'cat.tasks.TasksRecord': 'cat/tasks/types.ts#L22-L101', -'cat.templates.Request': 'cat/templates/CatTemplatesRequest.ts#L23-L41', +'cat.templates.Request': 'cat/templates/CatTemplatesRequest.ts#L23-L51', 'cat.templates.Response': 'cat/templates/CatTemplatesResponse.ts#L22-L24', 'cat.templates.TemplatesRecord': 'cat/templates/types.ts#L22-L48', -'cat.thread_pool.Request': 'cat/thread_pool/CatThreadPoolRequest.ts#L24-L48', +'cat.thread_pool.Request': 'cat/thread_pool/CatThreadPoolRequest.ts#L24-L56', 'cat.thread_pool.Response': 'cat/thread_pool/CatThreadPoolResponse.ts#L22-L24', 'cat.thread_pool.ThreadPoolRecord': 'cat/thread_pool/types.ts#L22-L124', 'cat.transforms.Request': 'cat/transforms/CatTransformsRequest.ts#L25-L78', @@ -1352,7 +1354,7 @@ 'features.get_features.Response': 'features/get_features/GetFeaturesResponse.ts#L22-L26', 'features.reset_features.Request': 'features/reset_features/ResetFeaturesRequest.ts#L22-L27', 'features.reset_features.Response': 'features/reset_features/ResetFeaturesResponse.ts#L22-L26', -'fleet.search.Request': 'fleet/search/SearchRequest.ts#L55-L260', +'fleet.search.Request': 'fleet/search/SearchRequest.ts#L54-L258', 'fleet.search.Response': 'fleet/search/SearchResponse.ts#L33-L50', 'graph._types.Connection': 'graph/_types/Connection.ts#L22-L27', 'graph._types.ExploreControls': 'graph/_types/ExploreControls.ts#L24-L49', @@ -1530,7 +1532,7 @@ 'indices.downsample.Request': 'indices/downsample/Request.ts#L24-L44', 'indices.downsample.Response': 'indices/downsample/Response.ts#L22-L25', 'indices.exists.Request': 'indices/exists/IndicesExistsRequest.ts#L23-L73', -'indices.exists_alias.Request': 'indices/exists_alias/IndicesExistsAliasRequest.ts#L23-L68', +'indices.exists_alias.Request': 'indices/exists_alias/IndicesExistsAliasRequest.ts#L23-L63', 'indices.exists_index_template.Request': 'indices/exists_index_template/IndicesExistsIndexTemplateRequest.ts#L24-L41', 'indices.exists_template.Request': 'indices/exists_template/IndicesExistsTemplateRequest.ts#L24-L39', 'indices.explain_data_lifecycle.DataStreamLifecycleExplain': 'indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L31-L41', @@ -1553,7 +1555,7 @@ 'indices.get.Request': 'indices/get/IndicesGetRequest.ts#L24-L89', 'indices.get.Response': 'indices/get/IndicesGetResponse.ts#L24-L27', 'indices.get_alias.IndexAliases': 'indices/get_alias/IndicesGetAliasResponse.ts#L37-L39', -'indices.get_alias.Request': 'indices/get_alias/IndicesGetAliasRequest.ts#L23-L71', +'indices.get_alias.Request': 'indices/get_alias/IndicesGetAliasRequest.ts#L23-L66', 'indices.get_alias.Response': 'indices/get_alias/IndicesGetAliasResponse.ts#L26-L35', 'indices.get_data_lifecycle.DataStreamWithLifecycle': 'indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L27-L30', 'indices.get_data_lifecycle.Request': 'indices/get_data_lifecycle/IndicesGetDataLifecycleRequest.ts#L24-L60', @@ -1626,7 +1628,7 @@ 'indices.rollover.Response': 'indices/rollover/IndicesRolloverResponse.ts#L22-L32', 'indices.rollover.RolloverConditions': 'indices/rollover/types.ts#L24-L40', 'indices.segments.IndexSegment': 'indices/segments/types.ts#L24-L26', -'indices.segments.Request': 'indices/segments/IndicesSegmentsRequest.ts#L23-L64', +'indices.segments.Request': 'indices/segments/IndicesSegmentsRequest.ts#L23-L59', 'indices.segments.Response': 'indices/segments/IndicesSegmentsResponse.ts#L24-L29', 'indices.segments.Segment': 'indices/segments/types.ts#L28-L38', 'indices.segments.ShardSegmentRouting': 'indices/segments/types.ts#L40-L44', @@ -1696,65 +1698,66 @@ 'inference.inference.Response': 'inference/inference/InferenceResponse.ts#L22-L24', 'inference.put.Request': 'inference/put/PutRequest.ts#L25-L44', 'inference.put.Response': 'inference/put/PutResponse.ts#L22-L24', -'ingest._types.AppendProcessor': 'ingest/_types/Processors.ts#L324-L339', -'ingest._types.AttachmentProcessor': 'ingest/_types/Processors.ts#L341-L382', -'ingest._types.BytesProcessor': 'ingest/_types/Processors.ts#L515-L531', -'ingest._types.CircleProcessor': 'ingest/_types/Processors.ts#L533-L556', -'ingest._types.CommunityIDProcessor': 'ingest/_types/Processors.ts#L558-L619', -'ingest._types.ConvertProcessor': 'ingest/_types/Processors.ts#L632-L652', -'ingest._types.ConvertType': 'ingest/_types/Processors.ts#L621-L630', -'ingest._types.CsvProcessor': 'ingest/_types/Processors.ts#L654-L687', +'ingest._types.AppendProcessor': 'ingest/_types/Processors.ts#L328-L343', +'ingest._types.AttachmentProcessor': 'ingest/_types/Processors.ts#L345-L386', +'ingest._types.BytesProcessor': 'ingest/_types/Processors.ts#L555-L571', +'ingest._types.CircleProcessor': 'ingest/_types/Processors.ts#L573-L596', +'ingest._types.CommunityIDProcessor': 'ingest/_types/Processors.ts#L598-L659', +'ingest._types.ConvertProcessor': 'ingest/_types/Processors.ts#L672-L692', +'ingest._types.ConvertType': 'ingest/_types/Processors.ts#L661-L670', +'ingest._types.CsvProcessor': 'ingest/_types/Processors.ts#L694-L727', 'ingest._types.DatabaseConfiguration': 'ingest/_types/Database.ts#L22-L29', -'ingest._types.DateIndexNameProcessor': 'ingest/_types/Processors.ts#L689-L727', -'ingest._types.DateProcessor': 'ingest/_types/Processors.ts#L729-L762', -'ingest._types.DissectProcessor': 'ingest/_types/Processors.ts#L764-L783', -'ingest._types.DotExpanderProcessor': 'ingest/_types/Processors.ts#L785-L803', -'ingest._types.DropProcessor': 'ingest/_types/Processors.ts#L805-L805', -'ingest._types.EnrichProcessor': 'ingest/_types/Processors.ts#L807-L846', -'ingest._types.FailProcessor': 'ingest/_types/Processors.ts#L848-L854', -'ingest._types.FingerprintDigest': 'ingest/_types/Processors.ts#L856-L862', -'ingest._types.FingerprintProcessor': 'ingest/_types/Processors.ts#L864-L892', -'ingest._types.ForeachProcessor': 'ingest/_types/Processors.ts#L894-L908', -'ingest._types.GeoGridProcessor': 'ingest/_types/Processors.ts#L384-L425', -'ingest._types.GeoGridTargetFormat': 'ingest/_types/Processors.ts#L433-L436', -'ingest._types.GeoGridTileType': 'ingest/_types/Processors.ts#L427-L431', -'ingest._types.GeoIpProcessor': 'ingest/_types/Processors.ts#L438-L472', -'ingest._types.GrokProcessor': 'ingest/_types/Processors.ts#L910-L941', -'ingest._types.GsubProcessor': 'ingest/_types/Processors.ts#L943-L967', -'ingest._types.HtmlStripProcessor': 'ingest/_types/Processors.ts#L969-L985', -'ingest._types.InferenceConfig': 'ingest/_types/Processors.ts#L1008-L1020', -'ingest._types.InferenceConfigClassification': 'ingest/_types/Processors.ts#L1035-L1061', -'ingest._types.InferenceConfigRegression': 'ingest/_types/Processors.ts#L1022-L1033', -'ingest._types.InferenceProcessor': 'ingest/_types/Processors.ts#L987-L1006', -'ingest._types.JoinProcessor': 'ingest/_types/Processors.ts#L1063-L1078', -'ingest._types.JsonProcessor': 'ingest/_types/Processors.ts#L1080-L1109', -'ingest._types.JsonProcessorConflictStrategy': 'ingest/_types/Processors.ts#L1111-L1116', -'ingest._types.KeyValueProcessor': 'ingest/_types/Processors.ts#L1118-L1170', -'ingest._types.LowercaseProcessor': 'ingest/_types/Processors.ts#L1172-L1188', +'ingest._types.DateIndexNameProcessor': 'ingest/_types/Processors.ts#L729-L767', +'ingest._types.DateProcessor': 'ingest/_types/Processors.ts#L769-L802', +'ingest._types.DissectProcessor': 'ingest/_types/Processors.ts#L804-L823', +'ingest._types.DotExpanderProcessor': 'ingest/_types/Processors.ts#L825-L843', +'ingest._types.DropProcessor': 'ingest/_types/Processors.ts#L845-L845', +'ingest._types.EnrichProcessor': 'ingest/_types/Processors.ts#L847-L886', +'ingest._types.FailProcessor': 'ingest/_types/Processors.ts#L888-L894', +'ingest._types.FingerprintDigest': 'ingest/_types/Processors.ts#L896-L902', +'ingest._types.FingerprintProcessor': 'ingest/_types/Processors.ts#L904-L932', +'ingest._types.ForeachProcessor': 'ingest/_types/Processors.ts#L934-L948', +'ingest._types.GeoGridProcessor': 'ingest/_types/Processors.ts#L388-L429', +'ingest._types.GeoGridTargetFormat': 'ingest/_types/Processors.ts#L437-L440', +'ingest._types.GeoGridTileType': 'ingest/_types/Processors.ts#L431-L435', +'ingest._types.GeoIpProcessor': 'ingest/_types/Processors.ts#L442-L476', +'ingest._types.GrokProcessor': 'ingest/_types/Processors.ts#L950-L981', +'ingest._types.GsubProcessor': 'ingest/_types/Processors.ts#L983-L1007', +'ingest._types.HtmlStripProcessor': 'ingest/_types/Processors.ts#L1009-L1025', +'ingest._types.InferenceConfig': 'ingest/_types/Processors.ts#L1048-L1060', +'ingest._types.InferenceConfigClassification': 'ingest/_types/Processors.ts#L1075-L1101', +'ingest._types.InferenceConfigRegression': 'ingest/_types/Processors.ts#L1062-L1073', +'ingest._types.InferenceProcessor': 'ingest/_types/Processors.ts#L1027-L1046', +'ingest._types.IpLocationProcessor': 'ingest/_types/Processors.ts#L478-L512', +'ingest._types.JoinProcessor': 'ingest/_types/Processors.ts#L1103-L1118', +'ingest._types.JsonProcessor': 'ingest/_types/Processors.ts#L1120-L1149', +'ingest._types.JsonProcessorConflictStrategy': 'ingest/_types/Processors.ts#L1151-L1156', +'ingest._types.KeyValueProcessor': 'ingest/_types/Processors.ts#L1158-L1210', +'ingest._types.LowercaseProcessor': 'ingest/_types/Processors.ts#L1212-L1228', 'ingest._types.Maxmind': 'ingest/_types/Database.ts#L31-L33', -'ingest._types.NetworkDirectionProcessor': 'ingest/_types/Processors.ts#L1190-L1224', +'ingest._types.NetworkDirectionProcessor': 'ingest/_types/Processors.ts#L1230-L1264', 'ingest._types.Pipeline': 'ingest/_types/Pipeline.ts#L23-L51', -'ingest._types.PipelineProcessor': 'ingest/_types/Processors.ts#L1226-L1237', -'ingest._types.ProcessorBase': 'ingest/_types/Processors.ts#L299-L322', -'ingest._types.ProcessorContainer': 'ingest/_types/Processors.ts#L27-L297', -'ingest._types.RedactProcessor': 'ingest/_types/Processors.ts#L1239-L1280', -'ingest._types.RegisteredDomainProcessor': 'ingest/_types/Processors.ts#L1282-L1298', -'ingest._types.RemoveProcessor': 'ingest/_types/Processors.ts#L1300-L1314', -'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L1316-L1332', -'ingest._types.RerouteProcessor': 'ingest/_types/Processors.ts#L1334-L1362', -'ingest._types.ScriptProcessor': 'ingest/_types/Processors.ts#L1364-L1384', -'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L1386-L1420', -'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L1422-L1431', -'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L1433-L1436', -'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L1438-L1454', -'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L1456-L1481', -'ingest._types.TerminateProcessor': 'ingest/_types/Processors.ts#L1483-L1483', -'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L1485-L1501', -'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L1503-L1519', -'ingest._types.UriPartsProcessor': 'ingest/_types/Processors.ts#L1539-L1565', -'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L1521-L1537', -'ingest._types.UserAgentProcessor': 'ingest/_types/Processors.ts#L474-L505', -'ingest._types.UserAgentProperty': 'ingest/_types/Processors.ts#L507-L513', +'ingest._types.PipelineProcessor': 'ingest/_types/Processors.ts#L1266-L1277', +'ingest._types.ProcessorBase': 'ingest/_types/Processors.ts#L303-L326', +'ingest._types.ProcessorContainer': 'ingest/_types/Processors.ts#L27-L301', +'ingest._types.RedactProcessor': 'ingest/_types/Processors.ts#L1279-L1320', +'ingest._types.RegisteredDomainProcessor': 'ingest/_types/Processors.ts#L1322-L1338', +'ingest._types.RemoveProcessor': 'ingest/_types/Processors.ts#L1340-L1354', +'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L1356-L1372', +'ingest._types.RerouteProcessor': 'ingest/_types/Processors.ts#L1374-L1402', +'ingest._types.ScriptProcessor': 'ingest/_types/Processors.ts#L1404-L1424', +'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L1426-L1460', +'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L1462-L1471', +'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L1473-L1476', +'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L1478-L1494', +'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L1496-L1521', +'ingest._types.TerminateProcessor': 'ingest/_types/Processors.ts#L1523-L1523', +'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L1525-L1541', +'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L1543-L1559', +'ingest._types.UriPartsProcessor': 'ingest/_types/Processors.ts#L1579-L1605', +'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L1561-L1577', +'ingest._types.UserAgentProcessor': 'ingest/_types/Processors.ts#L514-L545', +'ingest._types.UserAgentProperty': 'ingest/_types/Processors.ts#L547-L553', 'ingest.delete_geoip_database.Request': 'ingest/delete_geoip_database/DeleteGeoipDatabaseRequest.ts#L24-L48', 'ingest.delete_geoip_database.Response': 'ingest/delete_geoip_database/DeleteGeoipDatabaseResponse.ts#L22-L24', 'ingest.delete_pipeline.Request': 'ingest/delete_pipeline/DeletePipelineRequest.ts#L24-L52', @@ -2388,6 +2391,7 @@ 'searchable_snapshots.mount.Response': 'searchable_snapshots/mount/SearchableSnapshotsMountResponse.ts#L22-L26', 'searchable_snapshots.stats.Request': 'searchable_snapshots/stats/SearchableSnapshotsStatsRequest.ts#L24-L35', 'searchable_snapshots.stats.Response': 'searchable_snapshots/stats/SearchableSnapshotsStatsResponse.ts#L22-L27', +'security._types.Access': 'security/_types/Access.ts#L22-L31', 'security._types.ApiKey': 'security/_types/ApiKey.ts#L26-L88', 'security._types.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L372-L374', 'security._types.ApplicationPrivileges': 'security/_types/Privileges.ts#L27-L40', @@ -2405,6 +2409,7 @@ 'security._types.ManageUserPrivileges': 'security/_types/Privileges.ts#L376-L378', 'security._types.RealmInfo': 'security/_types/RealmInfo.ts#L22-L25', 'security._types.RemoteIndicesPrivileges': 'security/_types/Privileges.ts#L225-L253', +'security._types.ReplicationAccess': 'security/_types/Privileges.ts#L380-L385', 'security._types.RoleDescriptor': 'security/_types/RoleDescriptor.ts#L31-L64', 'security._types.RoleDescriptorRead': 'security/_types/RoleDescriptor.ts#L66-L98', 'security._types.RoleMapping': 'security/_types/RoleMapping.ts#L25-L33', @@ -2413,6 +2418,7 @@ 'security._types.RoleTemplateInlineQuery': 'security/_types/Privileges.ts#L321-L322', 'security._types.RoleTemplateQuery': 'security/_types/Privileges.ts#L289-L299', 'security._types.RoleTemplateScript': 'security/_types/Privileges.ts#L301-L319', +'security._types.SearchAccess': 'security/_types/Privileges.ts#L387-L407', 'security._types.TemplateFormat': 'security/_types/RoleTemplate.ts#L22-L25', 'security._types.User': 'security/_types/User.ts#L23-L31', 'security._types.UserIndicesPrivileges': 'security/_types/Privileges.ts#L255-L277', @@ -2443,6 +2449,8 @@ 'security.clear_cached_service_tokens.Response': 'security/clear_cached_service_tokens/ClearCachedServiceTokensResponse.ts#L25-L32', 'security.create_api_key.Request': 'security/create_api_key/SecurityCreateApiKeyRequest.ts#L26-L60', 'security.create_api_key.Response': 'security/create_api_key/SecurityCreateApiKeyResponse.ts#L23-L50', +'security.create_cross_cluster_api_key.Request': 'security/create_cross_cluster_api_key/CreateCrossClusterApiKeyRequest.ts#L25-L73', +'security.create_cross_cluster_api_key.Response': 'security/create_cross_cluster_api_key/CreateCrossClusterApiKeyResponse.ts#L23-L48', 'security.create_service_token.Request': 'security/create_service_token/CreateServiceTokenRequest.ts#L23-L41', 'security.create_service_token.Response': 'security/create_service_token/CreateServiceTokenResponse.ts#L22-L27', 'security.create_service_token.Token': 'security/create_service_token/types.ts#L22-L25', @@ -2557,6 +2565,8 @@ 'security.suggest_user_profiles.TotalUserProfiles': 'security/suggest_user_profiles/Response.ts#L24-L27', 'security.update_api_key.Request': 'security/update_api_key/Request.ts#L26-L67', 'security.update_api_key.Response': 'security/update_api_key/Response.ts#L20-L28', +'security.update_cross_cluster_api_key.Request': 'security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyRequest.ts#L25-L61', +'security.update_cross_cluster_api_key.Response': 'security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyResponse.ts#L20-L28', 'security.update_user_profile_data.Request': 'security/update_user_profile_data/Request.ts#L27-L72', 'security.update_user_profile_data.Response': 'security/update_user_profile_data/Response.ts#L22-L24', 'shutdown._types.Type': 'shutdown/_types/types.ts#L20-L24', @@ -2865,8 +2875,8 @@ 'watcher.stop.Request': 'watcher/stop/WatcherStopRequest.ts#L22-L26', 'watcher.stop.Response': 'watcher/stop/WatcherStopResponse.ts#L22-L24', 'xpack.info.BuildInformation': 'xpack/info/types.ts#L24-L27', -'xpack.info.Feature': 'xpack/info/types.ts#L84-L89', -'xpack.info.Features': 'xpack/info/types.ts#L42-L82', +'xpack.info.Feature': 'xpack/info/types.ts#L85-L90', +'xpack.info.Features': 'xpack/info/types.ts#L42-L83', 'xpack.info.MinimalLicenseInformation': 'xpack/info/types.ts#L34-L40', 'xpack.info.NativeCodeInformation': 'xpack/info/types.ts#L29-L32', 'xpack.info.Request': 'xpack/info/XPackInfoRequest.ts#L22-L42', @@ -2943,10 +2953,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/88226e10e8f12f9165e8e7871840765042f55ba8/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/55d431ab4ffe02043ba6f6a41d27f14542f4c792/specification/" + (paths[hash] || ""); - Please see the Elasticsearch API specification. + Please see the Elasticsearch API specification. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/FleetSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/FleetSearchRequest.java index 898fa6d7f..7922bedde 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/FleetSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/FleetSearchRequest.java @@ -158,9 +158,6 @@ public class FleetSearchRequest extends RequestBase implements JsonpSerializable @Nullable private final Long maxConcurrentShardRequests; - @Nullable - private final String minCompatibleShardNode; - @Nullable private final Double minScore; @@ -268,7 +265,6 @@ private FleetSearchRequest(Builder builder) { this.indicesBoost = ApiTypeHelper.unmodifiable(builder.indicesBoost); this.lenient = builder.lenient; this.maxConcurrentShardRequests = builder.maxConcurrentShardRequests; - this.minCompatibleShardNode = builder.minCompatibleShardNode; this.minScore = builder.minScore; this.pit = builder.pit; this.postFilter = builder.postFilter; @@ -520,14 +516,6 @@ public final Long maxConcurrentShardRequests() { return this.maxConcurrentShardRequests; } - /** - * API name: {@code min_compatible_shard_node} - */ - @Nullable - public final String minCompatibleShardNode() { - return this.minCompatibleShardNode; - } - /** * Minimum _score for matching documents. Documents with a lower _score are not * included in the search results. @@ -1132,9 +1120,6 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private Long maxConcurrentShardRequests; - @Nullable - private String minCompatibleShardNode; - @Nullable private Double minScore; @@ -1583,14 +1568,6 @@ public final Builder maxConcurrentShardRequests(@Nullable Long value) { return this; } - /** - * API name: {@code min_compatible_shard_node} - */ - public final Builder minCompatibleShardNode(@Nullable String value) { - this.minCompatibleShardNode = value; - return this; - } - /** * Minimum _score for matching documents. Documents with a lower _score are not * included in the search results. @@ -2289,9 +2266,6 @@ protected static void setupFleetSearchRequestDeserializer(ObjectDeserializer index; - @Nullable - private final Boolean local; - private final List name; // --------------------------------------------------------------------------------------------- @@ -91,7 +88,6 @@ private ExistsAliasRequest(Builder builder) { this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.ignoreUnavailable = builder.ignoreUnavailable; this.index = ApiTypeHelper.unmodifiable(builder.index); - this.local = builder.local; this.name = ApiTypeHelper.unmodifiableRequired(builder.name, this, "name"); } @@ -149,17 +145,6 @@ public final List index() { return this.index; } - /** - * If true, the request retrieves information from the local node - * only. - *

- * API name: {@code local} - */ - @Nullable - public final Boolean local() { - return this.local; - } - /** * Required - Comma-separated list of aliases to check. Supports wildcards * (*). @@ -191,9 +176,6 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private List index; - @Nullable - private Boolean local; - private List name; /** @@ -282,17 +264,6 @@ public final Builder index(String value, String... values) { return this; } - /** - * If true, the request retrieves information from the local node - * only. - *

- * API name: {@code local} - */ - public final Builder local(@Nullable Boolean value) { - this.local = value; - return this; - } - /** * Required - Comma-separated list of aliases to check. Supports wildcards * (*). @@ -417,9 +388,6 @@ public ExistsAliasRequest build() { if (request.allowNoIndices != null) { params.put("allow_no_indices", String.valueOf(request.allowNoIndices)); } - if (request.local != null) { - params.put("local", String.valueOf(request.local)); - } return params; }, SimpleEndpoint.emptyMap(), false, null); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java index 1c2195539..d0337c73d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java @@ -77,9 +77,6 @@ public class GetAliasRequest extends RequestBase { private final List index; - @Nullable - private final Boolean local; - private final List name; // --------------------------------------------------------------------------------------------- @@ -90,7 +87,6 @@ private GetAliasRequest(Builder builder) { this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.ignoreUnavailable = builder.ignoreUnavailable; this.index = ApiTypeHelper.unmodifiable(builder.index); - this.local = builder.local; this.name = ApiTypeHelper.unmodifiable(builder.name); } @@ -148,17 +144,6 @@ public final List index() { return this.index; } - /** - * If true, the request retrieves information from the local node - * only. - *

- * API name: {@code local} - */ - @Nullable - public final Boolean local() { - return this.local; - } - /** * Comma-separated list of aliases to retrieve. Supports wildcards * (*). To retrieve all aliases, omit this parameter or use @@ -189,9 +174,6 @@ public static class Builder extends RequestBase.AbstractBuilder impleme @Nullable private List index; - @Nullable - private Boolean local; - @Nullable private List name; @@ -281,17 +263,6 @@ public final Builder index(String value, String... values) { return this; } - /** - * If true, the request retrieves information from the local node - * only. - *

- * API name: {@code local} - */ - public final Builder local(@Nullable Boolean value) { - this.local = value; - return this; - } - /** * Comma-separated list of aliases to retrieve. Supports wildcards * (*). To retrieve all aliases, omit this parameter or use @@ -437,9 +408,6 @@ public GetAliasRequest build() { if (request.allowNoIndices != null) { params.put("allow_no_indices", String.valueOf(request.allowNoIndices)); } - if (request.local != null) { - params.put("local", String.valueOf(request.local)); - } return params; }, SimpleEndpoint.emptyMap(), false, GetAliasResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsRequest.java index 4f980c067..0de776681 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsRequest.java @@ -77,9 +77,6 @@ public class SegmentsRequest extends RequestBase { private final List index; - @Nullable - private final Boolean verbose; - // --------------------------------------------------------------------------------------------- private SegmentsRequest(Builder builder) { @@ -88,7 +85,6 @@ private SegmentsRequest(Builder builder) { this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.ignoreUnavailable = builder.ignoreUnavailable; this.index = ApiTypeHelper.unmodifiable(builder.index); - this.verbose = builder.verbose; } @@ -145,16 +141,6 @@ public final List index() { return this.index; } - /** - * If true, the request returns a verbose response. - *

- * API name: {@code verbose} - */ - @Nullable - public final Boolean verbose() { - return this.verbose; - } - // --------------------------------------------------------------------------------------------- /** @@ -174,9 +160,6 @@ public static class Builder extends RequestBase.AbstractBuilder impleme @Nullable private List index; - @Nullable - private Boolean verbose; - /** * If false, the request returns an error if any wildcard * expression, index alias, or _all value targets only missing or @@ -263,16 +246,6 @@ public final Builder index(String value, String... values) { return this; } - /** - * If true, the request returns a verbose response. - *

- * API name: {@code verbose} - */ - public final Builder verbose(@Nullable Boolean value) { - this.verbose = value; - return this; - } - @Override protected Builder self() { return this; @@ -361,9 +334,6 @@ public SegmentsRequest build() { if (request.allowNoIndices != null) { params.put("allow_no_indices", String.valueOf(request.allowNoIndices)); } - if (request.verbose != null) { - params.put("verbose", String.valueOf(request.verbose)); - } return params; }, SimpleEndpoint.emptyMap(), false, SegmentsResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/IpLocationProcessor.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/IpLocationProcessor.java new file mode 100644 index 000000000..7d15c90b9 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/IpLocationProcessor.java @@ -0,0 +1,394 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.ingest; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: ingest._types.IpLocationProcessor + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class IpLocationProcessor extends ProcessorBase implements ProcessorVariant { + @Nullable + private final String databaseFile; + + private final String field; + + @Nullable + private final Boolean firstOnly; + + @Nullable + private final Boolean ignoreMissing; + + private final List properties; + + @Nullable + private final String targetField; + + @Nullable + private final Boolean downloadDatabaseOnPipelineCreation; + + // --------------------------------------------------------------------------------------------- + + private IpLocationProcessor(Builder builder) { + super(builder); + + this.databaseFile = builder.databaseFile; + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + this.firstOnly = builder.firstOnly; + this.ignoreMissing = builder.ignoreMissing; + this.properties = ApiTypeHelper.unmodifiable(builder.properties); + this.targetField = builder.targetField; + this.downloadDatabaseOnPipelineCreation = builder.downloadDatabaseOnPipelineCreation; + + } + + public static IpLocationProcessor of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Processor variant kind. + */ + @Override + public Processor.Kind _processorKind() { + return Processor.Kind.IpLocation; + } + + /** + * The database filename referring to a database the module ships with + * (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom + * database in the ingest-geoip config directory. + *

+ * API name: {@code database_file} + */ + @Nullable + public final String databaseFile() { + return this.databaseFile; + } + + /** + * Required - The field to get the ip address from for the geographical lookup. + *

+ * API name: {@code field} + */ + public final String field() { + return this.field; + } + + /** + * If true, only the first found IP location data will be returned, + * even if the field contains an array. + *

+ * API name: {@code first_only} + */ + @Nullable + public final Boolean firstOnly() { + return this.firstOnly; + } + + /** + * If true and field does not exist, the processor + * quietly exits without modifying the document. + *

+ * API name: {@code ignore_missing} + */ + @Nullable + public final Boolean ignoreMissing() { + return this.ignoreMissing; + } + + /** + * Controls what properties are added to the target_field based on + * the IP location lookup. + *

+ * API name: {@code properties} + */ + public final List properties() { + return this.properties; + } + + /** + * The field that will hold the geographical information looked up from the + * MaxMind database. + *

+ * API name: {@code target_field} + */ + @Nullable + public final String targetField() { + return this.targetField; + } + + /** + * If true (and if + * ingest.geoip.downloader.eager.download is false), + * the missing database is downloaded when the pipeline is created. Else, the + * download is triggered by when the pipeline is used as the + * default_pipeline or final_pipeline in an index. + *

+ * API name: {@code download_database_on_pipeline_creation} + */ + @Nullable + public final Boolean downloadDatabaseOnPipelineCreation() { + return this.downloadDatabaseOnPipelineCreation; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + if (this.databaseFile != null) { + generator.writeKey("database_file"); + generator.write(this.databaseFile); + + } + generator.writeKey("field"); + generator.write(this.field); + + if (this.firstOnly != null) { + generator.writeKey("first_only"); + generator.write(this.firstOnly); + + } + if (this.ignoreMissing != null) { + generator.writeKey("ignore_missing"); + generator.write(this.ignoreMissing); + + } + if (ApiTypeHelper.isDefined(this.properties)) { + generator.writeKey("properties"); + generator.writeStartArray(); + for (String item0 : this.properties) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.targetField != null) { + generator.writeKey("target_field"); + generator.write(this.targetField); + + } + if (this.downloadDatabaseOnPipelineCreation != null) { + generator.writeKey("download_database_on_pipeline_creation"); + generator.write(this.downloadDatabaseOnPipelineCreation); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link IpLocationProcessor}. + */ + + public static class Builder extends ProcessorBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private String databaseFile; + + private String field; + + @Nullable + private Boolean firstOnly; + + @Nullable + private Boolean ignoreMissing; + + @Nullable + private List properties; + + @Nullable + private String targetField; + + @Nullable + private Boolean downloadDatabaseOnPipelineCreation; + + /** + * The database filename referring to a database the module ships with + * (GeoLite2-City.mmdb, GeoLite2-Country.mmdb, or GeoLite2-ASN.mmdb) or a custom + * database in the ingest-geoip config directory. + *

+ * API name: {@code database_file} + */ + public final Builder databaseFile(@Nullable String value) { + this.databaseFile = value; + return this; + } + + /** + * Required - The field to get the ip address from for the geographical lookup. + *

+ * API name: {@code field} + */ + public final Builder field(String value) { + this.field = value; + return this; + } + + /** + * If true, only the first found IP location data will be returned, + * even if the field contains an array. + *

+ * API name: {@code first_only} + */ + public final Builder firstOnly(@Nullable Boolean value) { + this.firstOnly = value; + return this; + } + + /** + * If true and field does not exist, the processor + * quietly exits without modifying the document. + *

+ * API name: {@code ignore_missing} + */ + public final Builder ignoreMissing(@Nullable Boolean value) { + this.ignoreMissing = value; + return this; + } + + /** + * Controls what properties are added to the target_field based on + * the IP location lookup. + *

+ * API name: {@code properties} + *

+ * Adds all elements of list to properties. + */ + public final Builder properties(List list) { + this.properties = _listAddAll(this.properties, list); + return this; + } + + /** + * Controls what properties are added to the target_field based on + * the IP location lookup. + *

+ * API name: {@code properties} + *

+ * Adds one or more values to properties. + */ + public final Builder properties(String value, String... values) { + this.properties = _listAdd(this.properties, value, values); + return this; + } + + /** + * The field that will hold the geographical information looked up from the + * MaxMind database. + *

+ * API name: {@code target_field} + */ + public final Builder targetField(@Nullable String value) { + this.targetField = value; + return this; + } + + /** + * If true (and if + * ingest.geoip.downloader.eager.download is false), + * the missing database is downloaded when the pipeline is created. Else, the + * download is triggered by when the pipeline is used as the + * default_pipeline or final_pipeline in an index. + *

+ * API name: {@code download_database_on_pipeline_creation} + */ + public final Builder downloadDatabaseOnPipelineCreation(@Nullable Boolean value) { + this.downloadDatabaseOnPipelineCreation = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link IpLocationProcessor}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public IpLocationProcessor build() { + _checkSingleUse(); + + return new IpLocationProcessor(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link IpLocationProcessor} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, IpLocationProcessor::setupIpLocationProcessorDeserializer); + + protected static void setupIpLocationProcessorDeserializer(ObjectDeserializer op) { + ProcessorBase.setupProcessorBaseDeserializer(op); + op.add(Builder::databaseFile, JsonpDeserializer.stringDeserializer(), "database_file"); + op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field"); + op.add(Builder::firstOnly, JsonpDeserializer.booleanDeserializer(), "first_only"); + op.add(Builder::ignoreMissing, JsonpDeserializer.booleanDeserializer(), "ignore_missing"); + op.add(Builder::properties, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "properties"); + op.add(Builder::targetField, JsonpDeserializer.stringDeserializer(), "target_field"); + op.add(Builder::downloadDatabaseOnPipelineCreation, JsonpDeserializer.booleanDeserializer(), + "download_database_on_pipeline_creation"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/Processor.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/Processor.java index 489acf9e6..721d8f4f3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/Processor.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/Processor.java @@ -106,6 +106,8 @@ public enum Kind implements JsonEnum { Foreach("foreach"), + IpLocation("ip_location"), + GeoGrid("geo_grid"), Geoip("geoip"), @@ -485,6 +487,23 @@ public ForeachProcessor foreach() { return TaggedUnionUtils.get(this, Kind.Foreach); } + /** + * Is this variant instance of kind {@code ip_location}? + */ + public boolean isIpLocation() { + return _kind == Kind.IpLocation; + } + + /** + * Get the {@code ip_location} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code ip_location} kind. + */ + public IpLocationProcessor ipLocation() { + return TaggedUnionUtils.get(this, Kind.IpLocation); + } + /** * Is this variant instance of kind {@code geo_grid}? */ @@ -1190,6 +1209,17 @@ public ObjectBuilder foreach( return this.foreach(fn.apply(new ForeachProcessor.Builder()).build()); } + public ObjectBuilder ipLocation(IpLocationProcessor v) { + this._kind = Kind.IpLocation; + this._value = v; + return this; + } + + public ObjectBuilder ipLocation( + Function> fn) { + return this.ipLocation(fn.apply(new IpLocationProcessor.Builder()).build()); + } + public ObjectBuilder geoGrid(GeoGridProcessor v) { this._kind = Kind.GeoGrid; this._value = v; @@ -1525,6 +1555,7 @@ protected static void setupProcessorDeserializer(ObjectDeserializer op) op.add(Builder::fail, FailProcessor._DESERIALIZER, "fail"); op.add(Builder::fingerprint, FingerprintProcessor._DESERIALIZER, "fingerprint"); op.add(Builder::foreach, ForeachProcessor._DESERIALIZER, "foreach"); + op.add(Builder::ipLocation, IpLocationProcessor._DESERIALIZER, "ip_location"); op.add(Builder::geoGrid, GeoGridProcessor._DESERIALIZER, "geo_grid"); op.add(Builder::geoip, GeoIpProcessor._DESERIALIZER, "geoip"); op.add(Builder::grok, GrokProcessor._DESERIALIZER, "grok"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorBuilders.java index 6aa09cbed..ea2e5109b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorBuilders.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorBuilders.java @@ -335,6 +335,24 @@ public static Processor foreach(Function> fn) { + Processor.Builder builder = new Processor.Builder(); + builder.ipLocation(fn.apply(new IpLocationProcessor.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link GeoGridProcessor geo_grid} {@code Processor} * variant. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java index 91dd50b92..376f521b2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlAsyncClient.java @@ -2236,9 +2236,14 @@ public final CompletableFuture putDataFrameAnalyt * an anomaly detection job. You can associate only one datafeed with each * anomaly detection job. The datafeed contains a query that runs at a defined * interval (frequency). If you are concerned about delayed data, - * you can add a delay - * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` - * index. + * you can add a delay (query_delay) at each interval. When + * Elasticsearch security features are enabled, your datafeed remembers which + * roles the user who created it had at the time of creation and runs the query + * using those same roles. If you provide secondary authorization headers, those + * credentials are used instead. You must use Kibana, this API, or the create + * anomaly detection jobs API to create a datafeed. Do not add a datafeed + * directly to the .ml-config index. Do not give users + * write privileges on the .ml-config index. * * @see Documentation @@ -2257,9 +2262,14 @@ public CompletableFuture putDatafeed(PutDatafeedRequest req * an anomaly detection job. You can associate only one datafeed with each * anomaly detection job. The datafeed contains a query that runs at a defined * interval (frequency). If you are concerned about delayed data, - * you can add a delay - * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` - * index. + * you can add a delay (query_delay) at each interval. When + * Elasticsearch security features are enabled, your datafeed remembers which + * roles the user who created it had at the time of creation and runs the query + * using those same roles. If you provide secondary authorization headers, those + * credentials are used instead. You must use Kibana, this API, or the create + * anomaly detection jobs API to create a datafeed. Do not add a datafeed + * directly to the .ml-config index. Do not give users + * write privileges on the .ml-config index. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java index 75007da08..a7d3862fe 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/ElasticsearchMlClient.java @@ -2296,9 +2296,14 @@ public final PutDataFrameAnalyticsResponse putDataFrameAnalytics( * an anomaly detection job. You can associate only one datafeed with each * anomaly detection job. The datafeed contains a query that runs at a defined * interval (frequency). If you are concerned about delayed data, - * you can add a delay - * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` - * index. + * you can add a delay (query_delay) at each interval. When + * Elasticsearch security features are enabled, your datafeed remembers which + * roles the user who created it had at the time of creation and runs the query + * using those same roles. If you provide secondary authorization headers, those + * credentials are used instead. You must use Kibana, this API, or the create + * anomaly detection jobs API to create a datafeed. Do not add a datafeed + * directly to the .ml-config index. Do not give users + * write privileges on the .ml-config index. * * @see Documentation @@ -2317,9 +2322,14 @@ public PutDatafeedResponse putDatafeed(PutDatafeedRequest request) throws IOExce * an anomaly detection job. You can associate only one datafeed with each * anomaly detection job. The datafeed contains a query that runs at a defined * interval (frequency). If you are concerned about delayed data, - * you can add a delay - * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` - * index. + * you can add a delay (query_delay) at each interval. When + * Elasticsearch security features are enabled, your datafeed remembers which + * roles the user who created it had at the time of creation and runs the query + * using those same roles. If you provide secondary authorization headers, those + * credentials are used instead. You must use Kibana, this API, or the create + * anomaly detection jobs API to create a datafeed. Do not add a datafeed + * directly to the .ml-config index. Do not give users + * write privileges on the .ml-config index. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java index 15a9fc453..686bc9c5c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutDatafeedRequest.java @@ -72,9 +72,14 @@ * an anomaly detection job. You can associate only one datafeed with each * anomaly detection job. The datafeed contains a query that runs at a defined * interval (frequency). If you are concerned about delayed data, - * you can add a delay - * (query_delay') at each interval. When Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed directly to the .ml-configindex. Do not give userswriteprivileges on the.ml-config` - * index. + * you can add a delay (query_delay) at each interval. When + * Elasticsearch security features are enabled, your datafeed remembers which + * roles the user who created it had at the time of creation and runs the query + * using those same roles. If you provide secondary authorization headers, those + * credentials are used instead. You must use Kibana, this API, or the create + * anomaly detection jobs API to create a datafeed. Do not add a datafeed + * directly to the .ml-config index. Do not give users + * write privileges on the .ml-config index. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/Access.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/Access.java new file mode 100644 index 000000000..7c6fa84f3 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/Access.java @@ -0,0 +1,253 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.security; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: security._types.Access + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class Access implements JsonpSerializable { + private final List replication; + + private final List search; + + // --------------------------------------------------------------------------------------------- + + private Access(Builder builder) { + + this.replication = ApiTypeHelper.unmodifiable(builder.replication); + this.search = ApiTypeHelper.unmodifiable(builder.search); + + } + + public static Access of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * A list of indices permission entries for cross-cluster replication. + *

+ * API name: {@code replication} + */ + public final List replication() { + return this.replication; + } + + /** + * A list of indices permission entries for cross-cluster search. + *

+ * API name: {@code search} + */ + public final List search() { + return this.search; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.replication)) { + generator.writeKey("replication"); + generator.writeStartArray(); + for (ReplicationAccess item0 : this.replication) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.search)) { + generator.writeKey("search"); + generator.writeStartArray(); + for (SearchAccess item0 : this.search) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Access}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private List replication; + + @Nullable + private List search; + + /** + * A list of indices permission entries for cross-cluster replication. + *

+ * API name: {@code replication} + *

+ * Adds all elements of list to replication. + */ + public final Builder replication(List list) { + this.replication = _listAddAll(this.replication, list); + return this; + } + + /** + * A list of indices permission entries for cross-cluster replication. + *

+ * API name: {@code replication} + *

+ * Adds one or more values to replication. + */ + public final Builder replication(ReplicationAccess value, ReplicationAccess... values) { + this.replication = _listAdd(this.replication, value, values); + return this; + } + + /** + * A list of indices permission entries for cross-cluster replication. + *

+ * API name: {@code replication} + *

+ * Adds a value to replication using a builder lambda. + */ + public final Builder replication(Function> fn) { + return replication(fn.apply(new ReplicationAccess.Builder()).build()); + } + + /** + * A list of indices permission entries for cross-cluster search. + *

+ * API name: {@code search} + *

+ * Adds all elements of list to search. + */ + public final Builder search(List list) { + this.search = _listAddAll(this.search, list); + return this; + } + + /** + * A list of indices permission entries for cross-cluster search. + *

+ * API name: {@code search} + *

+ * Adds one or more values to search. + */ + public final Builder search(SearchAccess value, SearchAccess... values) { + this.search = _listAdd(this.search, value, values); + return this; + } + + /** + * A list of indices permission entries for cross-cluster search. + *

+ * API name: {@code search} + *

+ * Adds a value to search using a builder lambda. + */ + public final Builder search(Function> fn) { + return search(fn.apply(new SearchAccess.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link Access}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public Access build() { + _checkSingleUse(); + + return new Access(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Access} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + Access::setupAccessDeserializer); + + protected static void setupAccessDeserializer(ObjectDeserializer op) { + + op.add(Builder::replication, JsonpDeserializer.arrayDeserializer(ReplicationAccess._DESERIALIZER), + "replication"); + op.add(Builder::search, JsonpDeserializer.arrayDeserializer(SearchAccess._DESERIALIZER), "search"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateCrossClusterApiKeyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateCrossClusterApiKeyRequest.java new file mode 100644 index 000000000..c702c3b15 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateCrossClusterApiKeyRequest.java @@ -0,0 +1,377 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.security; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.json.JsonData; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: security.create_cross_cluster_api_key.Request + +/** + * Create a cross-cluster API key. + *

+ * Create an API key of the cross_cluster type for the API key + * based remote cluster access. A cross_cluster API key cannot be + * used to authenticate through the REST interface. + *

+ * IMPORTANT: To authenticate this request you must use a credential that is not + * an API key. Even if you use an API key that has the required privilege, the + * API returns an error. + *

+ * Cross-cluster API keys are created by the Elasticsearch API key service, + * which is automatically enabled. + *

+ * NOTE: Unlike REST API keys, a cross-cluster API key does not capture + * permissions of the authenticated user. The API key’s effective permission is + * exactly as specified with the access property. + *

+ * A successful request returns a JSON structure that contains the API key, its + * unique ID, and its name. If applicable, it also returns expiration + * information for the API key in milliseconds. + *

+ * By default, API keys never expire. You can specify expiration information + * when you create the API keys. + *

+ * Cross-cluster API keys can only be updated with the update cross-cluster API + * key API. Attempting to update them with the update REST API key API or the + * bulk update REST API keys API will result in an error. + * + * @see API + * specification + */ +@JsonpDeserializable +public class CreateCrossClusterApiKeyRequest extends RequestBase implements JsonpSerializable { + private final Access access; + + @Nullable + private final Time expiration; + + private final Map metadata; + + private final String name; + + // --------------------------------------------------------------------------------------------- + + private CreateCrossClusterApiKeyRequest(Builder builder) { + + this.access = ApiTypeHelper.requireNonNull(builder.access, this, "access"); + this.expiration = builder.expiration; + this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); + this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + + } + + public static CreateCrossClusterApiKeyRequest of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The access to be granted to this API key. The access is composed + * of permissions for cross-cluster search and cross-cluster replication. At + * least one of them must be specified. + *

+ * NOTE: No explicit privileges should be specified for either search or + * replication access. The creation process automatically converts the access + * specification to a role descriptor which has relevant privileges assigned + * accordingly. + *

+ * API name: {@code access} + */ + public final Access access() { + return this.access; + } + + /** + * Expiration time for the API key. By default, API keys never expire. + *

+ * API name: {@code expiration} + */ + @Nullable + public final Time expiration() { + return this.expiration; + } + + /** + * Arbitrary metadata that you want to associate with the API key. It supports + * nested data structure. Within the metadata object, keys beginning with + * _ are reserved for system usage. + *

+ * API name: {@code metadata} + */ + public final Map metadata() { + return this.metadata; + } + + /** + * Required - Specifies the name for this API key. + *

+ * API name: {@code name} + */ + public final String name() { + return this.name; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("access"); + this.access.serialize(generator, mapper); + + if (this.expiration != null) { + generator.writeKey("expiration"); + this.expiration.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.metadata)) { + generator.writeKey("metadata"); + generator.writeStartObject(); + for (Map.Entry item0 : this.metadata.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + generator.writeKey("name"); + generator.write(this.name); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CreateCrossClusterApiKeyRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private Access access; + + @Nullable + private Time expiration; + + @Nullable + private Map metadata; + + private String name; + + /** + * Required - The access to be granted to this API key. The access is composed + * of permissions for cross-cluster search and cross-cluster replication. At + * least one of them must be specified. + *

+ * NOTE: No explicit privileges should be specified for either search or + * replication access. The creation process automatically converts the access + * specification to a role descriptor which has relevant privileges assigned + * accordingly. + *

+ * API name: {@code access} + */ + public final Builder access(Access value) { + this.access = value; + return this; + } + + /** + * Required - The access to be granted to this API key. The access is composed + * of permissions for cross-cluster search and cross-cluster replication. At + * least one of them must be specified. + *

+ * NOTE: No explicit privileges should be specified for either search or + * replication access. The creation process automatically converts the access + * specification to a role descriptor which has relevant privileges assigned + * accordingly. + *

+ * API name: {@code access} + */ + public final Builder access(Function> fn) { + return this.access(fn.apply(new Access.Builder()).build()); + } + + /** + * Expiration time for the API key. By default, API keys never expire. + *

+ * API name: {@code expiration} + */ + public final Builder expiration(@Nullable Time value) { + this.expiration = value; + return this; + } + + /** + * Expiration time for the API key. By default, API keys never expire. + *

+ * API name: {@code expiration} + */ + public final Builder expiration(Function> fn) { + return this.expiration(fn.apply(new Time.Builder()).build()); + } + + /** + * Arbitrary metadata that you want to associate with the API key. It supports + * nested data structure. Within the metadata object, keys beginning with + * _ are reserved for system usage. + *

+ * API name: {@code metadata} + *

+ * Adds all entries of map to metadata. + */ + public final Builder metadata(Map map) { + this.metadata = _mapPutAll(this.metadata, map); + return this; + } + + /** + * Arbitrary metadata that you want to associate with the API key. It supports + * nested data structure. Within the metadata object, keys beginning with + * _ are reserved for system usage. + *

+ * API name: {@code metadata} + *

+ * Adds an entry to metadata. + */ + public final Builder metadata(String key, JsonData value) { + this.metadata = _mapPut(this.metadata, key, value); + return this; + } + + /** + * Required - Specifies the name for this API key. + *

+ * API name: {@code name} + */ + public final Builder name(String value) { + this.name = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CreateCrossClusterApiKeyRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CreateCrossClusterApiKeyRequest build() { + _checkSingleUse(); + + return new CreateCrossClusterApiKeyRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CreateCrossClusterApiKeyRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, CreateCrossClusterApiKeyRequest::setupCreateCrossClusterApiKeyRequestDeserializer); + + protected static void setupCreateCrossClusterApiKeyRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::access, Access._DESERIALIZER, "access"); + op.add(Builder::expiration, Time._DESERIALIZER, "expiration"); + op.add(Builder::metadata, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "metadata"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code security.create_cross_cluster_api_key}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/security.create_cross_cluster_api_key", + + // Request method + request -> { + return "POST"; + + }, + + // Request path + request -> { + return "/_security/cross_cluster/api_key"; + + }, + + // Path parameters + request -> { + return Collections.emptyMap(); + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, CreateCrossClusterApiKeyResponse._DESERIALIZER); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateCrossClusterApiKeyResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateCrossClusterApiKeyResponse.java new file mode 100644 index 000000000..b3245c4d2 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateCrossClusterApiKeyResponse.java @@ -0,0 +1,284 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.security; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Long; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: security.create_cross_cluster_api_key.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CreateCrossClusterApiKeyResponse implements JsonpSerializable { + private final String apiKey; + + @Nullable + private final Long expiration; + + private final String id; + + private final String name; + + private final String encoded; + + // --------------------------------------------------------------------------------------------- + + private CreateCrossClusterApiKeyResponse(Builder builder) { + + this.apiKey = ApiTypeHelper.requireNonNull(builder.apiKey, this, "apiKey"); + this.expiration = builder.expiration; + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.encoded = ApiTypeHelper.requireNonNull(builder.encoded, this, "encoded"); + + } + + public static CreateCrossClusterApiKeyResponse of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - Generated API key. + *

+ * API name: {@code api_key} + */ + public final String apiKey() { + return this.apiKey; + } + + /** + * Expiration in milliseconds for the API key. + *

+ * API name: {@code expiration} + */ + @Nullable + public final Long expiration() { + return this.expiration; + } + + /** + * Required - Unique ID for this API key. + *

+ * API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Required - Specifies the name for this API key. + *

+ * API name: {@code name} + */ + public final String name() { + return this.name; + } + + /** + * Required - API key credentials which is the base64-encoding of the UTF-8 + * representation of id and api_key joined by a colon + * (:). + *

+ * API name: {@code encoded} + */ + public final String encoded() { + return this.encoded; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("api_key"); + generator.write(this.apiKey); + + if (this.expiration != null) { + generator.writeKey("expiration"); + generator.write(this.expiration); + + } + generator.writeKey("id"); + generator.write(this.id); + + generator.writeKey("name"); + generator.write(this.name); + + generator.writeKey("encoded"); + generator.write(this.encoded); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CreateCrossClusterApiKeyResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private String apiKey; + + @Nullable + private Long expiration; + + private String id; + + private String name; + + private String encoded; + + /** + * Required - Generated API key. + *

+ * API name: {@code api_key} + */ + public final Builder apiKey(String value) { + this.apiKey = value; + return this; + } + + /** + * Expiration in milliseconds for the API key. + *

+ * API name: {@code expiration} + */ + public final Builder expiration(@Nullable Long value) { + this.expiration = value; + return this; + } + + /** + * Required - Unique ID for this API key. + *

+ * API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + /** + * Required - Specifies the name for this API key. + *

+ * API name: {@code name} + */ + public final Builder name(String value) { + this.name = value; + return this; + } + + /** + * Required - API key credentials which is the base64-encoding of the UTF-8 + * representation of id and api_key joined by a colon + * (:). + *

+ * API name: {@code encoded} + */ + public final Builder encoded(String value) { + this.encoded = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CreateCrossClusterApiKeyResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CreateCrossClusterApiKeyResponse build() { + _checkSingleUse(); + + return new CreateCrossClusterApiKeyResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CreateCrossClusterApiKeyResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, CreateCrossClusterApiKeyResponse::setupCreateCrossClusterApiKeyResponseDeserializer); + + protected static void setupCreateCrossClusterApiKeyResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::apiKey, JsonpDeserializer.stringDeserializer(), "api_key"); + op.add(Builder::expiration, JsonpDeserializer.longDeserializer(), "expiration"); + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::encoded, JsonpDeserializer.stringDeserializer(), "encoded"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java index a42b5db74..b7345b790 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java @@ -521,6 +521,92 @@ public CompletableFuture createApiKey() { CreateApiKeyRequest._ENDPOINT, this.transportOptions); } + // ----- Endpoint: security.create_cross_cluster_api_key + + /** + * Create a cross-cluster API key. + *

+ * Create an API key of the cross_cluster type for the API key + * based remote cluster access. A cross_cluster API key cannot be + * used to authenticate through the REST interface. + *

+ * IMPORTANT: To authenticate this request you must use a credential that is not + * an API key. Even if you use an API key that has the required privilege, the + * API returns an error. + *

+ * Cross-cluster API keys are created by the Elasticsearch API key service, + * which is automatically enabled. + *

+ * NOTE: Unlike REST API keys, a cross-cluster API key does not capture + * permissions of the authenticated user. The API key’s effective permission is + * exactly as specified with the access property. + *

+ * A successful request returns a JSON structure that contains the API key, its + * unique ID, and its name. If applicable, it also returns expiration + * information for the API key in milliseconds. + *

+ * By default, API keys never expire. You can specify expiration information + * when you create the API keys. + *

+ * Cross-cluster API keys can only be updated with the update cross-cluster API + * key API. Attempting to update them with the update REST API key API or the + * bulk update REST API keys API will result in an error. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture createCrossClusterApiKey( + CreateCrossClusterApiKeyRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) CreateCrossClusterApiKeyRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Create a cross-cluster API key. + *

+ * Create an API key of the cross_cluster type for the API key + * based remote cluster access. A cross_cluster API key cannot be + * used to authenticate through the REST interface. + *

+ * IMPORTANT: To authenticate this request you must use a credential that is not + * an API key. Even if you use an API key that has the required privilege, the + * API returns an error. + *

+ * Cross-cluster API keys are created by the Elasticsearch API key service, + * which is automatically enabled. + *

+ * NOTE: Unlike REST API keys, a cross-cluster API key does not capture + * permissions of the authenticated user. The API key’s effective permission is + * exactly as specified with the access property. + *

+ * A successful request returns a JSON structure that contains the API key, its + * unique ID, and its name. If applicable, it also returns expiration + * information for the API key in milliseconds. + *

+ * By default, API keys never expire. You can specify expiration information + * when you create the API keys. + *

+ * Cross-cluster API keys can only be updated with the update cross-cluster API + * key API. Attempting to update them with the update REST API key API or the + * bulk update REST API keys API will result in an error. + * + * @param fn + * a function that initializes a builder to create the + * {@link CreateCrossClusterApiKeyRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture createCrossClusterApiKey( + Function> fn) { + return createCrossClusterApiKey(fn.apply(new CreateCrossClusterApiKeyRequest.Builder()).build()); + } + // ----- Endpoint: security.create_service_token /** @@ -2485,6 +2571,46 @@ public final CompletableFuture updateApiKey( return updateApiKey(fn.apply(new UpdateApiKeyRequest.Builder()).build()); } + // ----- Endpoint: security.update_cross_cluster_api_key + + /** + * Update a cross-cluster API key. + *

+ * Update the attributes of an existing cross-cluster API key, which is used for + * API key based remote cluster access. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture updateCrossClusterApiKey( + UpdateCrossClusterApiKeyRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateCrossClusterApiKeyRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Update a cross-cluster API key. + *

+ * Update the attributes of an existing cross-cluster API key, which is used for + * API key based remote cluster access. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateCrossClusterApiKeyRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture updateCrossClusterApiKey( + Function> fn) { + return updateCrossClusterApiKey(fn.apply(new UpdateCrossClusterApiKeyRequest.Builder()).build()); + } + // ----- Endpoint: security.update_user_profile_data /** diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityClient.java index dffaa29af..c15eedd89 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityClient.java @@ -535,6 +535,93 @@ public CreateApiKeyResponse createApiKey() throws IOException, ElasticsearchExce this.transportOptions); } + // ----- Endpoint: security.create_cross_cluster_api_key + + /** + * Create a cross-cluster API key. + *

+ * Create an API key of the cross_cluster type for the API key + * based remote cluster access. A cross_cluster API key cannot be + * used to authenticate through the REST interface. + *

+ * IMPORTANT: To authenticate this request you must use a credential that is not + * an API key. Even if you use an API key that has the required privilege, the + * API returns an error. + *

+ * Cross-cluster API keys are created by the Elasticsearch API key service, + * which is automatically enabled. + *

+ * NOTE: Unlike REST API keys, a cross-cluster API key does not capture + * permissions of the authenticated user. The API key’s effective permission is + * exactly as specified with the access property. + *

+ * A successful request returns a JSON structure that contains the API key, its + * unique ID, and its name. If applicable, it also returns expiration + * information for the API key in milliseconds. + *

+ * By default, API keys never expire. You can specify expiration information + * when you create the API keys. + *

+ * Cross-cluster API keys can only be updated with the update cross-cluster API + * key API. Attempting to update them with the update REST API key API or the + * bulk update REST API keys API will result in an error. + * + * @see Documentation + * on elastic.co + */ + + public CreateCrossClusterApiKeyResponse createCrossClusterApiKey(CreateCrossClusterApiKeyRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) CreateCrossClusterApiKeyRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Create a cross-cluster API key. + *

+ * Create an API key of the cross_cluster type for the API key + * based remote cluster access. A cross_cluster API key cannot be + * used to authenticate through the REST interface. + *

+ * IMPORTANT: To authenticate this request you must use a credential that is not + * an API key. Even if you use an API key that has the required privilege, the + * API returns an error. + *

+ * Cross-cluster API keys are created by the Elasticsearch API key service, + * which is automatically enabled. + *

+ * NOTE: Unlike REST API keys, a cross-cluster API key does not capture + * permissions of the authenticated user. The API key’s effective permission is + * exactly as specified with the access property. + *

+ * A successful request returns a JSON structure that contains the API key, its + * unique ID, and its name. If applicable, it also returns expiration + * information for the API key in milliseconds. + *

+ * By default, API keys never expire. You can specify expiration information + * when you create the API keys. + *

+ * Cross-cluster API keys can only be updated with the update cross-cluster API + * key API. Attempting to update them with the update REST API key API or the + * bulk update REST API keys API will result in an error. + * + * @param fn + * a function that initializes a builder to create the + * {@link CreateCrossClusterApiKeyRequest} + * @see Documentation + * on elastic.co + */ + + public final CreateCrossClusterApiKeyResponse createCrossClusterApiKey( + Function> fn) + throws IOException, ElasticsearchException { + return createCrossClusterApiKey(fn.apply(new CreateCrossClusterApiKeyRequest.Builder()).build()); + } + // ----- Endpoint: security.create_service_token /** @@ -2547,6 +2634,47 @@ public final UpdateApiKeyResponse updateApiKey( return updateApiKey(fn.apply(new UpdateApiKeyRequest.Builder()).build()); } + // ----- Endpoint: security.update_cross_cluster_api_key + + /** + * Update a cross-cluster API key. + *

+ * Update the attributes of an existing cross-cluster API key, which is used for + * API key based remote cluster access. + * + * @see Documentation + * on elastic.co + */ + + public UpdateCrossClusterApiKeyResponse updateCrossClusterApiKey(UpdateCrossClusterApiKeyRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) UpdateCrossClusterApiKeyRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Update a cross-cluster API key. + *

+ * Update the attributes of an existing cross-cluster API key, which is used for + * API key based remote cluster access. + * + * @param fn + * a function that initializes a builder to create the + * {@link UpdateCrossClusterApiKeyRequest} + * @see Documentation + * on elastic.co + */ + + public final UpdateCrossClusterApiKeyResponse updateCrossClusterApiKey( + Function> fn) + throws IOException, ElasticsearchException { + return updateCrossClusterApiKey(fn.apply(new UpdateCrossClusterApiKeyRequest.Builder()).build()); + } + // ----- Endpoint: security.update_user_profile_data /** diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ReplicationAccess.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ReplicationAccess.java new file mode 100644 index 000000000..7907d7f89 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ReplicationAccess.java @@ -0,0 +1,184 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.security; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: security._types.ReplicationAccess + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ReplicationAccess implements JsonpSerializable { + private final List names; + + // --------------------------------------------------------------------------------------------- + + private ReplicationAccess(Builder builder) { + + this.names = ApiTypeHelper.unmodifiableRequired(builder.names, this, "names"); + + } + + public static ReplicationAccess of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - A list of indices (or index name patterns) to which the + * permissions in this entry apply. + *

+ * API name: {@code names} + */ + public final List names() { + return this.names; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (ApiTypeHelper.isDefined(this.names)) { + generator.writeKey("names"); + generator.writeStartArray(); + for (String item0 : this.names) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ReplicationAccess}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private List names; + + /** + * Required - A list of indices (or index name patterns) to which the + * permissions in this entry apply. + *

+ * API name: {@code names} + *

+ * Adds all elements of list to names. + */ + public final Builder names(List list) { + this.names = _listAddAll(this.names, list); + return this; + } + + /** + * Required - A list of indices (or index name patterns) to which the + * permissions in this entry apply. + *

+ * API name: {@code names} + *

+ * Adds one or more values to names. + */ + public final Builder names(String value, String... values) { + this.names = _listAdd(this.names, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ReplicationAccess}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ReplicationAccess build() { + _checkSingleUse(); + + return new ReplicationAccess(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ReplicationAccess} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ReplicationAccess::setupReplicationAccessDeserializer); + + protected static void setupReplicationAccessDeserializer(ObjectDeserializer op) { + + op.add(Builder::names, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "names"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SearchAccess.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SearchAccess.java new file mode 100644 index 000000000..a5084d55d --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/SearchAccess.java @@ -0,0 +1,317 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.security; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: security._types.SearchAccess + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SearchAccess implements JsonpSerializable { + @Nullable + private final FieldSecurity fieldSecurity; + + private final List names; + + @Nullable + private final IndicesPrivilegesQuery query; + + @Nullable + private final Boolean allowRestrictedIndices; + + // --------------------------------------------------------------------------------------------- + + private SearchAccess(Builder builder) { + + this.fieldSecurity = builder.fieldSecurity; + this.names = ApiTypeHelper.unmodifiableRequired(builder.names, this, "names"); + this.query = builder.query; + this.allowRestrictedIndices = builder.allowRestrictedIndices; + + } + + public static SearchAccess of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * The document fields that the owners of the role have read access to. + *

+ * API name: {@code field_security} + */ + @Nullable + public final FieldSecurity fieldSecurity() { + return this.fieldSecurity; + } + + /** + * Required - A list of indices (or index name patterns) to which the + * permissions in this entry apply. + *

+ * API name: {@code names} + */ + public final List names() { + return this.names; + } + + /** + * A search query that defines the documents the owners of the role have access + * to. A document within the specified indices must match this query for it to + * be accessible by the owners of the role. + *

+ * API name: {@code query} + */ + @Nullable + public final IndicesPrivilegesQuery query() { + return this.query; + } + + /** + * Set to true if using wildcard or regular expressions for + * patterns that cover restricted indices. Implicitly, restricted indices have + * limited privileges that can cause pattern tests to fail. If restricted + * indices are explicitly included in the names list, Elasticsearch + * checks privileges against these indices regardless of the value set for + * allow_restricted_indices. + *

+ * API name: {@code allow_restricted_indices} + */ + @Nullable + public final Boolean allowRestrictedIndices() { + return this.allowRestrictedIndices; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.fieldSecurity != null) { + generator.writeKey("field_security"); + this.fieldSecurity.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.names)) { + generator.writeKey("names"); + generator.writeStartArray(); + for (String item0 : this.names) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.query != null) { + generator.writeKey("query"); + this.query.serialize(generator, mapper); + + } + if (this.allowRestrictedIndices != null) { + generator.writeKey("allow_restricted_indices"); + generator.write(this.allowRestrictedIndices); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SearchAccess}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private FieldSecurity fieldSecurity; + + private List names; + + @Nullable + private IndicesPrivilegesQuery query; + + @Nullable + private Boolean allowRestrictedIndices; + + /** + * The document fields that the owners of the role have read access to. + *

+ * API name: {@code field_security} + */ + public final Builder fieldSecurity(@Nullable FieldSecurity value) { + this.fieldSecurity = value; + return this; + } + + /** + * The document fields that the owners of the role have read access to. + *

+ * API name: {@code field_security} + */ + public final Builder fieldSecurity(Function> fn) { + return this.fieldSecurity(fn.apply(new FieldSecurity.Builder()).build()); + } + + /** + * Required - A list of indices (or index name patterns) to which the + * permissions in this entry apply. + *

+ * API name: {@code names} + *

+ * Adds all elements of list to names. + */ + public final Builder names(List list) { + this.names = _listAddAll(this.names, list); + return this; + } + + /** + * Required - A list of indices (or index name patterns) to which the + * permissions in this entry apply. + *

+ * API name: {@code names} + *

+ * Adds one or more values to names. + */ + public final Builder names(String value, String... values) { + this.names = _listAdd(this.names, value, values); + return this; + } + + /** + * A search query that defines the documents the owners of the role have access + * to. A document within the specified indices must match this query for it to + * be accessible by the owners of the role. + *

+ * API name: {@code query} + */ + public final Builder query(@Nullable IndicesPrivilegesQuery value) { + this.query = value; + return this; + } + + /** + * A search query that defines the documents the owners of the role have access + * to. A document within the specified indices must match this query for it to + * be accessible by the owners of the role. + *

+ * API name: {@code query} + */ + public final Builder query(Function> fn) { + return this.query(fn.apply(new IndicesPrivilegesQuery.Builder()).build()); + } + + /** + * Set to true if using wildcard or regular expressions for + * patterns that cover restricted indices. Implicitly, restricted indices have + * limited privileges that can cause pattern tests to fail. If restricted + * indices are explicitly included in the names list, Elasticsearch + * checks privileges against these indices regardless of the value set for + * allow_restricted_indices. + *

+ * API name: {@code allow_restricted_indices} + */ + public final Builder allowRestrictedIndices(@Nullable Boolean value) { + this.allowRestrictedIndices = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SearchAccess}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SearchAccess build() { + _checkSingleUse(); + + return new SearchAccess(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SearchAccess} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + SearchAccess::setupSearchAccessDeserializer); + + protected static void setupSearchAccessDeserializer(ObjectDeserializer op) { + + op.add(Builder::fieldSecurity, FieldSecurity._DESERIALIZER, "field_security"); + op.add(Builder::names, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "names"); + op.add(Builder::query, IndicesPrivilegesQuery._DESERIALIZER, "query"); + op.add(Builder::allowRestrictedIndices, JsonpDeserializer.booleanDeserializer(), "allow_restricted_indices"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateCrossClusterApiKeyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateCrossClusterApiKeyRequest.java new file mode 100644 index 000000000..348a0842f --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateCrossClusterApiKeyRequest.java @@ -0,0 +1,371 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.security; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.json.JsonData; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: security.update_cross_cluster_api_key.Request + +/** + * Update a cross-cluster API key. + *

+ * Update the attributes of an existing cross-cluster API key, which is used for + * API key based remote cluster access. + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateCrossClusterApiKeyRequest extends RequestBase implements JsonpSerializable { + private final Access access; + + @Nullable + private final Time expiration; + + private final String id; + + private final Map metadata; + + // --------------------------------------------------------------------------------------------- + + private UpdateCrossClusterApiKeyRequest(Builder builder) { + + this.access = ApiTypeHelper.requireNonNull(builder.access, this, "access"); + this.expiration = builder.expiration; + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); + + } + + public static UpdateCrossClusterApiKeyRequest of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The access to be granted to this API key. The access is composed + * of permissions for cross cluster search and cross cluster replication. At + * least one of them must be specified. When specified, the new access + * assignment fully replaces the previously assigned access. + *

+ * API name: {@code access} + */ + public final Access access() { + return this.access; + } + + /** + * Expiration time for the API key. By default, API keys never expire. This + * property can be omitted to leave the value unchanged. + *

+ * API name: {@code expiration} + */ + @Nullable + public final Time expiration() { + return this.expiration; + } + + /** + * Required - The ID of the cross-cluster API key to update. + *

+ * API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * Arbitrary metadata that you want to associate with the API key. It supports + * nested data structure. Within the metadata object, keys beginning with + * _ are reserved for system usage. When specified, this + * information fully replaces metadata previously associated with the API key. + *

+ * API name: {@code metadata} + */ + public final Map metadata() { + return this.metadata; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("access"); + this.access.serialize(generator, mapper); + + if (this.expiration != null) { + generator.writeKey("expiration"); + this.expiration.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.metadata)) { + generator.writeKey("metadata"); + generator.writeStartObject(); + for (Map.Entry item0 : this.metadata.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateCrossClusterApiKeyRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private Access access; + + @Nullable + private Time expiration; + + private String id; + + @Nullable + private Map metadata; + + /** + * Required - The access to be granted to this API key. The access is composed + * of permissions for cross cluster search and cross cluster replication. At + * least one of them must be specified. When specified, the new access + * assignment fully replaces the previously assigned access. + *

+ * API name: {@code access} + */ + public final Builder access(Access value) { + this.access = value; + return this; + } + + /** + * Required - The access to be granted to this API key. The access is composed + * of permissions for cross cluster search and cross cluster replication. At + * least one of them must be specified. When specified, the new access + * assignment fully replaces the previously assigned access. + *

+ * API name: {@code access} + */ + public final Builder access(Function> fn) { + return this.access(fn.apply(new Access.Builder()).build()); + } + + /** + * Expiration time for the API key. By default, API keys never expire. This + * property can be omitted to leave the value unchanged. + *

+ * API name: {@code expiration} + */ + public final Builder expiration(@Nullable Time value) { + this.expiration = value; + return this; + } + + /** + * Expiration time for the API key. By default, API keys never expire. This + * property can be omitted to leave the value unchanged. + *

+ * API name: {@code expiration} + */ + public final Builder expiration(Function> fn) { + return this.expiration(fn.apply(new Time.Builder()).build()); + } + + /** + * Required - The ID of the cross-cluster API key to update. + *

+ * API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + /** + * Arbitrary metadata that you want to associate with the API key. It supports + * nested data structure. Within the metadata object, keys beginning with + * _ are reserved for system usage. When specified, this + * information fully replaces metadata previously associated with the API key. + *

+ * API name: {@code metadata} + *

+ * Adds all entries of map to metadata. + */ + public final Builder metadata(Map map) { + this.metadata = _mapPutAll(this.metadata, map); + return this; + } + + /** + * Arbitrary metadata that you want to associate with the API key. It supports + * nested data structure. Within the metadata object, keys beginning with + * _ are reserved for system usage. When specified, this + * information fully replaces metadata previously associated with the API key. + *

+ * API name: {@code metadata} + *

+ * Adds an entry to metadata. + */ + public final Builder metadata(String key, JsonData value) { + this.metadata = _mapPut(this.metadata, key, value); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateCrossClusterApiKeyRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateCrossClusterApiKeyRequest build() { + _checkSingleUse(); + + return new UpdateCrossClusterApiKeyRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateCrossClusterApiKeyRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateCrossClusterApiKeyRequest::setupUpdateCrossClusterApiKeyRequestDeserializer); + + protected static void setupUpdateCrossClusterApiKeyRequestDeserializer( + ObjectDeserializer op) { + + op.add(Builder::access, Access._DESERIALIZER, "access"); + op.add(Builder::expiration, Time._DESERIALIZER, "expiration"); + op.add(Builder::metadata, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "metadata"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code security.update_cross_cluster_api_key}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/security.update_cross_cluster_api_key", + + // Request method + request -> { + return "PUT"; + + }, + + // Request path + request -> { + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_security"); + buf.append("/cross_cluster"); + buf.append("/api_key"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.id, buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _id = 1 << 0; + + int propsSet = 0; + + propsSet |= _id; + + if (propsSet == (_id)) { + params.put("id", request.id); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, UpdateCrossClusterApiKeyResponse._DESERIALIZER); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateCrossClusterApiKeyResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateCrossClusterApiKeyResponse.java new file mode 100644 index 000000000..c99ec7f5c --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/UpdateCrossClusterApiKeyResponse.java @@ -0,0 +1,163 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.security; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: security.update_cross_cluster_api_key.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class UpdateCrossClusterApiKeyResponse implements JsonpSerializable { + private final boolean updated; + + // --------------------------------------------------------------------------------------------- + + private UpdateCrossClusterApiKeyResponse(Builder builder) { + + this.updated = ApiTypeHelper.requireNonNull(builder.updated, this, "updated"); + + } + + public static UpdateCrossClusterApiKeyResponse of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - If true, the API key was updated. If + * false, the API key didn’t change because no change was detected. + *

+ * API name: {@code updated} + */ + public final boolean updated() { + return this.updated; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("updated"); + generator.write(this.updated); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link UpdateCrossClusterApiKeyResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Boolean updated; + + /** + * Required - If true, the API key was updated. If + * false, the API key didn’t change because no change was detected. + *

+ * API name: {@code updated} + */ + public final Builder updated(boolean value) { + this.updated = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link UpdateCrossClusterApiKeyResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public UpdateCrossClusterApiKeyResponse build() { + _checkSingleUse(); + + return new UpdateCrossClusterApiKeyResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link UpdateCrossClusterApiKeyResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, UpdateCrossClusterApiKeyResponse::setupUpdateCrossClusterApiKeyResponseDeserializer); + + protected static void setupUpdateCrossClusterApiKeyResponseDeserializer( + ObjectDeserializer op) { + + op.add(Builder::updated, JsonpDeserializer.booleanDeserializer(), "updated"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ListRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ListRequest.java index 1a2544985..c212aa37b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ListRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ListRequest.java @@ -79,7 +79,7 @@ public class ListRequest extends RequestBase { @Nullable private final Time masterTimeout; - private final List nodeId; + private final List nodes; @Nullable private final String parentTaskId; @@ -98,7 +98,7 @@ private ListRequest(Builder builder) { this.detailed = builder.detailed; this.groupBy = builder.groupBy; this.masterTimeout = builder.masterTimeout; - this.nodeId = ApiTypeHelper.unmodifiable(builder.nodeId); + this.nodes = ApiTypeHelper.unmodifiable(builder.nodes); this.parentTaskId = builder.parentTaskId; this.timeout = builder.timeout; this.waitForCompletion = builder.waitForCompletion; @@ -154,10 +154,10 @@ public final Time masterTimeout() { /** * Comma-separated list of node IDs or names used to limit returned information. *

- * API name: {@code node_id} + * API name: {@code nodes} */ - public final List nodeId() { - return this.nodeId; + public final List nodes() { + return this.nodes; } /** @@ -212,7 +212,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private Time masterTimeout; @Nullable - private List nodeId; + private List nodes; @Nullable private String parentTaskId; @@ -294,24 +294,24 @@ public final Builder masterTimeout(Function> f /** * Comma-separated list of node IDs or names used to limit returned information. *

- * API name: {@code node_id} + * API name: {@code nodes} *

- * Adds all elements of list to nodeId. + * Adds all elements of list to nodes. */ - public final Builder nodeId(List list) { - this.nodeId = _listAddAll(this.nodeId, list); + public final Builder nodes(List list) { + this.nodes = _listAddAll(this.nodes, list); return this; } /** * Comma-separated list of node IDs or names used to limit returned information. *

- * API name: {@code node_id} + * API name: {@code nodes} *

- * Adds one or more values to nodeId. + * Adds one or more values to nodes. */ - public final Builder nodeId(String value, String... values) { - this.nodeId = _listAdd(this.nodeId, value, values); + public final Builder nodes(String value, String... values) { + this.nodes = _listAdd(this.nodes, value, values); return this; } @@ -406,6 +406,9 @@ public ListRequest build() { if (request.masterTimeout != null) { params.put("master_timeout", request.masterTimeout._toJsonString()); } + if (ApiTypeHelper.isDefined(request.nodes)) { + params.put("nodes", request.nodes.stream().map(v -> v).collect(Collectors.joining(","))); + } if (request.parentTaskId != null) { params.put("parent_task_id", request.parentTaskId); } @@ -424,9 +427,6 @@ public ListRequest build() { if (request.timeout != null) { params.put("timeout", request.timeout._toJsonString()); } - if (ApiTypeHelper.isDefined(request.nodeId)) { - params.put("node_id", request.nodeId.stream().map(v -> v).collect(Collectors.joining(","))); - } return params; }, SimpleEndpoint.emptyMap(), false, ListResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/xpack/info/Features.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/xpack/info/Features.java index 8e1562695..c13fe9212 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/xpack/info/Features.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/xpack/info/Features.java @@ -84,6 +84,8 @@ public class Features implements JsonpSerializable { private final Feature logstash; + private final Feature logsdb; + private final Feature ml; private final Feature monitoring; @@ -130,6 +132,7 @@ private Features(Builder builder) { this.graph = ApiTypeHelper.requireNonNull(builder.graph, this, "graph"); this.ilm = ApiTypeHelper.requireNonNull(builder.ilm, this, "ilm"); this.logstash = ApiTypeHelper.requireNonNull(builder.logstash, this, "logstash"); + this.logsdb = ApiTypeHelper.requireNonNull(builder.logsdb, this, "logsdb"); this.ml = ApiTypeHelper.requireNonNull(builder.ml, this, "ml"); this.monitoring = ApiTypeHelper.requireNonNull(builder.monitoring, this, "monitoring"); this.rollup = ApiTypeHelper.requireNonNull(builder.rollup, this, "rollup"); @@ -243,6 +246,13 @@ public final Feature logstash() { return this.logstash; } + /** + * Required - API name: {@code logsdb} + */ + public final Feature logsdb() { + return this.logsdb; + } + /** * Required - API name: {@code ml} */ @@ -392,6 +402,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("logstash"); this.logstash.serialize(generator, mapper); + generator.writeKey("logsdb"); + this.logsdb.serialize(generator, mapper); + generator.writeKey("ml"); this.ml.serialize(generator, mapper); @@ -476,6 +489,8 @@ public static class Builder extends WithJsonObjectBuilderBase implement private Feature logstash; + private Feature logsdb; + private Feature ml; private Feature monitoring; @@ -700,6 +715,21 @@ public final Builder logstash(Function> return this.logstash(fn.apply(new Feature.Builder()).build()); } + /** + * Required - API name: {@code logsdb} + */ + public final Builder logsdb(Feature value) { + this.logsdb = value; + return this; + } + + /** + * Required - API name: {@code logsdb} + */ + public final Builder logsdb(Function> fn) { + return this.logsdb(fn.apply(new Feature.Builder()).build()); + } + /** * Required - API name: {@code ml} */ @@ -951,6 +981,7 @@ protected static void setupFeaturesDeserializer(ObjectDeserializer