From 52df99b9403a7619bcc8ee55b8dc5ca2cabfa794 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Fri, 25 Oct 2024 11:21:35 +0200 Subject: [PATCH] [codegen] update to latest spec --- .../ElasticsearchAsyncClient.java | 226 +++++++++++++-- .../elasticsearch/ElasticsearchClient.java | 226 +++++++++++++-- .../elasticsearch/_types/query_dsl/Query.java | 3 - .../connector/CheckInRequest.java | 6 +- .../connector/DeleteConnectorRequest.java | 7 +- .../ElasticsearchConnectorAsyncClient.java | 231 ++++++++++++---- .../ElasticsearchConnectorClient.java | 231 ++++++++++++---- .../connector/FilteringAdvancedSnippet.java | 41 +-- .../connector/GetConnectorRequest.java | 4 +- .../elasticsearch/connector/ListRequest.java | 4 +- .../elasticsearch/connector/PostRequest.java | 8 +- .../elasticsearch/connector/PutRequest.java | 2 +- .../connector/SyncJobCancelRequest.java | 7 +- .../connector/SyncJobDeleteRequest.java | 5 +- .../connector/SyncJobGetRequest.java | 2 +- .../connector/SyncJobListRequest.java | 5 +- .../connector/SyncJobPostRequest.java | 5 +- .../UpdateActiveFilteringRequest.java | 2 + .../connector/UpdateApiKeyIdRequest.java | 8 +- .../connector/UpdateConfigurationRequest.java | 4 +- .../connector/UpdateErrorRequest.java | 6 +- .../connector/UpdateFilteringRequest.java | 7 +- .../UpdateFilteringValidationRequest.java | 4 +- .../connector/UpdateIndexNameRequest.java | 5 +- .../connector/UpdateNameRequest.java | 2 +- .../connector/UpdateNativeRequest.java | 2 +- .../connector/UpdatePipelineRequest.java | 5 +- .../connector/UpdateSchedulingRequest.java | 2 +- .../connector/UpdateServiceTypeRequest.java | 2 +- .../connector/UpdateStatusRequest.java | 2 +- .../core/GetScriptContextRequest.java | 4 +- .../core/GetScriptLanguagesRequest.java | 4 +- .../elasticsearch/core/MsearchRequest.java | 22 +- .../elasticsearch/core/ScrollRequest.java | 24 +- .../elasticsearch/core/TermsEnumRequest.java | 17 +- .../DeleteDanglingIndexRequest.java | 20 +- ...asticsearchDanglingIndicesAsyncClient.java | 42 ++- .../ElasticsearchDanglingIndicesClient.java | 42 ++- .../ImportDanglingIndexRequest.java | 26 +- .../ListDanglingIndicesRequest.java | 10 +- .../elasticsearch/doc-files/api-spec.html | 69 ++--- .../ElasticsearchQueryRulesAsyncClient.java | 32 +++ .../ElasticsearchQueryRulesClient.java | 33 +++ .../query_rules/TestRequest.java | 257 ++++++++++++++++++ .../query_rules/TestResponse.java | 210 ++++++++++++++ .../test/QueryRulesetMatchedRule.java | 189 +++++++++++++ .../ssl/CertificatesRequest.java | 32 ++- .../ssl/ElasticsearchSslAsyncClient.java | 32 ++- .../ssl/ElasticsearchSslClient.java | 32 ++- 49 files changed, 1899 insertions(+), 262 deletions(-) create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/TestRequest.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/TestResponse.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/test/QueryRulesetMatchedRule.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 01ff4a0d2..aa48413c8 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 @@ -1010,7 +1010,9 @@ public final CompletableFuture getScript( // ----- Endpoint: get_script_context /** - * Returns all script contexts. + * Get script contexts. + *

+ * Get a list of supported script contexts and their methods. * * @see Documentation @@ -1024,7 +1026,9 @@ public CompletableFuture getScriptContext() { // ----- Endpoint: get_script_languages /** - * Returns available script types, languages and contexts + * Get script languages. + *

+ * Get a list of available script types, languages, and contexts. * * @see Documentation @@ -1347,7 +1351,27 @@ public final CompletableFuture> mget( // ----- Endpoint: msearch /** - * Allows to execute several search operations in one request. + * Run multiple searches. + *

+ * The format of the request is similar to the bulk API format and makes use of + * the newline delimited JSON (NDJSON) format. The structure is as follows: + * + *

+	 * header\n
+	 * body\n
+	 * header\n
+	 * body\n
+	 * 
+	 * 
+ *

+ * This structure is specifically optimized to reduce parsing if a specific + * search ends up redirected to another node. + *

+ * IMPORTANT: The final line of data must end with a newline character + * \n. Each newline character may be preceded by a carriage return + * \r. When sending requests to this endpoint the + * Content-Type header should be set to + * application/x-ndjson. * * @see Documentation @@ -1365,7 +1389,27 @@ public CompletableFuture> msearch(Msearch } /** - * Allows to execute several search operations in one request. + * Run multiple searches. + *

+ * The format of the request is similar to the bulk API format and makes use of + * the newline delimited JSON (NDJSON) format. The structure is as follows: + * + *

+	 * header\n
+	 * body\n
+	 * header\n
+	 * body\n
+	 * 
+	 * 
+ *

+ * This structure is specifically optimized to reduce parsing if a specific + * search ends up redirected to another node. + *

+ * IMPORTANT: The final line of data must end with a newline character + * \n. Each newline character may be preceded by a carriage return + * \r. When sending requests to this endpoint the + * Content-Type header should be set to + * application/x-ndjson. * * @param fn * a function that initializes a builder to create the @@ -1381,7 +1425,27 @@ public final CompletableFuture> msearch( } /** - * Allows to execute several search operations in one request. + * Run multiple searches. + *

+ * The format of the request is similar to the bulk API format and makes use of + * the newline delimited JSON (NDJSON) format. The structure is as follows: + * + *

+	 * header\n
+	 * body\n
+	 * header\n
+	 * body\n
+	 * 
+	 * 
+ *

+ * This structure is specifically optimized to reduce parsing if a specific + * search ends up redirected to another node. + *

+ * IMPORTANT: The final line of data must end with a newline character + * \n. Each newline character may be preceded by a carriage return + * \r. When sending requests to this endpoint the + * Content-Type header should be set to + * application/x-ndjson. * * @see Documentation @@ -1399,7 +1463,27 @@ public CompletableFuture> msearch(Msearch } /** - * Allows to execute several search operations in one request. + * Run multiple searches. + *

+ * The format of the request is similar to the bulk API format and makes use of + * the newline delimited JSON (NDJSON) format. The structure is as follows: + * + *

+	 * header\n
+	 * body\n
+	 * header\n
+	 * body\n
+	 * 
+	 * 
+ *

+ * This structure is specifically optimized to reduce parsing if a specific + * search ends up redirected to another node. + *

+ * IMPORTANT: The final line of data must end with a newline character + * \n. Each newline character may be preceded by a carriage return + * \r. When sending requests to this endpoint the + * Content-Type header should be set to + * application/x-ndjson. * * @param fn * a function that initializes a builder to create the @@ -1858,7 +1942,29 @@ public final CompletableFuture // ----- Endpoint: scroll /** - * Allows to retrieve a large numbers of results from a single search request. + * Run a scrolling search. + *

+ * IMPORTANT: The scroll API is no longer recommend for deep pagination. If you + * need to preserve the index state while paging through more than 10,000 hits, + * use the search_after parameter with a point in time (PIT). + *

+ * The scroll API gets large sets of results from a single scrolling search + * request. To get the necessary scroll ID, submit a search API request that + * includes an argument for the scroll query parameter. The + * scroll parameter indicates how long Elasticsearch should retain + * the search context for the request. The search response returns a scroll ID + * in the _scroll_id response body parameter. You can then use the + * scroll ID with the scroll API to retrieve the next batch of results for the + * request. If the Elasticsearch security features are enabled, the access to + * the results of a specific scroll ID is restricted to the user or API key that + * submitted the search. + *

+ * You can also use the scroll API to specify a new scroll parameter that + * extends or shortens the retention period for the search context. + *

+ * IMPORTANT: Results from a scrolling search reflect the state of the index at + * the time of the initial search request. Subsequent indexing or document + * changes only affect later search and scroll requests. * * @see Documentation @@ -1876,7 +1982,29 @@ public CompletableFuture> scroll(ScrollReq } /** - * Allows to retrieve a large numbers of results from a single search request. + * Run a scrolling search. + *

+ * IMPORTANT: The scroll API is no longer recommend for deep pagination. If you + * need to preserve the index state while paging through more than 10,000 hits, + * use the search_after parameter with a point in time (PIT). + *

+ * The scroll API gets large sets of results from a single scrolling search + * request. To get the necessary scroll ID, submit a search API request that + * includes an argument for the scroll query parameter. The + * scroll parameter indicates how long Elasticsearch should retain + * the search context for the request. The search response returns a scroll ID + * in the _scroll_id response body parameter. You can then use the + * scroll ID with the scroll API to retrieve the next batch of results for the + * request. If the Elasticsearch security features are enabled, the access to + * the results of a specific scroll ID is restricted to the user or API key that + * submitted the search. + *

+ * You can also use the scroll API to specify a new scroll parameter that + * extends or shortens the retention period for the search context. + *

+ * IMPORTANT: Results from a scrolling search reflect the state of the index at + * the time of the initial search request. Subsequent indexing or document + * changes only affect later search and scroll requests. * * @param fn * a function that initializes a builder to create the @@ -1892,7 +2020,29 @@ public final CompletableFuture> scroll( } /** - * Allows to retrieve a large numbers of results from a single search request. + * Run a scrolling search. + *

+ * IMPORTANT: The scroll API is no longer recommend for deep pagination. If you + * need to preserve the index state while paging through more than 10,000 hits, + * use the search_after parameter with a point in time (PIT). + *

+ * The scroll API gets large sets of results from a single scrolling search + * request. To get the necessary scroll ID, submit a search API request that + * includes an argument for the scroll query parameter. The + * scroll parameter indicates how long Elasticsearch should retain + * the search context for the request. The search response returns a scroll ID + * in the _scroll_id response body parameter. You can then use the + * scroll ID with the scroll API to retrieve the next batch of results for the + * request. If the Elasticsearch security features are enabled, the access to + * the results of a specific scroll ID is restricted to the user or API key that + * submitted the search. + *

+ * You can also use the scroll API to specify a new scroll parameter that + * extends or shortens the retention period for the search context. + *

+ * IMPORTANT: Results from a scrolling search reflect the state of the index at + * the time of the initial search request. Subsequent indexing or document + * changes only affect later search and scroll requests. * * @see Documentation @@ -1909,7 +2059,29 @@ public CompletableFuture> scroll(ScrollReq } /** - * Allows to retrieve a large numbers of results from a single search request. + * Run a scrolling search. + *

+ * IMPORTANT: The scroll API is no longer recommend for deep pagination. If you + * need to preserve the index state while paging through more than 10,000 hits, + * use the search_after parameter with a point in time (PIT). + *

+ * The scroll API gets large sets of results from a single scrolling search + * request. To get the necessary scroll ID, submit a search API request that + * includes an argument for the scroll query parameter. The + * scroll parameter indicates how long Elasticsearch should retain + * the search context for the request. The search response returns a scroll ID + * in the _scroll_id response body parameter. You can then use the + * scroll ID with the scroll API to retrieve the next batch of results for the + * request. If the Elasticsearch security features are enabled, the access to + * the results of a specific scroll ID is restricted to the user or API key that + * submitted the search. + *

+ * You can also use the scroll API to specify a new scroll parameter that + * extends or shortens the retention period for the search context. + *

+ * IMPORTANT: Results from a scrolling search reflect the state of the index at + * the time of the initial search request. Subsequent indexing or document + * changes only affect later search and scroll requests. * * @param fn * a function that initializes a builder to create the @@ -2159,9 +2331,20 @@ public final CompletableFuture> se // ----- Endpoint: terms_enum /** - * The terms enum API can be used to discover terms in the index that begin with - * the provided string. It is designed for low-latency look-ups used in - * auto-complete scenarios. + * Get terms in an index. + *

+ * Discover terms that match a partial string in an index. This "terms + * enum" API is designed for low-latency look-ups used in auto-complete + * scenarios. + *

+ * If the complete property in the response is false, the returned + * terms set may be incomplete and should be treated as approximate. This can + * occur due to a few reasons, such as a request timeout or a node error. + *

+ * NOTE: The terms enum API may return terms from deleted documents. Deleted + * documents are initially only marked as deleted. It is not until their + * segments are merged that documents are actually deleted. Until that happens, + * the terms enum API will return terms from these documents. * * @see Documentation @@ -2176,9 +2359,20 @@ public CompletableFuture termsEnum(TermsEnumRequest request) } /** - * The terms enum API can be used to discover terms in the index that begin with - * the provided string. It is designed for low-latency look-ups used in - * auto-complete scenarios. + * Get terms in an index. + *

+ * Discover terms that match a partial string in an index. This "terms + * enum" API is designed for low-latency look-ups used in auto-complete + * scenarios. + *

+ * If the complete property in the response is false, the returned + * terms set may be incomplete and should be treated as approximate. This can + * occur due to a few reasons, such as a request timeout or a node error. + *

+ * NOTE: The terms enum API may return terms from deleted documents. Deleted + * documents are initially only marked as deleted. It is not until their + * segments are merged that documents are actually deleted. Until that happens, + * the terms enum API will return terms from these documents. * * @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 d2cdc67f7..680d5fc77 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 @@ -1025,7 +1025,9 @@ public final GetScriptResponse getScript(Function + * Get a list of supported script contexts and their methods. * * @see Documentation @@ -1039,7 +1041,9 @@ public GetScriptContextResponse getScriptContext() throws IOException, Elasticse // ----- Endpoint: get_script_languages /** - * Returns available script types, languages and contexts + * Get script languages. + *

+ * Get a list of available script types, languages, and contexts. * * @see Documentation @@ -1369,7 +1373,27 @@ public final MgetResponse mget(Function + * The format of the request is similar to the bulk API format and makes use of + * the newline delimited JSON (NDJSON) format. The structure is as follows: + * + *

+	 * header\n
+	 * body\n
+	 * header\n
+	 * body\n
+	 * 
+	 * 
+ *

+ * This structure is specifically optimized to reduce parsing if a specific + * search ends up redirected to another node. + *

+ * IMPORTANT: The final line of data must end with a newline character + * \n. Each newline character may be preceded by a carriage return + * \r. When sending requests to this endpoint the + * Content-Type header should be set to + * application/x-ndjson. * * @see Documentation @@ -1387,7 +1411,27 @@ public MsearchResponse msearch(MsearchRequest request, Cl } /** - * Allows to execute several search operations in one request. + * Run multiple searches. + *

+ * The format of the request is similar to the bulk API format and makes use of + * the newline delimited JSON (NDJSON) format. The structure is as follows: + * + *

+	 * header\n
+	 * body\n
+	 * header\n
+	 * body\n
+	 * 
+	 * 
+ *

+ * This structure is specifically optimized to reduce parsing if a specific + * search ends up redirected to another node. + *

+ * IMPORTANT: The final line of data must end with a newline character + * \n. Each newline character may be preceded by a carriage return + * \r. When sending requests to this endpoint the + * Content-Type header should be set to + * application/x-ndjson. * * @param fn * a function that initializes a builder to create the @@ -1404,7 +1448,27 @@ public final MsearchResponse msearch( } /** - * Allows to execute several search operations in one request. + * Run multiple searches. + *

+ * The format of the request is similar to the bulk API format and makes use of + * the newline delimited JSON (NDJSON) format. The structure is as follows: + * + *

+	 * header\n
+	 * body\n
+	 * header\n
+	 * body\n
+	 * 
+	 * 
+ *

+ * This structure is specifically optimized to reduce parsing if a specific + * search ends up redirected to another node. + *

+ * IMPORTANT: The final line of data must end with a newline character + * \n. Each newline character may be preceded by a carriage return + * \r. When sending requests to this endpoint the + * Content-Type header should be set to + * application/x-ndjson. * * @see Documentation @@ -1422,7 +1486,27 @@ public MsearchResponse msearch(MsearchRequest request, Ty } /** - * Allows to execute several search operations in one request. + * Run multiple searches. + *

+ * The format of the request is similar to the bulk API format and makes use of + * the newline delimited JSON (NDJSON) format. The structure is as follows: + * + *

+	 * header\n
+	 * body\n
+	 * header\n
+	 * body\n
+	 * 
+	 * 
+ *

+ * This structure is specifically optimized to reduce parsing if a specific + * search ends up redirected to another node. + *

+ * IMPORTANT: The final line of data must end with a newline character + * \n. Each newline character may be preceded by a carriage return + * \r. When sending requests to this endpoint the + * Content-Type header should be set to + * application/x-ndjson. * * @param fn * a function that initializes a builder to create the @@ -1891,7 +1975,29 @@ public final ScriptsPainlessExecuteResponse scriptsPainlessEx // ----- Endpoint: scroll /** - * Allows to retrieve a large numbers of results from a single search request. + * Run a scrolling search. + *

+ * IMPORTANT: The scroll API is no longer recommend for deep pagination. If you + * need to preserve the index state while paging through more than 10,000 hits, + * use the search_after parameter with a point in time (PIT). + *

+ * The scroll API gets large sets of results from a single scrolling search + * request. To get the necessary scroll ID, submit a search API request that + * includes an argument for the scroll query parameter. The + * scroll parameter indicates how long Elasticsearch should retain + * the search context for the request. The search response returns a scroll ID + * in the _scroll_id response body parameter. You can then use the + * scroll ID with the scroll API to retrieve the next batch of results for the + * request. If the Elasticsearch security features are enabled, the access to + * the results of a specific scroll ID is restricted to the user or API key that + * submitted the search. + *

+ * You can also use the scroll API to specify a new scroll parameter that + * extends or shortens the retention period for the search context. + *

+ * IMPORTANT: Results from a scrolling search reflect the state of the index at + * the time of the initial search request. Subsequent indexing or document + * changes only affect later search and scroll requests. * * @see Documentation @@ -1909,7 +2015,29 @@ public ScrollResponse scroll(ScrollRequest request, Class } /** - * Allows to retrieve a large numbers of results from a single search request. + * Run a scrolling search. + *

+ * IMPORTANT: The scroll API is no longer recommend for deep pagination. If you + * need to preserve the index state while paging through more than 10,000 hits, + * use the search_after parameter with a point in time (PIT). + *

+ * The scroll API gets large sets of results from a single scrolling search + * request. To get the necessary scroll ID, submit a search API request that + * includes an argument for the scroll query parameter. The + * scroll parameter indicates how long Elasticsearch should retain + * the search context for the request. The search response returns a scroll ID + * in the _scroll_id response body parameter. You can then use the + * scroll ID with the scroll API to retrieve the next batch of results for the + * request. If the Elasticsearch security features are enabled, the access to + * the results of a specific scroll ID is restricted to the user or API key that + * submitted the search. + *

+ * You can also use the scroll API to specify a new scroll parameter that + * extends or shortens the retention period for the search context. + *

+ * IMPORTANT: Results from a scrolling search reflect the state of the index at + * the time of the initial search request. Subsequent indexing or document + * changes only affect later search and scroll requests. * * @param fn * a function that initializes a builder to create the @@ -1926,7 +2054,29 @@ public final ScrollResponse scroll( } /** - * Allows to retrieve a large numbers of results from a single search request. + * Run a scrolling search. + *

+ * IMPORTANT: The scroll API is no longer recommend for deep pagination. If you + * need to preserve the index state while paging through more than 10,000 hits, + * use the search_after parameter with a point in time (PIT). + *

+ * The scroll API gets large sets of results from a single scrolling search + * request. To get the necessary scroll ID, submit a search API request that + * includes an argument for the scroll query parameter. The + * scroll parameter indicates how long Elasticsearch should retain + * the search context for the request. The search response returns a scroll ID + * in the _scroll_id response body parameter. You can then use the + * scroll ID with the scroll API to retrieve the next batch of results for the + * request. If the Elasticsearch security features are enabled, the access to + * the results of a specific scroll ID is restricted to the user or API key that + * submitted the search. + *

+ * You can also use the scroll API to specify a new scroll parameter that + * extends or shortens the retention period for the search context. + *

+ * IMPORTANT: Results from a scrolling search reflect the state of the index at + * the time of the initial search request. Subsequent indexing or document + * changes only affect later search and scroll requests. * * @see Documentation @@ -1944,7 +2094,29 @@ public ScrollResponse scroll(ScrollRequest request, Type } /** - * Allows to retrieve a large numbers of results from a single search request. + * Run a scrolling search. + *

+ * IMPORTANT: The scroll API is no longer recommend for deep pagination. If you + * need to preserve the index state while paging through more than 10,000 hits, + * use the search_after parameter with a point in time (PIT). + *

+ * The scroll API gets large sets of results from a single scrolling search + * request. To get the necessary scroll ID, submit a search API request that + * includes an argument for the scroll query parameter. The + * scroll parameter indicates how long Elasticsearch should retain + * the search context for the request. The search response returns a scroll ID + * in the _scroll_id response body parameter. You can then use the + * scroll ID with the scroll API to retrieve the next batch of results for the + * request. If the Elasticsearch security features are enabled, the access to + * the results of a specific scroll ID is restricted to the user or API key that + * submitted the search. + *

+ * You can also use the scroll API to specify a new scroll parameter that + * extends or shortens the retention period for the search context. + *

+ * IMPORTANT: Results from a scrolling search reflect the state of the index at + * the time of the initial search request. Subsequent indexing or document + * changes only affect later search and scroll requests. * * @param fn * a function that initializes a builder to create the @@ -2200,9 +2372,20 @@ public final SearchTemplateResponse searchTemplate( // ----- Endpoint: terms_enum /** - * The terms enum API can be used to discover terms in the index that begin with - * the provided string. It is designed for low-latency look-ups used in - * auto-complete scenarios. + * Get terms in an index. + *

+ * Discover terms that match a partial string in an index. This "terms + * enum" API is designed for low-latency look-ups used in auto-complete + * scenarios. + *

+ * If the complete property in the response is false, the returned + * terms set may be incomplete and should be treated as approximate. This can + * occur due to a few reasons, such as a request timeout or a node error. + *

+ * NOTE: The terms enum API may return terms from deleted documents. Deleted + * documents are initially only marked as deleted. It is not until their + * segments are merged that documents are actually deleted. Until that happens, + * the terms enum API will return terms from these documents. * * @see Documentation @@ -2217,9 +2400,20 @@ public TermsEnumResponse termsEnum(TermsEnumRequest request) throws IOException, } /** - * The terms enum API can be used to discover terms in the index that begin with - * the provided string. It is designed for low-latency look-ups used in - * auto-complete scenarios. + * Get terms in an index. + *

+ * Discover terms that match a partial string in an index. This "terms + * enum" API is designed for low-latency look-ups used in auto-complete + * scenarios. + *

+ * If the complete property in the response is false, the returned + * terms set may be incomplete and should be treated as approximate. This can + * occur due to a few reasons, such as a request timeout or a node error. + *

+ * NOTE: The terms enum API may return terms from deleted documents. Deleted + * documents are initially only marked as deleted. It is not until their + * segments are merged that documents are actually deleted. Until that happens, + * the terms enum API will return terms from these documents. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Query.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Query.java index 8eebcb40f..1103a2dd0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Query.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/Query.java @@ -62,9 +62,6 @@ /** * * @see Documentation - * on elastic.co - * @see API * specification */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInRequest.java index fc5fa4085..37129a044 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/CheckInRequest.java @@ -56,8 +56,10 @@ // typedef: connector.check_in.Request /** - * Updates the last_seen field in the connector, and sets it to current - * timestamp + * Check in a connector. + *

+ * Update the last_seen field in the connector and set it to the + * current timestamp. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorRequest.java index 9cb231331..87f611963 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/DeleteConnectorRequest.java @@ -56,7 +56,12 @@ // typedef: connector.delete.Request /** - * Deletes a connector. + * Delete a connector. + *

+ * Removes a connector and associated sync jobs. This is a destructive action + * that is not recoverable. NOTE: This action doesn’t delete any API keys, + * ingest pipelines, or data indices associated with the connector. These need + * to be removed manually. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java index 926aad3b3..9ba6fbca2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorAsyncClient.java @@ -70,8 +70,10 @@ public ElasticsearchConnectorAsyncClient withTransportOptions(@Nullable Transpor // ----- Endpoint: connector.check_in /** - * Updates the last_seen field in the connector, and sets it to current - * timestamp + * Check in a connector. + *

+ * Update the last_seen field in the connector and set it to the + * current timestamp. * * @see Documentation @@ -86,8 +88,10 @@ public CompletableFuture checkIn(CheckInRequest request) { } /** - * Updates the last_seen field in the connector, and sets it to current - * timestamp + * Check in a connector. + *

+ * Update the last_seen field in the connector and set it to the + * current timestamp. * * @param fn * a function that initializes a builder to create the @@ -105,7 +109,12 @@ public final CompletableFuture checkIn( // ----- Endpoint: connector.delete /** - * Deletes a connector. + * Delete a connector. + *

+ * Removes a connector and associated sync jobs. This is a destructive action + * that is not recoverable. NOTE: This action doesn’t delete any API keys, + * ingest pipelines, or data indices associated with the connector. These need + * to be removed manually. * * @see Documentation @@ -120,7 +129,12 @@ public CompletableFuture delete(DeleteConnectorRequest } /** - * Deletes a connector. + * Delete a connector. + *

+ * Removes a connector and associated sync jobs. This is a destructive action + * that is not recoverable. NOTE: This action doesn’t delete any API keys, + * ingest pipelines, or data indices associated with the connector. These need + * to be removed manually. * * @param fn * a function that initializes a builder to create the @@ -138,7 +152,9 @@ public final CompletableFuture delete( // ----- Endpoint: connector.get /** - * Retrieves a connector. + * Get a connector. + *

+ * Get the details about a connector. * * @see Documentation @@ -153,7 +169,9 @@ public CompletableFuture get(GetConnectorRequest request) } /** - * Retrieves a connector. + * Get a connector. + *

+ * Get the details about a connector. * * @param fn * a function that initializes a builder to create the @@ -171,7 +189,9 @@ public final CompletableFuture get( // ----- Endpoint: connector.list /** - * Returns existing connectors. + * Get all connectors. + *

+ * Get information about all connectors. * * @see Documentation @@ -186,7 +206,9 @@ public CompletableFuture list(ListRequest request) { } /** - * Returns existing connectors. + * Get all connectors. + *

+ * Get information about all connectors. * * @param fn * a function that initializes a builder to create the @@ -201,7 +223,9 @@ public final CompletableFuture list(Function + * Get information about all connectors. * * @see Documentation @@ -216,7 +240,13 @@ public CompletableFuture list() { // ----- Endpoint: connector.post /** - * Creates a connector. + * Create a connector. + *

+ * Connectors are Elasticsearch integrations that bring content from third-party + * data sources, which can be deployed on Elastic Cloud or hosted on your own + * infrastructure. Elastic managed connectors (Native connectors) are a managed + * service on Elastic Cloud. Self-managed connectors (Connector clients) are + * self-managed on your infrastructure. * * @see Documentation @@ -231,7 +261,13 @@ public CompletableFuture post(PostRequest request) { } /** - * Creates a connector. + * Create a connector. + *

+ * Connectors are Elasticsearch integrations that bring content from third-party + * data sources, which can be deployed on Elastic Cloud or hosted on your own + * infrastructure. Elastic managed connectors (Native connectors) are a managed + * service on Elastic Cloud. Self-managed connectors (Connector clients) are + * self-managed on your infrastructure. * * @param fn * a function that initializes a builder to create the @@ -246,7 +282,13 @@ public final CompletableFuture post(Function + * Connectors are Elasticsearch integrations that bring content from third-party + * data sources, which can be deployed on Elastic Cloud or hosted on your own + * infrastructure. Elastic managed connectors (Native connectors) are a managed + * service on Elastic Cloud. Self-managed connectors (Connector clients) are + * self-managed on your infrastructure. * * @see Documentation @@ -261,7 +303,7 @@ public CompletableFuture post() { // ----- Endpoint: connector.put /** - * Creates or updates a connector. + * Create or update a connector. * * @see Documentation @@ -276,7 +318,7 @@ public CompletableFuture put(PutRequest request) { } /** - * Creates or updates a connector. + * Create or update a connector. * * @param fn * a function that initializes a builder to create the @@ -291,7 +333,7 @@ public final CompletableFuture put(FunctionDocumentation @@ -306,7 +348,12 @@ public CompletableFuture put() { // ----- Endpoint: connector.sync_job_cancel /** - * Cancels a connector sync job. + * Cancel a connector sync job. + *

+ * Cancel a connector sync job, which sets the status to cancelling and updates + * cancellation_requested_at to the current time. The connector + * service is then responsible for setting the status of connector sync jobs to + * cancelled. * * @see Documentation @@ -321,7 +368,12 @@ public CompletableFuture syncJobCancel(SyncJobCancelReque } /** - * Cancels a connector sync job. + * Cancel a connector sync job. + *

+ * Cancel a connector sync job, which sets the status to cancelling and updates + * cancellation_requested_at to the current time. The connector + * service is then responsible for setting the status of connector sync jobs to + * cancelled. * * @param fn * a function that initializes a builder to create the @@ -339,7 +391,10 @@ public final CompletableFuture syncJobCancel( // ----- Endpoint: connector.sync_job_delete /** - * Deletes a connector sync job. + * Delete a connector sync job. + *

+ * Remove a connector sync job and its associated data. This is a destructive + * action that is not recoverable. * * @see Documentation @@ -354,7 +409,10 @@ public CompletableFuture syncJobDelete(SyncJobDeleteReque } /** - * Deletes a connector sync job. + * Delete a connector sync job. + *

+ * Remove a connector sync job and its associated data. This is a destructive + * action that is not recoverable. * * @param fn * a function that initializes a builder to create the @@ -372,7 +430,7 @@ public final CompletableFuture syncJobDelete( // ----- Endpoint: connector.sync_job_get /** - * Retrieves a connector sync job. + * Get a connector sync job. * * @see Documentation @@ -387,7 +445,7 @@ public CompletableFuture syncJobGet(SyncJobGetRequest reques } /** - * Retrieves a connector sync job. + * Get a connector sync job. * * @param fn * a function that initializes a builder to create the @@ -405,7 +463,10 @@ public final CompletableFuture syncJobGet( // ----- Endpoint: connector.sync_job_list /** - * Lists connector sync jobs. + * Get all connector sync jobs. + *

+ * Get information about all stored connector sync jobs listed by their creation + * date in ascending order. * * @see Documentation @@ -420,7 +481,10 @@ public CompletableFuture syncJobList(SyncJobListRequest req } /** - * Lists connector sync jobs. + * Get all connector sync jobs. + *

+ * Get information about all stored connector sync jobs listed by their creation + * date in ascending order. * * @param fn * a function that initializes a builder to create the @@ -436,7 +500,10 @@ public final CompletableFuture syncJobList( } /** - * Lists connector sync jobs. + * Get all connector sync jobs. + *

+ * Get information about all stored connector sync jobs listed by their creation + * date in ascending order. * * @see Documentation @@ -451,7 +518,10 @@ public CompletableFuture syncJobList() { // ----- Endpoint: connector.sync_job_post /** - * Creates a connector sync job. + * Create a connector sync job. + *

+ * Create a connector sync job document in the internal index and initialize its + * counters and timestamps with default values. * * @see Documentation @@ -466,7 +536,10 @@ public CompletableFuture syncJobPost(SyncJobPostRequest req } /** - * Creates a connector sync job. + * Create a connector sync job. + *

+ * Create a connector sync job document in the internal index and initialize its + * counters and timestamps with default values. * * @param fn * a function that initializes a builder to create the @@ -484,6 +557,8 @@ public final CompletableFuture syncJobPost( // ----- Endpoint: connector.update_active_filtering /** + * Activate the connector draft filter. + *

* Activates the valid draft filtering for a connector. * * @see updateActiveFiltering( } /** + * Activate the connector draft filter. + *

* Activates the valid draft filtering for a connector. * * @param fn @@ -518,7 +595,13 @@ public final CompletableFuture updateActiveFilter // ----- Endpoint: connector.update_api_key_id /** - * Updates the API key id in the connector document + * Update the connector API key ID. + *

+ * Update the api_key_id and api_key_secret_id fields + * of a connector. You can specify the ID of the API key used for authorization + * and the ID of the connector secret where the API key is stored. The connector + * secret ID is required only for Elastic managed (native) connectors. + * Self-managed connectors (connector clients) do not use this field. * * @see Documentation @@ -533,7 +616,13 @@ public CompletableFuture updateApiKeyId(UpdateApiKeyIdRe } /** - * Updates the API key id in the connector document + * Update the connector API key ID. + *

+ * Update the api_key_id and api_key_secret_id fields + * of a connector. You can specify the ID of the API key used for authorization + * and the ID of the connector secret where the API key is stored. The connector + * secret ID is required only for Elastic managed (native) connectors. + * Self-managed connectors (connector clients) do not use this field. * * @param fn * a function that initializes a builder to create the @@ -551,7 +640,9 @@ public final CompletableFuture updateApiKeyId( // ----- Endpoint: connector.update_configuration /** - * Updates the configuration field in the connector document + * Update the connector configuration. + *

+ * Update the configuration field in the connector document. * * @see Documentation @@ -566,7 +657,9 @@ public CompletableFuture updateConfiguration(Update } /** - * Updates the configuration field in the connector document + * Update the connector configuration. + *

+ * Update the configuration field in the connector document. * * @param fn * a function that initializes a builder to create the @@ -584,7 +677,11 @@ public final CompletableFuture updateConfiguration( // ----- Endpoint: connector.update_error /** - * Updates the filtering field in the connector document + * Update the connector error field. + *

+ * Set the error field for the connector. If the error provided in the request + * body is non-null, the connector’s status is updated to error. Otherwise, if + * the error is reset to null, the connector status is updated to connected. * * @see Documentation @@ -599,7 +696,11 @@ public CompletableFuture updateError(UpdateErrorRequest req } /** - * Updates the filtering field in the connector document + * Update the connector error field. + *

+ * Set the error field for the connector. If the error provided in the request + * body is non-null, the connector’s status is updated to error. Otherwise, if + * the error is reset to null, the connector status is updated to connected. * * @param fn * a function that initializes a builder to create the @@ -617,7 +718,12 @@ public final CompletableFuture updateError( // ----- Endpoint: connector.update_filtering /** - * Updates the filtering field in the connector document + * Update the connector filtering. + *

+ * Update the draft filtering configuration of a connector and marks the draft + * validation state as edited. The filtering draft is activated once validated + * by the running Elastic connector service. The filtering property is used to + * configure sync rules (both basic and advanced) for a connector. * * @see Documentation @@ -632,7 +738,12 @@ public CompletableFuture updateFiltering(UpdateFilterin } /** - * Updates the filtering field in the connector document + * Update the connector filtering. + *

+ * Update the draft filtering configuration of a connector and marks the draft + * validation state as edited. The filtering draft is activated once validated + * by the running Elastic connector service. The filtering property is used to + * configure sync rules (both basic and advanced) for a connector. * * @param fn * a function that initializes a builder to create the @@ -650,7 +761,9 @@ public final CompletableFuture updateFiltering( // ----- Endpoint: connector.update_filtering_validation /** - * Updates the draft filtering validation info for a connector. + * Update the connector draft filtering validation. + *

+ * Update the draft filtering validation info for a connector. * * @see Documentation @@ -666,7 +779,9 @@ public CompletableFuture updateFilteringValid } /** - * Updates the draft filtering validation info for a connector. + * Update the connector draft filtering validation. + *

+ * Update the draft filtering validation info for a connector. * * @param fn * a function that initializes a builder to create the @@ -684,7 +799,10 @@ public final CompletableFuture updateFilterin // ----- Endpoint: connector.update_index_name /** - * Updates the index_name in the connector document + * Update the connector index name. + *

+ * Update the index_name field of a connector, specifying the index + * where the data ingested by the connector is stored. * * @see Documentation @@ -699,7 +817,10 @@ public CompletableFuture updateIndexName(UpdateIndexNam } /** - * Updates the index_name in the connector document + * Update the connector index name. + *

+ * Update the index_name field of a connector, specifying the index + * where the data ingested by the connector is stored. * * @param fn * a function that initializes a builder to create the @@ -717,7 +838,7 @@ public final CompletableFuture updateIndexName( // ----- Endpoint: connector.update_name /** - * Updates the name and description fields in the connector document + * Update the connector name and description. * * @see Documentation @@ -732,7 +853,7 @@ public CompletableFuture updateName(UpdateNameRequest reques } /** - * Updates the name and description fields in the connector document + * Update the connector name and description. * * @param fn * a function that initializes a builder to create the @@ -750,7 +871,7 @@ public final CompletableFuture updateName( // ----- Endpoint: connector.update_native /** - * Updates the is_native flag in the connector document + * Update the connector is_native flag. * * @see Documentation @@ -765,7 +886,7 @@ public CompletableFuture updateNative(UpdateNativeRequest } /** - * Updates the is_native flag in the connector document + * Update the connector is_native flag. * * @param fn * a function that initializes a builder to create the @@ -783,7 +904,10 @@ public final CompletableFuture updateNative( // ----- Endpoint: connector.update_pipeline /** - * Updates the pipeline field in the connector document + * Update the connector pipeline. + *

+ * When you create a new connector, the configuration of an ingest pipeline is + * populated with default settings. * * @see Documentation @@ -798,7 +922,10 @@ public CompletableFuture updatePipeline(UpdatePipelineRe } /** - * Updates the pipeline field in the connector document + * Update the connector pipeline. + *

+ * When you create a new connector, the configuration of an ingest pipeline is + * populated with default settings. * * @param fn * a function that initializes a builder to create the @@ -816,7 +943,7 @@ public final CompletableFuture updatePipeline( // ----- Endpoint: connector.update_scheduling /** - * Updates the scheduling field in the connector document + * Update the connector scheduling. * * @see Documentation @@ -831,7 +958,7 @@ public CompletableFuture updateScheduling(UpdateSchedu } /** - * Updates the scheduling field in the connector document + * Update the connector scheduling. * * @param fn * a function that initializes a builder to create the @@ -849,7 +976,7 @@ public final CompletableFuture updateScheduling( // ----- Endpoint: connector.update_service_type /** - * Updates the service type of the connector + * Update the connector service type. * * @see Documentation @@ -864,7 +991,7 @@ public CompletableFuture updateServiceType(UpdateServ } /** - * Updates the service type of the connector + * Update the connector service type. * * @param fn * a function that initializes a builder to create the @@ -882,7 +1009,7 @@ public final CompletableFuture updateServiceType( // ----- Endpoint: connector.update_status /** - * Updates the status of the connector + * Update the connector status. * * @see Documentation @@ -897,7 +1024,7 @@ public CompletableFuture updateStatus(UpdateStatusRequest } /** - * Updates the status of the connector + * Update the connector status. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorClient.java index 7a1f4bf6b..309ec4767 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ElasticsearchConnectorClient.java @@ -68,8 +68,10 @@ public ElasticsearchConnectorClient withTransportOptions(@Nullable TransportOpti // ----- Endpoint: connector.check_in /** - * Updates the last_seen field in the connector, and sets it to current - * timestamp + * Check in a connector. + *

+ * Update the last_seen field in the connector and set it to the + * current timestamp. * * @see Documentation @@ -84,8 +86,10 @@ public CheckInResponse checkIn(CheckInRequest request) throws IOException, Elast } /** - * Updates the last_seen field in the connector, and sets it to current - * timestamp + * Check in a connector. + *

+ * Update the last_seen field in the connector and set it to the + * current timestamp. * * @param fn * a function that initializes a builder to create the @@ -103,7 +107,12 @@ public final CheckInResponse checkIn(Function + * Removes a connector and associated sync jobs. This is a destructive action + * that is not recoverable. NOTE: This action doesn’t delete any API keys, + * ingest pipelines, or data indices associated with the connector. These need + * to be removed manually. * * @see Documentation @@ -118,7 +127,12 @@ public DeleteConnectorResponse delete(DeleteConnectorRequest request) throws IOE } /** - * Deletes a connector. + * Delete a connector. + *

+ * Removes a connector and associated sync jobs. This is a destructive action + * that is not recoverable. NOTE: This action doesn’t delete any API keys, + * ingest pipelines, or data indices associated with the connector. These need + * to be removed manually. * * @param fn * a function that initializes a builder to create the @@ -137,7 +151,9 @@ public final DeleteConnectorResponse delete( // ----- Endpoint: connector.get /** - * Retrieves a connector. + * Get a connector. + *

+ * Get the details about a connector. * * @see Documentation @@ -152,7 +168,9 @@ public GetConnectorResponse get(GetConnectorRequest request) throws IOException, } /** - * Retrieves a connector. + * Get a connector. + *

+ * Get the details about a connector. * * @param fn * a function that initializes a builder to create the @@ -170,7 +188,9 @@ public final GetConnectorResponse get(Function + * Get information about all connectors. * * @see Documentation @@ -185,7 +205,9 @@ public ListResponse list(ListRequest request) throws IOException, ElasticsearchE } /** - * Returns existing connectors. + * Get all connectors. + *

+ * Get information about all connectors. * * @param fn * a function that initializes a builder to create the @@ -201,7 +223,9 @@ public final ListResponse list(Function + * Get information about all connectors. * * @see Documentation @@ -216,7 +240,13 @@ public ListResponse list() throws IOException, ElasticsearchException { // ----- Endpoint: connector.post /** - * Creates a connector. + * Create a connector. + *

+ * Connectors are Elasticsearch integrations that bring content from third-party + * data sources, which can be deployed on Elastic Cloud or hosted on your own + * infrastructure. Elastic managed connectors (Native connectors) are a managed + * service on Elastic Cloud. Self-managed connectors (Connector clients) are + * self-managed on your infrastructure. * * @see Documentation @@ -231,7 +261,13 @@ public PostResponse post(PostRequest request) throws IOException, ElasticsearchE } /** - * Creates a connector. + * Create a connector. + *

+ * Connectors are Elasticsearch integrations that bring content from third-party + * data sources, which can be deployed on Elastic Cloud or hosted on your own + * infrastructure. Elastic managed connectors (Native connectors) are a managed + * service on Elastic Cloud. Self-managed connectors (Connector clients) are + * self-managed on your infrastructure. * * @param fn * a function that initializes a builder to create the @@ -247,7 +283,13 @@ public final PostResponse post(Function + * Connectors are Elasticsearch integrations that bring content from third-party + * data sources, which can be deployed on Elastic Cloud or hosted on your own + * infrastructure. Elastic managed connectors (Native connectors) are a managed + * service on Elastic Cloud. Self-managed connectors (Connector clients) are + * self-managed on your infrastructure. * * @see Documentation @@ -262,7 +304,7 @@ public PostResponse post() throws IOException, ElasticsearchException { // ----- Endpoint: connector.put /** - * Creates or updates a connector. + * Create or update a connector. * * @see Documentation @@ -277,7 +319,7 @@ public PutResponse put(PutRequest request) throws IOException, ElasticsearchExce } /** - * Creates or updates a connector. + * Create or update a connector. * * @param fn * a function that initializes a builder to create the @@ -293,7 +335,7 @@ public final PutResponse put(FunctionDocumentation @@ -308,7 +350,12 @@ public PutResponse put() throws IOException, ElasticsearchException { // ----- Endpoint: connector.sync_job_cancel /** - * Cancels a connector sync job. + * Cancel a connector sync job. + *

+ * Cancel a connector sync job, which sets the status to cancelling and updates + * cancellation_requested_at to the current time. The connector + * service is then responsible for setting the status of connector sync jobs to + * cancelled. * * @see Documentation @@ -324,7 +371,12 @@ public SyncJobCancelResponse syncJobCancel(SyncJobCancelRequest request) } /** - * Cancels a connector sync job. + * Cancel a connector sync job. + *

+ * Cancel a connector sync job, which sets the status to cancelling and updates + * cancellation_requested_at to the current time. The connector + * service is then responsible for setting the status of connector sync jobs to + * cancelled. * * @param fn * a function that initializes a builder to create the @@ -343,7 +395,10 @@ public final SyncJobCancelResponse syncJobCancel( // ----- Endpoint: connector.sync_job_delete /** - * Deletes a connector sync job. + * Delete a connector sync job. + *

+ * Remove a connector sync job and its associated data. This is a destructive + * action that is not recoverable. * * @see Documentation @@ -359,7 +414,10 @@ public SyncJobDeleteResponse syncJobDelete(SyncJobDeleteRequest request) } /** - * Deletes a connector sync job. + * Delete a connector sync job. + *

+ * Remove a connector sync job and its associated data. This is a destructive + * action that is not recoverable. * * @param fn * a function that initializes a builder to create the @@ -378,7 +436,7 @@ public final SyncJobDeleteResponse syncJobDelete( // ----- Endpoint: connector.sync_job_get /** - * Retrieves a connector sync job. + * Get a connector sync job. * * @see Documentation @@ -393,7 +451,7 @@ public SyncJobGetResponse syncJobGet(SyncJobGetRequest request) throws IOExcepti } /** - * Retrieves a connector sync job. + * Get a connector sync job. * * @param fn * a function that initializes a builder to create the @@ -411,7 +469,10 @@ public final SyncJobGetResponse syncJobGet(Function + * Get information about all stored connector sync jobs listed by their creation + * date in ascending order. * * @see Documentation @@ -426,7 +487,10 @@ public SyncJobListResponse syncJobList(SyncJobListRequest request) throws IOExce } /** - * Lists connector sync jobs. + * Get all connector sync jobs. + *

+ * Get information about all stored connector sync jobs listed by their creation + * date in ascending order. * * @param fn * a function that initializes a builder to create the @@ -443,7 +507,10 @@ public final SyncJobListResponse syncJobList( } /** - * Lists connector sync jobs. + * Get all connector sync jobs. + *

+ * Get information about all stored connector sync jobs listed by their creation + * date in ascending order. * * @see Documentation @@ -458,7 +525,10 @@ public SyncJobListResponse syncJobList() throws IOException, ElasticsearchExcept // ----- Endpoint: connector.sync_job_post /** - * Creates a connector sync job. + * Create a connector sync job. + *

+ * Create a connector sync job document in the internal index and initialize its + * counters and timestamps with default values. * * @see Documentation @@ -473,7 +543,10 @@ public SyncJobPostResponse syncJobPost(SyncJobPostRequest request) throws IOExce } /** - * Creates a connector sync job. + * Create a connector sync job. + *

+ * Create a connector sync job document in the internal index and initialize its + * counters and timestamps with default values. * * @param fn * a function that initializes a builder to create the @@ -492,6 +565,8 @@ public final SyncJobPostResponse syncJobPost( // ----- Endpoint: connector.update_active_filtering /** + * Activate the connector draft filter. + *

* Activates the valid draft filtering for a connector. * * @see * Activates the valid draft filtering for a connector. * * @param fn @@ -527,7 +604,13 @@ public final UpdateActiveFilteringResponse updateActiveFiltering( // ----- Endpoint: connector.update_api_key_id /** - * Updates the API key id in the connector document + * Update the connector API key ID. + *

+ * Update the api_key_id and api_key_secret_id fields + * of a connector. You can specify the ID of the API key used for authorization + * and the ID of the connector secret where the API key is stored. The connector + * secret ID is required only for Elastic managed (native) connectors. + * Self-managed connectors (connector clients) do not use this field. * * @see Documentation @@ -543,7 +626,13 @@ public UpdateApiKeyIdResponse updateApiKeyId(UpdateApiKeyIdRequest request) } /** - * Updates the API key id in the connector document + * Update the connector API key ID. + *

+ * Update the api_key_id and api_key_secret_id fields + * of a connector. You can specify the ID of the API key used for authorization + * and the ID of the connector secret where the API key is stored. The connector + * secret ID is required only for Elastic managed (native) connectors. + * Self-managed connectors (connector clients) do not use this field. * * @param fn * a function that initializes a builder to create the @@ -562,7 +651,9 @@ public final UpdateApiKeyIdResponse updateApiKeyId( // ----- Endpoint: connector.update_configuration /** - * Updates the configuration field in the connector document + * Update the connector configuration. + *

+ * Update the configuration field in the connector document. * * @see Documentation @@ -578,7 +669,9 @@ public UpdateConfigurationResponse updateConfiguration(UpdateConfigurationReques } /** - * Updates the configuration field in the connector document + * Update the connector configuration. + *

+ * Update the configuration field in the connector document. * * @param fn * a function that initializes a builder to create the @@ -597,7 +690,11 @@ public final UpdateConfigurationResponse updateConfiguration( // ----- Endpoint: connector.update_error /** - * Updates the filtering field in the connector document + * Update the connector error field. + *

+ * Set the error field for the connector. If the error provided in the request + * body is non-null, the connector’s status is updated to error. Otherwise, if + * the error is reset to null, the connector status is updated to connected. * * @see Documentation @@ -612,7 +709,11 @@ public UpdateErrorResponse updateError(UpdateErrorRequest request) throws IOExce } /** - * Updates the filtering field in the connector document + * Update the connector error field. + *

+ * Set the error field for the connector. If the error provided in the request + * body is non-null, the connector’s status is updated to error. Otherwise, if + * the error is reset to null, the connector status is updated to connected. * * @param fn * a function that initializes a builder to create the @@ -631,7 +732,12 @@ public final UpdateErrorResponse updateError( // ----- Endpoint: connector.update_filtering /** - * Updates the filtering field in the connector document + * Update the connector filtering. + *

+ * Update the draft filtering configuration of a connector and marks the draft + * validation state as edited. The filtering draft is activated once validated + * by the running Elastic connector service. The filtering property is used to + * configure sync rules (both basic and advanced) for a connector. * * @see Documentation @@ -647,7 +753,12 @@ public UpdateFilteringResponse updateFiltering(UpdateFilteringRequest request) } /** - * Updates the filtering field in the connector document + * Update the connector filtering. + *

+ * Update the draft filtering configuration of a connector and marks the draft + * validation state as edited. The filtering draft is activated once validated + * by the running Elastic connector service. The filtering property is used to + * configure sync rules (both basic and advanced) for a connector. * * @param fn * a function that initializes a builder to create the @@ -666,7 +777,9 @@ public final UpdateFilteringResponse updateFiltering( // ----- Endpoint: connector.update_filtering_validation /** - * Updates the draft filtering validation info for a connector. + * Update the connector draft filtering validation. + *

+ * Update the draft filtering validation info for a connector. * * @see Documentation @@ -682,7 +795,9 @@ public UpdateFilteringValidationResponse updateFilteringValidation(UpdateFilteri } /** - * Updates the draft filtering validation info for a connector. + * Update the connector draft filtering validation. + *

+ * Update the draft filtering validation info for a connector. * * @param fn * a function that initializes a builder to create the @@ -701,7 +816,10 @@ public final UpdateFilteringValidationResponse updateFilteringValidation( // ----- Endpoint: connector.update_index_name /** - * Updates the index_name in the connector document + * Update the connector index name. + *

+ * Update the index_name field of a connector, specifying the index + * where the data ingested by the connector is stored. * * @see Documentation @@ -717,7 +835,10 @@ public UpdateIndexNameResponse updateIndexName(UpdateIndexNameRequest request) } /** - * Updates the index_name in the connector document + * Update the connector index name. + *

+ * Update the index_name field of a connector, specifying the index + * where the data ingested by the connector is stored. * * @param fn * a function that initializes a builder to create the @@ -736,7 +857,7 @@ public final UpdateIndexNameResponse updateIndexName( // ----- Endpoint: connector.update_name /** - * Updates the name and description fields in the connector document + * Update the connector name and description. * * @see Documentation @@ -751,7 +872,7 @@ public UpdateNameResponse updateName(UpdateNameRequest request) throws IOExcepti } /** - * Updates the name and description fields in the connector document + * Update the connector name and description. * * @param fn * a function that initializes a builder to create the @@ -769,7 +890,7 @@ public final UpdateNameResponse updateName(FunctionDocumentation @@ -784,7 +905,7 @@ public UpdateNativeResponse updateNative(UpdateNativeRequest request) throws IOE } /** - * Updates the is_native flag in the connector document + * Update the connector is_native flag. * * @param fn * a function that initializes a builder to create the @@ -803,7 +924,10 @@ public final UpdateNativeResponse updateNative( // ----- Endpoint: connector.update_pipeline /** - * Updates the pipeline field in the connector document + * Update the connector pipeline. + *

+ * When you create a new connector, the configuration of an ingest pipeline is + * populated with default settings. * * @see Documentation @@ -819,7 +943,10 @@ public UpdatePipelineResponse updatePipeline(UpdatePipelineRequest request) } /** - * Updates the pipeline field in the connector document + * Update the connector pipeline. + *

+ * When you create a new connector, the configuration of an ingest pipeline is + * populated with default settings. * * @param fn * a function that initializes a builder to create the @@ -838,7 +965,7 @@ public final UpdatePipelineResponse updatePipeline( // ----- Endpoint: connector.update_scheduling /** - * Updates the scheduling field in the connector document + * Update the connector scheduling. * * @see Documentation @@ -854,7 +981,7 @@ public UpdateSchedulingResponse updateScheduling(UpdateSchedulingRequest request } /** - * Updates the scheduling field in the connector document + * Update the connector scheduling. * * @param fn * a function that initializes a builder to create the @@ -873,7 +1000,7 @@ public final UpdateSchedulingResponse updateScheduling( // ----- Endpoint: connector.update_service_type /** - * Updates the service type of the connector + * Update the connector service type. * * @see Documentation @@ -889,7 +1016,7 @@ public UpdateServiceTypeResponse updateServiceType(UpdateServiceTypeRequest requ } /** - * Updates the service type of the connector + * Update the connector service type. * * @param fn * a function that initializes a builder to create the @@ -908,7 +1035,7 @@ public final UpdateServiceTypeResponse updateServiceType( // ----- Endpoint: connector.update_status /** - * Updates the status of the connector + * Update the connector status. * * @see Documentation @@ -923,7 +1050,7 @@ public UpdateStatusResponse updateStatus(UpdateStatusRequest request) throws IOE } /** - * Updates the status of the connector + * Update the connector status. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringAdvancedSnippet.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringAdvancedSnippet.java index a36839618..a6da3d5c1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringAdvancedSnippet.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/FilteringAdvancedSnippet.java @@ -32,8 +32,6 @@ import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; -import java.lang.String; -import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -69,7 +67,7 @@ public class FilteringAdvancedSnippet implements JsonpSerializable { @Nullable private final DateTime updatedAt; - private final Map value; + private final JsonData value; // --------------------------------------------------------------------------------------------- @@ -77,7 +75,7 @@ private FilteringAdvancedSnippet(Builder builder) { this.createdAt = builder.createdAt; this.updatedAt = builder.updatedAt; - this.value = ApiTypeHelper.unmodifiableRequired(builder.value, this, "value"); + this.value = ApiTypeHelper.requireNonNull(builder.value, this, "value"); } @@ -104,7 +102,7 @@ public final DateTime updatedAt() { /** * Required - API name: {@code value} */ - public final Map value() { + public final JsonData value() { return this.value; } @@ -127,17 +125,8 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("updated_at"); this.updatedAt.serialize(generator, mapper); } - if (ApiTypeHelper.isDefined(this.value)) { - generator.writeKey("value"); - generator.writeStartObject(); - for (Map.Entry item0 : this.value.entrySet()) { - generator.writeKey(item0.getKey()); - item0.getValue().serialize(generator, mapper); - - } - generator.writeEnd(); - - } + generator.writeKey("value"); + this.value.serialize(generator, mapper); } @@ -161,7 +150,7 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private DateTime updatedAt; - private Map value; + private JsonData value; /** * API name: {@code created_at} @@ -181,21 +170,9 @@ public final Builder updatedAt(@Nullable DateTime value) { /** * Required - API name: {@code value} - *

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

- * Adds an entry to value. */ - public final Builder value(String key, JsonData value) { - this.value = _mapPut(this.value, key, value); + public final Builder value(JsonData value) { + this.value = value; return this; } @@ -230,7 +207,7 @@ protected static void setupFilteringAdvancedSnippetDeserializer( op.add(Builder::createdAt, DateTime._DESERIALIZER, "created_at"); op.add(Builder::updatedAt, DateTime._DESERIALIZER, "updated_at"); - op.add(Builder::value, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "value"); + op.add(Builder::value, JsonData._DESERIALIZER, "value"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorRequest.java index 9d9cd9328..400a33927 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/GetConnectorRequest.java @@ -56,7 +56,9 @@ // typedef: connector.get.Request /** - * Retrieves a connector. + * Get a connector. + *

+ * Get the details about a connector. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ListRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ListRequest.java index c290e19f7..439c4094d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ListRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/ListRequest.java @@ -59,7 +59,9 @@ // typedef: connector.list.Request /** - * Returns existing connectors. + * Get all connectors. + *

+ * Get information about all connectors. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PostRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PostRequest.java index 2f34ed80d..962e1cf70 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PostRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PostRequest.java @@ -56,7 +56,13 @@ // typedef: connector.post.Request /** - * Creates a connector. + * Create a connector. + *

+ * Connectors are Elasticsearch integrations that bring content from third-party + * data sources, which can be deployed on Elastic Cloud or hosted on your own + * infrastructure. Elastic managed connectors (Native connectors) are a managed + * service on Elastic Cloud. Self-managed connectors (Connector clients) are + * self-managed on your infrastructure. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PutRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PutRequest.java index 49ca6b6b2..1739c1daa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PutRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/PutRequest.java @@ -58,7 +58,7 @@ // typedef: connector.put.Request /** - * Creates or updates a connector. + * Create or update a connector. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelRequest.java index d87926d47..650965a39 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobCancelRequest.java @@ -56,7 +56,12 @@ // typedef: connector.sync_job_cancel.Request /** - * Cancels a connector sync job. + * Cancel a connector sync job. + *

+ * Cancel a connector sync job, which sets the status to cancelling and updates + * cancellation_requested_at to the current time. The connector + * service is then responsible for setting the status of connector sync jobs to + * cancelled. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteRequest.java index 7fabf48c1..c2159eb88 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobDeleteRequest.java @@ -56,7 +56,10 @@ // typedef: connector.sync_job_delete.Request /** - * Deletes a connector sync job. + * Delete a connector sync job. + *

+ * Remove a connector sync job and its associated data. This is a destructive + * action that is not recoverable. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetRequest.java index 16bb24995..09502a164 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobGetRequest.java @@ -56,7 +56,7 @@ // typedef: connector.sync_job_get.Request /** - * Retrieves a connector sync job. + * Get a connector sync job. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListRequest.java index 884e96a94..2333c2e99 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobListRequest.java @@ -59,7 +59,10 @@ // typedef: connector.sync_job_list.Request /** - * Lists connector sync jobs. + * Get all connector sync jobs. + *

+ * Get information about all stored connector sync jobs listed by their creation + * date in ascending order. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostRequest.java index 88290cfea..3c9a52218 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/SyncJobPostRequest.java @@ -56,7 +56,10 @@ // typedef: connector.sync_job_post.Request /** - * Creates a connector sync job. + * Create a connector sync job. + *

+ * Create a connector sync job document in the internal index and initialize its + * counters and timestamps with default values. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringRequest.java index 518494566..be2006402 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateActiveFilteringRequest.java @@ -56,6 +56,8 @@ // typedef: connector.update_active_filtering.Request /** + * Activate the connector draft filter. + *

* Activates the valid draft filtering for a connector. * * @see + * Update the api_key_id and api_key_secret_id fields + * of a connector. You can specify the ID of the API key used for authorization + * and the ID of the connector secret where the API key is stored. The connector + * secret ID is required only for Elastic managed (native) connectors. + * Self-managed connectors (connector clients) do not use this field. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationRequest.java index 0c5965cae..350d1a191 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateConfigurationRequest.java @@ -59,7 +59,9 @@ // typedef: connector.update_configuration.Request /** - * Updates the configuration field in the connector document + * Update the connector configuration. + *

+ * Update the configuration field in the connector document. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorRequest.java index f4d02d753..94160d95e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateErrorRequest.java @@ -59,7 +59,11 @@ // typedef: connector.update_error.Request /** - * Updates the filtering field in the connector document + * Update the connector error field. + *

+ * Set the error field for the connector. If the error provided in the request + * body is non-null, the connector’s status is updated to error. Otherwise, if + * the error is reset to null, the connector status is updated to connected. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringRequest.java index a3d636dae..d4b38507a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringRequest.java @@ -59,7 +59,12 @@ // typedef: connector.update_filtering.Request /** - * Updates the filtering field in the connector document + * Update the connector filtering. + *

+ * Update the draft filtering configuration of a connector and marks the draft + * validation state as edited. The filtering draft is activated once validated + * by the running Elastic connector service. The filtering property is used to + * configure sync rules (both basic and advanced) for a connector. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationRequest.java index 4c204e883..3744cd701 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateFilteringValidationRequest.java @@ -58,7 +58,9 @@ // typedef: connector.update_filtering_validation.Request /** - * Updates the draft filtering validation info for a connector. + * Update the connector draft filtering validation. + *

+ * Update the draft filtering validation info for a connector. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameRequest.java index 42cd58058..b4244c940 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateIndexNameRequest.java @@ -59,7 +59,10 @@ // typedef: connector.update_index_name.Request /** - * Updates the index_name in the connector document + * Update the connector index name. + *

+ * Update the index_name field of a connector, specifying the index + * where the data ingested by the connector is stored. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameRequest.java index 12c5bf4dd..c446d81c6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNameRequest.java @@ -58,7 +58,7 @@ // typedef: connector.update_name.Request /** - * Updates the name and description fields in the connector document + * Update the connector name and description. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeRequest.java index 728a5783b..e3e03e486 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateNativeRequest.java @@ -59,7 +59,7 @@ // typedef: connector.update_native.Request /** - * Updates the is_native flag in the connector document + * Update the connector is_native flag. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineRequest.java index 8c77a6354..adf382880 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdatePipelineRequest.java @@ -58,7 +58,10 @@ // typedef: connector.update_pipeline.Request /** - * Updates the pipeline field in the connector document + * Update the connector pipeline. + *

+ * When you create a new connector, the configuration of an ingest pipeline is + * populated with default settings. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingRequest.java index 6fc8be6e4..0a5a834b6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateSchedulingRequest.java @@ -58,7 +58,7 @@ // typedef: connector.update_scheduling.Request /** - * Updates the scheduling field in the connector document + * Update the connector scheduling. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeRequest.java index 9e7c93ee8..58d700966 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateServiceTypeRequest.java @@ -58,7 +58,7 @@ // typedef: connector.update_service_type.Request /** - * Updates the service type of the connector + * Update the connector service type. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusRequest.java index 5f0b7270f..1e3a4c6c2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/connector/UpdateStatusRequest.java @@ -58,7 +58,7 @@ // typedef: connector.update_status.Request /** - * Updates the status of the connector + * Update the connector status. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptContextRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptContextRequest.java index 1c6081543..b86044ce0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptContextRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptContextRequest.java @@ -50,7 +50,9 @@ // typedef: _global.get_script_context.Request /** - * Returns all script contexts. + * Get script contexts. + *

+ * Get a list of supported script contexts and their methods. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptLanguagesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptLanguagesRequest.java index 759ad87f6..441e8e2b6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptLanguagesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetScriptLanguagesRequest.java @@ -50,7 +50,9 @@ // typedef: _global.get_script_languages.Request /** - * Returns available script types, languages and contexts + * Get script languages. + *

+ * Get a list of available script types, languages, and contexts. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java index a73479dbd..5116f9f72 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/MsearchRequest.java @@ -66,7 +66,27 @@ // typedef: _global.msearch.Request /** - * Allows to execute several search operations in one request. + * Run multiple searches. + *

+ * The format of the request is similar to the bulk API format and makes use of + * the newline delimited JSON (NDJSON) format. The structure is as follows: + * + *

+ * header\n
+ * body\n
+ * header\n
+ * body\n
+ * 
+ * 
+ *

+ * This structure is specifically optimized to reduce parsing if a specific + * search ends up redirected to another node. + *

+ * IMPORTANT: The final line of data must end with a newline character + * \n. Each newline character may be preceded by a carriage return + * \r. When sending requests to this endpoint the + * Content-Type header should be set to + * application/x-ndjson. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScrollRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScrollRequest.java index 9a1acc6b4..440f2039b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScrollRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ScrollRequest.java @@ -57,7 +57,29 @@ // typedef: _global.scroll.Request /** - * Allows to retrieve a large numbers of results from a single search request. + * Run a scrolling search. + *

+ * IMPORTANT: The scroll API is no longer recommend for deep pagination. If you + * need to preserve the index state while paging through more than 10,000 hits, + * use the search_after parameter with a point in time (PIT). + *

+ * The scroll API gets large sets of results from a single scrolling search + * request. To get the necessary scroll ID, submit a search API request that + * includes an argument for the scroll query parameter. The + * scroll parameter indicates how long Elasticsearch should retain + * the search context for the request. The search response returns a scroll ID + * in the _scroll_id response body parameter. You can then use the + * scroll ID with the scroll API to retrieve the next batch of results for the + * request. If the Elasticsearch security features are enabled, the access to + * the results of a specific scroll ID is restricted to the user or API key that + * submitted the search. + *

+ * You can also use the scroll API to specify a new scroll parameter that + * extends or shortens the retention period for the search context. + *

+ * IMPORTANT: Results from a scrolling search reflect the state of the index at + * the time of the initial search request. Subsequent indexing or document + * changes only affect later search and scroll requests. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermsEnumRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermsEnumRequest.java index 19e3a9b66..8e9c8adad 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermsEnumRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/TermsEnumRequest.java @@ -62,9 +62,20 @@ // typedef: _global.terms_enum.Request /** - * The terms enum API can be used to discover terms in the index that begin with - * the provided string. It is designed for low-latency look-ups used in - * auto-complete scenarios. + * Get terms in an index. + *

+ * Discover terms that match a partial string in an index. This "terms + * enum" API is designed for low-latency look-ups used in auto-complete + * scenarios. + *

+ * If the complete property in the response is false, the returned + * terms set may be incomplete and should be treated as approximate. This can + * occur due to a few reasons, such as a request timeout or a node error. + *

+ * NOTE: The terms enum API may return terms from deleted documents. Deleted + * documents are initially only marked as deleted. It is not until their + * segments are merged that documents are actually deleted. Until that happens, + * the terms enum API will return terms from these documents. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/DeleteDanglingIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/DeleteDanglingIndexRequest.java index 8f87222e0..f0995034d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/DeleteDanglingIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/DeleteDanglingIndexRequest.java @@ -57,7 +57,13 @@ // typedef: dangling_indices.delete_dangling_index.Request /** - * Deletes the specified dangling index + * Delete a dangling index. + *

+ * If Elasticsearch encounters index data that is absent from the current + * cluster state, those indices are considered to be dangling. For example, this + * can happen if you delete more than + * cluster.indices.tombstones.size indices while an Elasticsearch + * node is offline. * * @see API @@ -91,7 +97,8 @@ public static DeleteDanglingIndexRequest of(Function * API name: {@code accept_data_loss} */ @@ -100,7 +107,8 @@ public final boolean acceptDataLoss() { } /** - * Required - The UUID of the dangling index + * Required - The UUID of the index to delete. Use the get dangling indices API + * to find the UUID. *

* API name: {@code index_uuid} */ @@ -148,7 +156,8 @@ public static class Builder extends RequestBase.AbstractBuilder private Time timeout; /** - * Required - Must be set to true in order to delete the dangling index + * Required - This parameter must be set to true to acknowledge that it will no + * longer be possible to recove data from the dangling index. *

* API name: {@code accept_data_loss} */ @@ -158,7 +167,8 @@ public final Builder acceptDataLoss(boolean value) { } /** - * Required - The UUID of the dangling index + * Required - The UUID of the index to delete. Use the get dangling indices API + * to find the UUID. *

* API name: {@code index_uuid} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ElasticsearchDanglingIndicesAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ElasticsearchDanglingIndicesAsyncClient.java index 5999055f0..9399da94c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ElasticsearchDanglingIndicesAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ElasticsearchDanglingIndicesAsyncClient.java @@ -70,7 +70,13 @@ public ElasticsearchDanglingIndicesAsyncClient withTransportOptions(@Nullable Tr // ----- Endpoint: dangling_indices.delete_dangling_index /** - * Deletes the specified dangling index + * Delete a dangling index. + *

+ * If Elasticsearch encounters index data that is absent from the current + * cluster state, those indices are considered to be dangling. For example, this + * can happen if you delete more than + * cluster.indices.tombstones.size indices while an Elasticsearch + * node is offline. * * @see Documentation @@ -85,7 +91,13 @@ public CompletableFuture deleteDanglingIndex(Delete } /** - * Deletes the specified dangling index + * Delete a dangling index. + *

+ * If Elasticsearch encounters index data that is absent from the current + * cluster state, those indices are considered to be dangling. For example, this + * can happen if you delete more than + * cluster.indices.tombstones.size indices while an Elasticsearch + * node is offline. * * @param fn * a function that initializes a builder to create the @@ -103,7 +115,13 @@ public final CompletableFuture deleteDanglingIndex( // ----- Endpoint: dangling_indices.import_dangling_index /** - * Imports the specified dangling index + * Import a dangling index. + *

+ * If Elasticsearch encounters index data that is absent from the current + * cluster state, those indices are considered to be dangling. For example, this + * can happen if you delete more than + * cluster.indices.tombstones.size indices while an Elasticsearch + * node is offline. * * @see Documentation @@ -118,7 +136,13 @@ public CompletableFuture importDanglingIndex(Import } /** - * Imports the specified dangling index + * Import a dangling index. + *

+ * If Elasticsearch encounters index data that is absent from the current + * cluster state, those indices are considered to be dangling. For example, this + * can happen if you delete more than + * cluster.indices.tombstones.size indices while an Elasticsearch + * node is offline. * * @param fn * a function that initializes a builder to create the @@ -136,7 +160,15 @@ public final CompletableFuture importDanglingIndex( // ----- Endpoint: dangling_indices.list_dangling_indices /** - * Returns all dangling indices. + * Get the dangling indices. + *

+ * If Elasticsearch encounters index data that is absent from the current + * cluster state, those indices are considered to be dangling. For example, this + * can happen if you delete more than + * cluster.indices.tombstones.size indices while an Elasticsearch + * node is offline. + *

+ * Use this API to list dangling indices, which you can then import or delete. * * @see Documentation diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ElasticsearchDanglingIndicesClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ElasticsearchDanglingIndicesClient.java index c6b15b641..dd146a73a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ElasticsearchDanglingIndicesClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ElasticsearchDanglingIndicesClient.java @@ -71,7 +71,13 @@ public ElasticsearchDanglingIndicesClient withTransportOptions(@Nullable Transpo // ----- Endpoint: dangling_indices.delete_dangling_index /** - * Deletes the specified dangling index + * Delete a dangling index. + *

+ * If Elasticsearch encounters index data that is absent from the current + * cluster state, those indices are considered to be dangling. For example, this + * can happen if you delete more than + * cluster.indices.tombstones.size indices while an Elasticsearch + * node is offline. * * @see Documentation @@ -87,7 +93,13 @@ public DeleteDanglingIndexResponse deleteDanglingIndex(DeleteDanglingIndexReques } /** - * Deletes the specified dangling index + * Delete a dangling index. + *

+ * If Elasticsearch encounters index data that is absent from the current + * cluster state, those indices are considered to be dangling. For example, this + * can happen if you delete more than + * cluster.indices.tombstones.size indices while an Elasticsearch + * node is offline. * * @param fn * a function that initializes a builder to create the @@ -106,7 +118,13 @@ public final DeleteDanglingIndexResponse deleteDanglingIndex( // ----- Endpoint: dangling_indices.import_dangling_index /** - * Imports the specified dangling index + * Import a dangling index. + *

+ * If Elasticsearch encounters index data that is absent from the current + * cluster state, those indices are considered to be dangling. For example, this + * can happen if you delete more than + * cluster.indices.tombstones.size indices while an Elasticsearch + * node is offline. * * @see Documentation @@ -122,7 +140,13 @@ public ImportDanglingIndexResponse importDanglingIndex(ImportDanglingIndexReques } /** - * Imports the specified dangling index + * Import a dangling index. + *

+ * If Elasticsearch encounters index data that is absent from the current + * cluster state, those indices are considered to be dangling. For example, this + * can happen if you delete more than + * cluster.indices.tombstones.size indices while an Elasticsearch + * node is offline. * * @param fn * a function that initializes a builder to create the @@ -141,7 +165,15 @@ public final ImportDanglingIndexResponse importDanglingIndex( // ----- Endpoint: dangling_indices.list_dangling_indices /** - * Returns all dangling indices. + * Get the dangling indices. + *

+ * If Elasticsearch encounters index data that is absent from the current + * cluster state, those indices are considered to be dangling. For example, this + * can happen if you delete more than + * cluster.indices.tombstones.size indices while an Elasticsearch + * node is offline. + *

+ * Use this API to list dangling indices, which you can then import or delete. * * @see Documentation diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ImportDanglingIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ImportDanglingIndexRequest.java index acb5a9d15..b6e7c4d81 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ImportDanglingIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ImportDanglingIndexRequest.java @@ -57,7 +57,13 @@ // typedef: dangling_indices.import_dangling_index.Request /** - * Imports the specified dangling index + * Import a dangling index. + *

+ * If Elasticsearch encounters index data that is absent from the current + * cluster state, those indices are considered to be dangling. For example, this + * can happen if you delete more than + * cluster.indices.tombstones.size indices while an Elasticsearch + * node is offline. * * @see API @@ -91,7 +97,11 @@ public static ImportDanglingIndexRequest of(Function * API name: {@code accept_data_loss} */ @@ -100,7 +110,8 @@ public final boolean acceptDataLoss() { } /** - * Required - The UUID of the dangling index + * Required - The UUID of the index to import. Use the get dangling indices API + * to locate the UUID. *

* API name: {@code index_uuid} */ @@ -148,7 +159,11 @@ public static class Builder extends RequestBase.AbstractBuilder private Time timeout; /** - * Required - Must be set to true in order to import the dangling index + * Required - This parameter must be set to true to import a dangling index. + * Because Elasticsearch cannot know where the dangling index data came from or + * determine which shard copies are fresh and which are stale, it cannot + * guarantee that the imported data represents the latest state of the index + * when it was last in the cluster. *

* API name: {@code accept_data_loss} */ @@ -158,7 +173,8 @@ public final Builder acceptDataLoss(boolean value) { } /** - * Required - The UUID of the dangling index + * Required - The UUID of the index to import. Use the get dangling indices API + * to locate the UUID. *

* API name: {@code index_uuid} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ListDanglingIndicesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ListDanglingIndicesRequest.java index 4ac366cc2..079fc622f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ListDanglingIndicesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ListDanglingIndicesRequest.java @@ -50,7 +50,15 @@ // typedef: dangling_indices.list_dangling_indices.Request /** - * Returns all dangling indices. + * Get the dangling indices. + *

+ * If Elasticsearch encounters index data that is absent from the current + * cluster state, those indices are considered to be dangling. For example, this + * can happen if you delete more than + * cluster.indices.tombstones.size indices while an Elasticsearch + * node is offline. + *

+ * Use this API to list dangling indices, which you can then import or delete. * * @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 7a992ae7b..da8ea121d 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 @@ -49,10 +49,10 @@ '_global.get_script_context.Context': '_global/get_script_context/types.ts#L22-L25', '_global.get_script_context.ContextMethod': '_global/get_script_context/types.ts#L27-L31', '_global.get_script_context.ContextMethodParam': '_global/get_script_context/types.ts#L33-L36', -'_global.get_script_context.Request': '_global/get_script_context/GetScriptContextRequest.ts#L22-L26', +'_global.get_script_context.Request': '_global/get_script_context/GetScriptContextRequest.ts#L22-L30', '_global.get_script_context.Response': '_global/get_script_context/GetScriptContextResponse.ts#L22-L26', '_global.get_script_languages.LanguageContext': '_global/get_script_languages/types.ts#L22-L25', -'_global.get_script_languages.Request': '_global/get_script_languages/GetScriptLanguagesRequest.ts#L22-L26', +'_global.get_script_languages.Request': '_global/get_script_languages/GetScriptLanguagesRequest.ts#L22-L30', '_global.get_script_languages.Response': '_global/get_script_languages/GetScriptLanguagesResponse.ts#L22-L27', '_global.get_source.Request': '_global/get_source/SourceRequest.ts#L31-L89', '_global.get_source.Response': '_global/get_source/SourceResponse.ts#L20-L23', @@ -99,13 +99,13 @@ '_global.mget.Request': '_global/mget/MultiGetRequest.ts#L25-L98', '_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#L213-L216', -'_global.msearch.MultiSearchResult': '_global/msearch/types.ts#L203-L206', -'_global.msearch.MultisearchBody': '_global/msearch/types.ts#L70-L201', +'_global.msearch.MultiSearchItem': '_global/msearch/types.ts#L216-L219', +'_global.msearch.MultiSearchResult': '_global/msearch/types.ts#L206-L209', +'_global.msearch.MultisearchBody': '_global/msearch/types.ts#L70-L204', '_global.msearch.MultisearchHeader': '_global/msearch/types.ts#L52-L67', -'_global.msearch.Request': '_global/msearch/MultiSearchRequest.ts#L25-L106', +'_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#L208-L211', +'_global.msearch.ResponseItem': '_global/msearch/types.ts#L211-L214', '_global.msearch_template.Request': '_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L71', '_global.msearch_template.Response': '_global/msearch_template/MultiSearchTemplateResponse.ts#L22-L24', '_global.msearch_template.TemplateConfig': '_global/msearch_template/types.ts#L28-L54', @@ -150,7 +150,7 @@ '_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-L59', +'_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.Response': '_global/search/SearchResponse.ts#L34-L36', @@ -174,7 +174,7 @@ '_global.search._types.FetchProfile': '_global/search/_types/profile.ts#L230-L237', '_global.search._types.FetchProfileBreakdown': '_global/search/_types/profile.ts#L239-L248', '_global.search._types.FetchProfileDebug': '_global/search/_types/profile.ts#L250-L253', -'_global.search._types.FieldCollapse': '_global/search/_types/FieldCollapse.ts#L24-L38', +'_global.search._types.FieldCollapse': '_global/search/_types/FieldCollapse.ts#L24-L41', '_global.search._types.FieldSuggester': '_global/search/_types/suggester.ts#L109-L142', '_global.search._types.Highlight': '_global/search/_types/highlighting.ts#L152-L155', '_global.search._types.HighlightBase': '_global/search/_types/highlighting.ts#L47-L150', @@ -239,7 +239,7 @@ '_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.Response': '_global/search_template/SearchTemplateResponse.ts#L30-L48', -'_global.terms_enum.Request': '_global/terms_enum/TermsEnumRequest.ts#L26-L65', +'_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', @@ -1254,47 +1254,47 @@ 'connector._types.SyncRulesFeature': 'connector/_types/Connector.ts#L219-L222', 'connector._types.SyncStatus': 'connector/_types/Connector.ts#L138-L146', 'connector._types.Validation': 'connector/_types/Connector.ts#L50-L56', -'connector.check_in.Request': 'connector/check_in/ConnectorCheckInRequest.ts#L22-L36', +'connector.check_in.Request': 'connector/check_in/ConnectorCheckInRequest.ts#L22-L38', 'connector.check_in.Response': 'connector/check_in/ConnectorCheckInResponse.ts#L22-L26', -'connector.delete.Request': 'connector/delete/ConnectorDeleteRequest.ts#L22-L42', +'connector.delete.Request': 'connector/delete/ConnectorDeleteRequest.ts#L22-L47', 'connector.delete.Response': 'connector/delete/ConnectorDeleteResponse.ts#L22-L24', -'connector.get.Request': 'connector/get/ConnectorGetRequest.ts#L22-L36', +'connector.get.Request': 'connector/get/ConnectorGetRequest.ts#L22-L38', 'connector.get.Response': 'connector/get/ConnectorGetResponse.ts#L22-L24', -'connector.list.Request': 'connector/list/ConnectorListRequest.ts#L23-L57', +'connector.list.Request': 'connector/list/ConnectorListRequest.ts#L23-L59', 'connector.list.Response': 'connector/list/ConnectorListResponse.ts#L23-L28', -'connector.post.Request': 'connector/post/ConnectorPostRequest.ts#L22-L42', +'connector.post.Request': 'connector/post/ConnectorPostRequest.ts#L22-L46', 'connector.post.Response': 'connector/post/ConnectorPostResponse.ts#L23-L28', 'connector.put.Request': 'connector/put/ConnectorPutRequest.ts#L22-L48', 'connector.put.Response': 'connector/put/ConnectorPutResponse.ts#L23-L28', -'connector.sync_job_cancel.Request': 'connector/sync_job_cancel/SyncJobCancelRequest.ts#L22-L36', +'connector.sync_job_cancel.Request': 'connector/sync_job_cancel/SyncJobCancelRequest.ts#L22-L39', 'connector.sync_job_cancel.Response': 'connector/sync_job_cancel/SyncJobCancelResponse.ts#L22-L26', -'connector.sync_job_delete.Request': 'connector/sync_job_delete/SyncJobDeleteRequest.ts#L22-L36', +'connector.sync_job_delete.Request': 'connector/sync_job_delete/SyncJobDeleteRequest.ts#L22-L39', 'connector.sync_job_delete.Response': 'connector/sync_job_delete/SyncJobDeleteResponse.ts#L22-L24', 'connector.sync_job_get.Request': 'connector/sync_job_get/SyncJobGetRequest.ts#L22-L36', 'connector.sync_job_get.Response': 'connector/sync_job_get/SyncJobGetResponse.ts#L22-L24', -'connector.sync_job_list.Request': 'connector/sync_job_list/SyncJobListRequest.ts#L25-L55', +'connector.sync_job_list.Request': 'connector/sync_job_list/SyncJobListRequest.ts#L25-L57', 'connector.sync_job_list.Response': 'connector/sync_job_list/SyncJobListResponse.ts#L23-L28', -'connector.sync_job_post.Request': 'connector/sync_job_post/SyncJobPostRequest.ts#L23-L43', +'connector.sync_job_post.Request': 'connector/sync_job_post/SyncJobPostRequest.ts#L23-L45', 'connector.sync_job_post.Response': 'connector/sync_job_post/SyncJobPostResponse.ts#L22-L26', -'connector.update_active_filtering.Request': 'connector/update_active_filtering/ConnectorUpdateActiveFilteringRequest.ts#L22-L36', +'connector.update_active_filtering.Request': 'connector/update_active_filtering/ConnectorUpdateActiveFilteringRequest.ts#L22-L38', 'connector.update_active_filtering.Response': 'connector/update_active_filtering/ConnectorUpdateActiveFilteringResponse.ts#L22-L26', -'connector.update_api_key_id.Request': 'connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L21-L42', +'connector.update_api_key_id.Request': 'connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L21-L47', 'connector.update_api_key_id.Response': 'connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.ts#L22-L26', -'connector.update_configuration.Request': 'connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L25-L47', +'connector.update_configuration.Request': 'connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L25-L49', 'connector.update_configuration.Response': 'connector/update_configuration/ConnectorUpdateConfigurationResponse.ts#L22-L26', -'connector.update_error.Request': 'connector/update_error/ConnectorUpdateErrorRequest.ts#L23-L44', +'connector.update_error.Request': 'connector/update_error/ConnectorUpdateErrorRequest.ts#L23-L48', 'connector.update_error.Response': 'connector/update_error/ConnectorUpdateErrorResponse.ts#L22-L26', -'connector.update_filtering.Request': 'connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L27-L50', +'connector.update_filtering.Request': 'connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L27-L54', 'connector.update_filtering.Response': 'connector/update_filtering/ConnectorUpdateFilteringResponse.ts#L22-L26', -'connector.update_filtering_validation.Request': 'connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts#L23-L40', +'connector.update_filtering_validation.Request': 'connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts#L23-L42', 'connector.update_filtering_validation.Response': 'connector/update_filtering_validation/ConnectorUpdateFilteringValidationResponse.ts#L22-L26', -'connector.update_index_name.Request': 'connector/update_index_name/ConnectorUpdateIndexNameRequest.ts#L23-L43', +'connector.update_index_name.Request': 'connector/update_index_name/ConnectorUpdateIndexNameRequest.ts#L23-L45', 'connector.update_index_name.Response': 'connector/update_index_name/ConnectorUpdateIndexNameResponse.ts#L22-L26', 'connector.update_name.Request': 'connector/update_name/ConnectorUpdateNameRequest.ts#L22-L43', 'connector.update_name.Response': 'connector/update_name/ConnectorUpdateNameResponse.ts#L22-L26', 'connector.update_native.Request': 'connector/update_native/ConnectorUpdateNativeRequest.ts#L22-L42', 'connector.update_native.Response': 'connector/update_native/ConnectorUpdateNativeResponse.ts#L22-L26', -'connector.update_pipeline.Request': 'connector/update_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L44', +'connector.update_pipeline.Request': 'connector/update_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L46', 'connector.update_pipeline.Response': 'connector/update_pipeline/ConnectorUpdatePipelineResponse.ts#L22-L26', 'connector.update_scheduling.Request': 'connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts#L23-L44', 'connector.update_scheduling.Response': 'connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts#L22-L26', @@ -1302,12 +1302,12 @@ 'connector.update_service_type.Response': 'connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts#L22-L26', 'connector.update_status.Request': 'connector/update_status/ConnectorUpdateStatusRequest.ts#L23-L43', 'connector.update_status.Response': 'connector/update_status/ConnectorUpdateStatusResponse.ts#L22-L26', -'dangling_indices.delete_dangling_index.Request': 'dangling_indices/delete_dangling_index/DeleteDanglingIndexRequest.ts#L24-L37', +'dangling_indices.delete_dangling_index.Request': 'dangling_indices/delete_dangling_index/DeleteDanglingIndexRequest.ts#L24-L48', 'dangling_indices.delete_dangling_index.Response': 'dangling_indices/delete_dangling_index/DeleteDanglingIndexResponse.ts#L22-L24', -'dangling_indices.import_dangling_index.Request': 'dangling_indices/import_dangling_index/ImportDanglingIndexRequest.ts#L24-L37', +'dangling_indices.import_dangling_index.Request': 'dangling_indices/import_dangling_index/ImportDanglingIndexRequest.ts#L24-L49', 'dangling_indices.import_dangling_index.Response': 'dangling_indices/import_dangling_index/ImportDanglingIndexResponse.ts#L22-L24', 'dangling_indices.list_dangling_indices.DanglingIndex': 'dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L29-L34', -'dangling_indices.list_dangling_indices.Request': 'dangling_indices/list_dangling_indices/ListDanglingIndicesRequest.ts#L22-L26', +'dangling_indices.list_dangling_indices.Request': 'dangling_indices/list_dangling_indices/ListDanglingIndicesRequest.ts#L22-L33', 'dangling_indices.list_dangling_indices.Response': 'dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L23-L27', 'enrich._types.Policy': 'enrich/_types/Policy.ts#L34-L41', 'enrich._types.PolicyType': 'enrich/_types/Policy.ts#L28-L32', @@ -2315,6 +2315,9 @@ 'query_rules.put_rule.Response': 'query_rules/put_rule/QueryRulePutResponse.ts#L22-L26', 'query_rules.put_ruleset.Request': 'query_rules/put_ruleset/QueryRulesetPutRequest.ts#L23-L43', 'query_rules.put_ruleset.Response': 'query_rules/put_ruleset/QueryRulesetPutResponse.ts#L22-L26', +'query_rules.test.QueryRulesetMatchedRule': 'query_rules/test/QueryRulesetTestResponse.ts#L30-L39', +'query_rules.test.Request': 'query_rules/test/QueryRulesetTestRequest.ts#L24-L44', +'query_rules.test.Response': 'query_rules/test/QueryRulesetTestResponse.ts#L23-L28', 'rollup._types.DateHistogramGrouping': 'rollup/_types/Groupings.ts#L42-L73', 'rollup._types.FieldMetric': 'rollup/_types/Metric.ts#L30-L35', 'rollup._types.Groupings': 'rollup/_types/Groupings.ts#L24-L40', @@ -2663,7 +2666,7 @@ 'sql.translate.Request': 'sql/translate/TranslateSqlRequest.ts#L25-L54', 'sql.translate.Response': 'sql/translate/TranslateSqlResponse.ts#L27-L37', 'ssl.certificates.CertificateInformation': 'ssl/certificates/types.ts#L22-L31', -'ssl.certificates.Request': 'ssl/certificates/GetCertificatesRequest.ts#L22-L27', +'ssl.certificates.Request': 'ssl/certificates/GetCertificatesRequest.ts#L22-L45', 'ssl.certificates.Response': 'ssl/certificates/GetCertificatesResponse.ts#L22-L24', 'synonyms._types.SynonymRule': 'synonyms/_types/SynonymRule.ts#L26-L35', 'synonyms._types.SynonymRuleRead': 'synonyms/_types/SynonymRule.ts#L38-L47', @@ -2937,10 +2940,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/aee8ec41948fb45810b7cb1876f9693a3ce9d527/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/57838c982615f8f05106da3fcd54bad3baf60e73/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/query_rules/ElasticsearchQueryRulesAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesAsyncClient.java index d46a11ef2..7c322da2b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesAsyncClient.java @@ -311,4 +311,36 @@ public final CompletableFuture putRuleset( return putRuleset(fn.apply(new PutRulesetRequest.Builder()).build()); } + // ----- Endpoint: query_rules.test + + /** + * Creates or updates a query ruleset. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture test(TestRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) TestRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Creates or updates a query ruleset. + * + * @param fn + * a function that initializes a builder to create the + * {@link TestRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture test(Function> fn) { + return test(fn.apply(new TestRequest.Builder()).build()); + } + } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesClient.java index 50ddc779c..53367ecde 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesClient.java @@ -313,4 +313,37 @@ public final PutRulesetResponse putRuleset(FunctionDocumentation + * on elastic.co + */ + + public TestResponse test(TestRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) TestRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Creates or updates a query ruleset. + * + * @param fn + * a function that initializes a builder to create the + * {@link TestRequest} + * @see Documentation + * on elastic.co + */ + + public final TestResponse test(Function> fn) + throws IOException, ElasticsearchException { + return test(fn.apply(new TestRequest.Builder()).build()); + } + } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/TestRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/TestRequest.java new file mode 100644 index 000000000..9c7777941 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/TestRequest.java @@ -0,0 +1,257 @@ +/* + * 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.query_rules; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +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: query_rules.test.Request + +/** + * Creates or updates a query ruleset. + * + * @see API + * specification + */ +@JsonpDeserializable +public class TestRequest extends RequestBase implements JsonpSerializable { + private final Map matchCriteria; + + private final String rulesetId; + + // --------------------------------------------------------------------------------------------- + + private TestRequest(Builder builder) { + + this.matchCriteria = ApiTypeHelper.unmodifiableRequired(builder.matchCriteria, this, "matchCriteria"); + this.rulesetId = ApiTypeHelper.requireNonNull(builder.rulesetId, this, "rulesetId"); + + } + + public static TestRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code match_criteria} + */ + public final Map matchCriteria() { + return this.matchCriteria; + } + + /** + * Required - The unique identifier of the query ruleset to be created or + * updated + *

+ * API name: {@code ruleset_id} + */ + public final String rulesetId() { + return this.rulesetId; + } + + /** + * 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.matchCriteria)) { + generator.writeKey("match_criteria"); + generator.writeStartObject(); + for (Map.Entry item0 : this.matchCriteria.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link TestRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + private Map matchCriteria; + + private String rulesetId; + + /** + * Required - API name: {@code match_criteria} + *

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

+ * Adds an entry to matchCriteria. + */ + public final Builder matchCriteria(String key, JsonData value) { + this.matchCriteria = _mapPut(this.matchCriteria, key, value); + return this; + } + + /** + * Required - The unique identifier of the query ruleset to be created or + * updated + *

+ * API name: {@code ruleset_id} + */ + public final Builder rulesetId(String value) { + this.rulesetId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link TestRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public TestRequest build() { + _checkSingleUse(); + + return new TestRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link TestRequest} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + TestRequest::setupTestRequestDeserializer); + + protected static void setupTestRequestDeserializer(ObjectDeserializer op) { + + op.add(Builder::matchCriteria, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), + "match_criteria"); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code query_rules.test}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/query_rules.test", + + // Request method + request -> { + return "POST"; + + }, + + // Request path + request -> { + final int _rulesetId = 1 << 0; + + int propsSet = 0; + + propsSet |= _rulesetId; + + if (propsSet == (_rulesetId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_query_rules"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.rulesetId, buf); + buf.append("/_test"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _rulesetId = 1 << 0; + + int propsSet = 0; + + propsSet |= _rulesetId; + + if (propsSet == (_rulesetId)) { + params.put("rulesetId", request.rulesetId); + } + return params; + }, + + // Request parameters + request -> { + return Collections.emptyMap(); + + }, SimpleEndpoint.emptyMap(), true, TestResponse._DESERIALIZER); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/TestResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/TestResponse.java new file mode 100644 index 000000000..c1a655ce6 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/TestResponse.java @@ -0,0 +1,210 @@ +/* + * 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.query_rules; + +import co.elastic.clients.elasticsearch.query_rules.test.QueryRulesetMatchedRule; +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.Integer; +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: query_rules.test.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class TestResponse implements JsonpSerializable { + private final int totalMatchedRules; + + private final List matchedRules; + + // --------------------------------------------------------------------------------------------- + + private TestResponse(Builder builder) { + + this.totalMatchedRules = ApiTypeHelper.requireNonNull(builder.totalMatchedRules, this, "totalMatchedRules"); + this.matchedRules = ApiTypeHelper.unmodifiableRequired(builder.matchedRules, this, "matchedRules"); + + } + + public static TestResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code total_matched_rules} + */ + public final int totalMatchedRules() { + return this.totalMatchedRules; + } + + /** + * Required - API name: {@code matched_rules} + */ + public final List matchedRules() { + return this.matchedRules; + } + + /** + * 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("total_matched_rules"); + generator.write(this.totalMatchedRules); + + if (ApiTypeHelper.isDefined(this.matchedRules)) { + generator.writeKey("matched_rules"); + generator.writeStartArray(); + for (QueryRulesetMatchedRule item0 : this.matchedRules) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link TestResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Integer totalMatchedRules; + + private List matchedRules; + + /** + * Required - API name: {@code total_matched_rules} + */ + public final Builder totalMatchedRules(int value) { + this.totalMatchedRules = value; + return this; + } + + /** + * Required - API name: {@code matched_rules} + *

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

+ * Adds one or more values to matchedRules. + */ + public final Builder matchedRules(QueryRulesetMatchedRule value, QueryRulesetMatchedRule... values) { + this.matchedRules = _listAdd(this.matchedRules, value, values); + return this; + } + + /** + * Required - API name: {@code matched_rules} + *

+ * Adds a value to matchedRules using a builder lambda. + */ + public final Builder matchedRules( + Function> fn) { + return matchedRules(fn.apply(new QueryRulesetMatchedRule.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link TestResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public TestResponse build() { + _checkSingleUse(); + + return new TestResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link TestResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + TestResponse::setupTestResponseDeserializer); + + protected static void setupTestResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::totalMatchedRules, JsonpDeserializer.integerDeserializer(), "total_matched_rules"); + op.add(Builder::matchedRules, JsonpDeserializer.arrayDeserializer(QueryRulesetMatchedRule._DESERIALIZER), + "matched_rules"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/test/QueryRulesetMatchedRule.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/test/QueryRulesetMatchedRule.java new file mode 100644 index 000000000..897df01eb --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/test/QueryRulesetMatchedRule.java @@ -0,0 +1,189 @@ +/* + * 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.query_rules.test; + +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.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: query_rules.test.QueryRulesetMatchedRule + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class QueryRulesetMatchedRule implements JsonpSerializable { + private final String rulesetId; + + private final String ruleId; + + // --------------------------------------------------------------------------------------------- + + private QueryRulesetMatchedRule(Builder builder) { + + this.rulesetId = ApiTypeHelper.requireNonNull(builder.rulesetId, this, "rulesetId"); + this.ruleId = ApiTypeHelper.requireNonNull(builder.ruleId, this, "ruleId"); + + } + + public static QueryRulesetMatchedRule of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - Ruleset unique identifier + *

+ * API name: {@code ruleset_id} + */ + public final String rulesetId() { + return this.rulesetId; + } + + /** + * Required - Rule unique identifier within that ruleset + *

+ * API name: {@code rule_id} + */ + public final String ruleId() { + return this.ruleId; + } + + /** + * 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("ruleset_id"); + generator.write(this.rulesetId); + + generator.writeKey("rule_id"); + generator.write(this.ruleId); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link QueryRulesetMatchedRule}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private String rulesetId; + + private String ruleId; + + /** + * Required - Ruleset unique identifier + *

+ * API name: {@code ruleset_id} + */ + public final Builder rulesetId(String value) { + this.rulesetId = value; + return this; + } + + /** + * Required - Rule unique identifier within that ruleset + *

+ * API name: {@code rule_id} + */ + public final Builder ruleId(String value) { + this.ruleId = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link QueryRulesetMatchedRule}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public QueryRulesetMatchedRule build() { + _checkSingleUse(); + + return new QueryRulesetMatchedRule(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link QueryRulesetMatchedRule} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, QueryRulesetMatchedRule::setupQueryRulesetMatchedRuleDeserializer); + + protected static void setupQueryRulesetMatchedRuleDeserializer( + ObjectDeserializer op) { + + op.add(Builder::rulesetId, JsonpDeserializer.stringDeserializer(), "ruleset_id"); + op.add(Builder::ruleId, JsonpDeserializer.stringDeserializer(), "rule_id"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/CertificatesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/CertificatesRequest.java index 2d635b689..7873ecbf7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/CertificatesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/CertificatesRequest.java @@ -50,8 +50,36 @@ // typedef: ssl.certificates.Request /** - * Retrieves information about the X.509 certificates used to encrypt - * communications in the cluster. + * Get SSL certificates. + *

+ * Get information about the X.509 certificates that are used to encrypt + * communications in the cluster. The API returns a list that includes + * certificates from all TLS contexts including: + *

+ *

+ * The list includes certificates that are used for configuring trust, such as + * those configured in the xpack.security.transport.ssl.truststore + * and xpack.security.transport.ssl.certificate_authorities + * settings. It also includes certificates that are used for configuring server + * identity, such as xpack.security.http.ssl.keystore and + * xpack.security.http.ssl.certificate settings. + *

+ * The list does not include certificates that are sourced from the default SSL + * context of the Java Runtime Environment (JRE), even if those certificates are + * in use within Elasticsearch. + *

+ * NOTE: When a PKCS#11 token is configured as the truststore of the JRE, the + * API returns all the certificates that are included in the PKCS#11 token + * irrespective of whether these are used in the Elasticsearch TLS + * configuration. + *

+ * If Elasticsearch is configured to use a keystore or truststore, the API + * output includes all certificates in that store, even though some of the + * certificates might not be in active use within the cluster. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/ElasticsearchSslAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/ElasticsearchSslAsyncClient.java index ba2a85955..c4cc769e8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/ElasticsearchSslAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/ElasticsearchSslAsyncClient.java @@ -65,8 +65,36 @@ public ElasticsearchSslAsyncClient withTransportOptions(@Nullable TransportOptio // ----- Endpoint: ssl.certificates /** - * Retrieves information about the X.509 certificates used to encrypt - * communications in the cluster. + * Get SSL certificates. + *

+ * Get information about the X.509 certificates that are used to encrypt + * communications in the cluster. The API returns a list that includes + * certificates from all TLS contexts including: + *

+ *

+ * The list includes certificates that are used for configuring trust, such as + * those configured in the xpack.security.transport.ssl.truststore + * and xpack.security.transport.ssl.certificate_authorities + * settings. It also includes certificates that are used for configuring server + * identity, such as xpack.security.http.ssl.keystore and + * xpack.security.http.ssl.certificate settings. + *

+ * The list does not include certificates that are sourced from the default SSL + * context of the Java Runtime Environment (JRE), even if those certificates are + * in use within Elasticsearch. + *

+ * NOTE: When a PKCS#11 token is configured as the truststore of the JRE, the + * API returns all the certificates that are included in the PKCS#11 token + * irrespective of whether these are used in the Elasticsearch TLS + * configuration. + *

+ * If Elasticsearch is configured to use a keystore or truststore, the API + * output includes all certificates in that store, even though some of the + * certificates might not be in active use within the cluster. * * @see Documentation diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/ElasticsearchSslClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/ElasticsearchSslClient.java index a2b597d3a..cc83cedce 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/ElasticsearchSslClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ssl/ElasticsearchSslClient.java @@ -66,8 +66,36 @@ public ElasticsearchSslClient withTransportOptions(@Nullable TransportOptions tr // ----- Endpoint: ssl.certificates /** - * Retrieves information about the X.509 certificates used to encrypt - * communications in the cluster. + * Get SSL certificates. + *

+ * Get information about the X.509 certificates that are used to encrypt + * communications in the cluster. The API returns a list that includes + * certificates from all TLS contexts including: + *

+ *

+ * The list includes certificates that are used for configuring trust, such as + * those configured in the xpack.security.transport.ssl.truststore + * and xpack.security.transport.ssl.certificate_authorities + * settings. It also includes certificates that are used for configuring server + * identity, such as xpack.security.http.ssl.keystore and + * xpack.security.http.ssl.certificate settings. + *

+ * The list does not include certificates that are sourced from the default SSL + * context of the Java Runtime Environment (JRE), even if those certificates are + * in use within Elasticsearch. + *

+ * NOTE: When a PKCS#11 token is configured as the truststore of the JRE, the + * API returns all the certificates that are included in the PKCS#11 token + * irrespective of whether these are used in the Elasticsearch TLS + * configuration. + *

+ * If Elasticsearch is configured to use a keystore or truststore, the API + * output includes all certificates in that store, even though some of the + * certificates might not be in active use within the cluster. * * @see Documentation