From 3c3db684993d1096b00b66d571a98c9331c955da Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Tue, 19 Nov 2024 14:02:46 +0100 Subject: [PATCH] [codegen] update to latest spec --- .../ElasticsearchAsyncClient.java | 369 ++++++++++++---- .../elasticsearch/ElasticsearchClient.java | 369 ++++++++++++---- .../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 | 9 +- .../autoscaling/AutoscalingPolicy.java | 6 +- .../DeleteAutoscalingPolicyRequest.java | 7 +- .../ElasticsearchAutoscalingAsyncClient.java | 65 ++- .../ElasticsearchAutoscalingClient.java | 65 ++- .../GetAutoscalingCapacityRequest.java | 23 +- .../GetAutoscalingPolicyRequest.java | 7 +- .../PutAutoscalingPolicyRequest.java | 7 +- .../core/ClearScrollRequest.java | 4 +- .../core/ClosePointInTimeRequest.java | 9 +- .../core/DeleteByQueryRethrottleRequest.java | 8 +- .../elasticsearch/core/FieldCapsRequest.java | 13 +- .../elasticsearch/core/KnnSearchRequest.java | 20 +- .../elasticsearch/core/MgetRequest.java | 7 +- .../core/MsearchTemplateRequest.java | 2 +- .../core/MtermvectorsRequest.java | 8 +- .../core/OpenPointInTimeRequest.java | 12 +- .../elasticsearch/core/RankEvalRequest.java | 6 +- .../core/ReindexRethrottleRequest.java | 4 +- .../core/RenderSearchTemplateRequest.java | 4 +- .../elasticsearch/core/SearchMvtRequest.java | 4 +- .../elasticsearch/core/SearchRequest.java | 8 +- .../core/SearchShardsRequest.java | 8 +- .../core/SearchTemplateRequest.java | 2 +- .../core/TermvectorsRequest.java | 6 +- .../core/UpdateByQueryRethrottleRequest.java | 8 +- .../elasticsearch/doc-files/api-spec.html | 244 ++++++----- .../indices/ExistsAliasRequest.java | 6 + .../indices/GetAliasRequest.java | 6 + .../elasticsearch/indices/IndexTemplate.java | 90 ++++ .../ingest/IpLocationProcessor.java | 394 ++++++++++++++++++ .../elasticsearch/ingest/Processor.java | 31 ++ .../ingest/ProcessorBuilders.java | 18 + .../migration/DeprecationsResponse.java | 53 +++ .../elasticsearch/security/Access.java | 253 +++++++++++ .../security/ClusterPrivilege.java | 2 + .../CreateCrossClusterApiKeyRequest.java | 377 +++++++++++++++++ .../CreateCrossClusterApiKeyResponse.java | 284 +++++++++++++ .../ElasticsearchSecurityAsyncClient.java | 126 ++++++ .../security/ElasticsearchSecurityClient.java | 128 ++++++ .../GetBuiltinPrivilegesResponse.java | 43 ++ .../security/PutRoleRequest.java | 63 +++ .../security/RemoteClusterPrivilege.java | 67 +++ .../security/RemoteClusterPrivileges.java | 242 +++++++++++ .../security/RemoteIndicesPrivileges.java | 3 +- .../security/ReplicationAccess.java | 220 ++++++++++ .../elasticsearch/security/Restriction.java | 175 ++++++++ .../security/RestrictionWorkflow.java | 65 +++ .../security/RoleDescriptor.java | 172 ++++++++ .../security/RoleDescriptorRead.java | 172 ++++++++ .../elasticsearch/security/SearchAccess.java | 317 ++++++++++++++ .../UpdateCrossClusterApiKeyRequest.java | 371 +++++++++++++++++ .../UpdateCrossClusterApiKeyResponse.java | 163 ++++++++ .../elasticsearch/security/get_role/Role.java | 113 +++++ .../elasticsearch/tasks/ListRequest.java | 34 +- .../elasticsearch/xpack/info/Features.java | 31 ++ 69 files changed, 5819 insertions(+), 534 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/RemoteClusterPrivilege.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/security/RemoteClusterPrivileges.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/Restriction.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/security/RestrictionWorkflow.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 6eb25e209..ae1af29d3 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 @@ -631,8 +651,12 @@ public final CompletableFuture deleteByQuery( // ----- Endpoint: delete_by_query_rethrottle /** - * Changes the number of requests per second for a particular Delete By Query - * operation. + * Throttle a delete by query operation. + *

+ * Change the number of requests per second for a particular delete by query + * operation. Rethrottling that speeds up the query takes effect immediately but + * rethrotting that slows down the query takes effect after completing the + * current batch to prevent scroll timeouts. * * @see Documentation @@ -648,8 +672,12 @@ public CompletableFuture deleteByQueryRethrottl } /** - * Changes the number of requests per second for a particular Delete By Query - * operation. + * Throttle a delete by query operation. + *

+ * Change the number of requests per second for a particular delete by query + * operation. Rethrottling that speeds up the query takes effect immediately but + * rethrotting that slows down the query takes effect after completing the + * current batch to prevent scroll timeouts. * * @param fn * a function that initializes a builder to create the @@ -844,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 @@ -863,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 @@ -883,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 @@ -1210,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 @@ -1229,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 @@ -1245,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 @@ -1264,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 @@ -1282,7 +1379,12 @@ public final CompletableFuture> knnSear // ----- Endpoint: mget /** - * Allows to get multiple documents in one request. + * Get multiple documents. + *

+ * Get multiple JSON documents by ID from one or more indices. If you specify an + * index in the request URI, you only need to specify the document IDs in the + * request body. To ensure fast responses, this multi get (mget) API responds + * with partial results if one or more shards fail. * * @see Documentation @@ -1300,7 +1402,12 @@ public CompletableFuture> mget(MgetRequest r } /** - * Allows to get multiple documents in one request. + * Get multiple documents. + *

+ * Get multiple JSON documents by ID from one or more indices. If you specify an + * index in the request URI, you only need to specify the document IDs in the + * request body. To ensure fast responses, this multi get (mget) API responds + * with partial results if one or more shards fail. * * @param fn * a function that initializes a builder to create the @@ -1316,7 +1423,12 @@ public final CompletableFuture> mget( } /** - * Allows to get multiple documents in one request. + * Get multiple documents. + *

+ * Get multiple JSON documents by ID from one or more indices. If you specify an + * index in the request URI, you only need to specify the document IDs in the + * request body. To ensure fast responses, this multi get (mget) API responds + * with partial results if one or more shards fail. * * @see Documentation @@ -1333,7 +1445,12 @@ public CompletableFuture> mget(MgetRequest r } /** - * Allows to get multiple documents in one request. + * Get multiple documents. + *

+ * Get multiple JSON documents by ID from one or more indices. If you specify an + * index in the request URI, you only need to specify the document IDs in the + * request body. To ensure fast responses, this multi get (mget) API responds + * with partial results if one or more shards fail. * * @param fn * a function that initializes a builder to create the @@ -1501,7 +1618,7 @@ public final CompletableFuture> msearch( // ----- Endpoint: msearch_template /** - * Runs multiple templated searches with a single request. + * Run multiple templated searches. * * @see Documentation @@ -1520,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 @@ -1537,7 +1654,7 @@ public final CompletableFuture> m } /** - * Runs multiple templated searches with a single request. + * Run multiple templated searches. * * @see Documentation @@ -1556,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 @@ -1574,7 +1691,13 @@ public final CompletableFuture> m // ----- Endpoint: mtermvectors /** - * Returns multiple termvectors in one request. + * Get multiple term vectors. + *

+ * You can specify existing documents by index and ID or provide artificial + * documents in the body of the request. You can specify the index in the + * request body or request URI. The response contains a docs array + * with all the fetched termvectors. Each element has the structure provided by + * the termvectors API. * * @see Documentation @@ -1589,7 +1712,13 @@ public CompletableFuture mtermvectors(MtermvectorsRequest } /** - * Returns multiple termvectors in one request. + * Get multiple term vectors. + *

+ * You can specify existing documents by index and ID or provide artificial + * documents in the body of the request. You can specify the index in the + * request body or request URI. The response contains a docs array + * with all the fetched termvectors. Each element has the structure provided by + * the termvectors API. * * @param fn * a function that initializes a builder to create the @@ -1605,7 +1734,13 @@ public final CompletableFuture mtermvectors( } /** - * Returns multiple termvectors in one request. + * Get multiple term vectors. + *

+ * You can specify existing documents by index and ID or provide artificial + * documents in the body of the request. You can specify the index in the + * request body or request URI. The response contains a docs array + * with all the fetched termvectors. Each element has the structure provided by + * the termvectors API. * * @see Documentation @@ -1620,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 @@ -1642,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 @@ -1715,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 @@ -1731,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 @@ -1789,7 +1940,9 @@ public final CompletableFuture reindex( // ----- Endpoint: reindex_rethrottle /** - * Copies documents from a source to a destination. + * Throttle a reindex operation. + *

+ * Change the number of requests per second for a particular reindex operation. * * @see Documentation @@ -1804,7 +1957,9 @@ public CompletableFuture reindexRethrottle(ReindexRet } /** - * Copies documents from a source to a destination. + * Throttle a reindex operation. + *

+ * Change the number of requests per second for a particular reindex operation. * * @param fn * a function that initializes a builder to create the @@ -1822,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 @@ -1837,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 @@ -1853,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 @@ -2099,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 @@ -2119,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 @@ -2137,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 @@ -2156,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 @@ -2176,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 @@ -2191,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 @@ -2209,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 @@ -2225,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 @@ -2242,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 @@ -2258,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 @@ -2277,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 @@ -2294,7 +2479,7 @@ public final CompletableFuture> se } /** - * Runs a search with a search template. + * Run a search with a search template. * * @see Documentation @@ -2313,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 @@ -2390,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 @@ -2406,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 @@ -2540,8 +2729,12 @@ public final CompletableFuture updateByQuery( // ----- Endpoint: update_by_query_rethrottle /** - * Changes the number of requests per second for a particular Update By Query - * operation. + * Throttle an update by query operation. + *

+ * Change the number of requests per second for a particular update by query + * operation. Rethrottling that speeds up the query takes effect immediately but + * rethrotting that slows down the query takes effect after completing the + * current batch to prevent scroll timeouts. * * @see Documentation @@ -2557,8 +2750,12 @@ public CompletableFuture updateByQueryRethrottl } /** - * Changes the number of requests per second for a particular Update By Query - * operation. + * Throttle an update by query operation. + *

+ * Change the number of requests per second for a particular update by query + * operation. Rethrottling that speeds up the query takes effect immediately but + * rethrotting that slows down the query takes effect after completing the + * current batch to prevent scroll timeouts. * * @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 d3db882c1..de7780d8c 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 @@ -640,8 +660,12 @@ public final DeleteByQueryResponse deleteByQuery( // ----- Endpoint: delete_by_query_rethrottle /** - * Changes the number of requests per second for a particular Delete By Query - * operation. + * Throttle a delete by query operation. + *

+ * Change the number of requests per second for a particular delete by query + * operation. Rethrottling that speeds up the query takes effect immediately but + * rethrotting that slows down the query takes effect after completing the + * current batch to prevent scroll timeouts. * * @see Documentation @@ -657,8 +681,12 @@ public DeleteByQueryRethrottleResponse deleteByQueryRethrottle(DeleteByQueryReth } /** - * Changes the number of requests per second for a particular Delete By Query - * operation. + * Throttle a delete by query operation. + *

+ * Change the number of requests per second for a particular delete by query + * operation. Rethrottling that speeds up the query takes effect immediately but + * rethrotting that slows down the query takes effect after completing the + * current batch to prevent scroll timeouts. * * @param fn * a function that initializes a builder to create the @@ -858,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 @@ -877,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 @@ -897,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 @@ -1229,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 @@ -1248,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 @@ -1265,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 @@ -1284,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 @@ -1303,7 +1400,12 @@ public final KnnSearchResponse knnSearch( // ----- Endpoint: mget /** - * Allows to get multiple documents in one request. + * Get multiple documents. + *

+ * Get multiple JSON documents by ID from one or more indices. If you specify an + * index in the request URI, you only need to specify the document IDs in the + * request body. To ensure fast responses, this multi get (mget) API responds + * with partial results if one or more shards fail. * * @see Documentation @@ -1321,7 +1423,12 @@ public MgetResponse mget(MgetRequest request, Class + * Get multiple JSON documents by ID from one or more indices. If you specify an + * index in the request URI, you only need to specify the document IDs in the + * request body. To ensure fast responses, this multi get (mget) API responds + * with partial results if one or more shards fail. * * @param fn * a function that initializes a builder to create the @@ -1337,7 +1444,12 @@ public final MgetResponse mget(Function + * Get multiple JSON documents by ID from one or more indices. If you specify an + * index in the request URI, you only need to specify the document IDs in the + * request body. To ensure fast responses, this multi get (mget) API responds + * with partial results if one or more shards fail. * * @see Documentation @@ -1355,7 +1467,12 @@ public MgetResponse mget(MgetRequest request, Type tDocum } /** - * Allows to get multiple documents in one request. + * Get multiple documents. + *

+ * Get multiple JSON documents by ID from one or more indices. If you specify an + * index in the request URI, you only need to specify the document IDs in the + * request body. To ensure fast responses, this multi get (mget) API responds + * with partial results if one or more shards fail. * * @param fn * a function that initializes a builder to create the @@ -1525,7 +1642,7 @@ public final MsearchResponse msearch( // ----- Endpoint: msearch_template /** - * Runs multiple templated searches with a single request. + * Run multiple templated searches. * * @see Documentation @@ -1544,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 @@ -1561,7 +1678,7 @@ public final MsearchTemplateResponse msearchTemplate( } /** - * Runs multiple templated searches with a single request. + * Run multiple templated searches. * * @see Documentation @@ -1580,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 @@ -1599,7 +1716,13 @@ public final MsearchTemplateResponse msearchTemplate( // ----- Endpoint: mtermvectors /** - * Returns multiple termvectors in one request. + * Get multiple term vectors. + *

+ * You can specify existing documents by index and ID or provide artificial + * documents in the body of the request. You can specify the index in the + * request body or request URI. The response contains a docs array + * with all the fetched termvectors. Each element has the structure provided by + * the termvectors API. * * @see Documentation @@ -1614,7 +1737,13 @@ public MtermvectorsResponse mtermvectors(MtermvectorsRequest request) throws IOE } /** - * Returns multiple termvectors in one request. + * Get multiple term vectors. + *

+ * You can specify existing documents by index and ID or provide artificial + * documents in the body of the request. You can specify the index in the + * request body or request URI. The response contains a docs array + * with all the fetched termvectors. Each element has the structure provided by + * the termvectors API. * * @param fn * a function that initializes a builder to create the @@ -1631,7 +1760,13 @@ public final MtermvectorsResponse mtermvectors( } /** - * Returns multiple termvectors in one request. + * Get multiple term vectors. + *

+ * You can specify existing documents by index and ID or provide artificial + * documents in the body of the request. You can specify the index in the + * request body or request URI. The response contains a docs array + * with all the fetched termvectors. Each element has the structure provided by + * the termvectors API. * * @see Documentation @@ -1646,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 @@ -1669,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 @@ -1743,8 +1890,10 @@ public final PutScriptResponse putScript(Function + * Evaluate the quality of ranked search results over a set of typical search + * queries. * * @see Documentation @@ -1759,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 @@ -1817,7 +1968,9 @@ public final ReindexResponse reindex(Function + * Change the number of requests per second for a particular reindex operation. * * @see Documentation @@ -1833,7 +1986,9 @@ public ReindexRethrottleResponse reindexRethrottle(ReindexRethrottleRequest requ } /** - * Copies documents from a source to a destination. + * Throttle a reindex operation. + *

+ * Change the number of requests per second for a particular reindex operation. * * @param fn * a function that initializes a builder to create the @@ -1852,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 @@ -1868,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 @@ -1885,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 @@ -2135,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 @@ -2155,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 @@ -2174,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 @@ -2194,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 @@ -2215,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 @@ -2230,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 @@ -2248,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 @@ -2264,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 @@ -2282,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 @@ -2298,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 @@ -2317,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 @@ -2334,7 +2519,7 @@ public final SearchTemplateResponse searchTemplate( } /** - * Runs a search with a search template. + * Run a search with a search template. * * @see Documentation @@ -2353,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 @@ -2431,8 +2616,10 @@ public final TermsEnumResponse termsEnum(Function + * Get information and statistics about terms in the fields of a particular + * document. * * @see Documentation @@ -2448,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 @@ -2587,8 +2776,12 @@ public final UpdateByQueryResponse updateByQuery( // ----- Endpoint: update_by_query_rethrottle /** - * Changes the number of requests per second for a particular Update By Query - * operation. + * Throttle an update by query operation. + *

+ * Change the number of requests per second for a particular update by query + * operation. Rethrottling that speeds up the query takes effect immediately but + * rethrotting that slows down the query takes effect after completing the + * current batch to prevent scroll timeouts. * * @see Documentation @@ -2604,8 +2797,12 @@ public UpdateByQueryRethrottleResponse updateByQueryRethrottle(UpdateByQueryReth } /** - * Changes the number of requests per second for a particular Update By Query - * operation. + * Throttle an update by query operation. + *

+ * Change the number of requests per second for a particular update by query + * operation. Rethrottling that speeds up the query takes effect immediately but + * rethrotting that slows down the query takes effect after completing the + * current batch to prevent scroll timeouts. * * @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 f287f6d1e..b192aa23e 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 f3dcedba5..d942b5817 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..e69c4bc97 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. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/AutoscalingPolicy.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/AutoscalingPolicy.java index c9666e558..dabcc0372 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/AutoscalingPolicy.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/AutoscalingPolicy.java @@ -88,7 +88,7 @@ public final List 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 b867de1b2..bbf384e4c 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 9b91ac82f..c51dfcf81 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/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/DeleteByQueryRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java index 30291fc23..25a44a666 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java @@ -56,8 +56,12 @@ // typedef: _global.delete_by_query_rethrottle.Request /** - * Changes the number of requests per second for a particular Delete By Query - * operation. + * Throttle a delete by query operation. + *

+ * Change the number of requests per second for a particular delete by query + * operation. Rethrottling that speeds up the query takes effect immediately but + * rethrotting that slows down the query takes effect after completing the + * current batch to prevent scroll timeouts. * * @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/MgetRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MgetRequest.java index d220b257d..28297fcd9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MgetRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MgetRequest.java @@ -62,7 +62,12 @@ // typedef: _global.mget.Request /** - * Allows to get multiple documents in one request. + * Get multiple documents. + *

+ * Get multiple JSON documents by ID from one or more indices. If you specify an + * index in the request URI, you only need to specify the document IDs in the + * request body. To ensure fast responses, this multi get (mget) API responds + * with partial results if one or more shards fail. * * @see API * specification 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/MtermvectorsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java index 3c07cebd5..948d2bd0e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MtermvectorsRequest.java @@ -63,7 +63,13 @@ // typedef: _global.mtermvectors.Request /** - * Returns multiple termvectors in one request. + * Get multiple term vectors. + *

+ * You can specify existing documents by index and ID or provide artificial + * documents in the body of the request. You can specify the index in the + * request body or request URI. The response contains a docs array + * with all the fetched termvectors. Each element has the structure provided by + * the termvectors API. * * @see API * specification 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/ReindexRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java index d8148aa03..24a60f706 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java @@ -56,7 +56,9 @@ // typedef: _global.reindex_rethrottle.Request /** - * Copies documents from a source to a destination. + * Throttle a reindex operation. + *

+ * Change the number of requests per second for a particular reindex operation. * * @see API 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..f03adcb03 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 diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java index 7e57b903c..066dfb325 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java @@ -59,8 +59,12 @@ // typedef: _global.search_shards.Request /** - * 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 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/core/UpdateByQueryRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java index e7a920fe3..b6ee9aba7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java @@ -56,8 +56,12 @@ // typedef: _global.update_by_query_rethrottle.Request /** - * Changes the number of requests per second for a particular Update By Query - * operation. + * Throttle an update by query operation. + *

+ * Change the number of requests per second for a particular update by query + * operation. Rethrottling that speeds up the query takes effect immediately but + * rethrotting that slows down the query takes effect after completing the + * current batch to prevent scroll timeouts. * * @see API 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 f4310f236..c65f32484 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', @@ -28,7 +28,7 @@ '_global.delete.Response': '_global/delete/DeleteResponse.ts#L22-L34', '_global.delete_by_query.Request': '_global/delete_by_query/DeleteByQueryRequest.ts#L36-L211', '_global.delete_by_query.Response': '_global/delete_by_query/DeleteByQueryResponse.ts#L26-L45', -'_global.delete_by_query_rethrottle.Request': '_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts#L24-L42', +'_global.delete_by_query_rethrottle.Request': '_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts#L24-L47', '_global.delete_by_query_rethrottle.Response': '_global/delete_by_query_rethrottle/DeleteByQueryRethrottleResponse.ts#L22-L24', '_global.delete_script.Request': '_global/delete_script/DeleteScriptRequest.ts#L24-L53', '_global.delete_script.Response': '_global/delete_script/DeleteScriptResponse.ts#L22-L24', @@ -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,12 +91,12 @@ '_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', '_global.mget.Operation': '_global/mget/types.ts#L32-L55', -'_global.mget.Request': '_global/mget/MultiGetRequest.ts#L25-L98', +'_global.mget.Request': '_global/mget/MultiGetRequest.ts#L25-L104', '_global.mget.Response': '_global/mget/MultiGetResponse.ts#L22-L26', '_global.mget.ResponseItem': '_global/mget/types.ts#L57-L60', '_global.msearch.MultiSearchItem': '_global/msearch/types.ts#L216-L219', @@ -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-L109', +'_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', @@ -143,16 +143,16 @@ '_global.reindex_rethrottle.ReindexNode': '_global/reindex_rethrottle/types.ts#L33-L35', '_global.reindex_rethrottle.ReindexStatus': '_global/reindex_rethrottle/types.ts#L37-L85', '_global.reindex_rethrottle.ReindexTask': '_global/reindex_rethrottle/types.ts#L87-L98', -'_global.reindex_rethrottle.Request': '_global/reindex_rethrottle/ReindexRethrottleRequest.ts#L24-L44', +'_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#L54-L531', '_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', @@ -253,7 +253,7 @@ '_global.update.UpdateWriteResponseBase': '_global/update/UpdateResponse.ts#L23-L25', '_global.update_by_query.Request': '_global/update_by_query/UpdateByQueryRequest.ts#L37-L227', '_global.update_by_query.Response': '_global/update_by_query/UpdateByQueryResponse.ts#L26-L45', -'_global.update_by_query_rethrottle.Request': '_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts#L24-L43', +'_global.update_by_query_rethrottle.Request': '_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts#L24-L48', '_global.update_by_query_rethrottle.Response': '_global/update_by_query_rethrottle/UpdateByQueryRethrottleResponse.ts#L23-L25', '_global.update_by_query_rethrottle.UpdateByQueryRethrottleNode': '_global/update_by_query_rethrottle/UpdateByQueryRethrottleNode.ts#L25-L27', '_spec_utils.BaseNode': '_spec_utils/BaseNode.ts#L25-L32', @@ -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', @@ -985,28 +987,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#L55-L290', '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', @@ -1434,9 +1436,9 @@ 'indices._types.IndexSettingsLifecycleStep': 'indices/_types/IndexSettings.ts#L311-L317', 'indices._types.IndexSettingsTimeSeries': 'indices/_types/IndexSettings.ts#L327-L330', 'indices._types.IndexState': 'indices/_types/IndexState.ts#L27-L40', -'indices._types.IndexTemplate': 'indices/_types/IndexTemplate.ts#L28-L67', -'indices._types.IndexTemplateDataStreamConfiguration': 'indices/_types/IndexTemplate.ts#L69-L80', -'indices._types.IndexTemplateSummary': 'indices/_types/IndexTemplate.ts#L82-L104', +'indices._types.IndexTemplate': 'indices/_types/IndexTemplate.ts#L28-L81', +'indices._types.IndexTemplateDataStreamConfiguration': 'indices/_types/IndexTemplate.ts#L83-L94', +'indices._types.IndexTemplateSummary': 'indices/_types/IndexTemplate.ts#L96-L118', 'indices._types.IndexVersioning': 'indices/_types/IndexSettings.ts#L271-L274', 'indices._types.IndexingPressure': 'indices/_types/IndexSettings.ts#L550-L552', 'indices._types.IndexingPressureMemory': 'indices/_types/IndexSettings.ts#L554-L561', @@ -1527,7 +1529,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-L69', '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', @@ -1550,7 +1552,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-L72', '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', @@ -1693,65 +1695,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', @@ -1809,7 +1812,7 @@ 'migration.deprecations.Deprecation': 'migration/deprecations/types.ts#L29-L35', 'migration.deprecations.DeprecationLevel': 'migration/deprecations/types.ts#L20-L27', 'migration.deprecations.Request': 'migration/deprecations/DeprecationInfoRequest.ts#L23-L32', -'migration.deprecations.Response': 'migration/deprecations/DeprecationInfoResponse.ts#L23-L30', +'migration.deprecations.Response': 'migration/deprecations/DeprecationInfoResponse.ts#L23-L31', 'migration.get_feature_upgrade_status.MigrationFeature': 'migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L37-L42', 'migration.get_feature_upgrade_status.MigrationFeatureIndexInfo': 'migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L44-L48', 'migration.get_feature_upgrade_status.MigrationStatus': 'migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L30-L35', @@ -2385,34 +2388,41 @@ '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.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L408-L410', 'security._types.ApplicationPrivileges': 'security/_types/Privileges.ts#L27-L40', 'security._types.BulkError': 'security/_types/Bulk.ts#L24-L33', 'security._types.ClusterNode': 'security/_types/ClusterNode.ts#L22-L24', -'security._types.ClusterPrivilege': 'security/_types/Privileges.ts#L42-L195', +'security._types.ClusterPrivilege': 'security/_types/Privileges.ts#L42-L199', 'security._types.CreatedStatus': 'security/_types/CreatedStatus.ts#L20-L22', 'security._types.FieldRule': 'security/_types/RoleMappingRule.ts#L35-L43', 'security._types.FieldSecurity': 'security/_types/FieldSecurity.ts#L22-L25', -'security._types.GlobalPrivilege': 'security/_types/Privileges.ts#L368-L370', +'security._types.GlobalPrivilege': 'security/_types/Privileges.ts#L404-L406', 'security._types.GrantType': 'security/_types/GrantType.ts#L20-L29', -'security._types.IndexPrivilege': 'security/_types/Privileges.ts#L324-L366', -'security._types.IndicesPrivileges': 'security/_types/Privileges.ts#L198-L222', -'security._types.IndicesPrivilegesQuery': 'security/_types/Privileges.ts#L279-L287', -'security._types.ManageUserPrivileges': 'security/_types/Privileges.ts#L376-L378', +'security._types.IndexPrivilege': 'security/_types/Privileges.ts#L360-L402', +'security._types.IndicesPrivileges': 'security/_types/Privileges.ts#L217-L241', +'security._types.IndicesPrivilegesQuery': 'security/_types/Privileges.ts#L315-L323', +'security._types.ManageUserPrivileges': 'security/_types/Privileges.ts#L412-L414', 'security._types.RealmInfo': 'security/_types/RealmInfo.ts#L22-L25', -'security._types.RemoteIndicesPrivileges': 'security/_types/Privileges.ts#L225-L253', -'security._types.RoleDescriptor': 'security/_types/RoleDescriptor.ts#L31-L64', -'security._types.RoleDescriptorRead': 'security/_types/RoleDescriptor.ts#L66-L98', +'security._types.RemoteClusterPrivilege': 'security/_types/Privileges.ts#L201-L214', +'security._types.RemoteClusterPrivileges': 'security/_types/Privileges.ts#L277-L289', +'security._types.RemoteIndicesPrivileges': 'security/_types/Privileges.ts#L243-L275', +'security._types.ReplicationAccess': 'security/_types/Privileges.ts#L416-L426', +'security._types.Restriction': 'security/_types/RoleDescriptor.ts#L130-L132', +'security._types.RestrictionWorkflow': 'security/_types/RoleDescriptor.ts#L134-L137', +'security._types.RoleDescriptor': 'security/_types/RoleDescriptor.ts#L33-L80', +'security._types.RoleDescriptorRead': 'security/_types/RoleDescriptor.ts#L82-L128', 'security._types.RoleMapping': 'security/_types/RoleMapping.ts#L25-L33', 'security._types.RoleMappingRule': 'security/_types/RoleMappingRule.ts#L22-L33', 'security._types.RoleTemplate': 'security/_types/RoleTemplate.ts#L28-L31', -'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.RoleTemplateInlineQuery': 'security/_types/Privileges.ts#L357-L358', +'security._types.RoleTemplateQuery': 'security/_types/Privileges.ts#L325-L335', +'security._types.RoleTemplateScript': 'security/_types/Privileges.ts#L337-L355', +'security._types.SearchAccess': 'security/_types/Privileges.ts#L428-L448', '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', +'security._types.UserIndicesPrivileges': 'security/_types/Privileges.ts#L291-L313', 'security._types.UserProfile': 'security/_types/UserProfile.ts#L41-L47', 'security._types.UserProfileHitMetadata': 'security/_types/UserProfile.ts#L27-L30', 'security._types.UserProfileUser': 'security/_types/UserProfile.ts#L32-L39', @@ -2440,6 +2450,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', @@ -2470,12 +2482,12 @@ 'security.get_api_key.Request': 'security/get_api_key/SecurityGetApiKeyRequest.ts#L23-L88', 'security.get_api_key.Response': 'security/get_api_key/SecurityGetApiKeyResponse.ts#L22-L24', 'security.get_builtin_privileges.Request': 'security/get_builtin_privileges/SecurityGetBuiltinPrivilegesRequest.ts#L22-L32', -'security.get_builtin_privileges.Response': 'security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L22-L24', +'security.get_builtin_privileges.Response': 'security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L26-L32', 'security.get_privileges.Request': 'security/get_privileges/SecurityGetPrivilegesRequest.ts#L23-L35', 'security.get_privileges.Response': 'security/get_privileges/SecurityGetPrivilegesResponse.ts#L23-L26', 'security.get_role.Request': 'security/get_role/SecurityGetRoleRequest.ts#L23-L41', 'security.get_role.Response': 'security/get_role/SecurityGetRoleResponse.ts#L23-L26', -'security.get_role.Role': 'security/get_role/types.ts#L29-L42', +'security.get_role.Role': 'security/get_role/types.ts#L32-L53', 'security.get_role_mapping.Request': 'security/get_role_mapping/SecurityGetRoleMappingRequest.ts#L23-L42', 'security.get_role_mapping.Response': 'security/get_role_mapping/SecurityGetRoleMappingResponse.ts#L23-L26', 'security.get_service_accounts.Request': 'security/get_service_accounts/GetServiceAccountsRequest.ts#L23-L44', @@ -2517,7 +2529,7 @@ 'security.put_privileges.Actions': 'security/put_privileges/types.ts#L22-L27', 'security.put_privileges.Request': 'security/put_privileges/SecurityPutPrivilegesRequest.ts#L25-L38', 'security.put_privileges.Response': 'security/put_privileges/SecurityPutPrivilegesResponse.ts#L23-L26', -'security.put_role.Request': 'security/put_role/SecurityPutRoleRequest.ts#L31-L95', +'security.put_role.Request': 'security/put_role/SecurityPutRoleRequest.ts#L32-L102', 'security.put_role.Response': 'security/put_role/SecurityPutRoleResponse.ts#L22-L24', 'security.put_role_mapping.Request': 'security/put_role_mapping/SecurityPutRoleMappingRequest.ts#L25-L56', 'security.put_role_mapping.Response': 'security/put_role_mapping/SecurityPutRoleMappingResponse.ts#L22-L24', @@ -2554,6 +2566,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', @@ -2862,8 +2876,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', @@ -2940,10 +2954,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/c324fbab4644a938ec8b8c420dbe219ab2b44348/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/879785d054b9922350ada689427fb5659ce251c6/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/indices/ExistsAliasRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java index b86cd677b..9a441a4f8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java @@ -154,7 +154,10 @@ public final List index() { * only. *

* API name: {@code local} + * + * @deprecated 8.12.0 */ + @Deprecated @Nullable public final Boolean local() { return this.local; @@ -287,7 +290,10 @@ public final Builder index(String value, String... values) { * only. *

* API name: {@code local} + * + * @deprecated 8.12.0 */ + @Deprecated public final Builder local(@Nullable Boolean value) { this.local = value; return this; 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..d8d19b1c5 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 @@ -153,7 +153,10 @@ public final List index() { * only. *

* API name: {@code local} + * + * @deprecated 8.12.0 */ + @Deprecated @Nullable public final Boolean local() { return this.local; @@ -286,7 +289,10 @@ public final Builder index(String value, String... values) { * only. *

* API name: {@code local} + * + * @deprecated 8.12.0 */ + @Deprecated public final Builder local(@Nullable Boolean value) { this.local = value; return this; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexTemplate.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexTemplate.java index 638061f29..ce5ab90a0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexTemplate.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndexTemplate.java @@ -85,6 +85,11 @@ public class IndexTemplate implements JsonpSerializable { @Nullable private final IndexTemplateDataStreamConfiguration dataStream; + @Nullable + private final Boolean deprecated; + + private final List ignoreMissingComponentTemplates; + // --------------------------------------------------------------------------------------------- private IndexTemplate(Builder builder) { @@ -97,6 +102,8 @@ private IndexTemplate(Builder builder) { this.meta = ApiTypeHelper.unmodifiable(builder.meta); this.allowAutoCreate = builder.allowAutoCreate; this.dataStream = builder.dataStream; + this.deprecated = builder.deprecated; + this.ignoreMissingComponentTemplates = ApiTypeHelper.unmodifiable(builder.ignoreMissingComponentTemplates); } @@ -190,6 +197,27 @@ public final IndexTemplateDataStreamConfiguration dataStream() { return this.dataStream; } + /** + * Marks this index template as deprecated. When creating or updating a + * non-deprecated index template that uses deprecated components, Elasticsearch + * will emit a deprecation warning. + *

+ * API name: {@code deprecated} + */ + @Nullable + public final Boolean deprecated() { + return this.deprecated; + } + + /** + * A list of component template names that are allowed to be absent. + *

+ * API name: {@code ignore_missing_component_templates} + */ + public final List ignoreMissingComponentTemplates() { + return this.ignoreMissingComponentTemplates; + } + /** * Serialize this object to JSON. */ @@ -257,6 +285,21 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { this.dataStream.serialize(generator, mapper); } + if (this.deprecated != null) { + generator.writeKey("deprecated"); + generator.write(this.deprecated); + + } + if (ApiTypeHelper.isDefined(this.ignoreMissingComponentTemplates)) { + generator.writeKey("ignore_missing_component_templates"); + generator.writeStartArray(); + for (String item0 : this.ignoreMissingComponentTemplates) { + generator.write(item0); + + } + generator.writeEnd(); + + } } @@ -294,6 +337,12 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private IndexTemplateDataStreamConfiguration dataStream; + @Nullable + private Boolean deprecated; + + @Nullable + private List ignoreMissingComponentTemplates; + /** * Required - Name of the index template. *

@@ -450,6 +499,43 @@ public final Builder dataStream( return this.dataStream(fn.apply(new IndexTemplateDataStreamConfiguration.Builder()).build()); } + /** + * Marks this index template as deprecated. When creating or updating a + * non-deprecated index template that uses deprecated components, Elasticsearch + * will emit a deprecation warning. + *

+ * API name: {@code deprecated} + */ + public final Builder deprecated(@Nullable Boolean value) { + this.deprecated = value; + return this; + } + + /** + * A list of component template names that are allowed to be absent. + *

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

+ * Adds all elements of list to + * ignoreMissingComponentTemplates. + */ + public final Builder ignoreMissingComponentTemplates(List list) { + this.ignoreMissingComponentTemplates = _listAddAll(this.ignoreMissingComponentTemplates, list); + return this; + } + + /** + * A list of component template names that are allowed to be absent. + *

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

+ * Adds one or more values to ignoreMissingComponentTemplates. + */ + public final Builder ignoreMissingComponentTemplates(String value, String... values) { + this.ignoreMissingComponentTemplates = _listAdd(this.ignoreMissingComponentTemplates, value, values); + return this; + } + @Override protected Builder self() { return this; @@ -488,6 +574,10 @@ protected static void setupIndexTemplateDeserializer(ObjectDeserializerAPI + * 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/migration/DeprecationsResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/DeprecationsResponse.java index 5345e5275..71d9b4866 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/DeprecationsResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/DeprecationsResponse.java @@ -66,6 +66,8 @@ public class DeprecationsResponse implements JsonpSerializable { private final Map> indexSettings; + private final Map> dataStreams; + private final List nodeSettings; private final List mlSettings; @@ -76,6 +78,7 @@ private DeprecationsResponse(Builder builder) { this.clusterSettings = ApiTypeHelper.unmodifiableRequired(builder.clusterSettings, this, "clusterSettings"); this.indexSettings = ApiTypeHelper.unmodifiableRequired(builder.indexSettings, this, "indexSettings"); + this.dataStreams = ApiTypeHelper.unmodifiableRequired(builder.dataStreams, this, "dataStreams"); this.nodeSettings = ApiTypeHelper.unmodifiableRequired(builder.nodeSettings, this, "nodeSettings"); this.mlSettings = ApiTypeHelper.unmodifiableRequired(builder.mlSettings, this, "mlSettings"); @@ -99,6 +102,13 @@ public final Map> indexSettings() { return this.indexSettings; } + /** + * Required - API name: {@code data_streams} + */ + public final Map> dataStreams() { + return this.dataStreams; + } + /** * Required - API name: {@code node_settings} */ @@ -151,6 +161,24 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (ApiTypeHelper.isDefined(this.dataStreams)) { + generator.writeKey("data_streams"); + generator.writeStartObject(); + for (Map.Entry> item0 : this.dataStreams.entrySet()) { + generator.writeKey(item0.getKey()); + generator.writeStartArray(); + if (item0.getValue() != null) { + for (Deprecation item1 : item0.getValue()) { + item1.serialize(generator, mapper); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); + } if (ApiTypeHelper.isDefined(this.nodeSettings)) { generator.writeKey("node_settings"); @@ -193,6 +221,8 @@ public static class Builder extends WithJsonObjectBuilderBase private Map> indexSettings; + private Map> dataStreams; + private List nodeSettings; private List mlSettings; @@ -246,6 +276,26 @@ public final Builder indexSettings(String key, List value) { return this; } + /** + * Required - API name: {@code data_streams} + *

+ * Adds all entries of map to dataStreams. + */ + public final Builder dataStreams(Map> map) { + this.dataStreams = _mapPutAll(this.dataStreams, map); + return this; + } + + /** + * Required - API name: {@code data_streams} + *

+ * Adds an entry to dataStreams. + */ + public final Builder dataStreams(String key, List value) { + this.dataStreams = _mapPut(this.dataStreams, key, value); + return this; + } + /** * Required - API name: {@code node_settings} *

@@ -337,6 +387,9 @@ protected static void setupDeprecationsResponseDeserializer(ObjectDeserializerAPI + * 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/ClusterPrivilege.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClusterPrivilege.java index 992258250..3c4cca124 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClusterPrivilege.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClusterPrivilege.java @@ -134,6 +134,8 @@ public enum ClusterPrivilege implements JsonEnum { MonitorSnapshot("monitor_snapshot"), + MonitorStats("monitor_stats"), + MonitorTextStructure("monitor_text_structure"), MonitorTransform("monitor_transform"), 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 85cce6e3e..82e2b73e3 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 /** @@ -2491,6 +2577,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 e760354da..ae97689ae 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 /** @@ -2553,6 +2640,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/GetBuiltinPrivilegesResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetBuiltinPrivilegesResponse.java index 916160081..180893c5e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetBuiltinPrivilegesResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetBuiltinPrivilegesResponse.java @@ -65,12 +65,15 @@ public class GetBuiltinPrivilegesResponse implements JsonpSerializable { private final List index; + private final List remoteCluster; + // --------------------------------------------------------------------------------------------- private GetBuiltinPrivilegesResponse(Builder builder) { this.cluster = ApiTypeHelper.unmodifiableRequired(builder.cluster, this, "cluster"); this.index = ApiTypeHelper.unmodifiableRequired(builder.index, this, "index"); + this.remoteCluster = ApiTypeHelper.unmodifiableRequired(builder.remoteCluster, this, "remoteCluster"); } @@ -92,6 +95,13 @@ public final List index() { return this.index; } + /** + * Required - API name: {@code remote_cluster} + */ + public final List remoteCluster() { + return this.remoteCluster; + } + /** * Serialize this object to JSON. */ @@ -123,6 +133,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } + if (ApiTypeHelper.isDefined(this.remoteCluster)) { + generator.writeKey("remote_cluster"); + generator.writeStartArray(); + for (RemoteClusterPrivilege item0 : this.remoteCluster) { + item0.serialize(generator, mapper); + } + generator.writeEnd(); + + } } @@ -144,6 +163,8 @@ public static class Builder extends WithJsonObjectBuilderBase private List index; + private List remoteCluster; + /** * Required - API name: {@code cluster} *

@@ -184,6 +205,26 @@ public final Builder index(String value, String... values) { return this; } + /** + * Required - API name: {@code remote_cluster} + *

+ * Adds all elements of list to remoteCluster. + */ + public final Builder remoteCluster(List list) { + this.remoteCluster = _listAddAll(this.remoteCluster, list); + return this; + } + + /** + * Required - API name: {@code remote_cluster} + *

+ * Adds one or more values to remoteCluster. + */ + public final Builder remoteCluster(RemoteClusterPrivilege value, RemoteClusterPrivilege... values) { + this.remoteCluster = _listAdd(this.remoteCluster, value, values); + return this; + } + @Override protected Builder self() { return this; @@ -216,6 +257,8 @@ protected static void setupGetBuiltinPrivilegesResponseDeserializer( op.add(Builder::cluster, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "cluster"); op.add(Builder::index, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "index"); + op.add(Builder::remoteCluster, JsonpDeserializer.arrayDeserializer(RemoteClusterPrivilege._DESERIALIZER), + "remote_cluster"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleRequest.java index cca1ea112..6878b7af0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/PutRoleRequest.java @@ -90,6 +90,8 @@ public class PutRoleRequest extends RequestBase implements JsonpSerializable { @Nullable private final Refresh refresh; + private final List remoteCluster; + private final List remoteIndices; private final List runAs; @@ -108,6 +110,7 @@ private PutRoleRequest(Builder builder) { this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); this.refresh = builder.refresh; + this.remoteCluster = ApiTypeHelper.unmodifiable(builder.remoteCluster); this.remoteIndices = ApiTypeHelper.unmodifiable(builder.remoteIndices); this.runAs = ApiTypeHelper.unmodifiable(builder.runAs); this.transientMetadata = ApiTypeHelper.unmodifiable(builder.transientMetadata); @@ -199,6 +202,15 @@ public final Refresh refresh() { return this.refresh; } + /** + * A list of remote cluster permissions entries. + *

+ * API name: {@code remote_cluster} + */ + public final List remoteCluster() { + return this.remoteCluster; + } + /** * A list of remote indices permissions entries. *

@@ -301,6 +313,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (ApiTypeHelper.isDefined(this.remoteCluster)) { + generator.writeKey("remote_cluster"); + generator.writeStartArray(); + for (RemoteClusterPrivileges item0 : this.remoteCluster) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + } if (ApiTypeHelper.isDefined(this.remoteIndices)) { generator.writeKey("remote_indices"); @@ -366,6 +388,9 @@ public static class Builder extends RequestBase.AbstractBuilder impleme @Nullable private Refresh refresh; + @Nullable + private List remoteCluster; + @Nullable private List remoteIndices; @@ -559,6 +584,42 @@ public final Builder refresh(@Nullable Refresh value) { return this; } + /** + * A list of remote cluster permissions entries. + *

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

+ * Adds all elements of list to remoteCluster. + */ + public final Builder remoteCluster(List list) { + this.remoteCluster = _listAddAll(this.remoteCluster, list); + return this; + } + + /** + * A list of remote cluster permissions entries. + *

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

+ * Adds one or more values to remoteCluster. + */ + public final Builder remoteCluster(RemoteClusterPrivileges value, RemoteClusterPrivileges... values) { + this.remoteCluster = _listAdd(this.remoteCluster, value, values); + return this; + } + + /** + * A list of remote cluster permissions entries. + *

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

+ * Adds a value to remoteCluster using a builder lambda. + */ + public final Builder remoteCluster( + Function> fn) { + return remoteCluster(fn.apply(new RemoteClusterPrivileges.Builder()).build()); + } + /** * A list of remote indices permissions entries. *

@@ -695,6 +756,8 @@ protected static void setupPutRoleRequestDeserializer(ObjectDeserializerAPI + * specification + */ +@JsonpDeserializable +public enum RemoteClusterPrivilege implements JsonEnum { + MonitorEnrich("monitor_enrich"), + + MonitorStats("monitor_stats"), + + ; + + private final String jsonValue; + + RemoteClusterPrivilege(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + RemoteClusterPrivilege.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RemoteClusterPrivileges.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RemoteClusterPrivileges.java new file mode 100644 index 000000000..619b3d03b --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RemoteClusterPrivileges.java @@ -0,0 +1,242 @@ +/* + * 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.RemoteClusterPrivileges + +/** + * The subset of cluster level privileges that can be defined for remote + * clusters. + * + * @see API + * specification + */ +@JsonpDeserializable +public class RemoteClusterPrivileges implements JsonpSerializable { + private final List clusters; + + private final List privileges; + + // --------------------------------------------------------------------------------------------- + + private RemoteClusterPrivileges(Builder builder) { + + this.clusters = ApiTypeHelper.unmodifiableRequired(builder.clusters, this, "clusters"); + this.privileges = ApiTypeHelper.unmodifiableRequired(builder.privileges, this, "privileges"); + + } + + public static RemoteClusterPrivileges of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - A list of cluster aliases to which the permissions in this entry + * apply. + *

+ * API name: {@code clusters} + */ + public final List clusters() { + return this.clusters; + } + + /** + * Required - The cluster level privileges that owners of the role have on the + * remote cluster. + *

+ * API name: {@code privileges} + */ + public final List privileges() { + return this.privileges; + } + + /** + * 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.clusters)) { + generator.writeKey("clusters"); + generator.writeStartArray(); + for (String item0 : this.clusters) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.privileges)) { + generator.writeKey("privileges"); + generator.writeStartArray(); + for (RemoteClusterPrivilege item0 : this.privileges) { + item0.serialize(generator, mapper); + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link RemoteClusterPrivileges}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private List clusters; + + private List privileges; + + /** + * Required - A list of cluster aliases to which the permissions in this entry + * apply. + *

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

+ * Adds all elements of list to clusters. + */ + public final Builder clusters(List list) { + this.clusters = _listAddAll(this.clusters, list); + return this; + } + + /** + * Required - A list of cluster aliases to which the permissions in this entry + * apply. + *

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

+ * Adds one or more values to clusters. + */ + public final Builder clusters(String value, String... values) { + this.clusters = _listAdd(this.clusters, value, values); + return this; + } + + /** + * Required - The cluster level privileges that owners of the role have on the + * remote cluster. + *

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

+ * Adds all elements of list to privileges. + */ + public final Builder privileges(List list) { + this.privileges = _listAddAll(this.privileges, list); + return this; + } + + /** + * Required - The cluster level privileges that owners of the role have on the + * remote cluster. + *

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

+ * Adds one or more values to privileges. + */ + public final Builder privileges(RemoteClusterPrivilege value, RemoteClusterPrivilege... values) { + this.privileges = _listAdd(this.privileges, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link RemoteClusterPrivileges}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public RemoteClusterPrivileges build() { + _checkSingleUse(); + + return new RemoteClusterPrivileges(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link RemoteClusterPrivileges} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, RemoteClusterPrivileges::setupRemoteClusterPrivilegesDeserializer); + + protected static void setupRemoteClusterPrivilegesDeserializer( + ObjectDeserializer op) { + + op.add(Builder::clusters, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "clusters"); + op.add(Builder::privileges, JsonpDeserializer.arrayDeserializer(RemoteClusterPrivilege._DESERIALIZER), + "privileges"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RemoteIndicesPrivileges.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RemoteIndicesPrivileges.java index 73659d0fc..bf0228ca9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RemoteIndicesPrivileges.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RemoteIndicesPrivileges.java @@ -55,7 +55,8 @@ // typedef: security._types.RemoteIndicesPrivileges /** - * + * The subset of index level privileges that can be defined for remote clusters. + * * @see API * specification 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..5bd2ca9e1 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ReplicationAccess.java @@ -0,0 +1,220 @@ +/* + * 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.ReplicationAccess + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ReplicationAccess implements JsonpSerializable { + private final List names; + + @Nullable + private final Boolean allowRestrictedIndices; + + // --------------------------------------------------------------------------------------------- + + private ReplicationAccess(Builder builder) { + + this.names = ApiTypeHelper.unmodifiableRequired(builder.names, this, "names"); + this.allowRestrictedIndices = builder.allowRestrictedIndices; + + } + + 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; + } + + /** + * This needs to be set to true if the patterns in the names field should cover + * system 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 (ApiTypeHelper.isDefined(this.names)) { + generator.writeKey("names"); + generator.writeStartArray(); + for (String item0 : this.names) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.allowRestrictedIndices != null) { + generator.writeKey("allow_restricted_indices"); + generator.write(this.allowRestrictedIndices); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ReplicationAccess}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private List names; + + @Nullable + private Boolean allowRestrictedIndices; + + /** + * 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; + } + + /** + * This needs to be set to true if the patterns in the names field should cover + * system 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 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"); + op.add(Builder::allowRestrictedIndices, JsonpDeserializer.booleanDeserializer(), "allow_restricted_indices"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/Restriction.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/Restriction.java new file mode 100644 index 000000000..2d48411ac --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/Restriction.java @@ -0,0 +1,175 @@ +/* + * 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.Restriction + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class Restriction implements JsonpSerializable { + private final List workflows; + + // --------------------------------------------------------------------------------------------- + + private Restriction(Builder builder) { + + this.workflows = ApiTypeHelper.unmodifiableRequired(builder.workflows, this, "workflows"); + + } + + public static Restriction of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code workflows} + */ + public final List workflows() { + return this.workflows; + } + + /** + * 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.workflows)) { + generator.writeKey("workflows"); + generator.writeStartArray(); + for (String item0 : this.workflows) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Restriction}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private List workflows; + + /** + * Required - API name: {@code workflows} + *

+ * Adds all elements of list to workflows. + */ + public final Builder workflows(List list) { + this.workflows = _listAddAll(this.workflows, list); + return this; + } + + /** + * Required - API name: {@code workflows} + *

+ * Adds one or more values to workflows. + */ + public final Builder workflows(String value, String... values) { + this.workflows = _listAdd(this.workflows, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link Restriction}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public Restriction build() { + _checkSingleUse(); + + return new Restriction(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Restriction} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + Restriction::setupRestrictionDeserializer); + + protected static void setupRestrictionDeserializer(ObjectDeserializer op) { + + op.add(Builder::workflows, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "workflows"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RestrictionWorkflow.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RestrictionWorkflow.java new file mode 100644 index 000000000..4d7f7da51 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RestrictionWorkflow.java @@ -0,0 +1,65 @@ +/* + * 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.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// 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. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum RestrictionWorkflow implements JsonEnum { + SearchApplicationQuery("search_application_query"), + + ; + + private final String jsonValue; + + RestrictionWorkflow(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + RestrictionWorkflow.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleDescriptor.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleDescriptor.java index d19de378e..f2f4db6eb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleDescriptor.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleDescriptor.java @@ -66,6 +66,10 @@ public class RoleDescriptor implements JsonpSerializable { private final List indices; + private final List remoteIndices; + + private final List remoteCluster; + private final List global; private final List applications; @@ -77,6 +81,9 @@ public class RoleDescriptor implements JsonpSerializable { @Nullable private final String description; + @Nullable + private final Restriction restriction; + private final Map transientMetadata; // --------------------------------------------------------------------------------------------- @@ -85,11 +92,14 @@ protected RoleDescriptor(AbstractBuilder builder) { this.cluster = ApiTypeHelper.unmodifiable(builder.cluster); this.indices = ApiTypeHelper.unmodifiable(builder.indices); + this.remoteIndices = ApiTypeHelper.unmodifiable(builder.remoteIndices); + this.remoteCluster = ApiTypeHelper.unmodifiable(builder.remoteCluster); this.global = ApiTypeHelper.unmodifiable(builder.global); this.applications = ApiTypeHelper.unmodifiable(builder.applications); this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); this.runAs = ApiTypeHelper.unmodifiable(builder.runAs); this.description = builder.description; + this.restriction = builder.restriction; this.transientMetadata = ApiTypeHelper.unmodifiable(builder.transientMetadata); } @@ -117,6 +127,25 @@ public final List indices() { return this.indices; } + /** + * A list of indices permissions for remote clusters. + *

+ * API name: {@code remote_indices} + */ + public final List remoteIndices() { + return this.remoteIndices; + } + + /** + * A list of cluster permissions for remote clusters. Note - this is limited a + * subset of the cluster permissions. + *

+ * API name: {@code remote_cluster} + */ + public final List remoteCluster() { + return this.remoteCluster; + } + /** * An object defining global privileges. A global privilege is a form of cluster * privilege that is request-aware. Support for global privileges is currently @@ -169,6 +198,16 @@ public final String description() { return this.description; } + /** + * Restriction for when the role descriptor is allowed to be effective. + *

+ * API name: {@code restriction} + */ + @Nullable + public final Restriction restriction() { + return this.restriction; + } + /** * API name: {@code transient_metadata} */ @@ -206,6 +245,26 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (ApiTypeHelper.isDefined(this.remoteIndices)) { + generator.writeKey("remote_indices"); + generator.writeStartArray(); + for (RemoteIndicesPrivileges item0 : this.remoteIndices) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.remoteCluster)) { + generator.writeKey("remote_cluster"); + generator.writeStartArray(); + for (RemoteClusterPrivileges item0 : this.remoteCluster) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + } if (ApiTypeHelper.isDefined(this.global)) { generator.writeKey("global"); @@ -252,6 +311,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("description"); generator.write(this.description); + } + if (this.restriction != null) { + generator.writeKey("restriction"); + this.restriction.serialize(generator, mapper); + } if (ApiTypeHelper.isDefined(this.transientMetadata)) { generator.writeKey("transient_metadata"); @@ -308,6 +372,12 @@ public abstract static class AbstractBuilder indices; + @Nullable + private List remoteIndices; + + @Nullable + private List remoteCluster; + @Nullable private List global; @@ -323,6 +393,9 @@ public abstract static class AbstractBuilder transientMetadata; @@ -387,6 +460,81 @@ public final BuilderT indices(Function + * API name: {@code remote_indices} + *

+ * Adds all elements of list to remoteIndices. + */ + public final BuilderT remoteIndices(List list) { + this.remoteIndices = _listAddAll(this.remoteIndices, list); + return self(); + } + + /** + * A list of indices permissions for remote clusters. + *

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

+ * Adds one or more values to remoteIndices. + */ + public final BuilderT remoteIndices(RemoteIndicesPrivileges value, RemoteIndicesPrivileges... values) { + this.remoteIndices = _listAdd(this.remoteIndices, value, values); + return self(); + } + + /** + * A list of indices permissions for remote clusters. + *

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

+ * Adds a value to remoteIndices using a builder lambda. + */ + public final BuilderT remoteIndices( + Function> fn) { + return remoteIndices(fn.apply(new RemoteIndicesPrivileges.Builder()).build()); + } + + /** + * A list of cluster permissions for remote clusters. Note - this is limited a + * subset of the cluster permissions. + *

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

+ * Adds all elements of list to remoteCluster. + */ + public final BuilderT remoteCluster(List list) { + this.remoteCluster = _listAddAll(this.remoteCluster, list); + return self(); + } + + /** + * A list of cluster permissions for remote clusters. Note - this is limited a + * subset of the cluster permissions. + *

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

+ * Adds one or more values to remoteCluster. + */ + public final BuilderT remoteCluster(RemoteClusterPrivileges value, RemoteClusterPrivileges... values) { + this.remoteCluster = _listAdd(this.remoteCluster, value, values); + return self(); + } + + /** + * A list of cluster permissions for remote clusters. Note - this is limited a + * subset of the cluster permissions. + *

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

+ * Adds a value to remoteCluster using a builder lambda. + */ + public final BuilderT remoteCluster( + Function> fn) { + return remoteCluster(fn.apply(new RemoteClusterPrivileges.Builder()).build()); + } + /** * An object defining global privileges. A global privilege is a form of cluster * privilege that is request-aware. Support for global privileges is currently @@ -530,6 +678,25 @@ public final BuilderT description(@Nullable String value) { return self(); } + /** + * Restriction for when the role descriptor is allowed to be effective. + *

+ * API name: {@code restriction} + */ + public final BuilderT restriction(@Nullable Restriction value) { + this.restriction = value; + return self(); + } + + /** + * Restriction for when the role descriptor is allowed to be effective. + *

+ * API name: {@code restriction} + */ + public final BuilderT restriction(Function> fn) { + return this.restriction(fn.apply(new Restriction.Builder()).build()); + } + /** * API name: {@code transient_metadata} *

@@ -569,6 +736,10 @@ protected static > void setupRoleDesc "cluster"); op.add(AbstractBuilder::indices, JsonpDeserializer.arrayDeserializer(IndicesPrivileges._DESERIALIZER), "indices", "index"); + op.add(AbstractBuilder::remoteIndices, + JsonpDeserializer.arrayDeserializer(RemoteIndicesPrivileges._DESERIALIZER), "remote_indices"); + op.add(AbstractBuilder::remoteCluster, + JsonpDeserializer.arrayDeserializer(RemoteClusterPrivileges._DESERIALIZER), "remote_cluster"); op.add(AbstractBuilder::global, JsonpDeserializer.arrayDeserializer(GlobalPrivilege._DESERIALIZER), "global"); op.add(AbstractBuilder::applications, JsonpDeserializer.arrayDeserializer(ApplicationPrivileges._DESERIALIZER), "applications"); @@ -576,6 +747,7 @@ protected static > void setupRoleDesc op.add(AbstractBuilder::runAs, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "run_as"); op.add(AbstractBuilder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(AbstractBuilder::restriction, Restriction._DESERIALIZER, "restriction"); op.add(AbstractBuilder::transientMetadata, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "transient_metadata"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleDescriptorRead.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleDescriptorRead.java index 07c3ac990..632a06b9b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleDescriptorRead.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/RoleDescriptorRead.java @@ -67,6 +67,10 @@ public class RoleDescriptorRead implements JsonpSerializable { private final List indices; + private final List remoteIndices; + + private final List remoteCluster; + private final List global; private final List applications; @@ -78,6 +82,9 @@ public class RoleDescriptorRead implements JsonpSerializable { @Nullable private final String description; + @Nullable + private final Restriction restriction; + private final Map transientMetadata; // --------------------------------------------------------------------------------------------- @@ -86,11 +93,14 @@ private RoleDescriptorRead(Builder builder) { this.cluster = ApiTypeHelper.unmodifiableRequired(builder.cluster, this, "cluster"); this.indices = ApiTypeHelper.unmodifiableRequired(builder.indices, this, "indices"); + this.remoteIndices = ApiTypeHelper.unmodifiable(builder.remoteIndices); + this.remoteCluster = ApiTypeHelper.unmodifiable(builder.remoteCluster); this.global = ApiTypeHelper.unmodifiable(builder.global); this.applications = ApiTypeHelper.unmodifiable(builder.applications); this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); this.runAs = ApiTypeHelper.unmodifiable(builder.runAs); this.description = builder.description; + this.restriction = builder.restriction; this.transientMetadata = ApiTypeHelper.unmodifiable(builder.transientMetadata); } @@ -118,6 +128,25 @@ public final List indices() { return this.indices; } + /** + * A list of indices permissions for remote clusters. + *

+ * API name: {@code remote_indices} + */ + public final List remoteIndices() { + return this.remoteIndices; + } + + /** + * A list of cluster permissions for remote clusters. Note - this is limited a + * subset of the cluster permissions. + *

+ * API name: {@code remote_cluster} + */ + public final List remoteCluster() { + return this.remoteCluster; + } + /** * An object defining global privileges. A global privilege is a form of cluster * privilege that is request-aware. Support for global privileges is currently @@ -167,6 +196,16 @@ public final String description() { return this.description; } + /** + * Restriction for when the role descriptor is allowed to be effective. + *

+ * API name: {@code restriction} + */ + @Nullable + public final Restriction restriction() { + return this.restriction; + } + /** * API name: {@code transient_metadata} */ @@ -204,6 +243,26 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (ApiTypeHelper.isDefined(this.remoteIndices)) { + generator.writeKey("remote_indices"); + generator.writeStartArray(); + for (RemoteIndicesPrivileges item0 : this.remoteIndices) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.remoteCluster)) { + generator.writeKey("remote_cluster"); + generator.writeStartArray(); + for (RemoteClusterPrivileges item0 : this.remoteCluster) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + } if (ApiTypeHelper.isDefined(this.global)) { generator.writeKey("global"); @@ -250,6 +309,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("description"); generator.write(this.description); + } + if (this.restriction != null) { + generator.writeKey("restriction"); + this.restriction.serialize(generator, mapper); + } if (ApiTypeHelper.isDefined(this.transientMetadata)) { generator.writeKey("transient_metadata"); @@ -283,6 +347,12 @@ public static class Builder extends WithJsonObjectBuilderBase private List indices; + @Nullable + private List remoteIndices; + + @Nullable + private List remoteCluster; + @Nullable private List global; @@ -298,6 +368,9 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private String description; + @Nullable + private Restriction restriction; + @Nullable private Map transientMetadata; @@ -362,6 +435,81 @@ public final Builder indices(Function + * API name: {@code remote_indices} + *

+ * Adds all elements of list to remoteIndices. + */ + public final Builder remoteIndices(List list) { + this.remoteIndices = _listAddAll(this.remoteIndices, list); + return this; + } + + /** + * A list of indices permissions for remote clusters. + *

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

+ * Adds one or more values to remoteIndices. + */ + public final Builder remoteIndices(RemoteIndicesPrivileges value, RemoteIndicesPrivileges... values) { + this.remoteIndices = _listAdd(this.remoteIndices, value, values); + return this; + } + + /** + * A list of indices permissions for remote clusters. + *

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

+ * Adds a value to remoteIndices using a builder lambda. + */ + public final Builder remoteIndices( + Function> fn) { + return remoteIndices(fn.apply(new RemoteIndicesPrivileges.Builder()).build()); + } + + /** + * A list of cluster permissions for remote clusters. Note - this is limited a + * subset of the cluster permissions. + *

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

+ * Adds all elements of list to remoteCluster. + */ + public final Builder remoteCluster(List list) { + this.remoteCluster = _listAddAll(this.remoteCluster, list); + return this; + } + + /** + * A list of cluster permissions for remote clusters. Note - this is limited a + * subset of the cluster permissions. + *

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

+ * Adds one or more values to remoteCluster. + */ + public final Builder remoteCluster(RemoteClusterPrivileges value, RemoteClusterPrivileges... values) { + this.remoteCluster = _listAdd(this.remoteCluster, value, values); + return this; + } + + /** + * A list of cluster permissions for remote clusters. Note - this is limited a + * subset of the cluster permissions. + *

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

+ * Adds a value to remoteCluster using a builder lambda. + */ + public final Builder remoteCluster( + Function> fn) { + return remoteCluster(fn.apply(new RemoteClusterPrivileges.Builder()).build()); + } + /** * An object defining global privileges. A global privilege is a form of cluster * privilege that is request-aware. Support for global privileges is currently @@ -499,6 +647,25 @@ public final Builder description(@Nullable String value) { return this; } + /** + * Restriction for when the role descriptor is allowed to be effective. + *

+ * API name: {@code restriction} + */ + public final Builder restriction(@Nullable Restriction value) { + this.restriction = value; + return this; + } + + /** + * Restriction for when the role descriptor is allowed to be effective. + *

+ * API name: {@code restriction} + */ + public final Builder restriction(Function> fn) { + return this.restriction(fn.apply(new Restriction.Builder()).build()); + } + /** * API name: {@code transient_metadata} *

@@ -551,12 +718,17 @@ protected static void setupRoleDescriptorReadDeserializer(ObjectDeserializerAPI + * 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/security/get_role/Role.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/Role.java index 142300b37..00e8e3643 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/Role.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/Role.java @@ -20,7 +20,10 @@ package co.elastic.clients.elasticsearch.security.get_role; import co.elastic.clients.elasticsearch.security.ApplicationPrivileges; +import co.elastic.clients.elasticsearch.security.ClusterPrivilege; import co.elastic.clients.elasticsearch.security.IndicesPrivileges; +import co.elastic.clients.elasticsearch.security.RemoteClusterPrivileges; +import co.elastic.clients.elasticsearch.security.RemoteIndicesPrivileges; import co.elastic.clients.elasticsearch.security.RoleTemplate; import co.elastic.clients.json.JsonData; import co.elastic.clients.json.JsonpDeserializable; @@ -69,6 +72,10 @@ public class Role implements JsonpSerializable { private final List indices; + private final List remoteIndices; + + private final List remoteCluster; + private final Map metadata; private final List runAs; @@ -87,6 +94,8 @@ private Role(Builder builder) { this.cluster = ApiTypeHelper.unmodifiableRequired(builder.cluster, this, "cluster"); this.indices = ApiTypeHelper.unmodifiableRequired(builder.indices, this, "indices"); + this.remoteIndices = ApiTypeHelper.unmodifiable(builder.remoteIndices); + this.remoteCluster = ApiTypeHelper.unmodifiable(builder.remoteCluster); this.metadata = ApiTypeHelper.unmodifiableRequired(builder.metadata, this, "metadata"); this.runAs = ApiTypeHelper.unmodifiableRequired(builder.runAs, this, "runAs"); this.transientMetadata = ApiTypeHelper.unmodifiable(builder.transientMetadata); @@ -114,6 +123,20 @@ public final List indices() { return this.indices; } + /** + * API name: {@code remote_indices} + */ + public final List remoteIndices() { + return this.remoteIndices; + } + + /** + * API name: {@code remote_cluster} + */ + public final List remoteCluster() { + return this.remoteCluster; + } + /** * Required - API name: {@code metadata} */ @@ -186,6 +209,26 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (ApiTypeHelper.isDefined(this.remoteIndices)) { + generator.writeKey("remote_indices"); + generator.writeStartArray(); + for (RemoteIndicesPrivileges item0 : this.remoteIndices) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.remoteCluster)) { + generator.writeKey("remote_cluster"); + generator.writeStartArray(); + for (RemoteClusterPrivileges item0 : this.remoteCluster) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + } if (ApiTypeHelper.isDefined(this.metadata)) { generator.writeKey("metadata"); @@ -292,6 +335,12 @@ public static class Builder extends WithJsonObjectBuilderBase implement private List indices; + @Nullable + private List remoteIndices; + + @Nullable + private List remoteCluster; + private Map metadata; private List runAs; @@ -356,6 +405,66 @@ public final Builder indices(Function + * Adds all elements of list to remoteIndices. + */ + public final Builder remoteIndices(List list) { + this.remoteIndices = _listAddAll(this.remoteIndices, list); + return this; + } + + /** + * API name: {@code remote_indices} + *

+ * Adds one or more values to remoteIndices. + */ + public final Builder remoteIndices(RemoteIndicesPrivileges value, RemoteIndicesPrivileges... values) { + this.remoteIndices = _listAdd(this.remoteIndices, value, values); + return this; + } + + /** + * API name: {@code remote_indices} + *

+ * Adds a value to remoteIndices using a builder lambda. + */ + public final Builder remoteIndices( + Function> fn) { + return remoteIndices(fn.apply(new RemoteIndicesPrivileges.Builder()).build()); + } + + /** + * API name: {@code remote_cluster} + *

+ * Adds all elements of list to remoteCluster. + */ + public final Builder remoteCluster(List list) { + this.remoteCluster = _listAddAll(this.remoteCluster, list); + return this; + } + + /** + * API name: {@code remote_cluster} + *

+ * Adds one or more values to remoteCluster. + */ + public final Builder remoteCluster(RemoteClusterPrivileges value, RemoteClusterPrivileges... values) { + this.remoteCluster = _listAdd(this.remoteCluster, value, values); + return this; + } + + /** + * API name: {@code remote_cluster} + *

+ * Adds a value to remoteCluster using a builder lambda. + */ + public final Builder remoteCluster( + Function> fn) { + return remoteCluster(fn.apply(new RemoteClusterPrivileges.Builder()).build()); + } + /** * Required - API name: {@code metadata} *

@@ -526,6 +635,10 @@ protected static void setupRoleDeserializer(ObjectDeserializer op) op.add(Builder::cluster, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "cluster"); op.add(Builder::indices, JsonpDeserializer.arrayDeserializer(IndicesPrivileges._DESERIALIZER), "indices"); + op.add(Builder::remoteIndices, JsonpDeserializer.arrayDeserializer(RemoteIndicesPrivileges._DESERIALIZER), + "remote_indices"); + op.add(Builder::remoteCluster, JsonpDeserializer.arrayDeserializer(RemoteClusterPrivileges._DESERIALIZER), + "remote_cluster"); op.add(Builder::metadata, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "metadata"); op.add(Builder::runAs, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "run_as"); op.add(Builder::transientMetadata, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), 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