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 3a5e474e59..2c8fac0c11 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 @@ -935,14 +935,49 @@ public CompletableFuture bulk() { // ----- Endpoint: cancel_reindex /** - * Cancel a reindex task. + * Cancel an ongoing reindex task. *

- * Cancel an ongoing reindex task. If wait_for_completion is - * true (the default), the response contains the final task state - * after cancellation. If wait_for_completion is - * false, the response contains only - * acknowledged: true. + * If wait_for_completion is true (the default), the + * response contains the final task state after cancellation. If + * wait_for_completion is false, the response contains + * only acknowledged: true. + *

+ * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * Returned task IDs and timings reflect the original task, not its relocated + * successor. Relocated task IDs are also supported. They are followed + * transparently and return the task ID and timings of the original task. + *

+ * When the task ID cannot be cancelled (unknown ID, non-reindex task, sliced + * child, finished task, or node left with no stored result), the API returns + * the following response with a 404 status code: + * + *

+	 * {
+	 *   "error": {
+	 *     "type": "resource_not_found_exception",
+	 *     "reason": "reindex task [r1A2WoRbTwKZ516z6NEs5A:36619] either not found or completed"
+	 *   },
+	 *   "status": 404
+	 * }
+	 * 
+	 * 
+ *

+ * During a brief handoff window of a node-shutdown relocation, you may receive + * the response below with a 503 status code. Retry with the same task ID; the + * retry follows the relocated task transparently. * + *

+	 * {
+	 *   "error": {
+	 *     "type": "status_exception",
+	 *     "reason": "cannot cancel task [36619] because it is being relocated"
+	 *   },
+	 *   "status": 503
+	 * }
+	 * 
+	 * 
+ * * @see Documentation * on elastic.co @@ -956,14 +991,49 @@ public CompletableFuture cancelReindex(CancelReindexReque } /** - * Cancel a reindex task. + * Cancel an ongoing reindex task. + *

+ * If wait_for_completion is true (the default), the + * response contains the final task state after cancellation. If + * wait_for_completion is false, the response contains + * only acknowledged: true. *

- * Cancel an ongoing reindex task. If wait_for_completion is - * true (the default), the response contains the final task state - * after cancellation. If wait_for_completion is - * false, the response contains only - * acknowledged: true. + * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * Returned task IDs and timings reflect the original task, not its relocated + * successor. Relocated task IDs are also supported. They are followed + * transparently and return the task ID and timings of the original task. + *

+ * When the task ID cannot be cancelled (unknown ID, non-reindex task, sliced + * child, finished task, or node left with no stored result), the API returns + * the following response with a 404 status code: + * + *

+	 * {
+	 *   "error": {
+	 *     "type": "resource_not_found_exception",
+	 *     "reason": "reindex task [r1A2WoRbTwKZ516z6NEs5A:36619] either not found or completed"
+	 *   },
+	 *   "status": 404
+	 * }
+	 * 
+	 * 
+ *

+ * During a brief handoff window of a node-shutdown relocation, you may receive + * the response below with a 503 status code. Retry with the same task ID; the + * retry follows the relocated task transparently. * + *

+	 * {
+	 *   "error": {
+	 *     "type": "status_exception",
+	 *     "reason": "cannot cancel task [36619] because it is being relocated"
+	 *   },
+	 *   "status": 503
+	 * }
+	 * 
+	 * 
+ * * @param fn * a function that initializes a builder to create the * {@link CancelReindexRequest} @@ -2620,10 +2690,31 @@ public final CompletableFuture> get( // ----- Endpoint: get_reindex /** - * Get a reindex task. - *

* Get the status and progress of a specific reindex task. + *

+ * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * Returned task IDs and timings reflect the original task, not its relocated + * successor. Relocated task IDs are also supported. They are followed + * transparently and return the task ID and timings of the original task. + *

+ * When the task ID cannot be resolved, the API returns the response below with + * a 404 status code. This response is used whether the ID is unknown, refers to + * a non-reindex task, refers to a sliced child subtask, or refers to a task + * whose node left the cluster with no stored result (e.g. a non-graceful + * shutdown). * + *

+	 * {
+	 *   "error": {
+	 *     "type": "resource_not_found_exception",
+	 *     "reason": "Reindex operation [r1A2WoRbTwKZ516z6NEs5A:36619] not found"
+	 *   },
+	 *   "status": 404
+	 * }
+	 * 
+	 * 
+ * * @see Documentation * on elastic.co @@ -2637,10 +2728,31 @@ public CompletableFuture getReindex(GetReindexRequest reques } /** - * Get a reindex task. - *

* Get the status and progress of a specific reindex task. + *

+ * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * Returned task IDs and timings reflect the original task, not its relocated + * successor. Relocated task IDs are also supported. They are followed + * transparently and return the task ID and timings of the original task. + *

+ * When the task ID cannot be resolved, the API returns the response below with + * a 404 status code. This response is used whether the ID is unknown, refers to + * a non-reindex task, refers to a sliced child subtask, or refers to a task + * whose node left the cluster with no stored result (e.g. a non-graceful + * shutdown). * + *

+	 * {
+	 *   "error": {
+	 *     "type": "resource_not_found_exception",
+	 *     "reason": "Reindex operation [r1A2WoRbTwKZ516z6NEs5A:36619] not found"
+	 *   },
+	 *   "status": 404
+	 * }
+	 * 
+	 * 
+ * * @param fn * a function that initializes a builder to create the * {@link GetReindexRequest} @@ -3451,9 +3563,16 @@ public CompletableFuture info() { // ----- Endpoint: list_reindex /** - * List active reindex tasks. - *

* Get information about all currently running reindex tasks. + *

+ * Reindex tasks that are mid-relocation between nodes are reported once, under + * their original task ID, so callers do not see duplicates across the + * relocation chain. + *

+ * If the API returns a HTTP status of 200 OK, but + * node_failures or task_failures are non-empty in the + * body, the listing is not a complete authoritative listing and may be missing + * tasks. * * @see Documentation @@ -3468,9 +3587,16 @@ public CompletableFuture listReindex(ListReindexRequest req } /** - * List active reindex tasks. - *

* Get information about all currently running reindex tasks. + *

+ * Reindex tasks that are mid-relocation between nodes are reported once, under + * their original task ID, so callers do not see duplicates across the + * relocation chain. + *

+ * If the API returns a HTTP status of 200 OK, but + * node_failures or task_failures are non-empty in the + * body, the listing is not a complete authoritative listing and may be missing + * tasks. * * @param fn * a function that initializes a builder to create the @@ -3486,9 +3612,16 @@ public final CompletableFuture listReindex( } /** - * List active reindex tasks. - *

* Get information about all currently running reindex tasks. + *

+ * Reindex tasks that are mid-relocation between nodes are reported once, under + * their original task ID, so callers do not see duplicates across the + * relocation chain. + *

+ * If the API returns a HTTP status of 200 OK, but + * node_failures or task_failures are non-empty in the + * body, the listing is not a complete authoritative listing and may be missing + * tasks. * * @see Documentation @@ -4366,8 +4499,8 @@ public final CompletableFuture rankEval( * cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless * project, only remote hosts from Elastic - * Cloud Hosted are allowed. Automatic data stream creation requires a - * matching index template with data stream enabled. + * Cloud Hosted and Elastic Cloud Serverless are allowed. Automatic data + * stream creation requires a matching index template with data stream enabled. *

* The dest element can be configured like the index API to control * optimistic concurrency control. Omitting version_type or setting @@ -4463,8 +4596,8 @@ public CompletableFuture reindex(ReindexRequest request) { * cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless * project, only remote hosts from Elastic - * Cloud Hosted are allowed. Automatic data stream creation requires a - * matching index template with data stream enabled. + * Cloud Hosted and Elastic Cloud Serverless are allowed. Automatic data + * stream creation requires a matching index template with data stream enabled. *

* The dest element can be configured like the index API to control * optimistic concurrency control. Omitting version_type or setting @@ -4529,8 +4662,9 @@ public final CompletableFuture reindex( /** * Throttle a reindex operation. *

- * Change the number of requests per second for a particular reindex operation. - * For example: + * Change the maximum number of documents to index per second for a particular + * reindex operation. For example, to unthrottle to unlimited documents per + * second: * *

 	 * POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1
@@ -4538,8 +4672,22 @@ public final CompletableFuture reindex(
 	 * 
*

* Rethrottling that speeds up the query takes effect immediately. Rethrottling - * that slows down the query will take effect after completing the current - * batch. This behavior prevents scroll timeouts. + * that slows down the query will take effect after completing the current batch + * of documents. This behavior prevents scroll timeouts. + *

+ * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * The relocated task ID is also accepted and is followed transparently. In + * either case, returned task IDs and timings reflect the original task, not its + * relocated successor. + *

+ * The rethrottle may not have been applied to any tasks if either + * node_failures or task_failures are non-empty, or if + * the response contains no successfully rethrottled tasks — that is, no entries + * under nodes (returned with the default + * group_by=nodes in stack) or under tasks (returned + * in serverless, or in stack with group_by=none or + * group_by=parents). * * @see Documentation @@ -4556,8 +4704,9 @@ public CompletableFuture reindexRethrottle(ReindexRet /** * Throttle a reindex operation. *

- * Change the number of requests per second for a particular reindex operation. - * For example: + * Change the maximum number of documents to index per second for a particular + * reindex operation. For example, to unthrottle to unlimited documents per + * second: * *

 	 * POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1
@@ -4565,8 +4714,22 @@ public CompletableFuture reindexRethrottle(ReindexRet
 	 * 
*

* Rethrottling that speeds up the query takes effect immediately. Rethrottling - * that slows down the query will take effect after completing the current - * batch. This behavior prevents scroll timeouts. + * that slows down the query will take effect after completing the current batch + * of documents. This behavior prevents scroll timeouts. + *

+ * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * The relocated task ID is also accepted and is followed transparently. In + * either case, returned task IDs and timings reflect the original task, not its + * relocated successor. + *

+ * The rethrottle may not have been applied to any tasks if either + * node_failures or task_failures are non-empty, or if + * the response contains no successfully rethrottled tasks — that is, no entries + * under nodes (returned with the default + * group_by=nodes in stack) or under tasks (returned + * in serverless, or in stack with group_by=none or + * group_by=parents). * * @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 1ee17a7cad..0b6ee66feb 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 @@ -936,14 +936,49 @@ public BulkResponse bulk() throws IOException, ElasticsearchException { // ----- Endpoint: cancel_reindex /** - * Cancel a reindex task. + * Cancel an ongoing reindex task. *

- * Cancel an ongoing reindex task. If wait_for_completion is - * true (the default), the response contains the final task state - * after cancellation. If wait_for_completion is - * false, the response contains only - * acknowledged: true. + * If wait_for_completion is true (the default), the + * response contains the final task state after cancellation. If + * wait_for_completion is false, the response contains + * only acknowledged: true. + *

+ * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * Returned task IDs and timings reflect the original task, not its relocated + * successor. Relocated task IDs are also supported. They are followed + * transparently and return the task ID and timings of the original task. + *

+ * When the task ID cannot be cancelled (unknown ID, non-reindex task, sliced + * child, finished task, or node left with no stored result), the API returns + * the following response with a 404 status code: + * + *

+	 * {
+	 *   "error": {
+	 *     "type": "resource_not_found_exception",
+	 *     "reason": "reindex task [r1A2WoRbTwKZ516z6NEs5A:36619] either not found or completed"
+	 *   },
+	 *   "status": 404
+	 * }
+	 * 
+	 * 
+ *

+ * During a brief handoff window of a node-shutdown relocation, you may receive + * the response below with a 503 status code. Retry with the same task ID; the + * retry follows the relocated task transparently. * + *

+	 * {
+	 *   "error": {
+	 *     "type": "status_exception",
+	 *     "reason": "cannot cancel task [36619] because it is being relocated"
+	 *   },
+	 *   "status": 503
+	 * }
+	 * 
+	 * 
+ * * @see
Documentation * on elastic.co @@ -958,14 +993,49 @@ public CancelReindexResponse cancelReindex(CancelReindexRequest request) } /** - * Cancel a reindex task. + * Cancel an ongoing reindex task. + *

+ * If wait_for_completion is true (the default), the + * response contains the final task state after cancellation. If + * wait_for_completion is false, the response contains + * only acknowledged: true. *

- * Cancel an ongoing reindex task. If wait_for_completion is - * true (the default), the response contains the final task state - * after cancellation. If wait_for_completion is - * false, the response contains only - * acknowledged: true. + * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * Returned task IDs and timings reflect the original task, not its relocated + * successor. Relocated task IDs are also supported. They are followed + * transparently and return the task ID and timings of the original task. + *

+ * When the task ID cannot be cancelled (unknown ID, non-reindex task, sliced + * child, finished task, or node left with no stored result), the API returns + * the following response with a 404 status code: + * + *

+	 * {
+	 *   "error": {
+	 *     "type": "resource_not_found_exception",
+	 *     "reason": "reindex task [r1A2WoRbTwKZ516z6NEs5A:36619] either not found or completed"
+	 *   },
+	 *   "status": 404
+	 * }
+	 * 
+	 * 
+ *

+ * During a brief handoff window of a node-shutdown relocation, you may receive + * the response below with a 503 status code. Retry with the same task ID; the + * retry follows the relocated task transparently. * + *

+	 * {
+	 *   "error": {
+	 *     "type": "status_exception",
+	 *     "reason": "cannot cancel task [36619] because it is being relocated"
+	 *   },
+	 *   "status": 503
+	 * }
+	 * 
+	 * 
+ * * @param fn * a function that initializes a builder to create the * {@link CancelReindexRequest} @@ -2637,10 +2707,31 @@ public final GetResponse get(Function * Get the status and progress of a specific reindex task. + *

+ * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * Returned task IDs and timings reflect the original task, not its relocated + * successor. Relocated task IDs are also supported. They are followed + * transparently and return the task ID and timings of the original task. + *

+ * When the task ID cannot be resolved, the API returns the response below with + * a 404 status code. This response is used whether the ID is unknown, refers to + * a non-reindex task, refers to a sliced child subtask, or refers to a task + * whose node left the cluster with no stored result (e.g. a non-graceful + * shutdown). * + *

+	 * {
+	 *   "error": {
+	 *     "type": "resource_not_found_exception",
+	 *     "reason": "Reindex operation [r1A2WoRbTwKZ516z6NEs5A:36619] not found"
+	 *   },
+	 *   "status": 404
+	 * }
+	 * 
+	 * 
+ * * @see Documentation * on elastic.co @@ -2654,10 +2745,31 @@ public GetReindexResponse getReindex(GetReindexRequest request) throws IOExcepti } /** - * Get a reindex task. - *

* Get the status and progress of a specific reindex task. + *

+ * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * Returned task IDs and timings reflect the original task, not its relocated + * successor. Relocated task IDs are also supported. They are followed + * transparently and return the task ID and timings of the original task. + *

+ * When the task ID cannot be resolved, the API returns the response below with + * a 404 status code. This response is used whether the ID is unknown, refers to + * a non-reindex task, refers to a sliced child subtask, or refers to a task + * whose node left the cluster with no stored result (e.g. a non-graceful + * shutdown). * + *

+	 * {
+	 *   "error": {
+	 *     "type": "resource_not_found_exception",
+	 *     "reason": "Reindex operation [r1A2WoRbTwKZ516z6NEs5A:36619] not found"
+	 *   },
+	 *   "status": 404
+	 * }
+	 * 
+	 * 
+ * * @param fn * a function that initializes a builder to create the * {@link GetReindexRequest} @@ -3473,9 +3585,16 @@ public InfoResponse info() throws IOException, ElasticsearchException { // ----- Endpoint: list_reindex /** - * List active reindex tasks. - *

* Get information about all currently running reindex tasks. + *

+ * Reindex tasks that are mid-relocation between nodes are reported once, under + * their original task ID, so callers do not see duplicates across the + * relocation chain. + *

+ * If the API returns a HTTP status of 200 OK, but + * node_failures or task_failures are non-empty in the + * body, the listing is not a complete authoritative listing and may be missing + * tasks. * * @see Documentation @@ -3490,9 +3609,16 @@ public ListReindexResponse listReindex(ListReindexRequest request) throws IOExce } /** - * List active reindex tasks. - *

* Get information about all currently running reindex tasks. + *

+ * Reindex tasks that are mid-relocation between nodes are reported once, under + * their original task ID, so callers do not see duplicates across the + * relocation chain. + *

+ * If the API returns a HTTP status of 200 OK, but + * node_failures or task_failures are non-empty in the + * body, the listing is not a complete authoritative listing and may be missing + * tasks. * * @param fn * a function that initializes a builder to create the @@ -3509,9 +3635,16 @@ public final ListReindexResponse listReindex( } /** - * List active reindex tasks. - *

* Get information about all currently running reindex tasks. + *

+ * Reindex tasks that are mid-relocation between nodes are reported once, under + * their original task ID, so callers do not see duplicates across the + * relocation chain. + *

+ * If the API returns a HTTP status of 200 OK, but + * node_failures or task_failures are non-empty in the + * body, the listing is not a complete authoritative listing and may be missing + * tasks. * * @see Documentation @@ -4398,8 +4531,8 @@ public final RankEvalResponse rankEval(FunctionElastic - * Cloud Hosted are allowed. Automatic data stream creation requires a - * matching index template with data stream enabled. + * Cloud Hosted and Elastic Cloud Serverless are allowed. Automatic data + * stream creation requires a matching index template with data stream enabled. *

* The dest element can be configured like the index API to control * optimistic concurrency control. Omitting version_type or setting @@ -4495,8 +4628,8 @@ public ReindexResponse reindex(ReindexRequest request) throws IOException, Elast * cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless * project, only remote hosts from Elastic - * Cloud Hosted are allowed. Automatic data stream creation requires a - * matching index template with data stream enabled. + * Cloud Hosted and Elastic Cloud Serverless are allowed. Automatic data + * stream creation requires a matching index template with data stream enabled. *

* The dest element can be configured like the index API to control * optimistic concurrency control. Omitting version_type or setting @@ -4561,8 +4694,9 @@ public final ReindexResponse reindex(Function - * Change the number of requests per second for a particular reindex operation. - * For example: + * Change the maximum number of documents to index per second for a particular + * reindex operation. For example, to unthrottle to unlimited documents per + * second: * *

 	 * POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1
@@ -4570,8 +4704,22 @@ public final ReindexResponse reindex(Function
 	 * 

* Rethrottling that speeds up the query takes effect immediately. Rethrottling - * that slows down the query will take effect after completing the current - * batch. This behavior prevents scroll timeouts. + * that slows down the query will take effect after completing the current batch + * of documents. This behavior prevents scroll timeouts. + *

+ * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * The relocated task ID is also accepted and is followed transparently. In + * either case, returned task IDs and timings reflect the original task, not its + * relocated successor. + *

+ * The rethrottle may not have been applied to any tasks if either + * node_failures or task_failures are non-empty, or if + * the response contains no successfully rethrottled tasks — that is, no entries + * under nodes (returned with the default + * group_by=nodes in stack) or under tasks (returned + * in serverless, or in stack with group_by=none or + * group_by=parents). * * @see Documentation @@ -4589,8 +4737,9 @@ public ReindexRethrottleResponse reindexRethrottle(ReindexRethrottleRequest requ /** * Throttle a reindex operation. *

- * Change the number of requests per second for a particular reindex operation. - * For example: + * Change the maximum number of documents to index per second for a particular + * reindex operation. For example, to unthrottle to unlimited documents per + * second: * *

 	 * POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1
@@ -4598,8 +4747,22 @@ public ReindexRethrottleResponse reindexRethrottle(ReindexRethrottleRequest requ
 	 * 
*

* Rethrottling that speeds up the query takes effect immediately. Rethrottling - * that slows down the query will take effect after completing the current - * batch. This behavior prevents scroll timeouts. + * that slows down the query will take effect after completing the current batch + * of documents. This behavior prevents scroll timeouts. + *

+ * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * The relocated task ID is also accepted and is followed transparently. In + * either case, returned task IDs and timings reflect the original task, not its + * relocated successor. + *

+ * The rethrottle may not have been applied to any tasks if either + * node_failures or task_failures are non-empty, or if + * the response contains no successfully rethrottled tasks — that is, no entries + * under nodes (returned with the default + * group_by=nodes in stack) or under tasks (returned + * in serverless, or in stack with group_by=none or + * group_by=parents). * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/Embedding.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/Embedding.java new file mode 100644 index 0000000000..7206a884c7 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/Embedding.java @@ -0,0 +1,248 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types; + +import co.elastic.clients.json.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: _types.Embedding + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class Embedding implements QueryVectorBuilderVariant, JsonpSerializable { + @Nullable + private final String inferenceId; + + private final KnnEmbeddingInput input; + + @Nullable + private final Time timeout; + + // --------------------------------------------------------------------------------------------- + + private Embedding(Builder builder) { + + this.inferenceId = builder.inferenceId; + this.input = ApiTypeHelper.requireNonNull(builder.input, this, "input"); + this.timeout = builder.timeout; + + } + + public static Embedding of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * QueryVectorBuilder variant kind. + */ + @Override + public QueryVectorBuilder.Kind _queryVectorBuilderKind() { + return QueryVectorBuilder.Kind.Embedding; + } + + /** + * API name: {@code inference_id} + */ + @Nullable + public final String inferenceId() { + return this.inferenceId; + } + + /** + * Required - API name: {@code input} + */ + public final KnnEmbeddingInput input() { + return this.input; + } + + /** + * API name: {@code timeout} + */ + @Nullable + public final Time timeout() { + return this.timeout; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.inferenceId != null) { + generator.writeKey("inference_id"); + generator.write(this.inferenceId); + + } + generator.writeKey("input"); + this.input.serialize(generator, mapper); + + if (this.timeout != null) { + generator.writeKey("timeout"); + this.timeout.serialize(generator, mapper); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Embedding}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private String inferenceId; + + private KnnEmbeddingInput input; + + @Nullable + private Time timeout; + + public Builder() { + } + private Builder(Embedding instance) { + this.inferenceId = instance.inferenceId; + this.input = instance.input; + this.timeout = instance.timeout; + + } + /** + * API name: {@code inference_id} + */ + public final Builder inferenceId(@Nullable String value) { + this.inferenceId = value; + return this; + } + + /** + * Required - API name: {@code input} + */ + public final Builder input(KnnEmbeddingInput value) { + this.input = value; + return this; + } + + /** + * Required - API name: {@code input} + */ + public final Builder input(Function> fn) { + return this.input(fn.apply(new KnnEmbeddingInput.Builder()).build()); + } + + /** + * API name: {@code timeout} + */ + public final Builder timeout(@Nullable Time value) { + this.timeout = value; + return this; + } + + /** + * API name: {@code timeout} + */ + public final Builder timeout(Function> fn) { + return this.timeout(fn.apply(new Time.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link Embedding}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public Embedding build() { + _checkSingleUse(); + + return new Embedding(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Embedding} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + Embedding::setupEmbeddingDeserializer); + + protected static void setupEmbeddingDeserializer(ObjectDeserializer op) { + + op.add(Builder::inferenceId, JsonpDeserializer.stringDeserializer(), "inference_id"); + op.add(Builder::input, KnnEmbeddingInput._DESERIALIZER, "input"); + op.add(Builder::timeout, Time._DESERIALIZER, "timeout"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/InferenceString.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/InferenceString.java new file mode 100644 index 0000000000..f0fa0acb7b --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/InferenceString.java @@ -0,0 +1,236 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types; + +import co.elastic.clients.elasticsearch.inference.EmbeddingContentFormat; +import co.elastic.clients.elasticsearch.inference.EmbeddingContentType; +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: _types.InferenceString + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class InferenceString implements JsonpSerializable { + private final EmbeddingContentType type; + + @Nullable + private final EmbeddingContentFormat format; + + private final String value; + + // --------------------------------------------------------------------------------------------- + + private InferenceString(Builder builder) { + + this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); + this.format = builder.format; + this.value = ApiTypeHelper.requireNonNull(builder.value, this, "value"); + + } + + public static InferenceString of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The type of data that the value represents. + *

+ * API name: {@code type} + */ + public final EmbeddingContentType type() { + return this.type; + } + + /** + * The format of the data. If null, the default data format for the given type + * is used. + *

+ * API name: {@code format} + */ + @Nullable + public final EmbeddingContentFormat format() { + return this.format; + } + + /** + * Required - String which may be raw text, or the string representation of some + * other data such as an image in base64. + *

+ * API name: {@code value} + */ + public final String value() { + return this.value; + } + + /** + * 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("type"); + this.type.serialize(generator, mapper); + if (this.format != null) { + generator.writeKey("format"); + this.format.serialize(generator, mapper); + } + generator.writeKey("value"); + generator.write(this.value); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link InferenceString}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private EmbeddingContentType type; + + @Nullable + private EmbeddingContentFormat format; + + private String value; + + public Builder() { + } + private Builder(InferenceString instance) { + this.type = instance.type; + this.format = instance.format; + this.value = instance.value; + + } + /** + * Required - The type of data that the value represents. + *

+ * API name: {@code type} + */ + public final Builder type(EmbeddingContentType value) { + this.type = value; + return this; + } + + /** + * The format of the data. If null, the default data format for the given type + * is used. + *

+ * API name: {@code format} + */ + public final Builder format(@Nullable EmbeddingContentFormat value) { + this.format = value; + return this; + } + + /** + * Required - String which may be raw text, or the string representation of some + * other data such as an image in base64. + *

+ * API name: {@code value} + */ + public final Builder value(String value) { + this.value = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link InferenceString}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public InferenceString build() { + _checkSingleUse(); + + return new InferenceString(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link InferenceString} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + InferenceString::setupInferenceStringDeserializer); + + protected static void setupInferenceStringDeserializer(ObjectDeserializer op) { + + op.add(Builder::type, EmbeddingContentType._DESERIALIZER, "type"); + op.add(Builder::format, EmbeddingContentFormat._DESERIALIZER, "format"); + op.add(Builder::value, JsonpDeserializer.stringDeserializer(), "value"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnEmbeddingInput.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnEmbeddingInput.java new file mode 100644 index 0000000000..eb5b734c2b --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnEmbeddingInput.java @@ -0,0 +1,196 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types; + +import co.elastic.clients.json.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.ObjectDeserializer; +import co.elastic.clients.json.UnionDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.ObjectBuilderBase; +import co.elastic.clients.util.TaggedUnion; +import co.elastic.clients.util.TaggedUnionUtils; +import jakarta.json.stream.JsonGenerator; +import java.lang.Object; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.KnnEmbeddingInput + +/** + * Knn embedding input. Either a string, an object or array of objects + * + * @see API + * specification + */ +@JsonpDeserializable +public class KnnEmbeddingInput implements TaggedUnion, JsonpSerializable { + + public enum Kind { + Object, String + + } + + private final Kind _kind; + private final Object _value; + + @Override + public final Kind _kind() { + return _kind; + } + + @Override + public final Object _get() { + return _value; + } + + private KnnEmbeddingInput(Kind kind, Object value) { + this._kind = kind; + this._value = value; + } + + private KnnEmbeddingInput(Builder builder) { + + this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); + this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); + + } + + public static KnnEmbeddingInput of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Is this variant instance of kind {@code object}? + */ + public boolean isObject() { + return _kind == Kind.Object; + } + + /** + * Get the {@code object} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code object} kind. + */ + public List object() { + return TaggedUnionUtils.get(this, Kind.Object); + } + + /** + * Is this variant instance of kind {@code string}? + */ + public boolean isString() { + return _kind == Kind.String; + } + + /** + * Get the {@code string} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code string} kind. + */ + public String string() { + return TaggedUnionUtils.get(this, Kind.String); + } + + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + if (_value instanceof JsonpSerializable) { + ((JsonpSerializable) _value).serialize(generator, mapper); + } else { + switch (_kind) { + case Object : + generator.writeStartArray(); + for (InferenceString item0 : ((List) this._value)) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + break; + case String : + generator.write(((String) this._value)); + + break; + } + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + public static class Builder extends ObjectBuilderBase implements ObjectBuilder { + private Kind _kind; + private Object _value; + + public ObjectBuilder object(List v) { + this._kind = Kind.Object; + this._value = v; + return this; + } + + public ObjectBuilder string(String v) { + this._kind = Kind.String; + this._value = v; + return this; + } + + public KnnEmbeddingInput build() { + _checkSingleUse(); + return new KnnEmbeddingInput(this); + } + + } + + private static JsonpDeserializer buildKnnEmbeddingInputDeserializer() { + return new UnionDeserializer.Builder(KnnEmbeddingInput::new, false) + .addMember(Kind.Object, JsonpDeserializer.arrayDeserializer(InferenceString._DESERIALIZER)) + .addMember(Kind.String, JsonpDeserializer.stringDeserializer()).build(); + } + + public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer + .lazy(KnnEmbeddingInput::buildKnnEmbeddingInputDeserializer); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnEmbeddingInputBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnEmbeddingInputBuilders.java new file mode 100644 index 0000000000..ef73449631 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/KnnEmbeddingInputBuilders.java @@ -0,0 +1,52 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types; + +import co.elastic.clients.util.ObjectBuilder; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Builders for {@link KnnEmbeddingInput} variants. + *

+ * Variants object, string are not available here as + * they don't have a dedicated class. Use {@link KnnEmbeddingInput}'s builder + * for these. + * + */ +public class KnnEmbeddingInputBuilders { + private KnnEmbeddingInputBuilders() { + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilder.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilder.java index 2975a72ec4..84ea367c73 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilder.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilder.java @@ -71,6 +71,8 @@ public class QueryVectorBuilder implements TaggedUnion protected Builder self() { return this; } + public ObjectBuilder embedding(Embedding v) { + this._kind = Kind.Embedding; + this._value = v; + return this; + } + + public ObjectBuilder embedding(Function> fn) { + return this.embedding(fn.apply(new Embedding.Builder()).build()); + } + public ObjectBuilder textEmbedding(TextEmbedding v) { this._kind = Kind.TextEmbedding; this._value = v; @@ -215,6 +244,7 @@ public QueryVectorBuilder build() { protected static void setupQueryVectorBuilderDeserializer(ObjectDeserializer op) { + op.add(Builder::embedding, Embedding._DESERIALIZER, "embedding"); op.add(Builder::textEmbedding, TextEmbedding._DESERIALIZER, "text_embedding"); op.add(Builder::lookup, LookupQueryVectorBuilder._DESERIALIZER, "lookup"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilderBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilderBuilders.java index c7aba3d3f9..f1ad73a56a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilderBuilders.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/QueryVectorBuilderBuilders.java @@ -44,6 +44,24 @@ public class QueryVectorBuilderBuilders { private QueryVectorBuilderBuilders() { } + /** + * Creates a builder for the {@link Embedding embedding} + * {@code QueryVectorBuilder} variant. + */ + public static Embedding.Builder embedding() { + return new Embedding.Builder(); + } + + /** + * Creates a QueryVectorBuilder of the {@link Embedding embedding} + * {@code QueryVectorBuilder} variant. + */ + public static QueryVectorBuilder embedding(Function> fn) { + QueryVectorBuilder.Builder builder = new QueryVectorBuilder.Builder(); + builder.embedding(fn.apply(new Embedding.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link TextEmbedding text_embedding} * {@code QueryVectorBuilder} variant. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ReindexTaskInfo.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ReindexTaskInfo.java index c8f31f0750..89a9efc984 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ReindexTaskInfo.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ReindexTaskInfo.java @@ -55,7 +55,7 @@ // typedef: _types.ReindexTaskInfo /** - * Information about a single reindex task, as returned by the reindex + * Information about a single parent reindex task, as returned by the reindex * management APIs. * * @see API @@ -104,7 +104,8 @@ public static ReindexTaskInfo of(FunctionnodeId:taskNum format. + * Required - The ID of the reindex task. The ID is assigned when the task was + * first created and remains the same across graceful shutdown relocations. *

* API name: {@code id} */ @@ -125,7 +126,7 @@ public final String description() { /** * Required - The time at which the reindex task started, in milliseconds since - * the Unix epoch. + * the Unix epoch. Remains the same across graceful shutdown relocations. *

* API name: {@code start_time_in_millis} */ @@ -134,9 +135,9 @@ public final long startTimeInMillis() { } /** - * The time at which the reindex task started, as an ISO 8601 formatted string. - * Only present when the request includes the ?human=true query - * parameter. + * The time at which the reindex task started, as an ISO-8601 formatted string. + * Remains the same across graceful shutdown relocations. Only present when the + * request includes the ?human=true query parameter. *

* API name: {@code start_time} */ @@ -146,9 +147,9 @@ public final String startTime() { } /** - * The elapsed running time of the reindex task, in a human-readable format. - * Only present when the request includes the ?human=true query - * parameter. + * The elapsed running time of the reindex task, including relocations, in a + * human-readable format. Only present when the request includes the + * ?human=true query parameter. *

* API name: {@code running_time} */ @@ -158,7 +159,8 @@ public final Time runningTime() { } /** - * Required - The elapsed running time of the reindex task, in nanoseconds. + * Required - The elapsed running time of the reindex task, including + * relocations, in nanoseconds. *

* API name: {@code running_time_in_nanos} */ @@ -277,7 +279,8 @@ private Builder(ReindexTaskInfo instance) { } /** - * Required - The ID of the reindex task, in nodeId:taskNum format. + * Required - The ID of the reindex task. The ID is assigned when the task was + * first created and remains the same across graceful shutdown relocations. *

* API name: {@code id} */ @@ -299,7 +302,7 @@ public final Builder description(@Nullable String value) { /** * Required - The time at which the reindex task started, in milliseconds since - * the Unix epoch. + * the Unix epoch. Remains the same across graceful shutdown relocations. *

* API name: {@code start_time_in_millis} */ @@ -309,9 +312,9 @@ public final Builder startTimeInMillis(long value) { } /** - * The time at which the reindex task started, as an ISO 8601 formatted string. - * Only present when the request includes the ?human=true query - * parameter. + * The time at which the reindex task started, as an ISO-8601 formatted string. + * Remains the same across graceful shutdown relocations. Only present when the + * request includes the ?human=true query parameter. *

* API name: {@code start_time} */ @@ -321,9 +324,9 @@ public final Builder startTime(@Nullable String value) { } /** - * The elapsed running time of the reindex task, in a human-readable format. - * Only present when the request includes the ?human=true query - * parameter. + * The elapsed running time of the reindex task, including relocations, in a + * human-readable format. Only present when the request includes the + * ?human=true query parameter. *

* API name: {@code running_time} */ @@ -333,9 +336,9 @@ public final Builder runningTime(@Nullable Time value) { } /** - * The elapsed running time of the reindex task, in a human-readable format. - * Only present when the request includes the ?human=true query - * parameter. + * The elapsed running time of the reindex task, including relocations, in a + * human-readable format. Only present when the request includes the + * ?human=true query parameter. *

* API name: {@code running_time} */ @@ -344,7 +347,8 @@ public final Builder runningTime(Function> fn) } /** - * Required - The elapsed running time of the reindex task, in nanoseconds. + * Required - The elapsed running time of the reindex task, including + * relocations, in nanoseconds. *

* API name: {@code running_time_in_nanos} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SynonymTokenFilterBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SynonymTokenFilterBase.java index 955686dcdd..6d4ee05c29 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SynonymTokenFilterBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/SynonymTokenFilterBase.java @@ -73,8 +73,7 @@ public abstract class SynonymTokenFilterBase extends TokenFilterBase { @Nullable private final String synonymsPath; - @Nullable - private final String synonymsSet; + private final List synonymsSet; @Nullable private final String tokenizer; @@ -92,7 +91,7 @@ protected SynonymTokenFilterBase(AbstractBuilder builder) { this.lenient = builder.lenient; this.synonyms = ApiTypeHelper.unmodifiable(builder.synonyms); this.synonymsPath = builder.synonymsPath; - this.synonymsSet = builder.synonymsSet; + this.synonymsSet = ApiTypeHelper.unmodifiable(builder.synonymsSet); this.tokenizer = builder.tokenizer; this.updateable = builder.updateable; @@ -152,12 +151,12 @@ public final String synonymsPath() { } /** - * Provide a synonym set created via Synonyms Management APIs. + * Provide one or more synonym sets created through the Synonyms Management + * APIs. Maximum 100 sets per filter. *

* API name: {@code synonyms_set} */ - @Nullable - public final String synonymsSet() { + public final List synonymsSet() { return this.synonymsSet; } @@ -219,9 +218,14 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.synonymsPath); } - if (this.synonymsSet != null) { + if (ApiTypeHelper.isDefined(this.synonymsSet)) { generator.writeKey("synonyms_set"); - generator.write(this.synonymsSet); + generator.writeStartArray(); + for (String item0 : this.synonymsSet) { + generator.write(item0); + + } + generator.writeEnd(); } if (this.tokenizer != null) { @@ -256,7 +260,7 @@ public abstract static class AbstractBuilder synonymsSet; @Nullable private String tokenizer; @@ -333,12 +337,28 @@ public final BuilderT synonymsPath(@Nullable String value) { } /** - * Provide a synonym set created via Synonyms Management APIs. + * Provide one or more synonym sets created through the Synonyms Management + * APIs. Maximum 100 sets per filter. + *

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

+ * Adds all elements of list to synonymsSet. + */ + public final BuilderT synonymsSet(List list) { + this.synonymsSet = _listAddAll(this.synonymsSet, list); + return self(); + } + + /** + * Provide one or more synonym sets created through the Synonyms Management + * APIs. Maximum 100 sets per filter. *

* API name: {@code synonyms_set} + *

+ * Adds one or more values to synonymsSet. */ - public final BuilderT synonymsSet(@Nullable String value) { - this.synonymsSet = value; + public final BuilderT synonymsSet(String value, String... values) { + this.synonymsSet = _listAdd(this.synonymsSet, value, values); return self(); } @@ -380,7 +400,8 @@ protected static > void setupSynonymT op.add(AbstractBuilder::synonyms, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "synonyms"); op.add(AbstractBuilder::synonymsPath, JsonpDeserializer.stringDeserializer(), "synonyms_path"); - op.add(AbstractBuilder::synonymsSet, JsonpDeserializer.stringDeserializer(), "synonyms_set"); + op.add(AbstractBuilder::synonymsSet, + JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "synonyms_set"); op.add(AbstractBuilder::tokenizer, JsonpDeserializer.stringDeserializer(), "tokenizer"); op.add(AbstractBuilder::updateable, JsonpDeserializer.booleanDeserializer(), "updateable"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java index 535a22d4ee..3435ead818 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/DenseVectorIndexOptions.java @@ -79,6 +79,9 @@ public class DenseVectorIndexOptions implements JsonpSerializable { @Nullable private final Boolean onDiskRescore; + @Nullable + private final Integer flatIndexThreshold; + // --------------------------------------------------------------------------------------------- private DenseVectorIndexOptions(Builder builder) { @@ -89,6 +92,7 @@ private DenseVectorIndexOptions(Builder builder) { this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); this.rescoreVector = builder.rescoreVector; this.onDiskRescore = builder.onDiskRescore; + this.flatIndexThreshold = builder.flatIndexThreshold; } @@ -183,6 +187,24 @@ public final Boolean onDiskRescore() { return this.onDiskRescore; } + /** + * The segment document count threshold below which HNSW graph construction is + * skipped in favor of brute-force flat search. -1 (default) defers + * to format defaults: 300 for bbq_hnsw, + * 150 for hnsw, int8_hnsw, and + * int4_hnsw. 0 always builds the graph. A positive + * value overrides the format default. + *

+ * Only applicable to hnsw, int8_hnsw, + * int4_hnsw, and bbq_hnsw index types. + *

+ * API name: {@code flat_index_threshold} + */ + @Nullable + public final Integer flatIndexThreshold() { + return this.flatIndexThreshold; + } + /** * Serialize this object to JSON. */ @@ -221,6 +243,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.onDiskRescore); } + if (this.flatIndexThreshold != null) { + generator.writeKey("flat_index_threshold"); + generator.write(this.flatIndexThreshold); + + } } @@ -255,6 +282,9 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private Boolean onDiskRescore; + @Nullable + private Integer flatIndexThreshold; + public Builder() { } private Builder(DenseVectorIndexOptions instance) { @@ -264,6 +294,7 @@ private Builder(DenseVectorIndexOptions instance) { this.type = instance.type; this.rescoreVector = instance.rescoreVector; this.onDiskRescore = instance.onDiskRescore; + this.flatIndexThreshold = instance.flatIndexThreshold; } /** @@ -367,6 +398,24 @@ public final Builder onDiskRescore(@Nullable Boolean value) { return this; } + /** + * The segment document count threshold below which HNSW graph construction is + * skipped in favor of brute-force flat search. -1 (default) defers + * to format defaults: 300 for bbq_hnsw, + * 150 for hnsw, int8_hnsw, and + * int4_hnsw. 0 always builds the graph. A positive + * value overrides the format default. + *

+ * Only applicable to hnsw, int8_hnsw, + * int4_hnsw, and bbq_hnsw index types. + *

+ * API name: {@code flat_index_threshold} + */ + public final Builder flatIndexThreshold(@Nullable Integer value) { + this.flatIndexThreshold = value; + return this; + } + @Override protected Builder self() { return this; @@ -408,6 +457,7 @@ protected static void setupDenseVectorIndexOptionsDeserializer( op.add(Builder::type, DenseVectorIndexOptionsType._DESERIALIZER, "type"); op.add(Builder::rescoreVector, DenseVectorIndexOptionsRescoreVector._DESERIALIZER, "rescore_vector"); op.add(Builder::onDiskRescore, JsonpDeserializer.booleanDeserializer(), "on_disk_rescore"); + op.add(Builder::flatIndexThreshold, JsonpDeserializer.integerDeserializer(), "flat_index_threshold"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatTransformColumn.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatTransformColumn.java index 660814208c..1991e04b86 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatTransformColumn.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatTransformColumn.java @@ -185,6 +185,12 @@ public enum CatTransformColumn implements JsonEnum { */ ProcessingTime("processing_time", "pt"), + /** + * The project routing filter for cross-project search from the source + * configuration. + */ + ProjectRouting("project_routing", "pr", "projectRouting"), + /** * If a transform has a failed state, this property provides * details about the reason for the failure. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/transforms/TransformsRecord.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/transforms/TransformsRecord.java index dc0b32aa31..6ece2e1c20 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/transforms/TransformsRecord.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/transforms/TransformsRecord.java @@ -95,6 +95,9 @@ public class TransformsRecord implements JsonpSerializable { @Nullable private final String pipeline; + @Nullable + private final String projectRouting; + @Nullable private final String description; @@ -174,6 +177,7 @@ private TransformsRecord(Builder builder) { this.sourceIndex = builder.sourceIndex; this.destIndex = builder.destIndex; this.pipeline = builder.pipeline; + this.projectRouting = builder.projectRouting; this.description = builder.description; this.transformType = builder.transformType; this.frequency = builder.frequency; @@ -328,6 +332,17 @@ public final String pipeline() { return this.pipeline; } + /** + * The project routing filter for cross-project search from the source + * configuration. + *

+ * API name: {@code project_routing} + */ + @Nullable + public final String projectRouting() { + return this.projectRouting; + } + /** * The description of the transform. *

@@ -620,6 +635,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("pipeline"); generator.write(this.pipeline); + } + if (this.projectRouting != null) { + generator.writeKey("project_routing"); + generator.write(this.projectRouting); + } if (this.description != null) { generator.writeKey("description"); @@ -777,6 +797,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private String pipeline; + @Nullable + private String projectRouting; + @Nullable private String description; @@ -855,6 +878,7 @@ private Builder(TransformsRecord instance) { this.sourceIndex = instance.sourceIndex; this.destIndex = instance.destIndex; this.pipeline = instance.pipeline; + this.projectRouting = instance.projectRouting; this.description = instance.description; this.transformType = instance.transformType; this.frequency = instance.frequency; @@ -1004,6 +1028,17 @@ public final Builder pipeline(@Nullable String value) { return this; } + /** + * The project routing filter for cross-project search from the source + * configuration. + *

+ * API name: {@code project_routing} + */ + public final Builder projectRouting(@Nullable String value) { + this.projectRouting = value; + return this; + } + /** * The description of the transform. *

@@ -1276,6 +1311,8 @@ protected static void setupTransformsRecordDeserializer(ObjectDeserializer charFilterTypes; + @Nullable + private final MultipleSynonymGraphFilter multipleSynonymGraphFilters; + private final List filterTypes; private final List tokenizerTypes; @@ -92,6 +95,7 @@ private CharFilterTypes(Builder builder) { this.builtInTokenizers = ApiTypeHelper.unmodifiableRequired(builder.builtInTokenizers, this, "builtInTokenizers"); this.charFilterTypes = ApiTypeHelper.unmodifiableRequired(builder.charFilterTypes, this, "charFilterTypes"); + this.multipleSynonymGraphFilters = builder.multipleSynonymGraphFilters; this.filterTypes = ApiTypeHelper.unmodifiableRequired(builder.filterTypes, this, "filterTypes"); this.tokenizerTypes = ApiTypeHelper.unmodifiableRequired(builder.tokenizerTypes, this, "tokenizerTypes"); this.synonyms = ApiTypeHelper.unmodifiableRequired(builder.synonyms, this, "synonyms"); @@ -161,6 +165,14 @@ public final List charFilterTypes() { return this.charFilterTypes; } + /** + * API name: {@code multiple_synonym_graph_filters} + */ + @Nullable + public final MultipleSynonymGraphFilter multipleSynonymGraphFilters() { + return this.multipleSynonymGraphFilters; + } + /** * Required - Contains statistics about token filter types used in selected * nodes. @@ -259,6 +271,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (this.multipleSynonymGraphFilters != null) { + generator.writeKey("multiple_synonym_graph_filters"); + this.multipleSynonymGraphFilters.serialize(generator, mapper); + } if (ApiTypeHelper.isDefined(this.filterTypes)) { generator.writeKey("filter_types"); @@ -318,6 +335,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement private List charFilterTypes; + @Nullable + private MultipleSynonymGraphFilter multipleSynonymGraphFilters; + private List filterTypes; private List tokenizerTypes; @@ -333,6 +353,7 @@ private Builder(CharFilterTypes instance) { this.builtInFilters = instance.builtInFilters; this.builtInTokenizers = instance.builtInTokenizers; this.charFilterTypes = instance.charFilterTypes; + this.multipleSynonymGraphFilters = instance.multipleSynonymGraphFilters; this.filterTypes = instance.filterTypes; this.tokenizerTypes = instance.tokenizerTypes; this.synonyms = instance.synonyms; @@ -563,6 +584,22 @@ public final Builder charFilterTypes(Function> fn) { + return this.multipleSynonymGraphFilters(fn.apply(new MultipleSynonymGraphFilter.Builder()).build()); + } + /** * Required - Contains statistics about token filter types used in selected * nodes. @@ -716,6 +753,8 @@ protected static void setupCharFilterTypesDeserializer(ObjectDeserializerAPI + * specification + */ +@JsonpDeserializable +public class MultipleSynonymGraphFilter implements JsonpSerializable { + @Nullable + private final Integer analyzerCount; + + @Nullable + private final Integer indexCount; + + // --------------------------------------------------------------------------------------------- + + private MultipleSynonymGraphFilter(Builder builder) { + + this.analyzerCount = builder.analyzerCount; + this.indexCount = builder.indexCount; + + } + + public static MultipleSynonymGraphFilter of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Number of analyzers across the cluster whose filter chain contains more than + * one synonym_graph filter. + *

+ * API name: {@code analyzer_count} + */ + @Nullable + public final Integer analyzerCount() { + return this.analyzerCount; + } + + /** + * Number of indices that contain at least one analyzer with more than one + * synonym_graph filter. + *

+ * API name: {@code index_count} + */ + @Nullable + public final Integer indexCount() { + return this.indexCount; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.analyzerCount != null) { + generator.writeKey("analyzer_count"); + generator.write(this.analyzerCount); + + } + if (this.indexCount != null) { + generator.writeKey("index_count"); + generator.write(this.indexCount); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link MultipleSynonymGraphFilter}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private Integer analyzerCount; + + @Nullable + private Integer indexCount; + + public Builder() { + } + private Builder(MultipleSynonymGraphFilter instance) { + this.analyzerCount = instance.analyzerCount; + this.indexCount = instance.indexCount; + + } + /** + * Number of analyzers across the cluster whose filter chain contains more than + * one synonym_graph filter. + *

+ * API name: {@code analyzer_count} + */ + public final Builder analyzerCount(@Nullable Integer value) { + this.analyzerCount = value; + return this; + } + + /** + * Number of indices that contain at least one analyzer with more than one + * synonym_graph filter. + *

+ * API name: {@code index_count} + */ + public final Builder indexCount(@Nullable Integer value) { + this.indexCount = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link MultipleSynonymGraphFilter}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public MultipleSynonymGraphFilter build() { + _checkSingleUse(); + + return new MultipleSynonymGraphFilter(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link MultipleSynonymGraphFilter} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, MultipleSynonymGraphFilter::setupMultipleSynonymGraphFilterDeserializer); + + protected static void setupMultipleSynonymGraphFilterDeserializer( + ObjectDeserializer op) { + + op.add(Builder::analyzerCount, JsonpDeserializer.integerDeserializer(), "analyzer_count"); + op.add(Builder::indexCount, JsonpDeserializer.integerDeserializer(), "index_count"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CancelReindexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CancelReindexRequest.java index 27864d250e..bdf00f86cf 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CancelReindexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CancelReindexRequest.java @@ -56,14 +56,49 @@ // typedef: _global.cancel_reindex.Request /** - * Cancel a reindex task. + * Cancel an ongoing reindex task. *

- * Cancel an ongoing reindex task. If wait_for_completion is - * true (the default), the response contains the final task state - * after cancellation. If wait_for_completion is - * false, the response contains only - * acknowledged: true. + * If wait_for_completion is true (the default), the + * response contains the final task state after cancellation. If + * wait_for_completion is false, the response contains + * only acknowledged: true. + *

+ * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * Returned task IDs and timings reflect the original task, not its relocated + * successor. Relocated task IDs are also supported. They are followed + * transparently and return the task ID and timings of the original task. + *

+ * When the task ID cannot be cancelled (unknown ID, non-reindex task, sliced + * child, finished task, or node left with no stored result), the API returns + * the following response with a 404 status code: * + *

+ * {
+ *   "error": {
+ *     "type": "resource_not_found_exception",
+ *     "reason": "reindex task [r1A2WoRbTwKZ516z6NEs5A:36619] either not found or completed"
+ *   },
+ *   "status": 404
+ * }
+ * 
+ * 
+ *

+ * During a brief handoff window of a node-shutdown relocation, you may receive + * the response below with a 503 status code. Retry with the same task ID; the + * retry follows the relocated task transparently. + * + *

+ * {
+ *   "error": {
+ *     "type": "status_exception",
+ *     "reason": "cannot cancel task [36619] because it is being relocated"
+ *   },
+ *   "status": 503
+ * }
+ * 
+ * 
+ * * @see API * specification */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CancelReindexResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CancelReindexResponse.java index c4eb796372..af138395a7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CancelReindexResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CancelReindexResponse.java @@ -145,7 +145,8 @@ public final Boolean completed() { } /** - * The ID of the reindex task, in nodeId:taskNum format. Present + * The ID of the reindex task. The value is the ID assigned when the task was + * first created and remains stable across node-shutdown relocations. Present * when wait_for_completion=true. *

* API name: {@code id} @@ -395,7 +396,8 @@ public final Builder completed(@Nullable Boolean value) { } /** - * The ID of the reindex task, in nodeId:taskNum format. Present + * The ID of the reindex task. The value is the ID assigned when the task was + * first created and remains stable across node-shutdown relocations. Present * when wait_for_completion=true. *

* API name: {@code id} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java index 015f362707..3489f1b11f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRequest.java @@ -542,7 +542,10 @@ public final Boolean requestCache() { } /** - * The throttle for this request in sub-requests per second. + * The maximum number of documents to delete per second, across the entire + * delete-by-query operation (including slices). It can be either + * -1 to turn off throttling or any decimal number like + * 1.7 or 12 to throttle to that level. *

* API name: {@code requests_per_second} */ @@ -1140,7 +1143,10 @@ public final Builder requestCache(@Nullable Boolean value) { } /** - * The throttle for this request in sub-requests per second. + * The maximum number of documents to delete per second, across the entire + * delete-by-query operation (including slices). It can be either + * -1 to turn off throttling or any decimal number like + * 1.7 or 12 to throttle to that level. *

* API name: {@code requests_per_second} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java index c6169b5c56..dfd4e78842 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java @@ -88,8 +88,10 @@ public static DeleteByQueryRethrottleRequest of( } /** - * Required - The throttle for this request in sub-requests per second. To - * disable throttling, set it to -1. + * Required - The maximum number of documents to delete per second, across the + * entire delete-by-query operation (including slices). It can be either + * -1 to turn off throttling or any decimal number like + * 1.7 or 12 to throttle to that level. *

* API name: {@code requests_per_second} */ @@ -127,8 +129,10 @@ private Builder(DeleteByQueryRethrottleRequest instance) { } /** - * Required - The throttle for this request in sub-requests per second. To - * disable throttling, set it to -1. + * Required - The maximum number of documents to delete per second, across the + * entire delete-by-query operation (including slices). It can be either + * -1 to turn off throttling or any decimal number like + * 1.7 or 12 to throttle to that level. *

* API name: {@code requests_per_second} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetReindexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetReindexRequest.java index 511e2e56fe..4736758a2a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetReindexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetReindexRequest.java @@ -57,10 +57,31 @@ // typedef: _global.get_reindex.Request /** - * Get a reindex task. - *

* Get the status and progress of a specific reindex task. + *

+ * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * Returned task IDs and timings reflect the original task, not its relocated + * successor. Relocated task IDs are also supported. They are followed + * transparently and return the task ID and timings of the original task. + *

+ * When the task ID cannot be resolved, the API returns the response below with + * a 404 status code. This response is used whether the ID is unknown, refers to + * a non-reindex task, refers to a sliced child subtask, or refers to a task + * whose node left the cluster with no stored result (e.g. a non-graceful + * shutdown). * + *

+ * {
+ *   "error": {
+ *     "type": "resource_not_found_exception",
+ *     "reason": "Reindex operation [r1A2WoRbTwKZ516z6NEs5A:36619] not found"
+ *   },
+ *   "status": 404
+ * }
+ * 
+ * 
+ * * @see API * specification */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetReindexResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetReindexResponse.java index 7612a057f8..e7b9e2e1cd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetReindexResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetReindexResponse.java @@ -126,7 +126,8 @@ public final boolean completed() { } /** - * Required - The ID of the reindex task, in nodeId:taskNum format. + * Required - The ID of the reindex task. The value is the ID assigned when the + * task was first created and remains stable across node-shutdown relocations. *

* API name: {@code id} */ @@ -340,7 +341,8 @@ public final Builder completed(boolean value) { } /** - * Required - The ID of the reindex task, in nodeId:taskNum format. + * Required - The ID of the reindex task. The value is the ID assigned when the + * task was first created and remains stable across node-shutdown relocations. *

* API name: {@code id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ListReindexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ListReindexRequest.java index 939619c84a..460e744ec3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ListReindexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ListReindexRequest.java @@ -55,9 +55,16 @@ // typedef: _global.list_reindex.Request /** - * List active reindex tasks. - *

* Get information about all currently running reindex tasks. + *

+ * Reindex tasks that are mid-relocation between nodes are reported once, under + * their original task ID, so callers do not see duplicates across the + * relocation chain. + *

+ * If the API returns a HTTP status of 200 OK, but + * node_failures or task_failures are non-empty in the + * body, the listing is not a complete authoritative listing and may be missing + * tasks. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ListReindexResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ListReindexResponse.java index 76332aeed9..cf0f8230d8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ListReindexResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ListReindexResponse.java @@ -92,7 +92,8 @@ public final List reindex() { } /** - * Task-level failures that occurred while listing reindex tasks. + * Per-task failures encountered while listing reindex tasks. Tasks that failed + * are not included in the reindex array. *

* API name: {@code task_failures} */ @@ -101,7 +102,10 @@ public final List taskFailures() { } /** - * Node-level failures that occurred while listing reindex tasks. + * Node-level failures encountered while listing reindex tasks. Typically + * populated when a node disconnects or stops responding mid-request, reindex + * tasks running on such nodes will be missing from the reindex + * array for the duration of the disruption. *

* API name: {@code node_failures} */ @@ -211,7 +215,8 @@ public final Builder reindex(Functionreindex array. *

* API name: {@code task_failures} *

@@ -223,7 +228,8 @@ public final Builder taskFailures(List list) { } /** - * Task-level failures that occurred while listing reindex tasks. + * Per-task failures encountered while listing reindex tasks. Tasks that failed + * are not included in the reindex array. *

* API name: {@code task_failures} *

@@ -235,7 +241,8 @@ public final Builder taskFailures(TaskFailure value, TaskFailure... values) { } /** - * Task-level failures that occurred while listing reindex tasks. + * Per-task failures encountered while listing reindex tasks. Tasks that failed + * are not included in the reindex array. *

* API name: {@code task_failures} *

@@ -246,7 +253,10 @@ public final Builder taskFailures(Functionreindex + * array for the duration of the disruption. *

* API name: {@code node_failures} *

@@ -258,7 +268,10 @@ public final Builder nodeFailures(List list) { } /** - * Node-level failures that occurred while listing reindex tasks. + * Node-level failures encountered while listing reindex tasks. Typically + * populated when a node disconnects or stops responding mid-request, reindex + * tasks running on such nodes will be missing from the reindex + * array for the duration of the disruption. *

* API name: {@code node_failures} *

@@ -270,7 +283,10 @@ public final Builder nodeFailures(ErrorCause value, ErrorCause... values) { } /** - * Node-level failures that occurred while listing reindex tasks. + * Node-level failures encountered while listing reindex tasks. Typically + * populated when a node disconnects or stops responding mid-request, reindex + * tasks running on such nodes will be missing from the reindex + * array for the duration of the disruption. *

* API name: {@code node_failures} *

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 a23c9baf22..fb808b1509 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 @@ -94,6 +94,9 @@ */ public class MsearchRequest extends RequestBase implements NdJsonpSerializable, JsonpSerializable { + @Nullable + private final String slice; + @Nullable private final Boolean allowNoIndices; @@ -136,6 +139,7 @@ public class MsearchRequest extends RequestBase implements NdJsonpSerializable, private MsearchRequest(Builder builder) { + this.slice = builder.slice; this.allowNoIndices = builder.allowNoIndices; this.ccsMinimizeRoundtrips = builder.ccsMinimizeRoundtrips; this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); @@ -161,6 +165,23 @@ public static MsearchRequest of(Function> public Iterator _serializables() { return this.searches.iterator(); } + /** + * The slice identifier for routing the search to a specific slice. When + * provided at the top level, all sub-searches are routed to shards matching the + * given slice value. Use the special value _all to query all + * slices without restricting to a routing value. Required when + * index.slice.enabled is true for the target index; + * not allowed when index.slice.enabled is false. + * Individual sub-search headers can also specify _slice to + * override the top-level setting. + *

+ * API name: {@code _slice} + */ + @Nullable + public final String slice() { + return this.slice; + } + /** * A setting that does two separate checks on the index expression. If * false, the request returns an error (1) if any wildcard @@ -303,7 +324,9 @@ public final String projectRouting() { } /** - * Custom routing value used to route search operations to a specific shard. + * Custom routing value used to route search operations to a specific shard. Not + * allowed when index.slice.enabled is true for the + * target index; use _slice instead. *

* API name: {@code routing} */ @@ -349,6 +372,9 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { */ public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private String slice; + @Nullable private Boolean allowNoIndices; @@ -393,6 +419,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme public Builder() { } private Builder(MsearchRequest instance) { + this.slice = instance.slice; this.allowNoIndices = instance.allowNoIndices; this.ccsMinimizeRoundtrips = instance.ccsMinimizeRoundtrips; this.expandWildcards = instance.expandWildcards; @@ -409,6 +436,23 @@ private Builder(MsearchRequest instance) { this.searches = instance.searches; } + /** + * The slice identifier for routing the search to a specific slice. When + * provided at the top level, all sub-searches are routed to shards matching the + * given slice value. Use the special value _all to query all + * slices without restricting to a routing value. Required when + * index.slice.enabled is true for the target index; + * not allowed when index.slice.enabled is false. + * Individual sub-search headers can also specify _slice to + * override the top-level setting. + *

+ * API name: {@code _slice} + */ + public final Builder slice(@Nullable String value) { + this.slice = value; + return this; + } + /** * A setting that does two separate checks on the index expression. If * false, the request returns an error (1) if any wildcard @@ -583,7 +627,9 @@ public final Builder projectRouting(@Nullable String value) { } /** - * Custom routing value used to route search operations to a specific shard. + * Custom routing value used to route search operations to a specific shard. Not + * allowed when index.slice.enabled is true for the + * target index; use _slice instead. *

* API name: {@code routing} *

@@ -595,7 +641,9 @@ public final Builder routing(List list) { } /** - * Custom routing value used to route search operations to a specific shard. + * Custom routing value used to route search operations to a specific shard. Not + * allowed when index.slice.enabled is true for the + * target index; use _slice instead. *

* API name: {@code routing} *

@@ -754,6 +802,9 @@ public Builder rebuild() { if (request.ccsMinimizeRoundtrips != null) { params.put("ccs_minimize_roundtrips", String.valueOf(request.ccsMinimizeRoundtrips)); } + if (request.slice != null) { + params.put("_slice", request.slice); + } if (ApiTypeHelper.isDefined(request.routing)) { params.put("routing", request.routing.stream().map(v -> v).filter(Objects::nonNull) .collect(Collectors.joining(","))); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeResponse.java index 72e7f8580b..ff5fddd163 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeResponse.java @@ -19,6 +19,7 @@ package co.elastic.clients.elasticsearch.core; +import co.elastic.clients.elasticsearch._types.ClusterStatistics; import co.elastic.clients.elasticsearch._types.ShardStatistics; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; @@ -65,12 +66,16 @@ public class OpenPointInTimeResponse implements JsonpSerializable { private final String id; + @Nullable + private final ClusterStatistics clusters; + // --------------------------------------------------------------------------------------------- private OpenPointInTimeResponse(Builder builder) { this.shards = ApiTypeHelper.requireNonNull(builder.shards, this, "shards"); this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.clusters = builder.clusters; } @@ -94,6 +99,17 @@ public final String id() { return this.id; } + /** + * Metadata about the clusters involved in the request, returned when the + * request targets one or more remote clusters. + *

+ * API name: {@code _clusters} + */ + @Nullable + public final ClusterStatistics clusters() { + return this.clusters; + } + /** * Serialize this object to JSON. */ @@ -111,6 +127,12 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("id"); generator.write(this.id); + if (this.clusters != null) { + generator.writeKey("_clusters"); + this.clusters.serialize(generator, mapper); + + } + } @Override @@ -131,6 +153,9 @@ public static class Builder extends WithJsonObjectBuilderBase private String id; + @Nullable + private ClusterStatistics clusters; + /** * Required - Shards used to create the PIT *

@@ -158,6 +183,27 @@ public final Builder id(String value) { return this; } + /** + * Metadata about the clusters involved in the request, returned when the + * request targets one or more remote clusters. + *

+ * API name: {@code _clusters} + */ + public final Builder clusters(@Nullable ClusterStatistics value) { + this.clusters = value; + return this; + } + + /** + * Metadata about the clusters involved in the request, returned when the + * request targets one or more remote clusters. + *

+ * API name: {@code _clusters} + */ + public final Builder clusters(Function> fn) { + return this.clusters(fn.apply(new ClusterStatistics.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -189,6 +235,7 @@ protected static void setupOpenPointInTimeResponseDeserializer( op.add(Builder::shards, ShardStatistics._DESERIALIZER, "_shards"); op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::clusters, ClusterStatistics._DESERIALIZER, "_clusters"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java index 00b6c1136a..0c4e12ded0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRequest.java @@ -103,8 +103,8 @@ * cluster. If reindexing from a remote cluster into an Elastic Cloud Serverless * project, only remote hosts from Elastic - * Cloud Hosted are allowed. Automatic data stream creation requires a - * matching index template with data stream enabled. + * Cloud Hosted and Elastic Cloud Serverless are allowed. Automatic data + * stream creation requires a matching index template with data stream enabled. *

* The dest element can be configured like the index API to control * optimistic concurrency control. Omitting version_type or setting @@ -266,8 +266,10 @@ public final Boolean refresh() { } /** - * The throttle for this request in sub-requests per second. By default, there - * is no throttle. + * The maximum number of documents to index per second, across the entire + * reindex operation (including slices). It can be either -1 to + * turn off throttling or any decimal number like 1.7 or + * 12 to throttle to that level. *

* API name: {@code requests_per_second} */ @@ -298,7 +300,11 @@ public final Script script() { /** * The period of time that a consistent view of the index should be maintained - * for scrolled search. + * for scrolled search. In serverless, and stack versions >= v9.5.0, we use + * PIT rather than scroll for pagination. We only use scroll for reindexing from + * remote clusters that are older than v7.10.0. Therefore, this parameter is + * ignored unless you are reindexing from a remote cluster that is older than + * v7.10.0. *

* API name: {@code scroll} */ @@ -530,8 +536,10 @@ public final Builder refresh(@Nullable Boolean value) { } /** - * The throttle for this request in sub-requests per second. By default, there - * is no throttle. + * The maximum number of documents to index per second, across the entire + * reindex operation (including slices). It can be either -1 to + * turn off throttling or any decimal number like 1.7 or + * 12 to throttle to that level. *

* API name: {@code requests_per_second} */ @@ -571,7 +579,11 @@ public final Builder script(Function> fn) /** * The period of time that a consistent view of the index should be maintained - * for scrolled search. + * for scrolled search. In serverless, and stack versions >= v9.5.0, we use + * PIT rather than scroll for pagination. We only use scroll for reindexing from + * remote clusters that are older than v7.10.0. Therefore, this parameter is + * ignored unless you are reindexing from a remote cluster that is older than + * v7.10.0. *

* API name: {@code scroll} */ @@ -582,7 +594,11 @@ public final Builder scroll(@Nullable Time value) { /** * The period of time that a consistent view of the index should be maintained - * for scrolled search. + * for scrolled search. In serverless, and stack versions >= v9.5.0, we use + * PIT rather than scroll for pagination. We only use scroll for reindexing from + * remote clusters that are older than v7.10.0. Therefore, this parameter is + * ignored unless you are reindexing from a remote cluster that is older than + * v7.10.0. *

* API name: {@code scroll} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java index 23b3d42ce9..a2faf1082f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java @@ -59,8 +59,9 @@ /** * Throttle a reindex operation. *

- * Change the number of requests per second for a particular reindex operation. - * For example: + * Change the maximum number of documents to index per second for a particular + * reindex operation. For example, to unthrottle to unlimited documents per + * second: * *

  * POST _reindex/r1A2WoRbTwKZ516z6NEs5A:36619/_rethrottle?requests_per_second=-1
@@ -68,8 +69,22 @@
  * 
*

* Rethrottling that speeds up the query takes effect immediately. Rethrottling - * that slows down the query will take effect after completing the current - * batch. This behavior prevents scroll timeouts. + * that slows down the query will take effect after completing the current batch + * of documents. This behavior prevents scroll timeouts. + *

+ * This API follows reindex tasks across node-shutdown relocations, so callers + * can keep using the original task ID throughout the lifetime of the operation. + * The relocated task ID is also accepted and is followed transparently. In + * either case, returned task IDs and timings reflect the original task, not its + * relocated successor. + *

+ * The rethrottle may not have been applied to any tasks if either + * node_failures or task_failures are non-empty, or if + * the response contains no successfully rethrottled tasks — that is, no entries + * under nodes (returned with the default + * group_by=nodes in stack) or under tasks (returned + * in serverless, or in stack with group_by=none or + * group_by=parents). * * @see API @@ -99,6 +114,9 @@ public static ReindexRethrottleRequest of(Functionnone, which provides the cleanest response format. + *

* API name: {@code group_by} */ @Nullable @@ -107,9 +125,10 @@ public final GroupBy groupBy() { } /** - * Required - The throttle for this request in sub-requests per second. It can - * be either -1 to turn off throttling or any decimal number like - * 1.7 or 12 to throttle to that level. + * Required - The maximum number of documents to index per second, across the + * entire reindex operation (including slices). It can be either -1 + * to turn off throttling or any decimal number like 1.7 or + * 12 to throttle to that level. *

* API name: {@code requests_per_second} */ @@ -118,7 +137,10 @@ public final float requestsPerSecond() { } /** - * Required - The task identifier, which can be found by using the tasks API. + * Required - The task identifier, returned when creating a reindex task, or by + * listing tasks via GET /_reindex or GET /_tasks. In + * stack, can be either the original task ID or the task ID of the relocated + * task. *

* API name: {@code task_id} */ @@ -151,6 +173,9 @@ private Builder(ReindexRethrottleRequest instance) { } /** + * The way to group the tasks in the response. We recommend setting this to + * none, which provides the cleanest response format. + *

* API name: {@code group_by} */ public final Builder groupBy(@Nullable GroupBy value) { @@ -159,9 +184,10 @@ public final Builder groupBy(@Nullable GroupBy value) { } /** - * Required - The throttle for this request in sub-requests per second. It can - * be either -1 to turn off throttling or any decimal number like - * 1.7 or 12 to throttle to that level. + * Required - The maximum number of documents to index per second, across the + * entire reindex operation (including slices). It can be either -1 + * to turn off throttling or any decimal number like 1.7 or + * 12 to throttle to that level. *

* API name: {@code requests_per_second} */ @@ -171,7 +197,10 @@ public final Builder requestsPerSecond(float value) { } /** - * Required - The task identifier, which can be found by using the tasks API. + * Required - The task identifier, returned when creating a reindex task, or by + * listing tasks via GET /_reindex or GET /_tasks. In + * stack, can be either the original task ID or the task ID of the relocated + * task. *

* API name: {@code task_id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleResponse.java index deb6bd7c0b..a7539e093a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleResponse.java @@ -91,6 +91,18 @@ public static ReindexRethrottleResponse of(Functionfailed_node_exception wrapping a + * no_such_node_exception, if a node handling the task either never + * existed, or has left the cluster, and one of the following is true: + *

    + *
  1. The task has completed.
  2. + *
  3. The task cannot be found.
  4. + *
+ *

+ * Note: Rethrottle handles relocations, so it should succeed if the task can be + * found and has not completed. + *

* API name: {@code node_failures} */ public final List nodeFailures() { @@ -98,6 +110,11 @@ public final List nodeFailures() { } /** + * Per-task failures encountered while applying the rethrottle. If a rethrottle + * is attempted during a relocation handoff, the failure object reports + * status: SERVICE_UNAVAILABLE (the HTTP response itself is still + * 200 OK). In this case, the request can be retried until success. + *

* API name: {@code task_failures} */ public final List taskFailures() { @@ -105,6 +122,9 @@ public final List taskFailures() { } /** + * Tasks grouped by node, returned only when group_by=nodes (the + * default). + *

* API name: {@code nodes} */ public final Map nodes() { @@ -112,6 +132,10 @@ public final Map nodes() { } /** + * The tasks that were successfully rethrottled. Always returned in serverless. + * Returned with group_by=none or group_by=parents in + * stack. + *

* API name: {@code tasks} */ @Nullable @@ -196,6 +220,18 @@ public static class Builder extends WithJsonObjectBuilderBase private ReindexTasks tasks; /** + * Node-level failures encountered while applying the rethrottle request. Will + * return a failed_node_exception wrapping a + * no_such_node_exception, if a node handling the task either never + * existed, or has left the cluster, and one of the following is true: + *

    + *
  1. The task has completed.
  2. + *
  3. The task cannot be found.
  4. + *
+ *

+ * Note: Rethrottle handles relocations, so it should succeed if the task can be + * found and has not completed. + *

* API name: {@code node_failures} *

* Adds all elements of list to nodeFailures. @@ -206,6 +242,18 @@ public final Builder nodeFailures(List list) { } /** + * Node-level failures encountered while applying the rethrottle request. Will + * return a failed_node_exception wrapping a + * no_such_node_exception, if a node handling the task either never + * existed, or has left the cluster, and one of the following is true: + *

    + *
  1. The task has completed.
  2. + *
  3. The task cannot be found.
  4. + *
+ *

+ * Note: Rethrottle handles relocations, so it should succeed if the task can be + * found and has not completed. + *

* API name: {@code node_failures} *

* Adds one or more values to nodeFailures. @@ -216,6 +264,18 @@ public final Builder nodeFailures(ErrorCause value, ErrorCause... values) { } /** + * Node-level failures encountered while applying the rethrottle request. Will + * return a failed_node_exception wrapping a + * no_such_node_exception, if a node handling the task either never + * existed, or has left the cluster, and one of the following is true: + *

    + *
  1. The task has completed.
  2. + *
  3. The task cannot be found.
  4. + *
+ *

+ * Note: Rethrottle handles relocations, so it should succeed if the task can be + * found and has not completed. + *

* API name: {@code node_failures} *

* Adds a value to nodeFailures using a builder lambda. @@ -225,6 +285,11 @@ public final Builder nodeFailures(Functionstatus: SERVICE_UNAVAILABLE (the HTTP response itself is still + * 200 OK). In this case, the request can be retried until success. + *

* API name: {@code task_failures} *

* Adds all elements of list to taskFailures. @@ -235,6 +300,11 @@ public final Builder taskFailures(List list) { } /** + * Per-task failures encountered while applying the rethrottle. If a rethrottle + * is attempted during a relocation handoff, the failure object reports + * status: SERVICE_UNAVAILABLE (the HTTP response itself is still + * 200 OK). In this case, the request can be retried until success. + *

* API name: {@code task_failures} *

* Adds one or more values to taskFailures. @@ -245,6 +315,11 @@ public final Builder taskFailures(TaskFailure value, TaskFailure... values) { } /** + * Per-task failures encountered while applying the rethrottle. If a rethrottle + * is attempted during a relocation handoff, the failure object reports + * status: SERVICE_UNAVAILABLE (the HTTP response itself is still + * 200 OK). In this case, the request can be retried until success. + *

* API name: {@code task_failures} *

* Adds a value to taskFailures using a builder lambda. @@ -254,6 +329,9 @@ public final Builder taskFailures(Functiongroup_by=nodes (the + * default). + *

* API name: {@code nodes} *

* Adds all entries of map to nodes. @@ -264,6 +342,9 @@ public final Builder nodes(Map map) { } /** + * Tasks grouped by node, returned only when group_by=nodes (the + * default). + *

* API name: {@code nodes} *

* Adds an entry to nodes. @@ -274,6 +355,9 @@ public final Builder nodes(String key, ReindexNode value) { } /** + * Tasks grouped by node, returned only when group_by=nodes (the + * default). + *

* API name: {@code nodes} *

* Adds an entry to nodes using a builder lambda. @@ -283,6 +367,10 @@ public final Builder nodes(String key, Functiongroup_by=none or group_by=parents in + * stack. + *

* API name: {@code tasks} */ public final Builder tasks(@Nullable ReindexTasks value) { @@ -291,6 +379,10 @@ public final Builder tasks(@Nullable ReindexTasks value) { } /** + * The tasks that were successfully rethrottled. Always returned in serverless. + * Returned with group_by=none or group_by=parents in + * stack. + *

* API name: {@code tasks} */ public final Builder tasks(Function> fn) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java index 1eba218b3b..0bbb6481be 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchShardsRequest.java @@ -76,6 +76,9 @@ */ public class SearchShardsRequest extends RequestBase { + @Nullable + private final String slice; + @Nullable private final Boolean allowNoIndices; @@ -101,6 +104,7 @@ public class SearchShardsRequest extends RequestBase { private SearchShardsRequest(Builder builder) { + this.slice = builder.slice; this.allowNoIndices = builder.allowNoIndices; this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.ignoreUnavailable = builder.ignoreUnavailable; @@ -116,6 +120,21 @@ public static SearchShardsRequest of(Function_all to query all slices without + * restricting to a routing value. Required when + * index.slice.enabled is true for the target index; + * not allowed when index.slice.enabled is false. + *

+ * API name: {@code _slice} + */ + @Nullable + public final String slice() { + return this.slice; + } + /** * A setting that does two separate checks on the index expression. If * false, the request returns an error (1) if any wildcard @@ -204,7 +223,9 @@ public final String preference() { } /** - * A custom value used to route operations to a specific shard. + * A custom value used to route operations to a specific shard. Not allowed when + * index.slice.enabled is true for the target index; + * use _slice instead. *

* API name: {@code routing} */ @@ -221,6 +242,9 @@ public final List routing() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private String slice; + @Nullable private Boolean allowNoIndices; @@ -248,6 +272,7 @@ public static class Builder extends RequestBase.AbstractBuilder public Builder() { } private Builder(SearchShardsRequest instance) { + this.slice = instance.slice; this.allowNoIndices = instance.allowNoIndices; this.expandWildcards = instance.expandWildcards; this.ignoreUnavailable = instance.ignoreUnavailable; @@ -258,6 +283,21 @@ private Builder(SearchShardsRequest instance) { this.routing = instance.routing; } + /** + * The slice identifier for routing the search to a specific slice. When + * provided, the request is limited to shards that match the given slice value. + * Use the special value _all to query all slices without + * restricting to a routing value. Required when + * index.slice.enabled is true for the target index; + * not allowed when index.slice.enabled is false. + *

+ * API name: {@code _slice} + */ + public final Builder slice(@Nullable String value) { + this.slice = value; + return this; + } + /** * A setting that does two separate checks on the index expression. If * false, the request returns an error (1) if any wildcard @@ -393,7 +433,9 @@ public final Builder preference(@Nullable String value) { } /** - * A custom value used to route operations to a specific shard. + * A custom value used to route operations to a specific shard. Not allowed when + * index.slice.enabled is true for the target index; + * use _slice instead. *

* API name: {@code routing} *

@@ -405,7 +447,9 @@ public final Builder routing(List list) { } /** - * A custom value used to route operations to a specific shard. + * A custom value used to route operations to a specific shard. Not allowed when + * index.slice.enabled is true for the target index; + * use _slice instead. *

* API name: {@code routing} *

@@ -505,6 +549,9 @@ public Builder rebuild() { if (request.masterTimeout != null) { params.put("master_timeout", request.masterTimeout._toJsonString()); } + if (request.slice != null) { + params.put("_slice", request.slice); + } if (ApiTypeHelper.isDefined(request.routing)) { params.put("routing", request.routing.stream().map(v -> v).filter(Objects::nonNull) .collect(Collectors.joining(","))); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java index 9b99a3b0af..8a15caaeaa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRequest.java @@ -585,7 +585,10 @@ public final Boolean requestCache() { } /** - * The throttle for this request in sub-requests per second. + * The maximum number of documents to update per second, across the entire + * update_by_query operation (including slices). It can be either + * -1 to turn off throttling or any decimal number like + * 1.7 or 12 to throttle to that level. *

* API name: {@code requests_per_second} */ @@ -1231,7 +1234,10 @@ public final Builder requestCache(@Nullable Boolean value) { } /** - * The throttle for this request in sub-requests per second. + * The maximum number of documents to update per second, across the entire + * update_by_query operation (including slices). It can be either + * -1 to turn off throttling or any decimal number like + * 1.7 or 12 to throttle to that level. *

* API name: {@code requests_per_second} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java index fe9f5f6fb8..c0963f9a84 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java @@ -88,8 +88,10 @@ public static UpdateByQueryRethrottleRequest of( } /** - * Required - The throttle for this request in sub-requests per second. To turn - * off throttling, set it to -1. + * Required - The maximum number of documents to update per second, across the + * entire update_by_query operation (including slices). It can be either + * -1 to turn off throttling or any decimal number like + * 1.7 or 12 to throttle to that level. *

* API name: {@code requests_per_second} */ @@ -127,8 +129,10 @@ private Builder(UpdateByQueryRethrottleRequest instance) { } /** - * Required - The throttle for this request in sub-requests per second. To turn - * off throttling, set it to -1. + * Required - The maximum number of documents to update per second, across the + * entire update_by_query operation (including slices). It can be either + * -1 to turn off throttling or any decimal number like + * 1.7 or 12 to throttle to that level. *

* API name: {@code requests_per_second} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultisearchHeader.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultisearchHeader.java index 683505c897..e31a5f927f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultisearchHeader.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/msearch/MultisearchHeader.java @@ -99,6 +99,9 @@ public class MultisearchHeader implements JsonpSerializable { @Nullable private final Boolean ignoreThrottled; + @Nullable + private final String slice; + // --------------------------------------------------------------------------------------------- private MultisearchHeader(Builder builder) { @@ -115,6 +118,7 @@ private MultisearchHeader(Builder builder) { this.ccsMinimizeRoundtrips = builder.ccsMinimizeRoundtrips; this.allowPartialSearchResults = builder.allowPartialSearchResults; this.ignoreThrottled = builder.ignoreThrottled; + this.slice = builder.slice; } @@ -190,6 +194,10 @@ public final Boolean requestCache() { } /** + * A custom value used to route operations to a specific shard. Not allowed when + * index.slice.enabled is true for the target index; + * use _slice instead. + *

* API name: {@code routing} */ public final List routing() { @@ -228,6 +236,20 @@ public final Boolean ignoreThrottled() { return this.ignoreThrottled; } + /** + * The slice identifier for routing the search to a specific slice. Use the + * special value _all to query all slices without restricting to a + * routing value. Required when index.slice.enabled is + * true for the target index; not allowed when + * index.slice.enabled is false. + *

+ * API name: {@code _slice} + */ + @Nullable + public final String slice() { + return this.slice; + } + /** * Serialize this object to JSON. */ @@ -312,6 +334,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.ignoreThrottled); } + if (this.slice != null) { + generator.writeKey("_slice"); + generator.write(this.slice); + + } } @@ -363,6 +390,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private Boolean ignoreThrottled; + @Nullable + private String slice; + public Builder() { } private Builder(MultisearchHeader instance) { @@ -378,6 +408,7 @@ private Builder(MultisearchHeader instance) { this.ccsMinimizeRoundtrips = instance.ccsMinimizeRoundtrips; this.allowPartialSearchResults = instance.allowPartialSearchResults; this.ignoreThrottled = instance.ignoreThrottled; + this.slice = instance.slice; } /** @@ -474,6 +505,10 @@ public final Builder requestCache(@Nullable Boolean value) { } /** + * A custom value used to route operations to a specific shard. Not allowed when + * index.slice.enabled is true for the target index; + * use _slice instead. + *

* API name: {@code routing} *

* Adds all elements of list to routing. @@ -484,6 +519,10 @@ public final Builder routing(List list) { } /** + * A custom value used to route operations to a specific shard. Not allowed when + * index.slice.enabled is true for the target index; + * use _slice instead. + *

* API name: {@code routing} *

* Adds one or more values to routing. @@ -525,6 +564,20 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { return this; } + /** + * The slice identifier for routing the search to a specific slice. Use the + * special value _all to query all slices without restricting to a + * routing value. Required when index.slice.enabled is + * true for the target index; not allowed when + * index.slice.enabled is false. + *

+ * API name: {@code _slice} + */ + public final Builder slice(@Nullable String value) { + this.slice = value; + return this; + } + @Override protected Builder self() { return this; @@ -574,6 +627,7 @@ protected static void setupMultisearchHeaderDeserializer(ObjectDeserializerAPI + * specification + */ +@JsonpDeserializable +public class ParentReindexStatus implements JsonpSerializable { + private final List slices; + + @Nullable + private final Integer sliceId; + + private final long batches; + + @Nullable + private final Long created; + + private final long deleted; + + private final long noops; + + private final float requestsPerSecond; + + private final Retries retries; + + @Nullable + private final Time throttled; + + private final long throttledMillis; + + @Nullable + private final Time throttledUntil; + + private final long throttledUntilMillis; + + private final long total; + + @Nullable + private final Long updated; + + private final long versionConflicts; + + @Nullable + private final String cancelled; + + // --------------------------------------------------------------------------------------------- + + private ParentReindexStatus(Builder builder) { + + this.slices = ApiTypeHelper.unmodifiable(builder.slices); + this.sliceId = builder.sliceId; + this.batches = ApiTypeHelper.requireNonNull(builder.batches, this, "batches", 0); + this.created = builder.created; + this.deleted = ApiTypeHelper.requireNonNull(builder.deleted, this, "deleted", 0); + this.noops = ApiTypeHelper.requireNonNull(builder.noops, this, "noops", 0); + this.requestsPerSecond = ApiTypeHelper.requireNonNull(builder.requestsPerSecond, this, "requestsPerSecond", 0); + this.retries = ApiTypeHelper.requireNonNull(builder.retries, this, "retries"); + this.throttled = builder.throttled; + this.throttledMillis = ApiTypeHelper.requireNonNull(builder.throttledMillis, this, "throttledMillis", 0); + this.throttledUntil = builder.throttledUntil; + this.throttledUntilMillis = ApiTypeHelper.requireNonNull(builder.throttledUntilMillis, this, + "throttledUntilMillis", 0); + this.total = ApiTypeHelper.requireNonNull(builder.total, this, "total", 0); + this.updated = builder.updated; + this.versionConflicts = ApiTypeHelper.requireNonNull(builder.versionConflicts, this, "versionConflicts", 0); + this.cancelled = builder.cancelled; + + } + + public static ParentReindexStatus of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code slices} + */ + public final List slices() { + return this.slices; + } + + /** + * The slice ID + *

+ * API name: {@code slice_id} + */ + @Nullable + public final Integer sliceId() { + return this.sliceId; + } + + /** + * Required - The number of scroll responses pulled back by the reindex. + *

+ * API name: {@code batches} + */ + public final long batches() { + return this.batches; + } + + /** + * The number of documents that were successfully created. + *

+ * API name: {@code created} + */ + @Nullable + public final Long created() { + return this.created; + } + + /** + * Required - The number of documents that were successfully deleted. + *

+ * API name: {@code deleted} + */ + public final long deleted() { + return this.deleted; + } + + /** + * Required - The number of documents that were ignored because the script used + * for the reindex returned a noop value for ctx.op. + *

+ * API name: {@code noops} + */ + public final long noops() { + return this.noops; + } + + /** + * Required - The number of requests per second effectively executed during the + * reindex. + *

+ * API name: {@code requests_per_second} + */ + public final float requestsPerSecond() { + return this.requestsPerSecond; + } + + /** + * Required - The number of retries attempted by reindex. bulk is + * the number of bulk actions retried and search is the number of + * search actions retried. + *

+ * API name: {@code retries} + */ + public final Retries retries() { + return this.retries; + } + + /** + * API name: {@code throttled} + */ + @Nullable + public final Time throttled() { + return this.throttled; + } + + /** + * Required - Number of milliseconds the request slept to conform to + * requests_per_second. + *

+ * API name: {@code throttled_millis} + */ + public final long throttledMillis() { + return this.throttledMillis; + } + + /** + * API name: {@code throttled_until} + */ + @Nullable + public final Time throttledUntil() { + return this.throttledUntil; + } + + /** + * Required - This field should always be equal to zero in a + * _reindex response. It only has meaning when using the Task API, + * where it indicates the next time (in milliseconds since epoch) a throttled + * request will be executed again in order to conform to + * requests_per_second. + *

+ * API name: {@code throttled_until_millis} + */ + public final long throttledUntilMillis() { + return this.throttledUntilMillis; + } + + /** + * Required - The number of documents that were successfully processed. + *

+ * API name: {@code total} + */ + public final long total() { + return this.total; + } + + /** + * The number of documents that were successfully updated, for example, a + * document with same ID already existed prior to reindex updating it. + *

+ * API name: {@code updated} + */ + @Nullable + public final Long updated() { + return this.updated; + } + + /** + * Required - The number of version conflicts that reindex hits. + *

+ * API name: {@code version_conflicts} + */ + public final long versionConflicts() { + return this.versionConflicts; + } + + /** + * The reason for cancellation if the slice was canceled + *

+ * API name: {@code cancelled} + */ + @Nullable + public final String cancelled() { + return this.cancelled; + } + + /** + * 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.slices)) { + generator.writeKey("slices"); + generator.writeStartArray(); + for (ReindexStatus item0 : this.slices) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (this.sliceId != null) { + generator.writeKey("slice_id"); + generator.write(this.sliceId); + + } + generator.writeKey("batches"); + generator.write(this.batches); + + if (this.created != null) { + generator.writeKey("created"); + generator.write(this.created); + + } + generator.writeKey("deleted"); + generator.write(this.deleted); + + generator.writeKey("noops"); + generator.write(this.noops); + + generator.writeKey("requests_per_second"); + generator.write(this.requestsPerSecond); + + generator.writeKey("retries"); + this.retries.serialize(generator, mapper); + + if (this.throttled != null) { + generator.writeKey("throttled"); + this.throttled.serialize(generator, mapper); + + } + generator.writeKey("throttled_millis"); + generator.write(this.throttledMillis); + + if (this.throttledUntil != null) { + generator.writeKey("throttled_until"); + this.throttledUntil.serialize(generator, mapper); + + } + generator.writeKey("throttled_until_millis"); + generator.write(this.throttledUntilMillis); + + generator.writeKey("total"); + generator.write(this.total); + + if (this.updated != null) { + generator.writeKey("updated"); + generator.write(this.updated); + + } + generator.writeKey("version_conflicts"); + generator.write(this.versionConflicts); + + if (this.cancelled != null) { + generator.writeKey("cancelled"); + generator.write(this.cancelled); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ParentReindexStatus}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private List slices; + + @Nullable + private Integer sliceId; + + private Long batches; + + @Nullable + private Long created; + + private Long deleted; + + private Long noops; + + private Float requestsPerSecond; + + private Retries retries; + + @Nullable + private Time throttled; + + private Long throttledMillis; + + @Nullable + private Time throttledUntil; + + private Long throttledUntilMillis; + + private Long total; + + @Nullable + private Long updated; + + private Long versionConflicts; + + @Nullable + private String cancelled; + + public Builder() { + } + private Builder(ParentReindexStatus instance) { + this.slices = instance.slices; + this.sliceId = instance.sliceId; + this.batches = instance.batches; + this.created = instance.created; + this.deleted = instance.deleted; + this.noops = instance.noops; + this.requestsPerSecond = instance.requestsPerSecond; + this.retries = instance.retries; + this.throttled = instance.throttled; + this.throttledMillis = instance.throttledMillis; + this.throttledUntil = instance.throttledUntil; + this.throttledUntilMillis = instance.throttledUntilMillis; + this.total = instance.total; + this.updated = instance.updated; + this.versionConflicts = instance.versionConflicts; + this.cancelled = instance.cancelled; + + } + /** + * API name: {@code slices} + *

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

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

+ * Adds a value to slices using a builder lambda. + */ + public final Builder slices(Function> fn) { + return slices(fn.apply(new ReindexStatus.Builder()).build()); + } + + /** + * The slice ID + *

+ * API name: {@code slice_id} + */ + public final Builder sliceId(@Nullable Integer value) { + this.sliceId = value; + return this; + } + + /** + * Required - The number of scroll responses pulled back by the reindex. + *

+ * API name: {@code batches} + */ + public final Builder batches(long value) { + this.batches = value; + return this; + } + + /** + * The number of documents that were successfully created. + *

+ * API name: {@code created} + */ + public final Builder created(@Nullable Long value) { + this.created = value; + return this; + } + + /** + * Required - The number of documents that were successfully deleted. + *

+ * API name: {@code deleted} + */ + public final Builder deleted(long value) { + this.deleted = value; + return this; + } + + /** + * Required - The number of documents that were ignored because the script used + * for the reindex returned a noop value for ctx.op. + *

+ * API name: {@code noops} + */ + public final Builder noops(long value) { + this.noops = value; + return this; + } + + /** + * Required - The number of requests per second effectively executed during the + * reindex. + *

+ * API name: {@code requests_per_second} + */ + public final Builder requestsPerSecond(float value) { + this.requestsPerSecond = value; + return this; + } + + /** + * Required - The number of retries attempted by reindex. bulk is + * the number of bulk actions retried and search is the number of + * search actions retried. + *

+ * API name: {@code retries} + */ + public final Builder retries(Retries value) { + this.retries = value; + return this; + } + + /** + * Required - The number of retries attempted by reindex. bulk is + * the number of bulk actions retried and search is the number of + * search actions retried. + *

+ * API name: {@code retries} + */ + public final Builder retries(Function> fn) { + return this.retries(fn.apply(new Retries.Builder()).build()); + } + + /** + * API name: {@code throttled} + */ + public final Builder throttled(@Nullable Time value) { + this.throttled = value; + return this; + } + + /** + * API name: {@code throttled} + */ + public final Builder throttled(Function> fn) { + return this.throttled(fn.apply(new Time.Builder()).build()); + } + + /** + * Required - Number of milliseconds the request slept to conform to + * requests_per_second. + *

+ * API name: {@code throttled_millis} + */ + public final Builder throttledMillis(long value) { + this.throttledMillis = value; + return this; + } + + /** + * API name: {@code throttled_until} + */ + public final Builder throttledUntil(@Nullable Time value) { + this.throttledUntil = value; + return this; + } + + /** + * API name: {@code throttled_until} + */ + public final Builder throttledUntil(Function> fn) { + return this.throttledUntil(fn.apply(new Time.Builder()).build()); + } + + /** + * Required - This field should always be equal to zero in a + * _reindex response. It only has meaning when using the Task API, + * where it indicates the next time (in milliseconds since epoch) a throttled + * request will be executed again in order to conform to + * requests_per_second. + *

+ * API name: {@code throttled_until_millis} + */ + public final Builder throttledUntilMillis(long value) { + this.throttledUntilMillis = value; + return this; + } + + /** + * Required - The number of documents that were successfully processed. + *

+ * API name: {@code total} + */ + public final Builder total(long value) { + this.total = value; + return this; + } + + /** + * The number of documents that were successfully updated, for example, a + * document with same ID already existed prior to reindex updating it. + *

+ * API name: {@code updated} + */ + public final Builder updated(@Nullable Long value) { + this.updated = value; + return this; + } + + /** + * Required - The number of version conflicts that reindex hits. + *

+ * API name: {@code version_conflicts} + */ + public final Builder versionConflicts(long value) { + this.versionConflicts = value; + return this; + } + + /** + * The reason for cancellation if the slice was canceled + *

+ * API name: {@code cancelled} + */ + public final Builder cancelled(@Nullable String value) { + this.cancelled = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ParentReindexStatus}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ParentReindexStatus build() { + _checkSingleUse(); + + return new ParentReindexStatus(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ParentReindexStatus} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ParentReindexStatus::setupParentReindexStatusDeserializer); + + protected static void setupParentReindexStatusDeserializer(ObjectDeserializer op) { + + op.add(Builder::slices, JsonpDeserializer.arrayDeserializer(ReindexStatus._DESERIALIZER), "slices"); + op.add(Builder::sliceId, JsonpDeserializer.integerDeserializer(), "slice_id"); + op.add(Builder::batches, JsonpDeserializer.longDeserializer(), "batches"); + op.add(Builder::created, JsonpDeserializer.longDeserializer(), "created"); + op.add(Builder::deleted, JsonpDeserializer.longDeserializer(), "deleted"); + op.add(Builder::noops, JsonpDeserializer.longDeserializer(), "noops"); + op.add(Builder::requestsPerSecond, JsonpDeserializer.floatDeserializer(), "requests_per_second"); + op.add(Builder::retries, Retries._DESERIALIZER, "retries"); + op.add(Builder::throttled, Time._DESERIALIZER, "throttled"); + op.add(Builder::throttledMillis, JsonpDeserializer.longDeserializer(), "throttled_millis"); + op.add(Builder::throttledUntil, Time._DESERIALIZER, "throttled_until"); + op.add(Builder::throttledUntilMillis, JsonpDeserializer.longDeserializer(), "throttled_until_millis"); + op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total"); + op.add(Builder::updated, JsonpDeserializer.longDeserializer(), "updated"); + op.add(Builder::versionConflicts, JsonpDeserializer.longDeserializer(), "version_conflicts"); + op.add(Builder::cancelled, JsonpDeserializer.stringDeserializer(), "cancelled"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexTask.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexTask.java index 227f36d064..9bcda32e4b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexTask.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/reindex_rethrottle/ReindexTask.java @@ -19,7 +19,6 @@ package co.elastic.clients.elasticsearch.core.reindex_rethrottle; -import co.elastic.clients.elasticsearch._types.ReindexStatus; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -81,7 +80,7 @@ public class ReindexTask implements JsonpSerializable { private final long startTimeInMillis; - private final ReindexStatus status; + private final ParentReindexStatus status; private final String type; @@ -169,7 +168,7 @@ public final long startTimeInMillis() { /** * Required - API name: {@code status} */ - public final ReindexStatus status() { + public final ParentReindexStatus status() { return this.status; } @@ -298,7 +297,7 @@ public abstract static class AbstractBuilder> fn) { - return this.status(fn.apply(new ReindexStatus.Builder()).build()); + public final BuilderT status(Function> fn) { + return this.status(fn.apply(new ParentReindexStatus.Builder()).build()); } /** @@ -434,7 +433,7 @@ protected static > void setupReindexT op.add(AbstractBuilder::node, JsonpDeserializer.stringDeserializer(), "node"); op.add(AbstractBuilder::runningTimeInNanos, JsonpDeserializer.longDeserializer(), "running_time_in_nanos"); op.add(AbstractBuilder::startTimeInMillis, JsonpDeserializer.longDeserializer(), "start_time_in_millis"); - op.add(AbstractBuilder::status, ReindexStatus._DESERIALIZER, "status"); + op.add(AbstractBuilder::status, ParentReindexStatus._DESERIALIZER, "status"); op.add(AbstractBuilder::type, JsonpDeserializer.stringDeserializer(), "type"); op.add(AbstractBuilder::headers, JsonpDeserializer.stringMapDeserializer( JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer())), "headers"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHits.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHits.java index a8f93a699d..a4540c150a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHits.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/InnerHits.java @@ -95,7 +95,9 @@ public class InnerHits implements JsonpSerializable { @Nullable private final Boolean seqNoPrimaryTerm; - private final List fields; + private final List field; + + private final List fields; private final List sort; @@ -124,6 +126,7 @@ private InnerHits(Builder builder) { this.ignoreUnmapped = builder.ignoreUnmapped; this.scriptFields = ApiTypeHelper.unmodifiable(builder.scriptFields); this.seqNoPrimaryTerm = builder.seqNoPrimaryTerm; + this.field = ApiTypeHelper.unmodifiable(builder.field); this.fields = ApiTypeHelper.unmodifiable(builder.fields); this.sort = ApiTypeHelper.unmodifiable(builder.sort); this.source = builder.source; @@ -222,10 +225,17 @@ public final Boolean seqNoPrimaryTerm() { return this.seqNoPrimaryTerm; } + /** + * API name: {@code field} + */ + public final List field() { + return this.field; + } + /** * API name: {@code fields} */ - public final List fields() { + public final List fields() { return this.fields; } @@ -341,12 +351,22 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("seq_no_primary_term"); generator.write(this.seqNoPrimaryTerm); + } + if (ApiTypeHelper.isDefined(this.field)) { + generator.writeKey("field"); + generator.writeStartArray(); + for (String item0 : this.field) { + generator.write(item0); + + } + generator.writeEnd(); + } if (ApiTypeHelper.isDefined(this.fields)) { generator.writeKey("fields"); generator.writeStartArray(); - for (String item0 : this.fields) { - generator.write(item0); + for (FieldAndFormat item0 : this.fields) { + item0.serialize(generator, mapper); } generator.writeEnd(); @@ -433,7 +453,10 @@ public static class Builder extends WithJsonObjectBuilderBase implement private Boolean seqNoPrimaryTerm; @Nullable - private List fields; + private List field; + + @Nullable + private List fields; @Nullable private List sort; @@ -463,6 +486,7 @@ private Builder(InnerHits instance) { this.ignoreUnmapped = instance.ignoreUnmapped; this.scriptFields = instance.scriptFields; this.seqNoPrimaryTerm = instance.seqNoPrimaryTerm; + this.field = instance.field; this.fields = instance.fields; this.sort = instance.sort; this.source = instance.source; @@ -614,12 +638,32 @@ public final Builder seqNoPrimaryTerm(@Nullable Boolean value) { return this; } + /** + * API name: {@code field} + *

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

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

* Adds all elements of list to fields. */ - public final Builder fields(List list) { + public final Builder fields(List list) { this.fields = _listAddAll(this.fields, list); return this; } @@ -629,11 +673,20 @@ public final Builder fields(List list) { *

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

+ * Adds a value to fields using a builder lambda. + */ + public final Builder fields(Function> fn) { + return fields(fn.apply(new FieldAndFormat.Builder()).build()); + } + /** * How the inner hits should be sorted per inner_hits. By default, * inner hits are sorted by score. @@ -769,7 +822,8 @@ protected static void setupInnerHitsDeserializer(ObjectDeserializer shards; + @Nullable + private final SearchRequestCoordinatorMetadata request; + // --------------------------------------------------------------------------------------------- private Profile(Builder builder) { this.shards = ApiTypeHelper.unmodifiableRequired(builder.shards, this, "shards"); + this.request = builder.request; } @@ -81,6 +85,17 @@ public final List shards() { return this.shards; } + /** + * When profiling is enabled, the original query source and target indices from + * the coordinating request. + *

+ * API name: {@code request} + */ + @Nullable + public final SearchRequestCoordinatorMetadata request() { + return this.request; + } + /** * Serialize this object to JSON. */ @@ -102,6 +117,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } + if (this.request != null) { + generator.writeKey("request"); + this.request.serialize(generator, mapper); + + } } @@ -119,10 +139,14 @@ public String toString() { public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List shards; + @Nullable + private SearchRequestCoordinatorMetadata request; + public Builder() { } private Builder(Profile instance) { this.shards = instance.shards; + this.request = instance.request; } /** @@ -154,6 +178,28 @@ public final Builder shards(Function + * API name: {@code request} + */ + public final Builder request(@Nullable SearchRequestCoordinatorMetadata value) { + this.request = value; + return this; + } + + /** + * When profiling is enabled, the original query source and target indices from + * the coordinating request. + *

+ * API name: {@code request} + */ + public final Builder request( + Function> fn) { + return this.request(fn.apply(new SearchRequestCoordinatorMetadata.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -189,6 +235,7 @@ public Builder rebuild() { protected static void setupProfileDeserializer(ObjectDeserializer op) { op.add(Builder::shards, JsonpDeserializer.arrayDeserializer(ShardProfile._DESERIALIZER), "shards"); + op.add(Builder::request, SearchRequestCoordinatorMetadata._DESERIALIZER, "request"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SearchRequestCoordinatorMetadata.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SearchRequestCoordinatorMetadata.java new file mode 100644 index 0000000000..327cd0f637 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/SearchRequestCoordinatorMetadata.java @@ -0,0 +1,267 @@ +/* + * 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.core.search; + +import co.elastic.clients.elasticsearch.core.SearchRequest; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _global.search._types.SearchRequestCoordinatorMetadata + +/** + * Coordinator snapshot of the original search request, serialized under + * profile.request when profiling is enabled. Introduced in + * Elasticsearch 9.5; omitted when the cluster contains mixed-version nodes that + * do not serialize this metadata. + * + * @see API + * specification + */ +@JsonpDeserializable +public class SearchRequestCoordinatorMetadata implements JsonpSerializable { + @Nullable + private final SearchRequestBody source; + + private final List indices; + + // --------------------------------------------------------------------------------------------- + + private SearchRequestCoordinatorMetadata(Builder builder) { + + this.source = builder.source; + this.indices = ApiTypeHelper.unmodifiable(builder.indices); + + } + + public static SearchRequestCoordinatorMetadata of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Original query source from the search request + * (SearchSourceBuilder as JSON). + *

+ * API name: {@code source} + */ + @Nullable + public final SearchRequestBody source() { + return this.source; + } + + /** + * Target index expressions from the request (before index resolution). + *

+ * API name: {@code indices} + */ + public final List indices() { + return this.indices; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.source != null) { + generator.writeKey("source"); + this.source.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.indices)) { + generator.writeKey("indices"); + generator.writeStartArray(); + for (String item0 : this.indices) { + generator.write(item0); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SearchRequestCoordinatorMetadata}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private SearchRequestBody source; + + @Nullable + private List indices; + + public Builder() { + } + private Builder(SearchRequestCoordinatorMetadata instance) { + this.source = instance.source; + this.indices = instance.indices; + + } + /** + * Original query source from the search request + * (SearchSourceBuilder as JSON). + *

+ * API name: {@code source} + */ + public final Builder source(@Nullable SearchRequestBody value) { + this.source = value; + return this; + } + + /** + * Original query source from the search request + * (SearchSourceBuilder as JSON). + *

+ * API name: {@code source} + */ + public final Builder source(Function> fn) { + return this.source(fn.apply(new SearchRequestBody.Builder()).build()); + } + + public final Builder source(@Nullable SearchRequest value) { + SearchRequestBody body = SearchRequestBody.of(srb -> srb.aggregations(value.aggregations()) + .collapse(value.collapse()).explain(value.explain()).ext(value.ext()).from(value.from()) + .highlight(value.highlight()).trackTotalHits(value.trackTotalHits()) + .indicesBoost(value.indicesBoost()).docvalueFields(value.docvalueFields()).knn(value.knn()) + .rank(value.rank()).minScore(value.minScore()).postFilter(value.postFilter()) + .profile(value.profile()).query(value.query()).rescore(value.rescore()).retriever(value.retriever()) + .scriptFields(value.scriptFields()).searchAfter(value.searchAfter()).size(value.size()) + .slice(value.slice()).sort(value.sort()).source(value.source()).fields(value.fields()) + .suggest(value.suggest()).terminateAfter(value.terminateAfter()).timeout(value.timeout()) + .trackScores(value.trackScores()).version(value.version()) + .seqNoPrimaryTerm(value.seqNoPrimaryTerm()).storedFields(value.storedFields()).pit(value.pit()) + .runtimeMappings(value.runtimeMappings()).stats(value.stats())); + this.source = body; + return this; + } + + /** + * Target index expressions from the request (before index resolution). + *

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

+ * Adds all elements of list to indices. + */ + public final Builder indices(List list) { + this.indices = _listAddAll(this.indices, list); + return this; + } + + /** + * Target index expressions from the request (before index resolution). + *

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

+ * Adds one or more values to indices. + */ + public final Builder indices(String value, String... values) { + this.indices = _listAdd(this.indices, value, values); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SearchRequestCoordinatorMetadata}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SearchRequestCoordinatorMetadata build() { + _checkSingleUse(); + + return new SearchRequestCoordinatorMetadata(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SearchRequestCoordinatorMetadata} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SearchRequestCoordinatorMetadata::setupSearchRequestCoordinatorMetadataDeserializer); + + protected static void setupSearchRequestCoordinatorMetadataDeserializer( + ObjectDeserializer op) { + + op.add(Builder::source, SearchRequestBody._DESERIALIZER, "source"); + op.add(Builder::indices, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "indices"); + + } + +} 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 a4d8e4a746..4751164572 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 @@ -17,7 +17,7 @@ '_global.bulk.UpdateAction': '_global/bulk/types.ts#L181-L216', '_global.bulk.UpdateOperation': '_global/bulk/types.ts#L145-L155', '_global.bulk.WriteOperation': '_global/bulk/types.ts#L118-L137', -'_global.cancel_reindex.Request': '_global/cancel_reindex/CancelReindexRequest.ts#L23-L56', +'_global.cancel_reindex.Request': '_global/cancel_reindex/CancelReindexRequest.ts#L23-L84', '_global.cancel_reindex.Response': '_global/cancel_reindex/CancelReindexResponse.ts#L31-L87', '_global.clear_scroll.Request': '_global/clear_scroll/ClearScrollRequest.ts#L23-L64', '_global.clear_scroll.Response': '_global/clear_scroll/ClearScrollResponse.ts#L22-L43', @@ -29,7 +29,7 @@ '_global.create.Response': '_global/create/CreateResponse.ts#L22-L25', '_global.delete.Request': '_global/delete/DeleteRequest.ts#L35-L148', '_global.delete.Response': '_global/delete/DeleteResponse.ts#L22-L36', -'_global.delete_by_query.Request': '_global/delete_by_query/DeleteByQueryRequest.ts#L38-L330', +'_global.delete_by_query.Request': '_global/delete_by_query/DeleteByQueryRequest.ts#L38-L331', '_global.delete_by_query.Response': '_global/delete_by_query/DeleteByQueryResponse.ts#L27-L93', '_global.delete_by_query_rethrottle.Request': '_global/delete_by_query_rethrottle/DeleteByQueryRethrottleRequest.ts#L24-L56', '_global.delete_by_query_rethrottle.Response': '_global/delete_by_query_rethrottle/DeleteByQueryRethrottleResponse.ts#L22-L25', @@ -47,7 +47,7 @@ '_global.get.GetResult': '_global/get/types.ts#L25-L67', '_global.get.Request': '_global/get/GetRequest.ts#L32-L190', '_global.get.Response': '_global/get/GetResponse.ts#L23-L36', -'_global.get_reindex.Request': '_global/get_reindex/GetReindexRequest.ts#L24-L59', +'_global.get_reindex.Request': '_global/get_reindex/GetReindexRequest.ts#L24-L75', '_global.get_reindex.Response': '_global/get_reindex/GetReindexResponse.ts#L31-L80', '_global.get_script.Request': '_global/get_script/GetScriptRequest.ts#L24-L58', '_global.get_script.Response': '_global/get_script/GetScriptResponse.ts#L23-L29', @@ -98,19 +98,19 @@ '_global.index.Response': '_global/index/IndexResponse.ts#L22-L25', '_global.info.Request': '_global/info/RootNodeInfoRequest.ts#L23-L44', '_global.info.Response': '_global/info/RootNodeInfoResponse.ts#L23-L40', -'_global.list_reindex.Request': '_global/list_reindex/ListReindexRequest.ts#L23-L47', -'_global.list_reindex.Response': '_global/list_reindex/ListReindexResponse.ts#L23-L38', +'_global.list_reindex.Request': '_global/list_reindex/ListReindexRequest.ts#L23-L51', +'_global.list_reindex.Response': '_global/list_reindex/ListReindexResponse.ts#L23-L40', '_global.mget.MultiGetError': '_global/mget/types.ts#L62-L66', '_global.mget.Operation': '_global/mget/types.ts#L32-L55', '_global.mget.Request': '_global/mget/MultiGetRequest.ts#L25-L129', '_global.mget.Response': '_global/mget/MultiGetResponse.ts#L22-L31', '_global.mget.ResponseItem': '_global/mget/types.ts#L57-L60', -'_global.msearch.MultiSearchItem': '_global/msearch/types.ts#L78-L81', -'_global.msearch.MultiSearchResult': '_global/msearch/types.ts#L68-L71', -'_global.msearch.MultisearchHeader': '_global/msearch/types.ts#L37-L66', -'_global.msearch.Request': '_global/msearch/MultiSearchRequest.ts#L32-L169', +'_global.msearch.MultiSearchItem': '_global/msearch/types.ts#L89-L92', +'_global.msearch.MultiSearchResult': '_global/msearch/types.ts#L79-L82', +'_global.msearch.MultisearchHeader': '_global/msearch/types.ts#L37-L77', +'_global.msearch.Request': '_global/msearch/MultiSearchRequest.ts#L32-L179', '_global.msearch.Response': '_global/msearch/MultiSearchResponse.ts#L25-L28', -'_global.msearch.ResponseItem': '_global/msearch/types.ts#L73-L76', +'_global.msearch.ResponseItem': '_global/msearch/types.ts#L84-L87', '_global.msearch_template.Request': '_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L131', '_global.msearch_template.Response': '_global/msearch_template/MultiSearchTemplateResponse.ts#L22-L33', '_global.msearch_template.TemplateConfig': '_global/msearch_template/types.ts#L29-L55', @@ -119,7 +119,7 @@ '_global.mtermvectors.Response': '_global/mtermvectors/MultiTermVectorsResponse.ts#L22-L24', '_global.mtermvectors.TermVectorsResult': '_global/mtermvectors/types.ts#L96-L104', '_global.open_point_in_time.Request': '_global/open_point_in_time/OpenPointInTimeRequest.ts#L32-L153', -'_global.open_point_in_time.Response': '_global/open_point_in_time/OpenPointInTimeResponse.ts#L23-L29', +'_global.open_point_in_time.Response': '_global/open_point_in_time/OpenPointInTimeResponse.ts#L23-L35', '_global.ping.Request': '_global/ping/PingRequest.ts#L23-L41', '_global.put_script.Request': '_global/put_script/PutScriptRequest.ts#L25-L90', '_global.put_script.Response': '_global/put_script/PutScriptResponse.ts#L22-L25', @@ -142,15 +142,16 @@ '_global.rank_eval.UnratedDocument': '_global/rank_eval/types.ts#L150-L153', '_global.reindex.Destination': '_global/reindex/types.ts#L39-L67', '_global.reindex.RemoteSource': '_global/reindex/types.ts#L127-L163', -'_global.reindex.Request': '_global/reindex/ReindexRequest.ts#L32-L192', +'_global.reindex.Request': '_global/reindex/ReindexRequest.ts#L32-L198', '_global.reindex.Response': '_global/reindex/ReindexResponse.ts#L27-L97', '_global.reindex.Source': '_global/reindex/types.ts#L69-L125', -'_global.reindex_rethrottle.ParentReindexTask': '_global/reindex_rethrottle/types.ts#L50-L52', -'_global.reindex_rethrottle.ReindexNode': '_global/reindex_rethrottle/types.ts#L27-L29', -'_global.reindex_rethrottle.ReindexTask': '_global/reindex_rethrottle/types.ts#L31-L43', -'_global.reindex_rethrottle.ReindexTasks': '_global/reindex_rethrottle/types.ts#L45-L48', -'_global.reindex_rethrottle.Request': '_global/reindex_rethrottle/ReindexRethrottleRequest.ts#L25-L69', -'_global.reindex_rethrottle.Response': '_global/reindex_rethrottle/ReindexRethrottleResponse.ts#L24-L31', +'_global.reindex_rethrottle.ParentReindexStatus': '_global/reindex_rethrottle/types.ts#L46-L48', +'_global.reindex_rethrottle.ParentReindexTask': '_global/reindex_rethrottle/types.ts#L55-L57', +'_global.reindex_rethrottle.ReindexNode': '_global/reindex_rethrottle/types.ts#L28-L30', +'_global.reindex_rethrottle.ReindexTask': '_global/reindex_rethrottle/types.ts#L32-L44', +'_global.reindex_rethrottle.ReindexTasks': '_global/reindex_rethrottle/types.ts#L50-L53', +'_global.reindex_rethrottle.Request': '_global/reindex_rethrottle/ReindexRethrottleRequest.ts#L25-L84', +'_global.reindex_rethrottle.Response': '_global/reindex_rethrottle/ReindexRethrottleResponse.ts#L24-L54', '_global.render_search_template.Request': '_global/render_search_template/RenderSearchTemplateRequest.ts#L26-L79', '_global.render_search_template.Response': '_global/render_search_template/RenderSearchTemplateResponse.ts#L23-L25', '_global.scripts_painless_execute.PainlessContext': '_global/scripts_painless_execute/types.ts#L57-L80', @@ -162,25 +163,25 @@ '_global.search.Request': '_global/search/SearchRequest.ts#L55-L623', '_global.search.Response': '_global/search/SearchResponse.ts#L34-L37', '_global.search.ResponseBody': '_global/search/SearchResponse.ts#L39-L85', -'_global.search._types.AggregationBreakdown': '_global/search/_types/profile.ts#L26-L39', -'_global.search._types.AggregationProfile': '_global/search/_types/profile.ts#L85-L92', -'_global.search._types.AggregationProfileDebug': '_global/search/_types/profile.ts#L42-L76', -'_global.search._types.AggregationProfileDelegateDebugFilter': '_global/search/_types/profile.ts#L78-L83', +'_global.search._types.AggregationBreakdown': '_global/search/_types/profile.ts#L27-L40', +'_global.search._types.AggregationProfile': '_global/search/_types/profile.ts#L86-L93', +'_global.search._types.AggregationProfileDebug': '_global/search/_types/profile.ts#L43-L77', +'_global.search._types.AggregationProfileDelegateDebugFilter': '_global/search/_types/profile.ts#L79-L84', '_global.search._types.BoundaryScanner': '_global/search/_types/highlighting.ts#L26-L45', -'_global.search._types.Collector': '_global/search/_types/profile.ts#L94-L99', +'_global.search._types.Collector': '_global/search/_types/profile.ts#L95-L100', '_global.search._types.CompletionContext': '_global/search/_types/suggester.ts#L230-L259', '_global.search._types.CompletionSuggest': '_global/search/_types/suggester.ts#L42-L49', '_global.search._types.CompletionSuggestOption': '_global/search/_types/suggester.ts#L67-L78', '_global.search._types.CompletionSuggester': '_global/search/_types/suggester.ts#L157-L175', '_global.search._types.Context': '_global/search/_types/suggester.ts#L223-L228', -'_global.search._types.DfsKnnProfile': '_global/search/_types/profile.ts#L181-L186', -'_global.search._types.DfsProfile': '_global/search/_types/profile.ts#L154-L157', -'_global.search._types.DfsStatisticsBreakdown': '_global/search/_types/profile.ts#L170-L179', -'_global.search._types.DfsStatisticsProfile': '_global/search/_types/profile.ts#L159-L167', +'_global.search._types.DfsKnnProfile': '_global/search/_types/profile.ts#L201-L206', +'_global.search._types.DfsProfile': '_global/search/_types/profile.ts#L174-L177', +'_global.search._types.DfsStatisticsBreakdown': '_global/search/_types/profile.ts#L190-L199', +'_global.search._types.DfsStatisticsProfile': '_global/search/_types/profile.ts#L179-L187', '_global.search._types.DirectGenerator': '_global/search/_types/suggester.ts#L263-L326', -'_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.FetchProfile': '_global/search/_types/profile.ts#L250-L257', +'_global.search._types.FetchProfileBreakdown': '_global/search/_types/profile.ts#L259-L268', +'_global.search._types.FetchProfileDebug': '_global/search/_types/profile.ts#L270-L273', '_global.search._types.FieldCollapse': '_global/search/_types/FieldCollapse.ts#L24-L41', '_global.search._types.FieldSuggester': '_global/search/_types/suggester.ts#L103-L136', '_global.search._types.Highlight': '_global/search/_types/highlighting.ts#L152-L157', @@ -193,11 +194,11 @@ '_global.search._types.HighlighterType': '_global/search/_types/highlighting.ts#L177-L192', '_global.search._types.Hit': '_global/search/_types/hits.ts#L40-L69', '_global.search._types.HitsMetadata': '_global/search/_types/hits.ts#L71-L81', -'_global.search._types.InnerHits': '_global/search/_types/hits.ts#L115-L149', +'_global.search._types.InnerHits': '_global/search/_types/hits.ts#L115-L152', '_global.search._types.InnerHitsResult': '_global/search/_types/hits.ts#L93-L95', -'_global.search._types.KnnCollectorResult': '_global/search/_types/profile.ts#L222-L228', -'_global.search._types.KnnQueryProfileBreakdown': '_global/search/_types/profile.ts#L199-L220', -'_global.search._types.KnnQueryProfileResult': '_global/search/_types/profile.ts#L188-L196', +'_global.search._types.KnnCollectorResult': '_global/search/_types/profile.ts#L242-L248', +'_global.search._types.KnnQueryProfileBreakdown': '_global/search/_types/profile.ts#L219-L240', +'_global.search._types.KnnQueryProfileResult': '_global/search/_types/profile.ts#L208-L216', '_global.search._types.LaplaceSmoothingModel': '_global/search/_types/suggester.ts#L421-L426', '_global.search._types.LearningToRank': '_global/search/_types/rescoring.ts#L91-L100', '_global.search._types.LinearInterpolationSmoothingModel': '_global/search/_types/suggester.ts#L428-L432', @@ -209,17 +210,18 @@ '_global.search._types.PhraseSuggestOption': '_global/search/_types/suggester.ts#L80-L85', '_global.search._types.PhraseSuggester': '_global/search/_types/suggester.ts#L354-L408', '_global.search._types.PointInTimeReference': '_global/search/_types/PointInTimeReference.ts#L23-L26', -'_global.search._types.Profile': '_global/search/_types/profile.ts#L101-L103', -'_global.search._types.QueryBreakdown': '_global/search/_types/profile.ts#L105-L126', -'_global.search._types.QueryProfile': '_global/search/_types/profile.ts#L128-L134', +'_global.search._types.Profile': '_global/search/_types/profile.ts#L117-L123', +'_global.search._types.QueryBreakdown': '_global/search/_types/profile.ts#L125-L146', +'_global.search._types.QueryProfile': '_global/search/_types/profile.ts#L148-L154', '_global.search._types.RegexOptions': '_global/search/_types/suggester.ts#L177-L189', '_global.search._types.Rescore': '_global/search/_types/rescoring.ts#L26-L41', '_global.search._types.RescoreQuery': '_global/search/_types/rescoring.ts#L43-L65', '_global.search._types.ScoreMode': '_global/search/_types/rescoring.ts#L67-L89', '_global.search._types.ScriptRescore': '_global/search/_types/rescoring.ts#L102-L104', -'_global.search._types.SearchProfile': '_global/search/_types/profile.ts#L136-L140', +'_global.search._types.SearchProfile': '_global/search/_types/profile.ts#L156-L160', '_global.search._types.SearchRequestBody': '_global/search/_types/SearchRequestBody.ts#L42-L248', -'_global.search._types.ShardProfile': '_global/search/_types/profile.ts#L142-L152', +'_global.search._types.SearchRequestCoordinatorMetadata': '_global/search/_types/profile.ts#L102-L115', +'_global.search._types.ShardProfile': '_global/search/_types/profile.ts#L162-L172', '_global.search._types.SmoothingModelContainer': '_global/search/_types/suggester.ts#L436-L452', '_global.search._types.SourceConfig': '_global/search/_types/SourceFilter.ts#L50-L54', '_global.search._types.SourceConfigParam': '_global/search/_types/SourceFilter.ts#L56-L62', @@ -237,12 +239,12 @@ '_global.search._types.TermSuggester': '_global/search/_types/suggester.ts#L497-L554', '_global.search._types.TotalHits': '_global/search/_types/hits.ts#L103-L106', '_global.search._types.TotalHitsRelation': '_global/search/_types/hits.ts#L108-L113', -'_global.search._types.TrackHits': '_global/search/_types/hits.ts#L151-L159', +'_global.search._types.TrackHits': '_global/search/_types/hits.ts#L154-L162', '_global.search_mvt.Request': '_global/search_mvt/SearchMvtRequest.ts#L39-L356', '_global.search_mvt.Response': '_global/search_mvt/SearchMvtResponse.ts#L22-L25', '_global.search_mvt._types.GridAggregationType': '_global/search_mvt/_types/GridType.ts#L30-L33', '_global.search_mvt._types.GridType': '_global/search_mvt/_types/GridType.ts#L20-L28', -'_global.search_shards.Request': '_global/search_shards/SearchShardsRequest.ts#L24-L106', +'_global.search_shards.Request': '_global/search_shards/SearchShardsRequest.ts#L24-L115', '_global.search_shards.Response': '_global/search_shards/SearchShardsResponse.ts#L34-L40', '_global.search_shards.SearchShardsNodeAttributes': '_global/search_shards/SearchShardsResponse.ts#L42-L60', '_global.search_shards.ShardStoreIndex': '_global/search_shards/SearchShardsResponse.ts#L62-L65', @@ -260,7 +262,7 @@ '_global.update.Request': '_global/update/UpdateRequest.ts#L39-L199', '_global.update.Response': '_global/update/UpdateResponse.ts#L27-L30', '_global.update.UpdateWriteResponseBase': '_global/update/UpdateResponse.ts#L23-L25', -'_global.update_by_query.Request': '_global/update_by_query/UpdateByQueryRequest.ts#L38-L364', +'_global.update_by_query.Request': '_global/update_by_query/UpdateByQueryRequest.ts#L38-L365', '_global.update_by_query.Response': '_global/update_by_query/UpdateByQueryResponse.ts#L27-L76', '_global.update_by_query_rethrottle.Request': '_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts#L24-L56', '_global.update_by_query_rethrottle.Response': '_global/update_by_query_rethrottle/UpdateByQueryRethrottleResponse.ts#L23-L25', @@ -289,6 +291,7 @@ '_types.DocStats': '_types/Stats.ts#L100-L121', '_types.ElasticsearchVersionInfo': '_types/Base.ts#L81-L123', '_types.ElasticsearchVersionMinInfo': '_types/Base.ts#L125-L133', +'_types.Embedding': '_types/Knn.ts#L124-L128', '_types.EmptyObject': '_types/common.ts#L155-L156', '_types.ErrorCause': '_types/Errors.ts#L25-L50', '_types.ErrorResponseBase': '_types/Base.ts#L135-L144', @@ -316,16 +319,18 @@ '_types.IndexingStats': '_types/Stats.ts#L168-L186', '_types.IndicesOptions': '_types/common.ts#L357-L389', '_types.IndicesResponseBase': '_types/Base.ts#L146-L148', +'_types.InferenceString': '_types/Knn.ts#L139-L154', '_types.InlineGet': '_types/common.ts#L342-L355', '_types.InnerRetriever': '_types/Retriever.ts#L88-L92', -'_types.KnnQuery': '_types/Knn.ts#L74-L104', +'_types.KnnEmbeddingInput': '_types/Knn.ts#L130-L135', +'_types.KnnQuery': '_types/Knn.ts#L79-L109', '_types.KnnRetriever': '_types/Retriever.ts#L118-L143', -'_types.KnnSearch': '_types/Knn.ts#L35-L72', +'_types.KnnSearch': '_types/Knn.ts#L40-L77', '_types.LatLonGeoLocation': '_types/Geo.ts#L114-L123', '_types.Level': '_types/common.ts#L260-L264', '_types.LifecycleOperationMode': '_types/Lifecycle.ts#L20-L24', '_types.LinearRetriever': '_types/Retriever.ts#L71-L78', -'_types.LookupQueryVectorBuilder': '_types/Knn.ts#L130-L139', +'_types.LookupQueryVectorBuilder': '_types/Knn.ts#L168-L177', '_types.MergesStats': '_types/Stats.ts#L188-L205', '_types.NestedSortValue': '_types/sort.ts#L29-L34', '_types.NodeAttributes': '_types/Node.ts#L41-L52', @@ -338,7 +343,7 @@ '_types.PinnedRetriever': '_types/Retriever.ts#L80-L86', '_types.PluginStats': '_types/Stats.ts#L207-L217', '_types.QueryCacheStats': '_types/Stats.ts#L219-L253', -'_types.QueryVectorBuilder': '_types/Knn.ts#L106-L116', +'_types.QueryVectorBuilder': '_types/Knn.ts#L111-L122', '_types.RRFRetriever': '_types/Retriever.ts#L164-L173', '_types.RRFRetrieverComponent': '_types/Retriever.ts#L145-L156', '_types.RRFRetrieverEntry': '_types/Retriever.ts#L158-L162', @@ -353,7 +358,7 @@ '_types.RelocationFailureInfo': '_types/Node.ts#L67-L69', '_types.RequestBase': '_types/Base.ts#L35-L35', '_types.RequestCacheStats': '_types/Stats.ts#L271-L277', -'_types.RescoreVector': '_types/Knn.ts#L30-L33', +'_types.RescoreVector': '_types/Knn.ts#L35-L38', '_types.RescorerRetriever': '_types/Retriever.ts#L65-L69', '_types.Result': '_types/Result.ts#L20-L26', '_types.Retries': '_types/Retries.ts#L22-L31', @@ -389,7 +394,7 @@ '_types.StoredScript': '_types/Scripting.ts#L51-L63', '_types.SuggestMode': '_types/common.ts#L299-L312', '_types.TaskFailure': '_types/Errors.ts#L71-L76', -'_types.TextEmbedding': '_types/Knn.ts#L118-L128', +'_types.TextEmbedding': '_types/Knn.ts#L156-L166', '_types.TextSimilarityReranker': '_types/Retriever.ts#L175-L192', '_types.ThreadType': '_types/common.ts#L314-L325', '_types.TimeUnit': '_types/Time.ts#L70-L78', @@ -879,9 +884,9 @@ '_types.mapping.DateProperty': '_types/mapping/core.ts#L78-L90', '_types.mapping.DateRangeProperty': '_types/mapping/range.ts#L29-L32', '_types.mapping.DenseVectorElementType': '_types/mapping/DenseVectorProperty.ts#L64-L85', -'_types.mapping.DenseVectorIndexOptions': '_types/mapping/DenseVectorProperty.ts#L134-L179', -'_types.mapping.DenseVectorIndexOptionsRescoreVector': '_types/mapping/DenseVectorProperty.ts#L237-L245', -'_types.mapping.DenseVectorIndexOptionsType': '_types/mapping/DenseVectorProperty.ts#L181-L235', +'_types.mapping.DenseVectorIndexOptions': '_types/mapping/DenseVectorProperty.ts#L134-L189', +'_types.mapping.DenseVectorIndexOptionsRescoreVector': '_types/mapping/DenseVectorProperty.ts#L247-L255', +'_types.mapping.DenseVectorIndexOptionsType': '_types/mapping/DenseVectorProperty.ts#L191-L245', '_types.mapping.DenseVectorProperty': '_types/mapping/DenseVectorProperty.ts#L23-L62', '_types.mapping.DenseVectorSimilarity': '_types/mapping/DenseVectorProperty.ts#L87-L132', '_types.mapping.DocValuesPropertyBase': '_types/mapping/core.ts#L53-L55', @@ -1127,13 +1132,13 @@ 'cat._types.CatRecoveryColumn': 'cat/_types/CatBase.ts#L2322-L2454', 'cat._types.CatRequestBase': 'cat/_types/CatBase.ts#L28-L30', 'cat._types.CatSegmentsColumn': 'cat/_types/CatBase.ts#L1026-L1091', -'cat._types.CatShardColumn': 'cat/_types/CatBase.ts#L2834-L3207', +'cat._types.CatShardColumn': 'cat/_types/CatBase.ts#L2840-L3213', 'cat._types.CatSnapshotsColumn': 'cat/_types/CatBase.ts#L1093-L1160', 'cat._types.CatTasksColumn': 'cat/_types/CatBase.ts#L2216-L2292', 'cat._types.CatTemplatesColumn': 'cat/_types/CatBase.ts#L2470-L2497', -'cat._types.CatThreadPoolColumn': 'cat/_types/CatBase.ts#L3210-L3310', +'cat._types.CatThreadPoolColumn': 'cat/_types/CatBase.ts#L3216-L3316', 'cat._types.CatTrainedModelsColumn': 'cat/_types/CatBase.ts#L2548-L2622', -'cat._types.CatTransformColumn': 'cat/_types/CatBase.ts#L2627-L2831', +'cat._types.CatTransformColumn': 'cat/_types/CatBase.ts#L2627-L2837', 'cat.aliases.AliasesRecord': 'cat/aliases/types.ts#L22-L53', 'cat.aliases.Request': 'cat/aliases/CatAliasesRequest.ts#L24-L79', 'cat.aliases.Response': 'cat/aliases/CatAliasesResponse.ts#L22-L25', @@ -1209,7 +1214,7 @@ 'cat.thread_pool.ThreadPoolRecord': 'cat/thread_pool/types.ts#L22-L124', 'cat.transforms.Request': 'cat/transforms/CatTransformsRequest.ts#L24-L86', 'cat.transforms.Response': 'cat/transforms/CatTransformsResponse.ts#L22-L25', -'cat.transforms.TransformsRecord': 'cat/transforms/types.ts#L22-L197', +'cat.transforms.TransformsRecord': 'cat/transforms/types.ts#L22-L203', 'ccr._types.FollowIndexStats': 'ccr/_types/FollowIndexStats.ts#L30-L35', 'ccr._types.ReadException': 'ccr/_types/FollowIndexStats.ts#L112-L119', 'ccr._types.ShardStats': 'ccr/_types/FollowIndexStats.ts#L37-L110', @@ -1307,32 +1312,32 @@ 'cluster.state.ClusterStateMetric': 'cluster/state/ClusterStateRequest.ts#L130-L149', 'cluster.state.Request': 'cluster/state/ClusterStateRequest.ts#L29-L128', 'cluster.state.Response': 'cluster/state/ClusterStateResponse.ts#L22-L31', -'cluster.stats.CCSStats': 'cluster/stats/types.ts#L800-L815', -'cluster.stats.CCSUsageClusterStats': 'cluster/stats/types.ts#L886-L893', -'cluster.stats.CCSUsageStats': 'cluster/stats/types.ts#L850-L875', -'cluster.stats.CCSUsageTimeValue': 'cluster/stats/types.ts#L877-L884', -'cluster.stats.CharFilterTypes': 'cluster/stats/types.ts#L346-L383', +'cluster.stats.CCSStats': 'cluster/stats/types.ts#L815-L830', +'cluster.stats.CCSUsageClusterStats': 'cluster/stats/types.ts#L901-L908', +'cluster.stats.CCSUsageStats': 'cluster/stats/types.ts#L865-L890', +'cluster.stats.CCSUsageTimeValue': 'cluster/stats/types.ts#L892-L899', +'cluster.stats.CharFilterTypes': 'cluster/stats/types.ts#L346-L385', 'cluster.stats.ClusterFileSystem': 'cluster/stats/types.ts#L35-L75', 'cluster.stats.ClusterIndices': 'cluster/stats/types.ts#L100-L147', 'cluster.stats.ClusterIndicesShards': 'cluster/stats/types.ts#L86-L98', 'cluster.stats.ClusterIndicesShardsIndex': 'cluster/stats/types.ts#L77-L84', -'cluster.stats.ClusterIngest': 'cluster/stats/types.ts#L398-L401', -'cluster.stats.ClusterJvm': 'cluster/stats/types.ts#L403-L424', -'cluster.stats.ClusterJvmMemory': 'cluster/stats/types.ts#L426-L443', -'cluster.stats.ClusterJvmVersion': 'cluster/stats/types.ts#L445-L475', -'cluster.stats.ClusterNetworkTypes': 'cluster/stats/types.ts#L477-L486', -'cluster.stats.ClusterNodeCount': 'cluster/stats/types.ts#L488-L509', -'cluster.stats.ClusterNodes': 'cluster/stats/types.ts#L511-L544', -'cluster.stats.ClusterOperatingSystem': 'cluster/stats/types.ts#L557-L584', -'cluster.stats.ClusterOperatingSystemArchitecture': 'cluster/stats/types.ts#L546-L555', -'cluster.stats.ClusterOperatingSystemName': 'cluster/stats/types.ts#L586-L595', -'cluster.stats.ClusterOperatingSystemPrettyName': 'cluster/stats/types.ts#L597-L606', -'cluster.stats.ClusterProcess': 'cluster/stats/types.ts#L608-L617', -'cluster.stats.ClusterProcessCpu': 'cluster/stats/types.ts#L619-L625', -'cluster.stats.ClusterProcessOpenFileDescriptors': 'cluster/stats/types.ts#L627-L643', -'cluster.stats.ClusterProcessor': 'cluster/stats/types.ts#L645-L651', -'cluster.stats.ClusterShardMetrics': 'cluster/stats/types.ts#L653-L666', -'cluster.stats.ClusterSnapshotStats': 'cluster/stats/types.ts#L668-L671', +'cluster.stats.ClusterIngest': 'cluster/stats/types.ts#L413-L416', +'cluster.stats.ClusterJvm': 'cluster/stats/types.ts#L418-L439', +'cluster.stats.ClusterJvmMemory': 'cluster/stats/types.ts#L441-L458', +'cluster.stats.ClusterJvmVersion': 'cluster/stats/types.ts#L460-L490', +'cluster.stats.ClusterNetworkTypes': 'cluster/stats/types.ts#L492-L501', +'cluster.stats.ClusterNodeCount': 'cluster/stats/types.ts#L503-L524', +'cluster.stats.ClusterNodes': 'cluster/stats/types.ts#L526-L559', +'cluster.stats.ClusterOperatingSystem': 'cluster/stats/types.ts#L572-L599', +'cluster.stats.ClusterOperatingSystemArchitecture': 'cluster/stats/types.ts#L561-L570', +'cluster.stats.ClusterOperatingSystemName': 'cluster/stats/types.ts#L601-L610', +'cluster.stats.ClusterOperatingSystemPrettyName': 'cluster/stats/types.ts#L612-L621', +'cluster.stats.ClusterProcess': 'cluster/stats/types.ts#L623-L632', +'cluster.stats.ClusterProcessCpu': 'cluster/stats/types.ts#L634-L640', +'cluster.stats.ClusterProcessOpenFileDescriptors': 'cluster/stats/types.ts#L642-L658', +'cluster.stats.ClusterProcessor': 'cluster/stats/types.ts#L660-L666', +'cluster.stats.ClusterShardMetrics': 'cluster/stats/types.ts#L668-L681', +'cluster.stats.ClusterSnapshotStats': 'cluster/stats/types.ts#L683-L686', 'cluster.stats.DenseVectorOffHeapStats': 'cluster/stats/types.ts#L193-L209', 'cluster.stats.DenseVectorStats': 'cluster/stats/types.ts#L184-L187', 'cluster.stats.ExtendedRetrieversSearchUsage': 'cluster/stats/types.ts#L164-L166', @@ -1341,23 +1346,24 @@ 'cluster.stats.ExtendedTextSimilarityRetrieverUsage': 'cluster/stats/types.ts#L168-L170', 'cluster.stats.FieldTypes': 'cluster/stats/types.ts#L242-L285', 'cluster.stats.FieldTypesMappings': 'cluster/stats/types.ts#L211-L240', -'cluster.stats.IndexingPressure': 'cluster/stats/types.ts#L796-L798', -'cluster.stats.IndicesVersions': 'cluster/stats/types.ts#L390-L396', -'cluster.stats.NodePackagingType': 'cluster/stats/types.ts#L731-L744', -'cluster.stats.OperatingSystemMemoryInfo': 'cluster/stats/types.ts#L746-L794', -'cluster.stats.PerRepositoryStats': 'cluster/stats/types.ts#L696-L701', -'cluster.stats.RemoteClusterInfo': 'cluster/stats/types.ts#L817-L848', -'cluster.stats.RepositoryStatsCurrentCounts': 'cluster/stats/types.ts#L703-L711', -'cluster.stats.RepositoryStatsShards': 'cluster/stats/types.ts#L713-L718', +'cluster.stats.IndexingPressure': 'cluster/stats/types.ts#L811-L813', +'cluster.stats.IndicesVersions': 'cluster/stats/types.ts#L405-L411', +'cluster.stats.MultipleSynonymGraphFilter': 'cluster/stats/types.ts#L387-L398', +'cluster.stats.NodePackagingType': 'cluster/stats/types.ts#L746-L759', +'cluster.stats.OperatingSystemMemoryInfo': 'cluster/stats/types.ts#L761-L809', +'cluster.stats.PerRepositoryStats': 'cluster/stats/types.ts#L711-L716', +'cluster.stats.RemoteClusterInfo': 'cluster/stats/types.ts#L832-L863', +'cluster.stats.RepositoryStatsCurrentCounts': 'cluster/stats/types.ts#L718-L726', +'cluster.stats.RepositoryStatsShards': 'cluster/stats/types.ts#L728-L733', 'cluster.stats.Request': 'cluster/stats/ClusterStatsRequest.ts#L24-L63', 'cluster.stats.Response': 'cluster/stats/ClusterStatsResponse.ts#L71-L74', 'cluster.stats.RuntimeFieldTypes': 'cluster/stats/types.ts#L287-L344', 'cluster.stats.SearchUsageStats': 'cluster/stats/types.ts#L149-L157', -'cluster.stats.SnapshotCurrentCounts': 'cluster/stats/types.ts#L673-L694', +'cluster.stats.SnapshotCurrentCounts': 'cluster/stats/types.ts#L688-L709', 'cluster.stats.SortType': 'cluster/stats/types.ts#L176-L182', 'cluster.stats.SparseVectorStats': 'cluster/stats/types.ts#L189-L191', 'cluster.stats.StatsResponseBase': 'cluster/stats/ClusterStatsResponse.ts#L31-L69', -'cluster.stats.SynonymsStats': 'cluster/stats/types.ts#L385-L388', +'cluster.stats.SynonymsStats': 'cluster/stats/types.ts#L400-L403', 'connector._types.Connector': 'connector/_types/Connector.ts#L252-L284', 'connector._types.ConnectorConfigProperties': 'connector/_types/Connector.ts#L83-L99', 'connector._types.ConnectorFeatures': 'connector/_types/Connector.ts#L230-L244', @@ -1570,9 +1576,9 @@ 'indices._types.DataStreamFailureStore': 'indices/_types/DataStreamFailureStore.ts#L22-L37', 'indices._types.DataStreamFailureStoreTemplate': 'indices/_types/DataStreamFailureStore.ts#L39-L54', 'indices._types.DataStreamIndex': 'indices/_types/DataStream.ts#L160-L185', -'indices._types.DataStreamLifecycle': 'indices/_types/DataStreamLifecycle.ts#L26-L55', -'indices._types.DataStreamLifecycleRolloverConditions': 'indices/_types/DataStreamLifecycle.ts#L70-L82', -'indices._types.DataStreamLifecycleWithRollover': 'indices/_types/DataStreamLifecycle.ts#L57-L68', +'indices._types.DataStreamLifecycle': 'indices/_types/DataStreamLifecycle.ts#L26-L65', +'indices._types.DataStreamLifecycleRolloverConditions': 'indices/_types/DataStreamLifecycle.ts#L87-L99', +'indices._types.DataStreamLifecycleWithRollover': 'indices/_types/DataStreamLifecycle.ts#L74-L85', 'indices._types.DataStreamOptions': 'indices/_types/DataStreamOptions.ts#L25-L34', 'indices._types.DataStreamOptionsTemplate': 'indices/_types/DataStreamOptions.ts#L36-L41', 'indices._types.DataStreamTimestampField': 'indices/_types/DataStream.ts#L153-L158', @@ -1627,6 +1633,7 @@ 'indices._types.NumericFielddataFormat': 'indices/_types/NumericFielddataFormat.ts#L20-L23', 'indices._types.Queries': 'indices/_types/IndexSettings.ts#L437-L439', 'indices._types.RetentionLease': 'indices/_types/IndexSettings.ts#L66-L68', +'indices._types.RetentionSource': 'indices/_types/DataStreamLifecycle.ts#L67-L72', 'indices._types.SamplingMethod': 'indices/_types/Downsample.ts#L33-L36', 'indices._types.SearchIdle': 'indices/_types/IndexSettings.ts#L261-L264', 'indices._types.SegmentSortMissing': 'indices/_types/IndexSegmentSort.ts#L43-L46', @@ -1732,9 +1739,10 @@ 'indices.get_alias.Request': 'indices/get_alias/IndicesGetAliasRequest.ts#L24-L100', 'indices.get_alias.Response': 'indices/get_alias/IndicesGetAliasResponse.ts#L28-L38', 'indices.get_alias._types.IndexAliases': 'indices/get_alias/_types/response.ts#L25-L27', -'indices.get_data_lifecycle.DataStreamWithLifecycle': 'indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L27-L30', +'indices.get_data_lifecycle.DataStreamWithLifecycle': 'indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L31-L34', 'indices.get_data_lifecycle.Request': 'indices/get_data_lifecycle/IndicesGetDataLifecycleRequest.ts#L24-L69', -'indices.get_data_lifecycle.Response': 'indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L23-L25', +'indices.get_data_lifecycle.Response': 'indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L24-L29', +'indices.get_data_lifecycle._types.GlobalRetention': 'indices/get_data_lifecycle/_types/response.ts#L22-L25', 'indices.get_data_lifecycle_stats.DataStreamStats': 'indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L46-L59', 'indices.get_data_lifecycle_stats.Request': 'indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsRequest.ts#L23-L42', 'indices.get_data_lifecycle_stats.Response': 'indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L24-L44', @@ -1861,7 +1869,7 @@ 'indices.simulate_template.Request': 'indices/simulate_template/IndicesSimulateTemplateRequest.ts#L33-L145', 'indices.simulate_template.Response': 'indices/simulate_template/IndicesSimulateTemplateResponse.ts#L26-L31', 'indices.simulate_template.Template': 'indices/simulate_template/IndicesSimulateTemplateResponse.ts#L33-L37', -'indices.split.Request': 'indices/split/IndicesSplitRequest.ts#L27-L116', +'indices.split.Request': 'indices/split/IndicesSplitRequest.ts#L27-L117', 'indices.split.Response': 'indices/split/IndicesSplitResponse.ts#L22-L28', 'indices.stats.IndexMetadataState': 'indices/stats/types.ts#L225-L228', 'indices.stats.IndexStats': 'indices/stats/types.ts#L52-L93', @@ -1901,31 +1909,33 @@ 'inference._types.AmazonBedrockServiceType': 'inference/_types/AmazonBedrockTypes.ts#L99-L101', 'inference._types.AmazonBedrockTaskSettings': 'inference/_types/AmazonBedrockTypes.ts#L67-L91', 'inference._types.AmazonBedrockTaskType': 'inference/_types/AmazonBedrockTypes.ts#L93-L97', -'inference._types.AmazonSageMakerApi': 'inference/_types/CommonTypes.ts#L712-L715', -'inference._types.AmazonSageMakerServiceSettings': 'inference/_types/CommonTypes.ts#L656-L710', -'inference._types.AmazonSageMakerServiceType': 'inference/_types/CommonTypes.ts#L795-L797', -'inference._types.AmazonSageMakerTaskSettings': 'inference/_types/CommonTypes.ts#L746-L775', -'inference._types.AnthropicServiceSettings': 'inference/_types/CommonTypes.ts#L799-L815', -'inference._types.AnthropicServiceType': 'inference/_types/CommonTypes.ts#L848-L850', -'inference._types.AnthropicTaskSettings': 'inference/_types/CommonTypes.ts#L817-L842', -'inference._types.AnthropicTaskType': 'inference/_types/CommonTypes.ts#L844-L846', -'inference._types.AzureAiStudioServiceSettings': 'inference/_types/CommonTypes.ts#L852-L892', -'inference._types.AzureAiStudioServiceType': 'inference/_types/CommonTypes.ts#L938-L940', -'inference._types.AzureAiStudioTaskSettings': 'inference/_types/CommonTypes.ts#L894-L930', -'inference._types.AzureAiStudioTaskType': 'inference/_types/CommonTypes.ts#L932-L936', -'inference._types.AzureOpenAIServiceSettings': 'inference/_types/CommonTypes.ts#L942-L1029', -'inference._types.AzureOpenAIServiceType': 'inference/_types/CommonTypes.ts#L1056-L1058', -'inference._types.AzureOpenAITaskSettings': 'inference/_types/CommonTypes.ts#L1031-L1048', -'inference._types.AzureOpenAITaskType': 'inference/_types/CommonTypes.ts#L1050-L1054', +'inference._types.AmazonSageMakerApi': 'inference/_types/CommonTypes.ts#L754-L757', +'inference._types.AmazonSageMakerElementType': 'inference/_types/CommonTypes.ts#L765-L769', +'inference._types.AmazonSageMakerServiceSettings': 'inference/_types/CommonTypes.ts#L686-L752', +'inference._types.AmazonSageMakerServiceType': 'inference/_types/CommonTypes.ts#L820-L822', +'inference._types.AmazonSageMakerSimilarity': 'inference/_types/CommonTypes.ts#L759-L763', +'inference._types.AmazonSageMakerTaskSettings': 'inference/_types/CommonTypes.ts#L771-L800', +'inference._types.AnthropicServiceSettings': 'inference/_types/CommonTypes.ts#L824-L840', +'inference._types.AnthropicServiceType': 'inference/_types/CommonTypes.ts#L874-L876', +'inference._types.AnthropicTaskSettings': 'inference/_types/CommonTypes.ts#L842-L867', +'inference._types.AnthropicTaskType': 'inference/_types/CommonTypes.ts#L869-L872', +'inference._types.AzureAiStudioServiceSettings': 'inference/_types/CommonTypes.ts#L878-L918', +'inference._types.AzureAiStudioServiceType': 'inference/_types/CommonTypes.ts#L964-L966', +'inference._types.AzureAiStudioTaskSettings': 'inference/_types/CommonTypes.ts#L920-L956', +'inference._types.AzureAiStudioTaskType': 'inference/_types/CommonTypes.ts#L958-L962', +'inference._types.AzureOpenAIServiceSettings': 'inference/_types/CommonTypes.ts#L968-L1055', +'inference._types.AzureOpenAIServiceType': 'inference/_types/CommonTypes.ts#L1082-L1084', +'inference._types.AzureOpenAITaskSettings': 'inference/_types/CommonTypes.ts#L1057-L1074', +'inference._types.AzureOpenAITaskType': 'inference/_types/CommonTypes.ts#L1076-L1080', 'inference._types.BaseReasoningDetail': 'inference/_types/CommonTypes.ts#L405-L422', -'inference._types.CohereEmbeddingType': 'inference/_types/CommonTypes.ts#L1111-L1117', -'inference._types.CohereInputType': 'inference/_types/CommonTypes.ts#L1119-L1124', -'inference._types.CohereServiceSettings': 'inference/_types/CommonTypes.ts#L1060-L1099', -'inference._types.CohereServiceType': 'inference/_types/CommonTypes.ts#L1107-L1109', -'inference._types.CohereSimilarityType': 'inference/_types/CommonTypes.ts#L1126-L1130', -'inference._types.CohereTaskSettings': 'inference/_types/CommonTypes.ts#L1138-L1170', -'inference._types.CohereTaskType': 'inference/_types/CommonTypes.ts#L1101-L1105', -'inference._types.CohereTruncateType': 'inference/_types/CommonTypes.ts#L1132-L1136', +'inference._types.CohereEmbeddingType': 'inference/_types/CommonTypes.ts#L1137-L1143', +'inference._types.CohereInputType': 'inference/_types/CommonTypes.ts#L1145-L1150', +'inference._types.CohereServiceSettings': 'inference/_types/CommonTypes.ts#L1086-L1125', +'inference._types.CohereServiceType': 'inference/_types/CommonTypes.ts#L1133-L1135', +'inference._types.CohereSimilarityType': 'inference/_types/CommonTypes.ts#L1152-L1156', +'inference._types.CohereTaskSettings': 'inference/_types/CommonTypes.ts#L1164-L1196', +'inference._types.CohereTaskType': 'inference/_types/CommonTypes.ts#L1127-L1131', +'inference._types.CohereTruncateType': 'inference/_types/CommonTypes.ts#L1158-L1162', 'inference._types.CompletionInferenceResult': 'inference/_types/Results.ts#L98-L103', 'inference._types.CompletionResult': 'inference/_types/Results.ts#L91-L96', 'inference._types.CompletionTool': 'inference/_types/CommonTypes.ts#L513-L525', @@ -1935,56 +1945,56 @@ 'inference._types.CompletionToolType': 'inference/_types/CommonTypes.ts#L154-L157', 'inference._types.ContentObject': 'inference/_types/CommonTypes.ts#L159-L180', 'inference._types.ContentType': 'inference/_types/CommonTypes.ts#L182-L186', -'inference._types.ContextualAIServiceSettings': 'inference/_types/CommonTypes.ts#L1460-L1481', -'inference._types.ContextualAIServiceType': 'inference/_types/CommonTypes.ts#L1456-L1458', -'inference._types.ContextualAITaskSettings': 'inference/_types/CommonTypes.ts#L1483-L1495', -'inference._types.CustomRequestParams': 'inference/_types/CommonTypes.ts#L1258-L1269', -'inference._types.CustomResponseParams': 'inference/_types/CommonTypes.ts#L1271-L1425', -'inference._types.CustomServiceInputType': 'inference/_types/CommonTypes.ts#L1172-L1177', -'inference._types.CustomServiceSettings': 'inference/_types/CommonTypes.ts#L1181-L1256', -'inference._types.CustomServiceType': 'inference/_types/CommonTypes.ts#L1434-L1436', -'inference._types.CustomTaskSettings': 'inference/_types/CommonTypes.ts#L1440-L1454', -'inference._types.CustomTaskType': 'inference/_types/CommonTypes.ts#L1427-L1432', -'inference._types.DeepSeekServiceSettings': 'inference/_types/CommonTypes.ts#L1497-L1517', -'inference._types.DeepSeekServiceType': 'inference/_types/CommonTypes.ts#L1519-L1521', +'inference._types.ContextualAIServiceSettings': 'inference/_types/CommonTypes.ts#L1486-L1507', +'inference._types.ContextualAIServiceType': 'inference/_types/CommonTypes.ts#L1482-L1484', +'inference._types.ContextualAITaskSettings': 'inference/_types/CommonTypes.ts#L1509-L1521', +'inference._types.CustomRequestParams': 'inference/_types/CommonTypes.ts#L1284-L1295', +'inference._types.CustomResponseParams': 'inference/_types/CommonTypes.ts#L1297-L1451', +'inference._types.CustomServiceInputType': 'inference/_types/CommonTypes.ts#L1198-L1203', +'inference._types.CustomServiceSettings': 'inference/_types/CommonTypes.ts#L1207-L1282', +'inference._types.CustomServiceType': 'inference/_types/CommonTypes.ts#L1460-L1462', +'inference._types.CustomTaskSettings': 'inference/_types/CommonTypes.ts#L1466-L1480', +'inference._types.CustomTaskType': 'inference/_types/CommonTypes.ts#L1453-L1458', +'inference._types.DeepSeekServiceSettings': 'inference/_types/CommonTypes.ts#L1523-L1543', +'inference._types.DeepSeekServiceType': 'inference/_types/CommonTypes.ts#L1545-L1547', 'inference._types.DeleteInferenceEndpointResult': 'inference/_types/Results.ts#L124-L129', 'inference._types.DenseEmbeddingByteResult': 'inference/_types/Results.ts#L57-L62', 'inference._types.DenseEmbeddingResult': 'inference/_types/Results.ts#L64-L69', -'inference._types.ElasticsearchServiceSettings': 'inference/_types/CommonTypes.ts#L1523-L1579', -'inference._types.ElasticsearchServiceType': 'inference/_types/CommonTypes.ts#L1595-L1597', -'inference._types.ElasticsearchTaskSettings': 'inference/_types/CommonTypes.ts#L1581-L1587', -'inference._types.ElasticsearchTaskType': 'inference/_types/CommonTypes.ts#L1589-L1593', -'inference._types.ElserServiceSettings': 'inference/_types/CommonTypes.ts#L1599-L1625', -'inference._types.ElserServiceType': 'inference/_types/CommonTypes.ts#L1631-L1633', -'inference._types.ElserTaskType': 'inference/_types/CommonTypes.ts#L1627-L1629', -'inference._types.EmbeddingContentFormat': 'inference/_types/CommonTypes.ts#L647-L654', -'inference._types.EmbeddingContentObject': 'inference/_types/CommonTypes.ts#L610-L618', -'inference._types.EmbeddingContentObjectContents': 'inference/_types/CommonTypes.ts#L620-L637', -'inference._types.EmbeddingContentType': 'inference/_types/CommonTypes.ts#L639-L645', +'inference._types.ElasticsearchServiceSettings': 'inference/_types/CommonTypes.ts#L1549-L1605', +'inference._types.ElasticsearchServiceType': 'inference/_types/CommonTypes.ts#L1621-L1623', +'inference._types.ElasticsearchTaskSettings': 'inference/_types/CommonTypes.ts#L1607-L1613', +'inference._types.ElasticsearchTaskType': 'inference/_types/CommonTypes.ts#L1615-L1619', +'inference._types.ElserServiceSettings': 'inference/_types/CommonTypes.ts#L1625-L1651', +'inference._types.ElserServiceType': 'inference/_types/CommonTypes.ts#L1657-L1659', +'inference._types.ElserTaskType': 'inference/_types/CommonTypes.ts#L1653-L1655', +'inference._types.EmbeddingContentFormat': 'inference/_types/CommonTypes.ts#L677-L684', +'inference._types.EmbeddingContentObject': 'inference/_types/CommonTypes.ts#L630-L638', +'inference._types.EmbeddingContentObjectItem': 'inference/_types/CommonTypes.ts#L647-L664', +'inference._types.EmbeddingContentType': 'inference/_types/CommonTypes.ts#L666-L675', 'inference._types.EmbeddingInferenceResult': 'inference/_types/Results.ts#L81-L89', -'inference._types.EmbeddingInput': 'inference/_types/CommonTypes.ts#L591-L596', +'inference._types.EmbeddingInput': 'inference/_types/CommonTypes.ts#L611-L616', 'inference._types.EncryptedReasoningDetail': 'inference/_types/CommonTypes.ts#L424-L434', 'inference._types.FileContent': 'inference/_types/CommonTypes.ts#L205-L214', -'inference._types.FireworksAIServiceSettings': 'inference/_types/CommonTypes.ts#L2047-L2087', -'inference._types.FireworksAIServiceType': 'inference/_types/CommonTypes.ts#L2095-L2097', -'inference._types.FireworksAISimilarityType': 'inference/_types/CommonTypes.ts#L2099-L2103', -'inference._types.FireworksAITaskSettings': 'inference/_types/CommonTypes.ts#L2105-L2122', -'inference._types.FireworksAITaskType': 'inference/_types/CommonTypes.ts#L2089-L2093', -'inference._types.GoogleAiServiceType': 'inference/_types/CommonTypes.ts#L1658-L1660', -'inference._types.GoogleAiStudioServiceSettings': 'inference/_types/CommonTypes.ts#L1635-L1651', -'inference._types.GoogleAiStudioTaskType': 'inference/_types/CommonTypes.ts#L1653-L1656', -'inference._types.GoogleModelGardenProvider': 'inference/_types/CommonTypes.ts#L1749-L1756', -'inference._types.GoogleVertexAIServiceSettings': 'inference/_types/CommonTypes.ts#L1662-L1747', -'inference._types.GoogleVertexAIServiceType': 'inference/_types/CommonTypes.ts#L1797-L1799', -'inference._types.GoogleVertexAITaskSettings': 'inference/_types/CommonTypes.ts#L1758-L1781', -'inference._types.GoogleVertexAITaskType': 'inference/_types/CommonTypes.ts#L1790-L1795', -'inference._types.GroqServiceSettings': 'inference/_types/CommonTypes.ts#L1801-L1823', -'inference._types.GroqServiceType': 'inference/_types/CommonTypes.ts#L1829-L1831', -'inference._types.GroqTaskType': 'inference/_types/CommonTypes.ts#L1825-L1827', -'inference._types.HuggingFaceServiceSettings': 'inference/_types/CommonTypes.ts#L1833-L1863', -'inference._types.HuggingFaceServiceType': 'inference/_types/CommonTypes.ts#L1884-L1886', -'inference._types.HuggingFaceTaskSettings': 'inference/_types/CommonTypes.ts#L1865-L1875', -'inference._types.HuggingFaceTaskType': 'inference/_types/CommonTypes.ts#L1877-L1882', +'inference._types.FireworksAIServiceSettings': 'inference/_types/CommonTypes.ts#L2075-L2115', +'inference._types.FireworksAIServiceType': 'inference/_types/CommonTypes.ts#L2123-L2125', +'inference._types.FireworksAISimilarityType': 'inference/_types/CommonTypes.ts#L2127-L2131', +'inference._types.FireworksAITaskSettings': 'inference/_types/CommonTypes.ts#L2133-L2150', +'inference._types.FireworksAITaskType': 'inference/_types/CommonTypes.ts#L2117-L2121', +'inference._types.GoogleAiServiceType': 'inference/_types/CommonTypes.ts#L1684-L1686', +'inference._types.GoogleAiStudioServiceSettings': 'inference/_types/CommonTypes.ts#L1661-L1677', +'inference._types.GoogleAiStudioTaskType': 'inference/_types/CommonTypes.ts#L1679-L1682', +'inference._types.GoogleModelGardenProvider': 'inference/_types/CommonTypes.ts#L1777-L1784', +'inference._types.GoogleVertexAIServiceSettings': 'inference/_types/CommonTypes.ts#L1688-L1775', +'inference._types.GoogleVertexAIServiceType': 'inference/_types/CommonTypes.ts#L1825-L1827', +'inference._types.GoogleVertexAITaskSettings': 'inference/_types/CommonTypes.ts#L1786-L1809', +'inference._types.GoogleVertexAITaskType': 'inference/_types/CommonTypes.ts#L1818-L1823', +'inference._types.GroqServiceSettings': 'inference/_types/CommonTypes.ts#L1829-L1851', +'inference._types.GroqServiceType': 'inference/_types/CommonTypes.ts#L1857-L1859', +'inference._types.GroqTaskType': 'inference/_types/CommonTypes.ts#L1853-L1855', +'inference._types.HuggingFaceServiceSettings': 'inference/_types/CommonTypes.ts#L1861-L1891', +'inference._types.HuggingFaceServiceType': 'inference/_types/CommonTypes.ts#L1912-L1914', +'inference._types.HuggingFaceTaskSettings': 'inference/_types/CommonTypes.ts#L1893-L1903', +'inference._types.HuggingFaceTaskType': 'inference/_types/CommonTypes.ts#L1905-L1910', 'inference._types.ImageUrl': 'inference/_types/CommonTypes.ts#L188-L197', 'inference._types.ImageUrlDetail': 'inference/_types/CommonTypes.ts#L199-L203', 'inference._types.InferenceChunkingSettings': 'inference/_types/Services.ts#L375-L434', @@ -2017,17 +2027,17 @@ 'inference._types.InferenceEndpointInfoVoyageAI': 'inference/_types/Services.ts#L353-L362', 'inference._types.InferenceEndpointInfoWatsonx': 'inference/_types/Services.ts#L364-L373', 'inference._types.InferenceResult': 'inference/_types/Results.ts#L131-L145', -'inference._types.JinaAIElementType': 'inference/_types/CommonTypes.ts#L1993-L1997', -'inference._types.JinaAIServiceSettings': 'inference/_types/CommonTypes.ts#L1888-L1936', -'inference._types.JinaAIServiceType': 'inference/_types/CommonTypes.ts#L1976-L1978', -'inference._types.JinaAISimilarityType': 'inference/_types/CommonTypes.ts#L1980-L1984', -'inference._types.JinaAITaskSettings': 'inference/_types/CommonTypes.ts#L1938-L1968', -'inference._types.JinaAITaskType': 'inference/_types/CommonTypes.ts#L1970-L1974', -'inference._types.JinaAITextEmbeddingTask': 'inference/_types/CommonTypes.ts#L1986-L1991', -'inference._types.LlamaServiceSettings': 'inference/_types/CommonTypes.ts#L1999-L2029', -'inference._types.LlamaServiceType': 'inference/_types/CommonTypes.ts#L2037-L2039', -'inference._types.LlamaSimilarityType': 'inference/_types/CommonTypes.ts#L2041-L2045', -'inference._types.LlamaTaskType': 'inference/_types/CommonTypes.ts#L2031-L2035', +'inference._types.JinaAIElementType': 'inference/_types/CommonTypes.ts#L2021-L2025', +'inference._types.JinaAIServiceSettings': 'inference/_types/CommonTypes.ts#L1916-L1964', +'inference._types.JinaAIServiceType': 'inference/_types/CommonTypes.ts#L2004-L2006', +'inference._types.JinaAISimilarityType': 'inference/_types/CommonTypes.ts#L2008-L2012', +'inference._types.JinaAITaskSettings': 'inference/_types/CommonTypes.ts#L1966-L1996', +'inference._types.JinaAITaskType': 'inference/_types/CommonTypes.ts#L1998-L2002', +'inference._types.JinaAITextEmbeddingTask': 'inference/_types/CommonTypes.ts#L2014-L2019', +'inference._types.LlamaServiceSettings': 'inference/_types/CommonTypes.ts#L2027-L2057', +'inference._types.LlamaServiceType': 'inference/_types/CommonTypes.ts#L2065-L2067', +'inference._types.LlamaSimilarityType': 'inference/_types/CommonTypes.ts#L2069-L2073', +'inference._types.LlamaTaskType': 'inference/_types/CommonTypes.ts#L2059-L2063', 'inference._types.Message': 'inference/_types/CommonTypes.ts#L300-L393', 'inference._types.MessageContent': 'inference/_types/CommonTypes.ts#L295-L298', 'inference._types.MistralServiceSettings': 'inference/_types/MistralTypes.ts#L23-L48', @@ -2039,16 +2049,16 @@ 'inference._types.NvidiaSimilarityType': 'inference/_types/NvidiaTypes.ts#L75-L79', 'inference._types.NvidiaTaskSettings': 'inference/_types/NvidiaTypes.ts#L81-L101', 'inference._types.NvidiaTaskType': 'inference/_types/NvidiaTypes.ts#L64-L69', -'inference._types.OpenAIServiceSettings': 'inference/_types/CommonTypes.ts#L2124-L2168', -'inference._types.OpenAIServiceType': 'inference/_types/CommonTypes.ts#L2201-L2203', -'inference._types.OpenAISimilarityType': 'inference/_types/CommonTypes.ts#L2170-L2174', -'inference._types.OpenAITaskSettings': 'inference/_types/CommonTypes.ts#L2176-L2193', -'inference._types.OpenAITaskType': 'inference/_types/CommonTypes.ts#L2195-L2199', -'inference._types.OpenShiftAiServiceSettings': 'inference/_types/CommonTypes.ts#L2205-L2238', -'inference._types.OpenShiftAiServiceType': 'inference/_types/CommonTypes.ts#L2247-L2249', -'inference._types.OpenShiftAiSimilarityType': 'inference/_types/CommonTypes.ts#L2251-L2255', -'inference._types.OpenShiftAiTaskSettings': 'inference/_types/CommonTypes.ts#L2257-L2266', -'inference._types.OpenShiftAiTaskType': 'inference/_types/CommonTypes.ts#L2240-L2245', +'inference._types.OpenAIServiceSettings': 'inference/_types/CommonTypes.ts#L2152-L2239', +'inference._types.OpenAIServiceType': 'inference/_types/CommonTypes.ts#L2273-L2275', +'inference._types.OpenAISimilarityType': 'inference/_types/CommonTypes.ts#L2241-L2245', +'inference._types.OpenAITaskSettings': 'inference/_types/CommonTypes.ts#L2247-L2264', +'inference._types.OpenAITaskType': 'inference/_types/CommonTypes.ts#L2266-L2271', +'inference._types.OpenShiftAiServiceSettings': 'inference/_types/CommonTypes.ts#L2277-L2310', +'inference._types.OpenShiftAiServiceType': 'inference/_types/CommonTypes.ts#L2319-L2321', +'inference._types.OpenShiftAiSimilarityType': 'inference/_types/CommonTypes.ts#L2323-L2327', +'inference._types.OpenShiftAiTaskSettings': 'inference/_types/CommonTypes.ts#L2329-L2338', +'inference._types.OpenShiftAiTaskType': 'inference/_types/CommonTypes.ts#L2312-L2317', 'inference._types.RankedDocument': 'inference/_types/Results.ts#L105-L115', 'inference._types.RateLimitSetting': 'inference/_types/Services.ts#L440-L471', 'inference._types.Reasoning': 'inference/_types/CommonTypes.ts#L216-L246', @@ -2056,7 +2066,7 @@ 'inference._types.ReasoningEffort': 'inference/_types/CommonTypes.ts#L248-L255', 'inference._types.ReasoningSummary': 'inference/_types/CommonTypes.ts#L257-L261', 'inference._types.RequestChatCompletion': 'inference/_types/CommonTypes.ts#L26-L133', -'inference._types.RequestEmbedding': 'inference/_types/CommonTypes.ts#L527-L589', +'inference._types.RequestEmbedding': 'inference/_types/CommonTypes.ts#L527-L609', 'inference._types.RerankedInferenceResult': 'inference/_types/Results.ts#L117-L122', 'inference._types.SparseEmbeddingInferenceResult': 'inference/_types/Results.ts#L44-L49', 'inference._types.SparseEmbeddingResult': 'inference/_types/Results.ts#L36-L42', @@ -2066,40 +2076,40 @@ 'inference._types.TaskTypeAlibabaCloudAI': 'inference/_types/TaskType.ts#L43-L48', 'inference._types.TaskTypeAmazonBedrock': 'inference/_types/TaskType.ts#L50-L54', 'inference._types.TaskTypeAmazonSageMaker': 'inference/_types/TaskType.ts#L56-L62', -'inference._types.TaskTypeAnthropic': 'inference/_types/TaskType.ts#L64-L66', -'inference._types.TaskTypeAzureAIStudio': 'inference/_types/TaskType.ts#L68-L72', -'inference._types.TaskTypeAzureOpenAI': 'inference/_types/TaskType.ts#L74-L78', -'inference._types.TaskTypeCohere': 'inference/_types/TaskType.ts#L80-L84', -'inference._types.TaskTypeContextualAI': 'inference/_types/TaskType.ts#L86-L88', -'inference._types.TaskTypeCustom': 'inference/_types/TaskType.ts#L90-L95', -'inference._types.TaskTypeDeepSeek': 'inference/_types/TaskType.ts#L97-L100', -'inference._types.TaskTypeELSER': 'inference/_types/TaskType.ts#L108-L110', -'inference._types.TaskTypeElasticsearch': 'inference/_types/TaskType.ts#L102-L106', -'inference._types.TaskTypeFireworksAI': 'inference/_types/TaskType.ts#L172-L176', -'inference._types.TaskTypeGoogleAIStudio': 'inference/_types/TaskType.ts#L112-L115', -'inference._types.TaskTypeGoogleVertexAI': 'inference/_types/TaskType.ts#L117-L122', -'inference._types.TaskTypeGroq': 'inference/_types/TaskType.ts#L124-L126', -'inference._types.TaskTypeHuggingFace': 'inference/_types/TaskType.ts#L128-L133', +'inference._types.TaskTypeAnthropic': 'inference/_types/TaskType.ts#L64-L67', +'inference._types.TaskTypeAzureAIStudio': 'inference/_types/TaskType.ts#L69-L73', +'inference._types.TaskTypeAzureOpenAI': 'inference/_types/TaskType.ts#L75-L79', +'inference._types.TaskTypeCohere': 'inference/_types/TaskType.ts#L81-L85', +'inference._types.TaskTypeContextualAI': 'inference/_types/TaskType.ts#L87-L89', +'inference._types.TaskTypeCustom': 'inference/_types/TaskType.ts#L91-L96', +'inference._types.TaskTypeDeepSeek': 'inference/_types/TaskType.ts#L98-L101', +'inference._types.TaskTypeELSER': 'inference/_types/TaskType.ts#L109-L111', +'inference._types.TaskTypeElasticsearch': 'inference/_types/TaskType.ts#L103-L107', +'inference._types.TaskTypeFireworksAI': 'inference/_types/TaskType.ts#L174-L178', +'inference._types.TaskTypeGoogleAIStudio': 'inference/_types/TaskType.ts#L113-L116', +'inference._types.TaskTypeGoogleVertexAI': 'inference/_types/TaskType.ts#L118-L123', +'inference._types.TaskTypeGroq': 'inference/_types/TaskType.ts#L125-L127', +'inference._types.TaskTypeHuggingFace': 'inference/_types/TaskType.ts#L129-L134', 'inference._types.TaskTypeJinaAi': 'inference/_types/TaskType.ts#L32-L36', -'inference._types.TaskTypeLlama': 'inference/_types/TaskType.ts#L135-L139', -'inference._types.TaskTypeMistral': 'inference/_types/TaskType.ts#L141-L145', -'inference._types.TaskTypeNvidia': 'inference/_types/TaskType.ts#L147-L152', -'inference._types.TaskTypeOpenAI': 'inference/_types/TaskType.ts#L154-L158', -'inference._types.TaskTypeOpenShiftAi': 'inference/_types/TaskType.ts#L160-L165', -'inference._types.TaskTypeVoyageAI': 'inference/_types/TaskType.ts#L167-L170', -'inference._types.TaskTypeWatsonx': 'inference/_types/TaskType.ts#L178-L182', +'inference._types.TaskTypeLlama': 'inference/_types/TaskType.ts#L136-L140', +'inference._types.TaskTypeMistral': 'inference/_types/TaskType.ts#L142-L146', +'inference._types.TaskTypeNvidia': 'inference/_types/TaskType.ts#L148-L153', +'inference._types.TaskTypeOpenAI': 'inference/_types/TaskType.ts#L155-L160', +'inference._types.TaskTypeOpenShiftAi': 'inference/_types/TaskType.ts#L162-L167', +'inference._types.TaskTypeVoyageAI': 'inference/_types/TaskType.ts#L169-L172', +'inference._types.TaskTypeWatsonx': 'inference/_types/TaskType.ts#L180-L184', 'inference._types.TextEmbeddingInferenceResult': 'inference/_types/Results.ts#L71-L79', 'inference._types.TextReasoningDetail': 'inference/_types/CommonTypes.ts#L448-L463', -'inference._types.ThinkingConfig': 'inference/_types/CommonTypes.ts#L1783-L1788', +'inference._types.ThinkingConfig': 'inference/_types/CommonTypes.ts#L1811-L1816', 'inference._types.ToolCall': 'inference/_types/CommonTypes.ts#L277-L293', 'inference._types.ToolCallFunction': 'inference/_types/CommonTypes.ts#L263-L275', -'inference._types.VoyageAIServiceSettings': 'inference/_types/CommonTypes.ts#L2268-L2299', -'inference._types.VoyageAIServiceType': 'inference/_types/CommonTypes.ts#L2332-L2334', -'inference._types.VoyageAITaskSettings': 'inference/_types/CommonTypes.ts#L2301-L2325', -'inference._types.VoyageAITaskType': 'inference/_types/CommonTypes.ts#L2327-L2330', -'inference._types.WatsonxServiceSettings': 'inference/_types/CommonTypes.ts#L2336-L2372', -'inference._types.WatsonxServiceType': 'inference/_types/CommonTypes.ts#L2381-L2383', -'inference._types.WatsonxTaskType': 'inference/_types/CommonTypes.ts#L2374-L2379', +'inference._types.VoyageAIServiceSettings': 'inference/_types/CommonTypes.ts#L2340-L2371', +'inference._types.VoyageAIServiceType': 'inference/_types/CommonTypes.ts#L2404-L2406', +'inference._types.VoyageAITaskSettings': 'inference/_types/CommonTypes.ts#L2373-L2397', +'inference._types.VoyageAITaskType': 'inference/_types/CommonTypes.ts#L2399-L2402', +'inference._types.WatsonxServiceSettings': 'inference/_types/CommonTypes.ts#L2408-L2444', +'inference._types.WatsonxServiceType': 'inference/_types/CommonTypes.ts#L2453-L2455', +'inference._types.WatsonxTaskType': 'inference/_types/CommonTypes.ts#L2446-L2451', 'inference.chat_completion_unified.Request': 'inference/chat_completion_unified/UnifiedRequest.ts#L24-L63', 'inference.chat_completion_unified.Response': 'inference/chat_completion_unified/UnifiedResponse.ts#L22-L25', 'inference.completion.Request': 'inference/completion/CompletionRequest.ts#L25-L72', @@ -2122,7 +2132,7 @@ 'inference.put_amazonbedrock.Response': 'inference/put_amazonbedrock/PutAmazonBedrockResponse.ts#L22-L25', 'inference.put_amazonsagemaker.Request': 'inference/put_amazonsagemaker/PutAmazonSageMakerRequest.ts#L31-L90', 'inference.put_amazonsagemaker.Response': 'inference/put_amazonsagemaker/PutAmazonSageMakerResponse.ts#L22-L25', -'inference.put_anthropic.Request': 'inference/put_anthropic/PutAnthropicRequest.ts#L30-L82', +'inference.put_anthropic.Request': 'inference/put_anthropic/PutAnthropicRequest.ts#L30-L83', 'inference.put_anthropic.Response': 'inference/put_anthropic/PutAnthropicResponse.ts#L22-L25', 'inference.put_azureaistudio.Request': 'inference/put_azureaistudio/PutAzureAiStudioRequest.ts#L31-L89', 'inference.put_azureaistudio.Response': 'inference/put_azureaistudio/PutAzureAiStudioResponse.ts#L22-L25', @@ -2177,79 +2187,79 @@ 'inference.update.Request': 'inference/update/UpdateInferenceRequest.ts#L25-L64', 'inference.update.Response': 'inference/update/UpdateInferenceResponse.ts#L22-L25', 'ingest._types.AppendProcessor': 'ingest/_types/Processors.ts#L334-L366', -'ingest._types.AttachmentProcessor': 'ingest/_types/Processors.ts#L368-L409', -'ingest._types.BytesProcessor': 'ingest/_types/Processors.ts#L578-L594', -'ingest._types.CefProcessor': 'ingest/_types/Processors.ts#L596-L622', -'ingest._types.CircleProcessor': 'ingest/_types/Processors.ts#L624-L647', -'ingest._types.CommunityIDProcessor': 'ingest/_types/Processors.ts#L649-L710', -'ingest._types.ConvertProcessor': 'ingest/_types/Processors.ts#L723-L743', -'ingest._types.ConvertType': 'ingest/_types/Processors.ts#L712-L721', -'ingest._types.CsvProcessor': 'ingest/_types/Processors.ts#L745-L778', +'ingest._types.AttachmentProcessor': 'ingest/_types/Processors.ts#L368-L419', +'ingest._types.BytesProcessor': 'ingest/_types/Processors.ts#L588-L604', +'ingest._types.CefProcessor': 'ingest/_types/Processors.ts#L606-L632', +'ingest._types.CircleProcessor': 'ingest/_types/Processors.ts#L634-L657', +'ingest._types.CommunityIDProcessor': 'ingest/_types/Processors.ts#L659-L720', +'ingest._types.ConvertProcessor': 'ingest/_types/Processors.ts#L733-L753', +'ingest._types.ConvertType': 'ingest/_types/Processors.ts#L722-L731', +'ingest._types.CsvProcessor': 'ingest/_types/Processors.ts#L755-L788', 'ingest._types.DatabaseConfiguration': 'ingest/_types/Database.ts#L22-L37', 'ingest._types.DatabaseConfigurationFull': 'ingest/_types/Database.ts#L39-L53', -'ingest._types.DateIndexNameProcessor': 'ingest/_types/Processors.ts#L780-L818', -'ingest._types.DateProcessor': 'ingest/_types/Processors.ts#L820-L853', -'ingest._types.DissectProcessor': 'ingest/_types/Processors.ts#L855-L874', +'ingest._types.DateIndexNameProcessor': 'ingest/_types/Processors.ts#L790-L828', +'ingest._types.DateProcessor': 'ingest/_types/Processors.ts#L830-L863', +'ingest._types.DissectProcessor': 'ingest/_types/Processors.ts#L865-L884', 'ingest._types.Document': 'ingest/_types/Simulation.ts#L69-L83', 'ingest._types.DocumentSimulation': 'ingest/_types/Simulation.ts#L85-L115', -'ingest._types.DotExpanderProcessor': 'ingest/_types/Processors.ts#L876-L894', -'ingest._types.DropProcessor': 'ingest/_types/Processors.ts#L896-L896', -'ingest._types.EnrichProcessor': 'ingest/_types/Processors.ts#L898-L937', -'ingest._types.FailProcessor': 'ingest/_types/Processors.ts#L939-L945', +'ingest._types.DotExpanderProcessor': 'ingest/_types/Processors.ts#L886-L904', +'ingest._types.DropProcessor': 'ingest/_types/Processors.ts#L906-L906', +'ingest._types.EnrichProcessor': 'ingest/_types/Processors.ts#L908-L947', +'ingest._types.FailProcessor': 'ingest/_types/Processors.ts#L949-L955', 'ingest._types.FieldAccessPattern': 'ingest/_types/Pipeline.ts#L115-L118', -'ingest._types.FingerprintDigest': 'ingest/_types/Processors.ts#L947-L953', -'ingest._types.FingerprintProcessor': 'ingest/_types/Processors.ts#L955-L983', -'ingest._types.ForeachProcessor': 'ingest/_types/Processors.ts#L985-L999', -'ingest._types.GeoGridProcessor': 'ingest/_types/Processors.ts#L411-L452', -'ingest._types.GeoGridTargetFormat': 'ingest/_types/Processors.ts#L460-L463', -'ingest._types.GeoGridTileType': 'ingest/_types/Processors.ts#L454-L458', -'ingest._types.GeoIpProcessor': 'ingest/_types/Processors.ts#L465-L499', -'ingest._types.GrokProcessor': 'ingest/_types/Processors.ts#L1001-L1039', -'ingest._types.GsubProcessor': 'ingest/_types/Processors.ts#L1041-L1065', -'ingest._types.HtmlStripProcessor': 'ingest/_types/Processors.ts#L1067-L1083', -'ingest._types.InferenceConfig': 'ingest/_types/Processors.ts#L1124-L1136', -'ingest._types.InferenceConfigClassification': 'ingest/_types/Processors.ts#L1151-L1177', -'ingest._types.InferenceConfigRegression': 'ingest/_types/Processors.ts#L1138-L1149', -'ingest._types.InferenceProcessor': 'ingest/_types/Processors.ts#L1085-L1117', +'ingest._types.FingerprintDigest': 'ingest/_types/Processors.ts#L957-L963', +'ingest._types.FingerprintProcessor': 'ingest/_types/Processors.ts#L965-L993', +'ingest._types.ForeachProcessor': 'ingest/_types/Processors.ts#L995-L1009', +'ingest._types.GeoGridProcessor': 'ingest/_types/Processors.ts#L421-L462', +'ingest._types.GeoGridTargetFormat': 'ingest/_types/Processors.ts#L470-L473', +'ingest._types.GeoGridTileType': 'ingest/_types/Processors.ts#L464-L468', +'ingest._types.GeoIpProcessor': 'ingest/_types/Processors.ts#L475-L509', +'ingest._types.GrokProcessor': 'ingest/_types/Processors.ts#L1011-L1049', +'ingest._types.GsubProcessor': 'ingest/_types/Processors.ts#L1051-L1075', +'ingest._types.HtmlStripProcessor': 'ingest/_types/Processors.ts#L1077-L1093', +'ingest._types.InferenceConfig': 'ingest/_types/Processors.ts#L1134-L1146', +'ingest._types.InferenceConfigClassification': 'ingest/_types/Processors.ts#L1161-L1187', +'ingest._types.InferenceConfigRegression': 'ingest/_types/Processors.ts#L1148-L1159', +'ingest._types.InferenceProcessor': 'ingest/_types/Processors.ts#L1095-L1127', 'ingest._types.Ingest': 'ingest/_types/Simulation.ts#L28-L36', -'ingest._types.InputConfig': 'ingest/_types/Processors.ts#L1119-L1122', -'ingest._types.IpLocationProcessor': 'ingest/_types/Processors.ts#L501-L535', +'ingest._types.InputConfig': 'ingest/_types/Processors.ts#L1129-L1132', +'ingest._types.IpLocationProcessor': 'ingest/_types/Processors.ts#L511-L545', 'ingest._types.Ipinfo': 'ingest/_types/Database.ts#L59-L59', -'ingest._types.JoinProcessor': 'ingest/_types/Processors.ts#L1179-L1194', -'ingest._types.JsonProcessor': 'ingest/_types/Processors.ts#L1196-L1225', -'ingest._types.JsonProcessorConflictStrategy': 'ingest/_types/Processors.ts#L1227-L1232', -'ingest._types.KeyValueProcessor': 'ingest/_types/Processors.ts#L1234-L1286', +'ingest._types.JoinProcessor': 'ingest/_types/Processors.ts#L1189-L1204', +'ingest._types.JsonProcessor': 'ingest/_types/Processors.ts#L1206-L1235', +'ingest._types.JsonProcessorConflictStrategy': 'ingest/_types/Processors.ts#L1237-L1242', +'ingest._types.KeyValueProcessor': 'ingest/_types/Processors.ts#L1244-L1296', 'ingest._types.Local': 'ingest/_types/Database.ts#L63-L65', -'ingest._types.LowercaseProcessor': 'ingest/_types/Processors.ts#L1288-L1304', +'ingest._types.LowercaseProcessor': 'ingest/_types/Processors.ts#L1298-L1314', 'ingest._types.Maxmind': 'ingest/_types/Database.ts#L55-L57', -'ingest._types.NetworkDirectionProcessor': 'ingest/_types/Processors.ts#L1306-L1340', +'ingest._types.NetworkDirectionProcessor': 'ingest/_types/Processors.ts#L1316-L1350', 'ingest._types.Pipeline': 'ingest/_types/Pipeline.ts#L24-L83', 'ingest._types.PipelineConfig': 'ingest/_types/Pipeline.ts#L99-L113', -'ingest._types.PipelineProcessor': 'ingest/_types/Processors.ts#L1342-L1353', +'ingest._types.PipelineProcessor': 'ingest/_types/Processors.ts#L1352-L1363', 'ingest._types.PipelineProcessorResult': 'ingest/_types/Simulation.ts#L59-L67', 'ingest._types.PipelineSimulationStatusOptions': 'ingest/_types/Simulation.ts#L51-L57', 'ingest._types.ProcessorBase': 'ingest/_types/Processors.ts#L309-L332', 'ingest._types.ProcessorContainer': 'ingest/_types/Processors.ts#L28-L307', 'ingest._types.Redact': 'ingest/_types/Simulation.ts#L38-L43', -'ingest._types.RedactProcessor': 'ingest/_types/Processors.ts#L1355-L1396', -'ingest._types.RegisteredDomainProcessor': 'ingest/_types/Processors.ts#L1398-L1414', -'ingest._types.RemoveProcessor': 'ingest/_types/Processors.ts#L1416-L1430', -'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L1432-L1448', -'ingest._types.RerouteProcessor': 'ingest/_types/Processors.ts#L1450-L1478', -'ingest._types.ScriptProcessor': 'ingest/_types/Processors.ts#L1480-L1500', -'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L1502-L1537', -'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L1539-L1548', -'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L1550-L1553', +'ingest._types.RedactProcessor': 'ingest/_types/Processors.ts#L1365-L1406', +'ingest._types.RegisteredDomainProcessor': 'ingest/_types/Processors.ts#L1408-L1424', +'ingest._types.RemoveProcessor': 'ingest/_types/Processors.ts#L1426-L1440', +'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L1442-L1458', +'ingest._types.RerouteProcessor': 'ingest/_types/Processors.ts#L1460-L1488', +'ingest._types.ScriptProcessor': 'ingest/_types/Processors.ts#L1490-L1510', +'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L1512-L1547', +'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L1549-L1558', +'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L1560-L1563', 'ingest._types.SimulateDocumentResult': 'ingest/_types/Simulation.ts#L45-L49', -'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L1555-L1571', -'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L1573-L1598', -'ingest._types.TerminateProcessor': 'ingest/_types/Processors.ts#L1600-L1600', -'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L1602-L1618', -'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L1620-L1636', -'ingest._types.UriPartsProcessor': 'ingest/_types/Processors.ts#L1656-L1682', -'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L1638-L1654', -'ingest._types.UserAgentProcessor': 'ingest/_types/Processors.ts#L537-L568', -'ingest._types.UserAgentProperty': 'ingest/_types/Processors.ts#L570-L576', +'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L1565-L1581', +'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L1583-L1608', +'ingest._types.TerminateProcessor': 'ingest/_types/Processors.ts#L1610-L1610', +'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L1612-L1628', +'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L1630-L1646', +'ingest._types.UriPartsProcessor': 'ingest/_types/Processors.ts#L1666-L1692', +'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L1648-L1664', +'ingest._types.UserAgentProcessor': 'ingest/_types/Processors.ts#L547-L578', +'ingest._types.UserAgentProperty': 'ingest/_types/Processors.ts#L580-L586', 'ingest._types.Web': 'ingest/_types/Database.ts#L61-L61', 'ingest.delete_geoip_database.Request': 'ingest/delete_geoip_database/DeleteGeoipDatabaseRequest.ts#L24-L58', 'ingest.delete_geoip_database.Response': 'ingest/delete_geoip_database/DeleteGeoipDatabaseResponse.ts#L22-L25', @@ -2387,8 +2397,8 @@ 'ml._types.DataframeEvaluationRegressionMetricsMsle': 'ml/_types/DataframeEvaluation.ts#L112-L115', 'ml._types.DataframeState': 'ml/_types/Dataframe.ts#L20-L26', 'ml._types.DelayedDataCheckConfig': 'ml/_types/Datafeed.ts#L126-L137', -'ml._types.DeploymentAllocationState': 'ml/_types/TrainedModel.ts#L332-L345', -'ml._types.DeploymentAssignmentState': 'ml/_types/TrainedModel.ts#L347-L364', +'ml._types.DeploymentAllocationState': 'ml/_types/TrainedModel.ts#L334-L347', +'ml._types.DeploymentAssignmentState': 'ml/_types/TrainedModel.ts#L349-L366', 'ml._types.DetectionRule': 'ml/_types/Rule.ts#L25-L39', 'ml._types.Detector': 'ml/_types/Detector.ts#L25-L67', 'ml._types.DetectorRead': 'ml/_types/Detector.ts#L69-L71', @@ -2403,7 +2413,7 @@ 'ml._types.FilterRef': 'ml/_types/Filter.ts#L31-L41', 'ml._types.FilterType': 'ml/_types/Filter.ts#L43-L46', 'ml._types.GeoResults': 'ml/_types/Anomaly.ts#L146-L155', -'ml._types.Hyperparameter': 'ml/_types/TrainedModel.ts#L275-L289', +'ml._types.Hyperparameter': 'ml/_types/TrainedModel.ts#L277-L291', 'ml._types.Hyperparameters': 'ml/_types/DataframeAnalytics.ts#L420-L526', 'ml._types.Include': 'ml/_types/Include.ts#L20-L47', 'ml._types.InferenceConfigCreateContainer': 'ml/_types/inference.ts#L26-L85', @@ -2422,7 +2432,7 @@ 'ml._types.JobTimingStats': 'ml/_types/Job.ts#L334-L343', 'ml._types.LearningToRankConfig': 'ml/_types/inference.ts#L87-L91', 'ml._types.MemoryStatus': 'ml/_types/Model.ts#L89-L93', -'ml._types.ModelPackageConfig': 'ml/_types/TrainedModel.ts#L258-L273', +'ml._types.ModelPackageConfig': 'ml/_types/TrainedModel.ts#L260-L275', 'ml._types.ModelPlotConfig': 'ml/_types/ModelPlot.ts#L23-L42', 'ml._types.ModelSizeStats': 'ml/_types/Model.ts#L59-L82', 'ml._types.ModelSnapshot': 'ml/_types/Model.ts#L25-L46', @@ -2443,7 +2453,7 @@ 'ml._types.QuestionAnsweringInferenceOptions': 'ml/_types/inference.ts#L305-L315', 'ml._types.QuestionAnsweringInferenceUpdateOptions': 'ml/_types/inference.ts#L443-L454', 'ml._types.RegressionInferenceOptions': 'ml/_types/inference.ts#L107-L116', -'ml._types.RoutingState': 'ml/_types/TrainedModel.ts#L409-L430', +'ml._types.RoutingState': 'ml/_types/TrainedModel.ts#L411-L432', 'ml._types.RuleAction': 'ml/_types/Rule.ts#L41-L50', 'ml._types.RuleCondition': 'ml/_types/Rule.ts#L52-L65', 'ml._types.RunningStateSearchInterval': 'ml/_types/Datafeed.ts#L230-L247', @@ -2458,30 +2468,30 @@ 'ml._types.TokenizationConfigContainer': 'ml/_types/inference.ts#L135-L158', 'ml._types.TokenizationTruncate': 'ml/_types/inference.ts#L373-L377', 'ml._types.TopClassEntry': 'ml/_types/inference.ts#L463-L467', -'ml._types.TotalFeatureImportance': 'ml/_types/TrainedModel.ts#L291-L298', -'ml._types.TotalFeatureImportanceClass': 'ml/_types/TrainedModel.ts#L300-L305', -'ml._types.TotalFeatureImportanceStatistics': 'ml/_types/TrainedModel.ts#L307-L314', -'ml._types.TrainedModelAssignment': 'ml/_types/TrainedModel.ts#L473-L490', -'ml._types.TrainedModelAssignmentRoutingStateAndReason': 'ml/_types/TrainedModel.ts#L432-L442', -'ml._types.TrainedModelAssignmentRoutingTable': 'ml/_types/TrainedModel.ts#L444-L462', -'ml._types.TrainedModelAssignmentTaskParameters': 'ml/_types/TrainedModel.ts#L371-L407', -'ml._types.TrainedModelConfig': 'ml/_types/TrainedModel.ts#L204-L241', -'ml._types.TrainedModelConfigInput': 'ml/_types/TrainedModel.ts#L243-L246', -'ml._types.TrainedModelConfigMetadata': 'ml/_types/TrainedModel.ts#L248-L256', -'ml._types.TrainedModelDeploymentAllocationStatus': 'ml/_types/TrainedModel.ts#L464-L471', -'ml._types.TrainedModelDeploymentNodesStats': 'ml/_types/TrainedModel.ts#L157-L202', +'ml._types.TotalFeatureImportance': 'ml/_types/TrainedModel.ts#L293-L300', +'ml._types.TotalFeatureImportanceClass': 'ml/_types/TrainedModel.ts#L302-L307', +'ml._types.TotalFeatureImportanceStatistics': 'ml/_types/TrainedModel.ts#L309-L316', +'ml._types.TrainedModelAssignment': 'ml/_types/TrainedModel.ts#L475-L492', +'ml._types.TrainedModelAssignmentRoutingStateAndReason': 'ml/_types/TrainedModel.ts#L434-L444', +'ml._types.TrainedModelAssignmentRoutingTable': 'ml/_types/TrainedModel.ts#L446-L464', +'ml._types.TrainedModelAssignmentTaskParameters': 'ml/_types/TrainedModel.ts#L373-L409', +'ml._types.TrainedModelConfig': 'ml/_types/TrainedModel.ts#L206-L243', +'ml._types.TrainedModelConfigInput': 'ml/_types/TrainedModel.ts#L245-L248', +'ml._types.TrainedModelConfigMetadata': 'ml/_types/TrainedModel.ts#L250-L258', +'ml._types.TrainedModelDeploymentAllocationStatus': 'ml/_types/TrainedModel.ts#L466-L473', +'ml._types.TrainedModelDeploymentNodesStats': 'ml/_types/TrainedModel.ts#L157-L204', 'ml._types.TrainedModelDeploymentStats': 'ml/_types/TrainedModel.ts#L62-L108', 'ml._types.TrainedModelEntities': 'ml/_types/inference.ts#L456-L462', 'ml._types.TrainedModelInferenceClassImportance': 'ml/_types/inference.ts#L469-L472', 'ml._types.TrainedModelInferenceFeatureImportance': 'ml/_types/inference.ts#L474-L478', 'ml._types.TrainedModelInferenceStats': 'ml/_types/TrainedModel.ts#L128-L148', -'ml._types.TrainedModelLocation': 'ml/_types/TrainedModel.ts#L492-L494', -'ml._types.TrainedModelLocationIndex': 'ml/_types/TrainedModel.ts#L496-L498', -'ml._types.TrainedModelPrefixStrings': 'ml/_types/TrainedModel.ts#L500-L509', +'ml._types.TrainedModelLocation': 'ml/_types/TrainedModel.ts#L494-L496', +'ml._types.TrainedModelLocationIndex': 'ml/_types/TrainedModel.ts#L498-L500', +'ml._types.TrainedModelPrefixStrings': 'ml/_types/TrainedModel.ts#L502-L511', 'ml._types.TrainedModelSizeStats': 'ml/_types/TrainedModel.ts#L150-L155', 'ml._types.TrainedModelStats': 'ml/_types/TrainedModel.ts#L42-L60', -'ml._types.TrainedModelType': 'ml/_types/TrainedModel.ts#L316-L330', -'ml._types.TrainingPriority': 'ml/_types/TrainedModel.ts#L366-L369', +'ml._types.TrainedModelType': 'ml/_types/TrainedModel.ts#L318-L332', +'ml._types.TrainingPriority': 'ml/_types/TrainedModel.ts#L368-L371', 'ml._types.TransformAuthorization': 'ml/_types/Authorization.ts#L61-L74', 'ml._types.ValidationLoss': 'ml/_types/DataframeAnalytics.ts#L571-L576', 'ml._types.Vocabulary': 'ml/_types/inference.ts#L250-L252', @@ -2919,27 +2929,27 @@ 'security._types.Access': 'security/_types/Access.ts#L22-L31', 'security._types.ApiKey': 'security/_types/ApiKey.ts#L27-L120', 'security._types.ApiKeyType': 'security/_types/ApiKey.ts#L122-L125', -'security._types.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L412-L414', +'security._types.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L422-L424', 'security._types.ApplicationPrivileges': 'security/_types/Privileges.ts#L28-L41', 'security._types.BulkError': 'security/_types/Bulk.ts#L24-L33', 'security._types.ClusterNode': 'security/_types/ClusterNode.ts#L22-L24', -'security._types.ClusterPrivilege': 'security/_types/Privileges.ts#L43-L210', +'security._types.ClusterPrivilege': 'security/_types/Privileges.ts#L43-L220', 'security._types.CreatedStatus': 'security/_types/CreatedStatus.ts#L20-L22', 'security._types.CredentialManagedBy': 'security/_types/CredentialManagedBy.ts#L20-L23', 'security._types.FieldSecurity': 'security/_types/FieldSecurity.ts#L22-L25', -'security._types.GlobalPrivilege': 'security/_types/Privileges.ts#L408-L410', +'security._types.GlobalPrivilege': 'security/_types/Privileges.ts#L418-L420', 'security._types.GrantType': 'security/_types/GrantType.ts#L20-L30', -'security._types.IndexPrivilege': 'security/_types/Privileges.ts#L360-L406', -'security._types.IndicesPrivileges': 'security/_types/Privileges.ts#L254-L254', -'security._types.IndicesPrivilegesQuery': 'security/_types/Privileges.ts#L315-L323', -'security._types.ManageUserPrivileges': 'security/_types/Privileges.ts#L416-L418', +'security._types.IndexPrivilege': 'security/_types/Privileges.ts#L370-L416', +'security._types.IndicesPrivileges': 'security/_types/Privileges.ts#L264-L264', +'security._types.IndicesPrivilegesQuery': 'security/_types/Privileges.ts#L325-L333', +'security._types.ManageUserPrivileges': 'security/_types/Privileges.ts#L426-L428', 'security._types.NodeSecurityStats': 'security/_types/NodeSecurityStats.ts#L22-L27', 'security._types.RealmInfo': 'security/_types/RealmInfo.ts#L22-L25', -'security._types.RemoteClusterPrivilege': 'security/_types/Privileges.ts#L212-L224', -'security._types.RemoteClusterPrivileges': 'security/_types/Privileges.ts#L268-L280', -'security._types.RemoteIndicesPrivileges': 'security/_types/Privileges.ts#L256-L266', -'security._types.RemoteUserIndicesPrivileges': 'security/_types/Privileges.ts#L309-L313', -'security._types.ReplicationAccess': 'security/_types/Privileges.ts#L420-L430', +'security._types.RemoteClusterPrivilege': 'security/_types/Privileges.ts#L222-L234', +'security._types.RemoteClusterPrivileges': 'security/_types/Privileges.ts#L278-L290', +'security._types.RemoteIndicesPrivileges': 'security/_types/Privileges.ts#L266-L276', +'security._types.RemoteUserIndicesPrivileges': 'security/_types/Privileges.ts#L319-L323', +'security._types.ReplicationAccess': 'security/_types/Privileges.ts#L430-L440', 'security._types.Restriction': 'security/_types/RoleDescriptor.ts#L90-L96', 'security._types.RestrictionWorkflow': 'security/_types/RoleDescriptor.ts#L98-L101', 'security._types.RoleDescriptor': 'security/_types/RoleDescriptor.ts#L33-L83', @@ -2947,15 +2957,15 @@ 'security._types.RoleMapping': 'security/_types/RoleMapping.ts#L25-L33', 'security._types.RoleMappingRule': 'security/_types/RoleMappingRule.ts#L23-L31', 'security._types.RoleTemplate': 'security/_types/RoleTemplate.ts#L28-L31', -'security._types.RoleTemplateInlineQuery': 'security/_types/Privileges.ts#L357-L358', -'security._types.RoleTemplateQuery': 'security/_types/Privileges.ts#L325-L335', -'security._types.RoleTemplateScript': 'security/_types/Privileges.ts#L337-L355', +'security._types.RoleTemplateInlineQuery': 'security/_types/Privileges.ts#L367-L368', +'security._types.RoleTemplateQuery': 'security/_types/Privileges.ts#L335-L345', +'security._types.RoleTemplateScript': 'security/_types/Privileges.ts#L347-L365', 'security._types.RolesStats': 'security/_types/NodeSecurityStats.ts#L29-L34', -'security._types.SearchAccess': 'security/_types/Privileges.ts#L432-L452', +'security._types.SearchAccess': 'security/_types/Privileges.ts#L442-L462', 'security._types.SecuritySettings': 'security/_types/SecuritySettings.ts#L22-L24', 'security._types.TemplateFormat': 'security/_types/RoleTemplate.ts#L22-L25', 'security._types.User': 'security/_types/User.ts#L23-L31', -'security._types.UserIndicesPrivileges': 'security/_types/Privileges.ts#L306-L307', +'security._types.UserIndicesPrivileges': 'security/_types/Privileges.ts#L316-L317', 'security._types.UserProfile': 'security/_types/UserProfile.ts#L41-L47', 'security._types.UserProfileHitMetadata': 'security/_types/UserProfile.ts#L27-L30', 'security._types.UserProfileUser': 'security/_types/UserProfile.ts#L32-L39', @@ -2990,7 +3000,7 @@ 'security.create_api_key.Response': 'security/create_api_key/SecurityCreateApiKeyResponse.ts#L23-L50', 'security.create_cross_cluster_api_key.Request': 'security/create_cross_cluster_api_key/CreateCrossClusterApiKeyRequest.ts#L25-L88', 'security.create_cross_cluster_api_key.Response': 'security/create_cross_cluster_api_key/CreateCrossClusterApiKeyResponse.ts#L23-L48', -'security.create_service_token.Request': 'security/create_service_token/CreateServiceTokenRequest.ts#L23-L76', +'security.create_service_token.Request': 'security/create_service_token/CreateServiceTokenRequest.ts#L23-L79', 'security.create_service_token.Response': 'security/create_service_token/CreateServiceTokenResponse.ts#L22-L30', 'security.create_service_token.Token': 'security/create_service_token/types.ts#L22-L25', 'security.delegate_pki.Authentication': 'security/delegate_pki/SecurityDelegatePkiResponse.ts#L43-L55', @@ -3004,7 +3014,7 @@ 'security.delete_role.Response': 'security/delete_role/SecurityDeleteRoleResponse.ts#L20-L28', 'security.delete_role_mapping.Request': 'security/delete_role_mapping/SecurityDeleteRoleMappingRequest.ts#L23-L57', 'security.delete_role_mapping.Response': 'security/delete_role_mapping/SecurityDeleteRoleMappingResponse.ts#L20-L28', -'security.delete_service_token.Request': 'security/delete_service_token/DeleteServiceTokenRequest.ts#L23-L62', +'security.delete_service_token.Request': 'security/delete_service_token/DeleteServiceTokenRequest.ts#L23-L65', 'security.delete_service_token.Response': 'security/delete_service_token/DeleteServiceTokenResponse.ts#L20-L28', 'security.delete_user.Request': 'security/delete_user/SecurityDeleteUserRequest.ts#L23-L52', 'security.delete_user.Response': 'security/delete_user/SecurityDeleteUserResponse.ts#L20-L28', @@ -3027,9 +3037,10 @@ 'security.get_builtin_privileges.Response': 'security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L26-L42', 'security.get_privileges.Request': 'security/get_privileges/SecurityGetPrivilegesRequest.ts#L23-L66', 'security.get_privileges.Response': 'security/get_privileges/SecurityGetPrivilegesResponse.ts#L23-L29', -'security.get_role.Request': 'security/get_role/SecurityGetRoleRequest.ts#L23-L55', +'security.get_role.IndicesPrivilegesRead': 'security/get_role/types.ts#L33-L48', +'security.get_role.Request': 'security/get_role/SecurityGetRoleRequest.ts#L23-L65', 'security.get_role.Response': 'security/get_role/SecurityGetRoleResponse.ts#L23-L31', -'security.get_role.Role': 'security/get_role/types.ts#L32-L54', +'security.get_role.Role': 'security/get_role/types.ts#L50-L72', 'security.get_role_mapping.Request': 'security/get_role_mapping/SecurityGetRoleMappingRequest.ts#L23-L54', 'security.get_role_mapping.Response': 'security/get_role_mapping/SecurityGetRoleMappingResponse.ts#L23-L29', 'security.get_service_accounts.Request': 'security/get_service_accounts/GetServiceAccountsRequest.ts#L23-L65', @@ -3135,7 +3146,7 @@ 'shutdown.get_node.ShardMigrationStatus': 'shutdown/get_node/ShutdownGetNodeResponse.ts#L52-L54', 'shutdown.get_node.ShutdownStatus': 'shutdown/get_node/ShutdownGetNodeResponse.ts#L45-L50', 'shutdown.get_node.ShutdownType': 'shutdown/get_node/ShutdownGetNodeResponse.ts#L40-L43', -'shutdown.put_node.Request': 'shutdown/put_node/ShutdownPutNodeRequest.ts#L25-L110', +'shutdown.put_node.Request': 'shutdown/put_node/ShutdownPutNodeRequest.ts#L25-L112', 'shutdown.put_node.Response': 'shutdown/put_node/ShutdownPutNodeResponse.ts#L22-L25', 'simulate.ingest.IngestDocumentSimulation': 'simulate/ingest/SimulateIngestResponse.ts#L36-L80', 'simulate.ingest.MergeType': 'simulate/ingest/SimulateIngestRequest.ts#L113-L116', @@ -3168,26 +3179,26 @@ 'slm.start.Response': 'slm/start/StartSnapshotLifecycleManagementResponse.ts#L22-L25', 'slm.stop.Request': 'slm/stop/StopSnapshotLifecycleManagementRequest.ts#L24-L63', 'slm.stop.Response': 'slm/stop/StopSnapshotLifecycleManagementResponse.ts#L22-L25', -'snapshot._types.AzureRepository': 'snapshot/_types/SnapshotRepository.ts#L40-L50', -'snapshot._types.AzureRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L145-L196', +'snapshot._types.AzureRepository': 'snapshot/_types/SnapshotRepository.ts#L41-L51', +'snapshot._types.AzureRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L146-L197', 'snapshot._types.FileCountSnapshotStats': 'snapshot/_types/FileCountSnapshotStats.ts#L22-L25', -'snapshot._types.GcsRepository': 'snapshot/_types/SnapshotRepository.ts#L52-L62', -'snapshot._types.GcsRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L198-L235', +'snapshot._types.GcsRepository': 'snapshot/_types/SnapshotRepository.ts#L53-L63', +'snapshot._types.GcsRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L199-L236', 'snapshot._types.IndexDetails': 'snapshot/_types/SnapshotIndexDetails.ts#L23-L28', 'snapshot._types.InfoFeatureState': 'snapshot/_types/SnapshotInfoFeatureState.ts#L22-L25', -'snapshot._types.ReadOnlyUrlRepository': 'snapshot/_types/SnapshotRepository.ts#L92-L102', -'snapshot._types.ReadOnlyUrlRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L377-L412', -'snapshot._types.Repository': 'snapshot/_types/SnapshotRepository.ts#L24-L34', -'snapshot._types.RepositoryBase': 'snapshot/_types/SnapshotRepository.ts#L36-L38', -'snapshot._types.RepositorySettingsBase': 'snapshot/_types/SnapshotRepository.ts#L116-L143', -'snapshot._types.S3Repository': 'snapshot/_types/SnapshotRepository.ts#L64-L78', -'snapshot._types.S3RepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L237-L346', +'snapshot._types.ReadOnlyUrlRepository': 'snapshot/_types/SnapshotRepository.ts#L93-L103', +'snapshot._types.ReadOnlyUrlRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L378-L413', +'snapshot._types.Repository': 'snapshot/_types/SnapshotRepository.ts#L25-L35', +'snapshot._types.RepositoryBase': 'snapshot/_types/SnapshotRepository.ts#L37-L39', +'snapshot._types.RepositorySettingsBase': 'snapshot/_types/SnapshotRepository.ts#L117-L144', +'snapshot._types.S3Repository': 'snapshot/_types/SnapshotRepository.ts#L65-L79', +'snapshot._types.S3RepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L238-L347', 'snapshot._types.ShardsStats': 'snapshot/_types/SnapshotShardsStats.ts#L22-L47', 'snapshot._types.ShardsStatsStage': 'snapshot/_types/SnapshotShardsStatsStage.ts#L20-L31', 'snapshot._types.ShardsStatsSummary': 'snapshot/_types/SnapshotShardsStatus.ts#L29-L35', 'snapshot._types.ShardsStatsSummaryItem': 'snapshot/_types/SnapshotShardsStatus.ts#L37-L40', -'snapshot._types.SharedFileSystemRepository': 'snapshot/_types/SnapshotRepository.ts#L80-L90', -'snapshot._types.SharedFileSystemRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L348-L375', +'snapshot._types.SharedFileSystemRepository': 'snapshot/_types/SnapshotRepository.ts#L81-L91', +'snapshot._types.SharedFileSystemRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L349-L376', 'snapshot._types.SnapshotIndexStats': 'snapshot/_types/SnapshotIndexStats.ts#L25-L29', 'snapshot._types.SnapshotInfo': 'snapshot/_types/SnapshotInfo.ts#L41-L71', 'snapshot._types.SnapshotShardFailure': 'snapshot/_types/SnapshotShardFailure.ts#L23-L30', @@ -3195,8 +3206,13 @@ 'snapshot._types.SnapshotSort': 'snapshot/_types/SnapshotInfo.ts#L73-L93', 'snapshot._types.SnapshotState': 'snapshot/_types/SnapshotState.ts#L20-L31', 'snapshot._types.SnapshotStats': 'snapshot/_types/SnapshotStats.ts#L23-L42', -'snapshot._types.SourceOnlyRepository': 'snapshot/_types/SnapshotRepository.ts#L104-L114', -'snapshot._types.SourceOnlyRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L414-L441', +'snapshot._types.SourceOnlyRepository': 'snapshot/_types/SnapshotRepository.ts#L105-L115', +'snapshot._types.SourceOnlyRepositorySettings': 'snapshot/_types/SnapshotRepository.ts#L415-L426', +'snapshot._types.SourceOnlyRepositorySettingsForAzure': 'snapshot/_types/SnapshotRepository.ts#L440-L444', +'snapshot._types.SourceOnlyRepositorySettingsForGcs': 'snapshot/_types/SnapshotRepository.ts#L446-L450', +'snapshot._types.SourceOnlyRepositorySettingsForReadOnlyUrl': 'snapshot/_types/SnapshotRepository.ts#L434-L438', +'snapshot._types.SourceOnlyRepositorySettingsForS3': 'snapshot/_types/SnapshotRepository.ts#L452-L456', +'snapshot._types.SourceOnlyRepositorySettingsForSharedFileSystem': 'snapshot/_types/SnapshotRepository.ts#L428-L432', 'snapshot._types.Status': 'snapshot/_types/SnapshotStatus.ts#L26-L60', 'snapshot.cleanup_repository.CleanupRepositoryResults': 'snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L29-L37', 'snapshot.cleanup_repository.Request': 'snapshot/cleanup_repository/SnapshotCleanupRepositoryRequest.ts#L24-L65', @@ -3220,7 +3236,7 @@ 'snapshot.repository_analyze.DetailsInfo': 'snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L286-L321', 'snapshot.repository_analyze.ReadBlobDetails': 'snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L204-L248', 'snapshot.repository_analyze.ReadSummaryInfo': 'snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L115-L160', -'snapshot.repository_analyze.Request': 'snapshot/repository_analyze/SnapshotAnalyzeRepositoryRequest.ts#L25-L232', +'snapshot.repository_analyze.Request': 'snapshot/repository_analyze/SnapshotAnalyzeRepositoryRequest.ts#L25-L239', 'snapshot.repository_analyze.Response': 'snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L24-L108', 'snapshot.repository_analyze.SnapshotNodeInfo': 'snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L110-L113', 'snapshot.repository_analyze.SummaryInfo': 'snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L193-L202', @@ -3267,28 +3283,28 @@ 'synonyms.delete_synonym.Response': 'synonyms/delete_synonym/SynonymsDeleteResponse.ts#L22-L25', 'synonyms.delete_synonym_rule.Request': 'synonyms/delete_synonym_rule/SynonymRuleDeleteRequest.ts#L22-L60', 'synonyms.delete_synonym_rule.Response': 'synonyms/delete_synonym_rule/SynonymRuleDeleteResponse.ts#L22-L25', -'synonyms.get_synonym.Request': 'synonyms/get_synonym/SynonymsGetRequest.ts#L23-L58', +'synonyms.get_synonym.Request': 'synonyms/get_synonym/SynonymsGetRequest.ts#L23-L66', 'synonyms.get_synonym.Response': 'synonyms/get_synonym/SynonymsGetResponse.ts#L23-L34', 'synonyms.get_synonym_rule.Request': 'synonyms/get_synonym_rule/SynonymRuleGetRequest.ts#L22-L51', 'synonyms.get_synonym_rule.Response': 'synonyms/get_synonym_rule/SynonymRuleGetResponse.ts#L22-L25', 'synonyms.get_synonyms_sets.Request': 'synonyms/get_synonyms_sets/SynonymsSetsGetRequest.ts#L23-L53', 'synonyms.get_synonyms_sets.Response': 'synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L23-L34', 'synonyms.get_synonyms_sets.SynonymsSetItem': 'synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L36-L45', -'synonyms.put_synonym.Request': 'synonyms/put_synonym/SynonymsPutRequest.ts#L23-L69', +'synonyms.put_synonym.Request': 'synonyms/put_synonym/SynonymsPutRequest.ts#L23-L78', 'synonyms.put_synonym.Response': 'synonyms/put_synonym/SynonymsPutResponse.ts#L23-L36', 'synonyms.put_synonym_rule.Request': 'synonyms/put_synonym_rule/SynonymRulePutRequest.ts#L23-L72', 'synonyms.put_synonym_rule.Response': 'synonyms/put_synonym_rule/SynonymRulePutResponse.ts#L22-L25', 'tasks._types.GroupBy': 'tasks/_types/GroupBy.ts#L20-L27', 'tasks._types.NodeTasks': 'tasks/_types/TaskListResponseBase.ts#L49-L57', 'tasks._types.ParentTaskInfo': 'tasks/_types/TaskListResponseBase.ts#L45-L47', -'tasks._types.TaskInfo': 'tasks/_types/TaskInfo.ts#L32-L58', +'tasks._types.TaskInfo': 'tasks/_types/TaskInfo.ts#L32-L71', 'tasks._types.TaskInfos': 'tasks/_types/TaskListResponseBase.ts#L40-L43', 'tasks._types.TaskListResponseBase': 'tasks/_types/TaskListResponseBase.ts#L26-L38', -'tasks.cancel.Request': 'tasks/cancel/CancelTasksRequest.ts#L23-L79', +'tasks.cancel.Request': 'tasks/cancel/CancelTasksRequest.ts#L23-L83', 'tasks.cancel.Response': 'tasks/cancel/CancelTasksResponse.ts#L22-L25', -'tasks.get.Request': 'tasks/get/GetTaskRequest.ts#L24-L72', +'tasks.get.Request': 'tasks/get/GetTaskRequest.ts#L24-L76', 'tasks.get.Response': 'tasks/get/GetTaskResponse.ts#L24-L31', -'tasks.list.Request': 'tasks/list/ListTasksRequest.ts#L25-L141', +'tasks.list.Request': 'tasks/list/ListTasksRequest.ts#L25-L145', 'tasks.list.Response': 'tasks/list/ListTasksResponse.ts#L22-L25', 'text_structure._types.EcsCompatibilityType': 'text_structure/_types/Structure.ts#L40-L43', 'text_structure._types.FieldStat': 'text_structure/_types/Structure.ts#L23-L33', @@ -3308,10 +3324,10 @@ 'transform._types.PivotGroupByContainer': 'transform/_types/Transform.ts#L70-L78', 'transform._types.RetentionPolicy': 'transform/_types/Transform.ts#L88-L96', 'transform._types.RetentionPolicyContainer': 'transform/_types/Transform.ts#L80-L86', -'transform._types.Settings': 'transform/_types/Transform.ts#L98-L166', -'transform._types.Source': 'transform/_types/Transform.ts#L168-L199', -'transform._types.SyncContainer': 'transform/_types/Transform.ts#L203-L209', -'transform._types.TimeSync': 'transform/_types/Transform.ts#L211-L223', +'transform._types.Settings': 'transform/_types/Transform.ts#L98-L165', +'transform._types.Source': 'transform/_types/Transform.ts#L167-L198', +'transform._types.SyncContainer': 'transform/_types/Transform.ts#L202-L208', +'transform._types.TimeSync': 'transform/_types/Transform.ts#L210-L222', 'transform.delete_transform.Request': 'transform/delete_transform/DeleteTransformRequest.ts#L24-L66', 'transform.delete_transform.Response': 'transform/delete_transform/DeleteTransformResponse.ts#L22-L25', 'transform.get_node_stats.Request': 'transform/get_node_stats/GetNodeStatsRequest.ts#L23-L40', @@ -3555,10 +3571,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/55402308cca81b60887fb8662d1d6fbfc2806778/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/7c4055b7a8e6c585dd8ed999086000838dcdf35e/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/esql/DeleteViewRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/DeleteViewRequest.java index fff130adab..3cdf1e6c28 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/DeleteViewRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/DeleteViewRequest.java @@ -33,9 +33,11 @@ import java.lang.String; import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.function.Function; +import java.util.stream.Collectors; import javax.annotation.Nullable; //---------------------------------------------------------------- @@ -65,13 +67,13 @@ */ public class DeleteViewRequest extends RequestBase { - private final String name; + private final List name; // --------------------------------------------------------------------------------------------- private DeleteViewRequest(Builder builder) { - this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.name = ApiTypeHelper.unmodifiableRequired(builder.name, this, "name"); } @@ -84,7 +86,7 @@ public static DeleteViewRequest of(Function * API name: {@code name} */ - public final String name() { + public final List name() { return this.name; } @@ -97,7 +99,7 @@ public final String name() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { - private String name; + private List name; public Builder() { } @@ -109,9 +111,23 @@ private Builder(DeleteViewRequest instance) { * Required - The view name to remove. *

* API name: {@code name} + *

+ * Adds all elements of list to name. + */ + public final Builder name(List list) { + this.name = _listAddAll(this.name, list); + return this; + } + + /** + * Required - The view name to remove. + *

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

+ * Adds one or more values to name. */ - public final Builder name(String value) { - this.name = value; + public final Builder name(String value, String... values) { + this.name = _listAdd(this.name, value, values); return this; } @@ -166,7 +182,9 @@ public Builder rebuild() { buf.append("/_query"); buf.append("/view"); buf.append("/"); - SimpleEndpoint.pathEncode(request.name, buf); + SimpleEndpoint.pathEncode( + request.name.stream().map(v -> v).filter(Objects::nonNull).collect(Collectors.joining(",")), + buf); return buf.toString(); } throw SimpleEndpoint.noPathTemplateFound("path"); @@ -183,7 +201,8 @@ public Builder rebuild() { propsSet |= _name; if (propsSet == (_name)) { - params.put("name", request.name); + params.put("name", request.name.stream().map(v -> v).filter(Objects::nonNull) + .collect(Collectors.joining(","))); } return params; }, diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycle.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycle.java index 8ce947ca68..4e9842e8ca 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycle.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DataStreamLifecycle.java @@ -67,6 +67,12 @@ public class DataStreamLifecycle implements JsonpSerializable { @Nullable private final Time dataRetention; + @Nullable + private final Time effectiveRetention; + + @Nullable + private final RetentionSource retentionDeterminedBy; + private final List downsampling; @Nullable @@ -83,6 +89,8 @@ public class DataStreamLifecycle implements JsonpSerializable { protected DataStreamLifecycle(AbstractBuilder builder) { this.dataRetention = builder.dataRetention; + this.effectiveRetention = builder.effectiveRetention; + this.retentionDeterminedBy = builder.retentionDeterminedBy; this.downsampling = ApiTypeHelper.unmodifiable(builder.downsampling); this.downsamplingMethod = builder.downsamplingMethod; this.enabled = builder.enabled; @@ -107,6 +115,26 @@ public final Time dataRetention() { return this.dataRetention; } + /** + * The least amount of time data should be kept by elasticsearch. + *

+ * API name: {@code effective_retention} + */ + @Nullable + public final Time effectiveRetention() { + return this.effectiveRetention; + } + + /** + * Configuration source that can influence the retention of a data stream. + *

+ * API name: {@code retention_determined_by} + */ + @Nullable + public final RetentionSource retentionDeterminedBy() { + return this.retentionDeterminedBy; + } + /** * The list of downsampling rounds to execute as part of this downsampling * configuration @@ -168,6 +196,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { this.dataRetention.serialize(generator, mapper); } + if (this.effectiveRetention != null) { + generator.writeKey("effective_retention"); + this.effectiveRetention.serialize(generator, mapper); + + } + if (this.retentionDeterminedBy != null) { + generator.writeKey("retention_determined_by"); + this.retentionDeterminedBy.serialize(generator, mapper); + } if (ApiTypeHelper.isDefined(this.downsampling)) { generator.writeKey("downsampling"); generator.writeStartArray(); @@ -233,6 +270,12 @@ public abstract static class AbstractBuilder downsampling; @@ -270,6 +313,35 @@ public final BuilderT dataRetention(Function> return this.dataRetention(fn.apply(new Time.Builder()).build()); } + /** + * The least amount of time data should be kept by elasticsearch. + *

+ * API name: {@code effective_retention} + */ + public final BuilderT effectiveRetention(@Nullable Time value) { + this.effectiveRetention = value; + return self(); + } + + /** + * The least amount of time data should be kept by elasticsearch. + *

+ * API name: {@code effective_retention} + */ + public final BuilderT effectiveRetention(Function> fn) { + return this.effectiveRetention(fn.apply(new Time.Builder()).build()); + } + + /** + * Configuration source that can influence the retention of a data stream. + *

+ * API name: {@code retention_determined_by} + */ + public final BuilderT retentionDeterminedBy(@Nullable RetentionSource value) { + this.retentionDeterminedBy = value; + return self(); + } + /** * The list of downsampling rounds to execute as part of this downsampling * configuration @@ -368,6 +440,8 @@ protected static > void setupDataStre ObjectDeserializer op) { op.add(AbstractBuilder::dataRetention, Time._DESERIALIZER, "data_retention"); + op.add(AbstractBuilder::effectiveRetention, Time._DESERIALIZER, "effective_retention"); + op.add(AbstractBuilder::retentionDeterminedBy, RetentionSource._DESERIALIZER, "retention_determined_by"); op.add(AbstractBuilder::downsampling, JsonpDeserializer.arrayDeserializer(DownsamplingRound._DESERIALIZER), "downsampling"); op.add(AbstractBuilder::downsamplingMethod, SamplingMethod._DESERIALIZER, "downsampling_method"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java index 9cf8957052..fa4cef0cf5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java @@ -4818,6 +4818,8 @@ public CompletableFuture simulateTemplate() { * index. *

  • The number of primary shards in the target index must be a multiple of * the number of primary shards in the source index.
  • + *
  • The number of primary shards in the target index must be a divisor of the + * source index's index.number_of_routing_shards.
  • *
  • The node handling the split process must have sufficient free disk space * to accommodate a second copy of the existing index.
  • * @@ -4897,6 +4899,8 @@ public CompletableFuture split(SplitRequest request) { * index. *
  • The number of primary shards in the target index must be a multiple of * the number of primary shards in the source index.
  • + *
  • The number of primary shards in the target index must be a divisor of the + * source index's index.number_of_routing_shards.
  • *
  • The node handling the split process must have sufficient free disk space * to accommodate a second copy of the existing index.
  • * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java index 5e6c582ffe..6f128ff644 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java @@ -4884,6 +4884,8 @@ public SimulateTemplateResponse simulateTemplate() throws IOException, Elasticse * index. *
  • The number of primary shards in the target index must be a multiple of * the number of primary shards in the source index.
  • + *
  • The number of primary shards in the target index must be a divisor of the + * source index's index.number_of_routing_shards.
  • *
  • The node handling the split process must have sufficient free disk space * to accommodate a second copy of the existing index.
  • * @@ -4963,6 +4965,8 @@ public SplitResponse split(SplitRequest request) throws IOException, Elasticsear * index. *
  • The number of primary shards in the target index must be a multiple of * the number of primary shards in the source index.
  • + *
  • The number of primary shards in the target index must be a divisor of the + * source index's index.number_of_routing_shards.
  • *
  • The node handling the split process must have sufficient free disk space * to accommodate a second copy of the existing index.
  • * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleResponse.java index b770acbe51..d3d9e46b55 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetDataLifecycleResponse.java @@ -20,6 +20,7 @@ package co.elastic.clients.elasticsearch.indices; import co.elastic.clients.elasticsearch.indices.get_data_lifecycle.DataStreamWithLifecycle; +import co.elastic.clients.elasticsearch.indices.get_data_lifecycle.GlobalRetention; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -63,11 +64,14 @@ public class GetDataLifecycleResponse implements JsonpSerializable { private final List dataStreams; + private final GlobalRetention globalRetention; + // --------------------------------------------------------------------------------------------- private GetDataLifecycleResponse(Builder builder) { this.dataStreams = ApiTypeHelper.unmodifiableRequired(builder.dataStreams, this, "dataStreams"); + this.globalRetention = ApiTypeHelper.requireNonNull(builder.globalRetention, this, "globalRetention"); } @@ -82,6 +86,13 @@ public final List dataStreams() { return this.dataStreams; } + /** + * Required - API name: {@code global_retention} + */ + public final GlobalRetention globalRetention() { + return this.globalRetention; + } + /** * Serialize this object to JSON. */ @@ -103,6 +114,8 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } + generator.writeKey("global_retention"); + this.globalRetention.serialize(generator, mapper); } @@ -122,6 +135,8 @@ public static class Builder extends WithJsonObjectBuilderBase ObjectBuilder { private List dataStreams; + private GlobalRetention globalRetention; + /** * Required - API name: {@code data_streams} *

    @@ -152,6 +167,21 @@ public final Builder dataStreams( return dataStreams(fn.apply(new DataStreamWithLifecycle.Builder()).build()); } + /** + * Required - API name: {@code global_retention} + */ + public final Builder globalRetention(GlobalRetention value) { + this.globalRetention = value; + return this; + } + + /** + * Required - API name: {@code global_retention} + */ + public final Builder globalRetention(Function> fn) { + return this.globalRetention(fn.apply(new GlobalRetention.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -183,6 +213,7 @@ protected static void setupGetDataLifecycleResponseDeserializer( op.add(Builder::dataStreams, JsonpDeserializer.arrayDeserializer(DataStreamWithLifecycle._DESERIALIZER), "data_streams"); + op.add(Builder::globalRetention, GlobalRetention._DESERIALIZER, "global_retention"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RetentionSource.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RetentionSource.java new file mode 100644 index 0000000000..a44557325e --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RetentionSource.java @@ -0,0 +1,70 @@ +/* + * 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.indices; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum RetentionSource implements JsonEnum { + DataStreamConfiguration("data_stream_configuration"), + + DefaultGlobalRetention("default_global_retention"), + + MaxGlobalRetention("max_global_retention"), + + DefaultFailuresRetention("default_failures_retention"), + + ; + + private final String jsonValue; + + RetentionSource(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + RetentionSource.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SplitRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SplitRequest.java index 932bb47185..84d1b67640 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SplitRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SplitRequest.java @@ -122,6 +122,8 @@ * index. *

  • The number of primary shards in the target index must be a multiple of * the number of primary shards in the source index.
  • + *
  • The number of primary shards in the target index must be a divisor of the + * source index's index.number_of_routing_shards.
  • *
  • The node handling the split process must have sufficient free disk space * to accommodate a second copy of the existing index.
  • * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_lifecycle/GlobalRetention.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_lifecycle/GlobalRetention.java new file mode 100644 index 0000000000..e7ed8cc8fb --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/get_data_lifecycle/GlobalRetention.java @@ -0,0 +1,215 @@ +/* + * 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.indices.get_data_lifecycle; + +import co.elastic.clients.elasticsearch._types.Time; +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.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +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: indices.get_data_lifecycle._types.GlobalRetention + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class GlobalRetention implements JsonpSerializable { + @Nullable + private final Time maxRetention; + + @Nullable + private final Time defaultRetention; + + // --------------------------------------------------------------------------------------------- + + private GlobalRetention(Builder builder) { + + this.maxRetention = builder.maxRetention; + this.defaultRetention = builder.defaultRetention; + + } + + public static GlobalRetention of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code max_retention} + */ + @Nullable + public final Time maxRetention() { + return this.maxRetention; + } + + /** + * API name: {@code default_retention} + */ + @Nullable + public final Time defaultRetention() { + return this.defaultRetention; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.maxRetention != null) { + generator.writeKey("max_retention"); + this.maxRetention.serialize(generator, mapper); + + } + if (this.defaultRetention != null) { + generator.writeKey("default_retention"); + this.defaultRetention.serialize(generator, mapper); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GlobalRetention}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private Time maxRetention; + + @Nullable + private Time defaultRetention; + + public Builder() { + } + private Builder(GlobalRetention instance) { + this.maxRetention = instance.maxRetention; + this.defaultRetention = instance.defaultRetention; + + } + /** + * API name: {@code max_retention} + */ + public final Builder maxRetention(@Nullable Time value) { + this.maxRetention = value; + return this; + } + + /** + * API name: {@code max_retention} + */ + public final Builder maxRetention(Function> fn) { + return this.maxRetention(fn.apply(new Time.Builder()).build()); + } + + /** + * API name: {@code default_retention} + */ + public final Builder defaultRetention(@Nullable Time value) { + this.defaultRetention = value; + return this; + } + + /** + * API name: {@code default_retention} + */ + public final Builder defaultRetention(Function> fn) { + return this.defaultRetention(fn.apply(new Time.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GlobalRetention}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GlobalRetention build() { + _checkSingleUse(); + + return new GlobalRetention(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GlobalRetention} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + GlobalRetention::setupGlobalRetentionDeserializer); + + protected static void setupGlobalRetentionDeserializer(ObjectDeserializer op) { + + op.add(Builder::maxRetention, Time._DESERIALIZER, "max_retention"); + op.add(Builder::defaultRetention, Time._DESERIALIZER, "default_retention"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AmazonSageMakerElementType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AmazonSageMakerElementType.java new file mode 100644 index 0000000000..e6b07026be --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AmazonSageMakerElementType.java @@ -0,0 +1,69 @@ +/* + * 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.inference; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum AmazonSageMakerElementType implements JsonEnum { + Byte("byte"), + + Float("float"), + + Bit("bit"), + + ; + + private final String jsonValue; + + AmazonSageMakerElementType(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + AmazonSageMakerElementType.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AmazonSageMakerServiceSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AmazonSageMakerServiceSettings.java index 2c7821b296..c5f59b13a6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AmazonSageMakerServiceSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AmazonSageMakerServiceSettings.java @@ -71,6 +71,12 @@ public class AmazonSageMakerServiceSettings implements JsonpSerializable { private final String secretKey; + @Nullable + private final AmazonSageMakerSimilarity similarity; + + @Nullable + private final AmazonSageMakerElementType elementType; + @Nullable private final String targetModel; @@ -95,6 +101,8 @@ private AmazonSageMakerServiceSettings(Builder builder) { this.api = ApiTypeHelper.requireNonNull(builder.api, this, "api"); this.region = ApiTypeHelper.requireNonNull(builder.region, this, "region"); this.secretKey = ApiTypeHelper.requireNonNull(builder.secretKey, this, "secretKey"); + this.similarity = builder.similarity; + this.elementType = builder.elementType; this.targetModel = builder.targetModel; this.targetContainerHostname = builder.targetContainerHostname; this.inferenceComponentName = builder.inferenceComponentName; @@ -160,6 +168,31 @@ public final String secretKey() { return this.secretKey; } + /** + * Required when api is elastic and task type is + * text_embedding. The similarity measure used when invoking the + * text_embedding task type. + *

    + * API name: {@code similarity} + */ + @Nullable + public final AmazonSageMakerSimilarity similarity() { + return this.similarity; + } + + /** + * Required when api is elastic and task type is + * text_embedding. The data type returned by the text embedding + * model. This value is used when parsing the response back to Elasticsearch + * data structures. + *

    + * API name: {@code element_type} + */ + @Nullable + public final AmazonSageMakerElementType elementType() { + return this.elementType; + } + /** * The model ID when calling a multi-model endpoint. *

    @@ -240,6 +273,14 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("secret_key"); generator.write(this.secretKey); + if (this.similarity != null) { + generator.writeKey("similarity"); + this.similarity.serialize(generator, mapper); + } + if (this.elementType != null) { + generator.writeKey("element_type"); + this.elementType.serialize(generator, mapper); + } if (this.targetModel != null) { generator.writeKey("target_model"); generator.write(this.targetModel); @@ -292,6 +333,12 @@ public static class Builder extends WithJsonObjectBuilderBase private String secretKey; + @Nullable + private AmazonSageMakerSimilarity similarity; + + @Nullable + private AmazonSageMakerElementType elementType; + @Nullable private String targetModel; @@ -315,6 +362,8 @@ private Builder(AmazonSageMakerServiceSettings instance) { this.api = instance.api; this.region = instance.region; this.secretKey = instance.secretKey; + this.similarity = instance.similarity; + this.elementType = instance.elementType; this.targetModel = instance.targetModel; this.targetContainerHostname = instance.targetContainerHostname; this.inferenceComponentName = instance.inferenceComponentName; @@ -379,6 +428,31 @@ public final Builder secretKey(String value) { return this; } + /** + * Required when api is elastic and task type is + * text_embedding. The similarity measure used when invoking the + * text_embedding task type. + *

    + * API name: {@code similarity} + */ + public final Builder similarity(@Nullable AmazonSageMakerSimilarity value) { + this.similarity = value; + return this; + } + + /** + * Required when api is elastic and task type is + * text_embedding. The data type returned by the text embedding + * model. This value is used when parsing the response back to Elasticsearch + * data structures. + *

    + * API name: {@code element_type} + */ + public final Builder elementType(@Nullable AmazonSageMakerElementType value) { + this.elementType = value; + return this; + } + /** * The model ID when calling a multi-model endpoint. *

    @@ -474,6 +548,8 @@ protected static void setupAmazonSageMakerServiceSettingsDeserializer( op.add(Builder::api, AmazonSageMakerApi._DESERIALIZER, "api"); op.add(Builder::region, JsonpDeserializer.stringDeserializer(), "region"); op.add(Builder::secretKey, JsonpDeserializer.stringDeserializer(), "secret_key"); + op.add(Builder::similarity, AmazonSageMakerSimilarity._DESERIALIZER, "similarity"); + op.add(Builder::elementType, AmazonSageMakerElementType._DESERIALIZER, "element_type"); op.add(Builder::targetModel, JsonpDeserializer.stringDeserializer(), "target_model"); op.add(Builder::targetContainerHostname, JsonpDeserializer.stringDeserializer(), "target_container_hostname"); op.add(Builder::inferenceComponentName, JsonpDeserializer.stringDeserializer(), "inference_component_name"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AmazonSageMakerSimilarity.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AmazonSageMakerSimilarity.java new file mode 100644 index 0000000000..c03c411d02 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AmazonSageMakerSimilarity.java @@ -0,0 +1,69 @@ +/* + * 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.inference; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum AmazonSageMakerSimilarity implements JsonEnum { + Cosine("cosine"), + + DotProduct("dot_product"), + + L2Norm("l2_norm"), + + ; + + private final String jsonValue; + + AmazonSageMakerSimilarity(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + AmazonSageMakerSimilarity.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AnthropicTaskSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AnthropicTaskSettings.java index 49eed99106..d272a4d68f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AnthropicTaskSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AnthropicTaskSettings.java @@ -88,8 +88,8 @@ public static AnthropicTaskSettings of(Functioncompletion task, it is the maximum number of - * tokens to generate before stopping. + * Required - For a completion or chat_completion + * task, it is the maximum number of tokens to generate before stopping. *

    * API name: {@code max_tokens} */ @@ -98,9 +98,9 @@ public final int maxTokens() { } /** - * For a completion task, it is the amount of randomness injected - * into the response. For more details about the supported range, refer to - * Anthropic documentation. + * For a completion or chat_completion task, it is the + * amount of randomness injected into the response. For more details about the + * supported range, refer to Anthropic documentation. *

    * API name: {@code temperature} */ @@ -110,9 +110,10 @@ public final Float temperature() { } /** - * For a completion task, it specifies to only sample from the top - * K options for each subsequent token. It is recommended for advanced use cases - * only. You usually only need to use temperature. + * For a completion or chat_completion task, it + * specifies to only sample from the top K options for each subsequent token. It + * is recommended for advanced use cases only. You usually only need to use + * temperature. *

    * API name: {@code top_k} */ @@ -122,13 +123,13 @@ public final Integer topK() { } /** - * For a completion task, it specifies to use Anthropic's nucleus - * sampling. In nucleus sampling, Anthropic computes the cumulative distribution - * over all the options for each subsequent token in decreasing probability - * order and cuts it off once it reaches the specified probability. You should - * either alter temperature or top_p, but not both. It - * is recommended for advanced use cases only. You usually only need to use - * temperature. + * For a completion or chat_completion task, it + * specifies to use Anthropic's nucleus sampling. In nucleus sampling, Anthropic + * computes the cumulative distribution over all the options for each subsequent + * token in decreasing probability order and cuts it off once it reaches the + * specified probability. You should either alter temperature or + * top_p, but not both. It is recommended for advanced use cases + * only. You usually only need to use temperature. *

    * API name: {@code top_p} */ @@ -204,8 +205,8 @@ private Builder(AnthropicTaskSettings instance) { } /** - * Required - For a completion task, it is the maximum number of - * tokens to generate before stopping. + * Required - For a completion or chat_completion + * task, it is the maximum number of tokens to generate before stopping. *

    * API name: {@code max_tokens} */ @@ -215,9 +216,9 @@ public final Builder maxTokens(int value) { } /** - * For a completion task, it is the amount of randomness injected - * into the response. For more details about the supported range, refer to - * Anthropic documentation. + * For a completion or chat_completion task, it is the + * amount of randomness injected into the response. For more details about the + * supported range, refer to Anthropic documentation. *

    * API name: {@code temperature} */ @@ -227,9 +228,10 @@ public final Builder temperature(@Nullable Float value) { } /** - * For a completion task, it specifies to only sample from the top - * K options for each subsequent token. It is recommended for advanced use cases - * only. You usually only need to use temperature. + * For a completion or chat_completion task, it + * specifies to only sample from the top K options for each subsequent token. It + * is recommended for advanced use cases only. You usually only need to use + * temperature. *

    * API name: {@code top_k} */ @@ -239,13 +241,13 @@ public final Builder topK(@Nullable Integer value) { } /** - * For a completion task, it specifies to use Anthropic's nucleus - * sampling. In nucleus sampling, Anthropic computes the cumulative distribution - * over all the options for each subsequent token in decreasing probability - * order and cuts it off once it reaches the specified probability. You should - * either alter temperature or top_p, but not both. It - * is recommended for advanced use cases only. You usually only need to use - * temperature. + * For a completion or chat_completion task, it + * specifies to use Anthropic's nucleus sampling. In nucleus sampling, Anthropic + * computes the cumulative distribution over all the options for each subsequent + * token in decreasing probability order and cuts it off once it reaches the + * specified probability. You should either alter temperature or + * top_p, but not both. It is recommended for advanced use cases + * only. You usually only need to use temperature. *

    * API name: {@code top_p} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AnthropicTaskType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AnthropicTaskType.java index c4b8c6eece..9a7a606f00 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AnthropicTaskType.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AnthropicTaskType.java @@ -48,6 +48,8 @@ public enum AnthropicTaskType implements JsonEnum { Completion("completion"), + ChatCompletion("chat_completion"), + ; private final String jsonValue; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AzureOpenAIServiceSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AzureOpenAIServiceSettings.java index af92c676cf..f15856ee94 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AzureOpenAIServiceSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AzureOpenAIServiceSettings.java @@ -134,12 +134,13 @@ public final String apiVersion() { } /** - * For OAuth 2.0 authentication using the client credentials grant flow. The + * For OAuth 2.0 authorization using the client credentials grant flow. The * application ID that's assigned to your app. *

    - * IMPORTANT: To configure OAuth 2.0, you must specify client_id, scopes, - * tenant_id, and client_secret together. If one of the fields is missing, you - * will receive an error when you try to create your endpoint. + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, tenant_id, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. *

    * API name: {@code client_id} */ @@ -149,7 +150,7 @@ public final String clientId() { } /** - * For OAuth 2.0 authentication using the client credentials grant flow. The + * For OAuth 2.0 authorization using the client credentials grant flow. The * application secret that you created in the Microsoft app registration portal * for your app. *

    @@ -158,9 +159,10 @@ public final String clientId() { * one or you provide more than one of them, you will receive an error when you * try to create your endpoint. *

    - * IMPORTANT: To configure OAuth 2.0, you must specify client_id, scopes, - * tenant_id, and client_secret together. If one of the fields is missing, you - * will receive an error when you try to create your endpoint. + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, tenant_id, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. *

    * API name: {@code client_secret} */ @@ -221,7 +223,7 @@ public final String resourceName() { } /** - * For OAuth 2.0 authentication using the client credentials grant flow. The + * For OAuth 2.0 authorization using the client credentials grant flow. The * resource identifier (application ID URI) of the resource you want, suffixed * with .default For example: * @@ -232,9 +234,10 @@ public final String resourceName() { * *

    *

    - * IMPORTANT: To configure OAuth 2.0, you must specify client_id, scopes, - * tenant_id, and client_secret together. If one of the fields is missing, you - * will receive an error when you try to create your endpoint. + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, tenant_id, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. *

    * API name: {@code scopes} */ @@ -243,12 +246,13 @@ public final List scopes() { } /** - * For OAuth 2.0 authentication using the client credentials grant flow. The + * For OAuth 2.0 authorization using the client credentials grant flow. The * directory tenant the application plans to operate against. *

    - * IMPORTANT: To configure OAuth 2.0, you must specify client_id, scopes, - * tenant_id, and client_secret together. If one of the fields is missing, you - * will receive an error when you try to create your endpoint. + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, tenant_id, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. *

    * API name: {@code tenant_id} */ @@ -403,12 +407,13 @@ public final Builder apiVersion(String value) { } /** - * For OAuth 2.0 authentication using the client credentials grant flow. The + * For OAuth 2.0 authorization using the client credentials grant flow. The * application ID that's assigned to your app. *

    - * IMPORTANT: To configure OAuth 2.0, you must specify client_id, scopes, - * tenant_id, and client_secret together. If one of the fields is missing, you - * will receive an error when you try to create your endpoint. + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, tenant_id, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. *

    * API name: {@code client_id} */ @@ -418,7 +423,7 @@ public final Builder clientId(@Nullable String value) { } /** - * For OAuth 2.0 authentication using the client credentials grant flow. The + * For OAuth 2.0 authorization using the client credentials grant flow. The * application secret that you created in the Microsoft app registration portal * for your app. *

    @@ -427,9 +432,10 @@ public final Builder clientId(@Nullable String value) { * one or you provide more than one of them, you will receive an error when you * try to create your endpoint. *

    - * IMPORTANT: To configure OAuth 2.0, you must specify client_id, scopes, - * tenant_id, and client_secret together. If one of the fields is missing, you - * will receive an error when you try to create your endpoint. + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, tenant_id, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. *

    * API name: {@code client_secret} */ @@ -506,7 +512,7 @@ public final Builder resourceName(String value) { } /** - * For OAuth 2.0 authentication using the client credentials grant flow. The + * For OAuth 2.0 authorization using the client credentials grant flow. The * resource identifier (application ID URI) of the resource you want, suffixed * with .default For example: * @@ -517,9 +523,10 @@ public final Builder resourceName(String value) { * * *

    - * IMPORTANT: To configure OAuth 2.0, you must specify client_id, scopes, - * tenant_id, and client_secret together. If one of the fields is missing, you - * will receive an error when you try to create your endpoint. + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, tenant_id, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. *

    * API name: {@code scopes} *

    @@ -531,7 +538,7 @@ public final Builder scopes(List list) { } /** - * For OAuth 2.0 authentication using the client credentials grant flow. The + * For OAuth 2.0 authorization using the client credentials grant flow. The * resource identifier (application ID URI) of the resource you want, suffixed * with .default For example: * @@ -542,9 +549,10 @@ public final Builder scopes(List list) { * * *

    - * IMPORTANT: To configure OAuth 2.0, you must specify client_id, scopes, - * tenant_id, and client_secret together. If one of the fields is missing, you - * will receive an error when you try to create your endpoint. + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, tenant_id, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. *

    * API name: {@code scopes} *

    @@ -556,12 +564,13 @@ public final Builder scopes(String value, String... values) { } /** - * For OAuth 2.0 authentication using the client credentials grant flow. The + * For OAuth 2.0 authorization using the client credentials grant flow. The * directory tenant the application plans to operate against. *

    - * IMPORTANT: To configure OAuth 2.0, you must specify client_id, scopes, - * tenant_id, and client_secret together. If one of the fields is missing, you - * will receive an error when you try to create your endpoint. + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, tenant_id, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. *

    * API name: {@code tenant_id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomServiceSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomServiceSettings.java index a35ce5ee47..b661816ed2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomServiceSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomServiceSettings.java @@ -115,7 +115,7 @@ public final Integer batchSize() { } /** - * Specifies the HTTP header parameters – such as Authentication or + * Specifies the HTTP header parameters – such as Authorization or * Content-Type – that are required to access the custom service. * For example: * @@ -379,7 +379,7 @@ public final Builder batchSize(@Nullable Integer value) { } /** - * Specifies the HTTP header parameters – such as Authentication or + * Specifies the HTTP header parameters – such as Authorization or * Content-Type – that are required to access the custom service. * For example: * @@ -401,7 +401,7 @@ public final Builder headers(Map map) { } /** - * Specifies the HTTP header parameters – such as Authentication or + * Specifies the HTTP header parameters – such as Authorization or * Content-Type – that are required to access the custom service. * For example: * diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceAsyncClient.java index 8b3d794543..6e5d0ad483 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceAsyncClient.java @@ -422,7 +422,7 @@ public final CompletableFuture inference( *

  • Amazon SageMaker (chat_completion, completion, * rerank, sparse_embedding, * text_embedding)
  • - *
  • Anthropic (completion)
  • + *
  • Anthropic (chat_completion, completion)
  • *
  • Azure AI Studio (completion, rerank, * text_embedding)
  • *
  • Azure OpenAI (chat_completion, completion, @@ -495,7 +495,7 @@ public CompletableFuture put(PutRequest request) { *
  • Amazon SageMaker (chat_completion, completion, * rerank, sparse_embedding, * text_embedding)
  • - *
  • Anthropic (completion)
  • + *
  • Anthropic (chat_completion, completion)
  • *
  • Azure AI Studio (completion, rerank, * text_embedding)
  • *
  • Azure OpenAI (chat_completion, completion, @@ -2044,7 +2044,7 @@ public final CompletableFuture sparseEmbedding( * grant this privilege). You must use a client that supports streaming. * * @see Documentation + * "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-stream-completion">Documentation * on elastic.co */ @@ -2079,7 +2079,7 @@ public CompletableFuture streamCompletion(StreamCompletionReques * a function that initializes a builder to create the * {@link StreamCompletionRequest} * @see Documentation + * "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-stream-completion">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceClient.java index 1984563084..270d330c6f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceClient.java @@ -423,7 +423,7 @@ public final InferenceResponse inference(FunctionAmazon SageMaker (chat_completion, completion, * rerank, sparse_embedding, * text_embedding)
  • - *
  • Anthropic (completion)
  • + *
  • Anthropic (chat_completion, completion)
  • *
  • Azure AI Studio (completion, rerank, * text_embedding)
  • *
  • Azure OpenAI (chat_completion, completion, @@ -496,7 +496,7 @@ public PutResponse put(PutRequest request) throws IOException, ElasticsearchExce *
  • Amazon SageMaker (chat_completion, completion, * rerank, sparse_embedding, * text_embedding)
  • - *
  • Anthropic (completion)
  • + *
  • Anthropic (chat_completion, completion)
  • *
  • Azure AI Studio (completion, rerank, * text_embedding)
  • *
  • Azure OpenAI (chat_completion, completion, @@ -2075,7 +2075,7 @@ public final SparseEmbeddingResponse sparseEmbedding( * grant this privilege). You must use a client that supports streaming. * * @see Documentation + * "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-stream-completion">Documentation * on elastic.co */ @@ -2110,7 +2110,7 @@ public BinaryResponse streamCompletion(StreamCompletionRequest request) throws I * a function that initializes a builder to create the * {@link StreamCompletionRequest} * @see Documentation + * "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-stream-completion">Documentation * on elastic.co */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EmbeddingContentObject.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EmbeddingContentObject.java index 21d42a60a9..3d55c0e692 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EmbeddingContentObject.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EmbeddingContentObject.java @@ -30,6 +30,7 @@ import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import java.util.List; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -61,13 +62,13 @@ */ @JsonpDeserializable public class EmbeddingContentObject implements JsonpSerializable { - private final EmbeddingContentObjectContents content; + private final List content; // --------------------------------------------------------------------------------------------- private EmbeddingContentObject(Builder builder) { - this.content = ApiTypeHelper.requireNonNull(builder.content, this, "content"); + this.content = ApiTypeHelper.unmodifiableRequired(builder.content, this, "content"); } @@ -76,11 +77,12 @@ public static EmbeddingContentObject of(Function * API name: {@code content} */ - public final EmbeddingContentObjectContents content() { + public final List content() { return this.content; } @@ -95,8 +97,16 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("content"); - this.content.serialize(generator, mapper); + if (ApiTypeHelper.isDefined(this.content)) { + generator.writeKey("content"); + generator.writeStartArray(); + for (EmbeddingContentObjectItem item0 : this.content) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } } @@ -114,7 +124,7 @@ public String toString() { public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private EmbeddingContentObjectContents content; + private List content; public Builder() { } @@ -123,23 +133,42 @@ private Builder(EmbeddingContentObject instance) { } /** - * Required - An object containing the input data for the model to embed + * Required - An object or an array of objects containing the input data for the + * model to embed *

    * API name: {@code content} + *

    + * Adds all elements of list to content. */ - public final Builder content(EmbeddingContentObjectContents value) { - this.content = value; + public final Builder content(List list) { + this.content = _listAddAll(this.content, list); return this; } /** - * Required - An object containing the input data for the model to embed + * Required - An object or an array of objects containing the input data for the + * model to embed *

    * API name: {@code content} + *

    + * Adds one or more values to content. + */ + public final Builder content(EmbeddingContentObjectItem value, EmbeddingContentObjectItem... values) { + this.content = _listAdd(this.content, value, values); + return this; + } + + /** + * Required - An object or an array of objects containing the input data for the + * model to embed + *

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

    + * Adds a value to content using a builder lambda. */ public final Builder content( - Function> fn) { - return this.content(fn.apply(new EmbeddingContentObjectContents.Builder()).build()); + Function> fn) { + return content(fn.apply(new EmbeddingContentObjectItem.Builder()).build()); } @Override @@ -177,7 +206,8 @@ public Builder rebuild() { protected static void setupEmbeddingContentObjectDeserializer( ObjectDeserializer op) { - op.add(Builder::content, EmbeddingContentObjectContents._DESERIALIZER, "content"); + op.add(Builder::content, JsonpDeserializer.arrayDeserializer(EmbeddingContentObjectItem._DESERIALIZER), + "content"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EmbeddingContentObjectContents.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EmbeddingContentObjectItem.java similarity index 76% rename from java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EmbeddingContentObjectContents.java rename to java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EmbeddingContentObjectItem.java index 7920ca4a96..14f022c2b2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EmbeddingContentObjectContents.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EmbeddingContentObjectItem.java @@ -50,17 +50,17 @@ // //---------------------------------------------------------------- -// typedef: inference._types.EmbeddingContentObjectContents +// typedef: inference._types.EmbeddingContentObjectItem /** - * An object containing the input data for the model to embed. + * An object containing the input data for a single item for the model to embed. * * @see API + * "../doc-files/api-spec.html#inference._types.EmbeddingContentObjectItem">API * specification */ @JsonpDeserializable -public class EmbeddingContentObjectContents implements JsonpSerializable { +public class EmbeddingContentObjectItem implements JsonpSerializable { private final EmbeddingContentType type; @Nullable @@ -70,7 +70,7 @@ public class EmbeddingContentObjectContents implements JsonpSerializable { // --------------------------------------------------------------------------------------------- - private EmbeddingContentObjectContents(Builder builder) { + private EmbeddingContentObjectItem(Builder builder) { this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); this.format = builder.format; @@ -78,13 +78,13 @@ private EmbeddingContentObjectContents(Builder builder) { } - public static EmbeddingContentObjectContents of( - Function> fn) { + public static EmbeddingContentObjectItem of(Function> fn) { return fn.apply(new Builder()).build(); } /** - * Required - The type of input to embed. + * Required - The type of input to embed. Not all models support all input + * types. *

    * API name: {@code type} */ @@ -94,10 +94,9 @@ public final EmbeddingContentType type() { /** * The format of the input. For the text type this must be - * text. For the image type, this must be - * base64. If not specified, this will default to text - * for the text type and base64 for the - * image type. + * text. For all other types, this must be base64. If + * not specified, this will default to text for the + * text type and base64 for all other types. *

    * API name: {@code format} */ @@ -146,12 +145,12 @@ public String toString() { // --------------------------------------------------------------------------------------------- /** - * Builder for {@link EmbeddingContentObjectContents}. + * Builder for {@link EmbeddingContentObjectItem}. */ public static class Builder extends WithJsonObjectBuilderBase implements - ObjectBuilder { + ObjectBuilder { private EmbeddingContentType type; @Nullable @@ -161,14 +160,15 @@ public static class Builder extends WithJsonObjectBuilderBase public Builder() { } - private Builder(EmbeddingContentObjectContents instance) { + private Builder(EmbeddingContentObjectItem instance) { this.type = instance.type; this.format = instance.format; this.value = instance.value; } /** - * Required - The type of input to embed. + * Required - The type of input to embed. Not all models support all input + * types. *

    * API name: {@code type} */ @@ -179,10 +179,9 @@ public final Builder type(EmbeddingContentType value) { /** * The format of the input. For the text type this must be - * text. For the image type, this must be - * base64. If not specified, this will default to text - * for the text type and base64 for the - * image type. + * text. For all other types, this must be base64. If + * not specified, this will default to text for the + * text type and base64 for all other types. *

    * API name: {@code format} */ @@ -208,15 +207,15 @@ protected Builder self() { } /** - * Builds a {@link EmbeddingContentObjectContents}. + * Builds a {@link EmbeddingContentObjectItem}. * * @throws NullPointerException * if some of the required fields are null. */ - public EmbeddingContentObjectContents build() { + public EmbeddingContentObjectItem build() { _checkSingleUse(); - return new EmbeddingContentObjectContents(this); + return new EmbeddingContentObjectItem(this); } } @@ -229,13 +228,13 @@ public Builder rebuild() { // --------------------------------------------------------------------------------------------- /** - * Json deserializer for {@link EmbeddingContentObjectContents} + * Json deserializer for {@link EmbeddingContentObjectItem} */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, EmbeddingContentObjectContents::setupEmbeddingContentObjectContentsDeserializer); + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, EmbeddingContentObjectItem::setupEmbeddingContentObjectItemDeserializer); - protected static void setupEmbeddingContentObjectContentsDeserializer( - ObjectDeserializer op) { + protected static void setupEmbeddingContentObjectItemDeserializer( + ObjectDeserializer op) { op.add(Builder::type, EmbeddingContentType._DESERIALIZER, "type"); op.add(Builder::format, EmbeddingContentFormat._DESERIALIZER, "format"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EmbeddingContentType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EmbeddingContentType.java index 63bb94871b..2a4940c835 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EmbeddingContentType.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/EmbeddingContentType.java @@ -50,6 +50,12 @@ public enum EmbeddingContentType implements JsonEnum { Image("image"), + Audio("audio"), + + Video("video"), + + Pdf("pdf"), + ; private final String jsonValue; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/GoogleVertexAIServiceSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/GoogleVertexAIServiceSettings.java index ca340219fd..c2036f234e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/GoogleVertexAIServiceSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/GoogleVertexAIServiceSettings.java @@ -187,11 +187,17 @@ public final String streamingUrl() { /** * The name of the location to use for the inference task for the Google Vertex * AI inference task. For Google Vertex AI, when provider is - * omitted or google location is mandatory. For Google - * Model Garden's completion and chat_completion - * tasks, when provider is a supported non-google - * value - location is ignored. Refer to the Google documentation - * for the list of supported locations. + * omitted or google, location is optional. When + * location is omitted, the request targets the Google Vertex AI + * global endpoint (https://aiplatform.googleapis.com); when it is + * provided, the corresponding regional endpoint + * (https://<location>-aiplatform.googleapis.com) is used. + * The field must be omitted to select the global endpoint; an empty string is + * not a valid location. For Google Model Garden's + * completion and chat_completion tasks, when + * provider is a supported non-google value - + * location is ignored. Refer to the Google documentation for the + * list of supported locations. *

    * API name: {@code location} */ @@ -490,11 +496,17 @@ public final Builder streamingUrl(@Nullable String value) { /** * The name of the location to use for the inference task for the Google Vertex * AI inference task. For Google Vertex AI, when provider is - * omitted or google location is mandatory. For Google - * Model Garden's completion and chat_completion - * tasks, when provider is a supported non-google - * value - location is ignored. Refer to the Google documentation - * for the list of supported locations. + * omitted or google, location is optional. When + * location is omitted, the request targets the Google Vertex AI + * global endpoint (https://aiplatform.googleapis.com); when it is + * provided, the corresponding regional endpoint + * (https://<location>-aiplatform.googleapis.com) is used. + * The field must be omitted to select the global endpoint; an empty string is + * not a valid location. For Google Model Garden's + * completion and chat_completion tasks, when + * provider is a supported non-google value - + * location is ignored. Refer to the Google documentation for the + * list of supported locations. *

    * API name: {@code location} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/JinaAIServiceSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/JinaAIServiceSettings.java index cd7d1f4307..710fef9d11 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/JinaAIServiceSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/JinaAIServiceSettings.java @@ -76,7 +76,7 @@ public class JinaAIServiceSettings implements JsonpSerializable { private final Integer dimensions; @Nullable - private final JinaAIElementType elementType; + private final JinaAIElementType embeddingType; @Nullable private final Boolean multimodalModel; @@ -90,7 +90,7 @@ private JinaAIServiceSettings(Builder builder) { this.rateLimit = builder.rateLimit; this.similarity = builder.similarity; this.dimensions = builder.dimensions; - this.elementType = builder.elementType; + this.embeddingType = builder.embeddingType; this.multimodalModel = builder.multimodalModel; } @@ -167,11 +167,11 @@ public final Integer dimensions() { * (this is a synonym of bit). Use float for the * default float embeddings. *

    - * API name: {@code element_type} + * API name: {@code embedding_type} */ @Nullable - public final JinaAIElementType elementType() { - return this.elementType; + public final JinaAIElementType embeddingType() { + return this.embeddingType; } /** @@ -221,9 +221,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.dimensions); } - if (this.elementType != null) { - generator.writeKey("element_type"); - this.elementType.serialize(generator, mapper); + if (this.embeddingType != null) { + generator.writeKey("embedding_type"); + this.embeddingType.serialize(generator, mapper); } if (this.multimodalModel != null) { generator.writeKey("multimodal_model"); @@ -261,7 +261,7 @@ public static class Builder extends WithJsonObjectBuilderBase private Integer dimensions; @Nullable - private JinaAIElementType elementType; + private JinaAIElementType embeddingType; @Nullable private Boolean multimodalModel; @@ -274,7 +274,7 @@ private Builder(JinaAIServiceSettings instance) { this.rateLimit = instance.rateLimit; this.similarity = instance.similarity; this.dimensions = instance.dimensions; - this.elementType = instance.elementType; + this.embeddingType = instance.embeddingType; this.multimodalModel = instance.multimodalModel; } @@ -359,10 +359,10 @@ public final Builder dimensions(@Nullable Integer value) { * (this is a synonym of bit). Use float for the * default float embeddings. *

    - * API name: {@code element_type} + * API name: {@code embedding_type} */ - public final Builder elementType(@Nullable JinaAIElementType value) { - this.elementType = value; + public final Builder embeddingType(@Nullable JinaAIElementType value) { + this.embeddingType = value; return this; } @@ -421,7 +421,7 @@ protected static void setupJinaAIServiceSettingsDeserializer(ObjectDeserializer< op.add(Builder::rateLimit, RateLimitSetting._DESERIALIZER, "rate_limit"); op.add(Builder::similarity, JinaAISimilarityType._DESERIALIZER, "similarity"); op.add(Builder::dimensions, JsonpDeserializer.integerDeserializer(), "dimensions"); - op.add(Builder::elementType, JinaAIElementType._DESERIALIZER, "element_type"); + op.add(Builder::embeddingType, JinaAIElementType._DESERIALIZER, "embedding_type"); op.add(Builder::multimodalModel, JsonpDeserializer.booleanDeserializer(), "multimodal_model"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/OpenAIServiceSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/OpenAIServiceSettings.java index c38215da45..5756c84d99 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/OpenAIServiceSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/OpenAIServiceSettings.java @@ -32,6 +32,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; +import java.util.List; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -61,8 +62,15 @@ */ @JsonpDeserializable public class OpenAIServiceSettings implements JsonpSerializable { + @Nullable private final String apiKey; + @Nullable + private final String clientId; + + @Nullable + private final String clientSecret; + @Nullable private final Integer dimensions; @@ -74,9 +82,14 @@ public class OpenAIServiceSettings implements JsonpSerializable { @Nullable private final RateLimitSetting rateLimit; + private final List scopes; + @Nullable private final OpenAISimilarityType similarity; + @Nullable + private final String tokenUrl; + @Nullable private final String url; @@ -84,12 +97,16 @@ public class OpenAIServiceSettings implements JsonpSerializable { private OpenAIServiceSettings(Builder builder) { - this.apiKey = ApiTypeHelper.requireNonNull(builder.apiKey, this, "apiKey"); + this.apiKey = builder.apiKey; + this.clientId = builder.clientId; + this.clientSecret = builder.clientSecret; this.dimensions = builder.dimensions; this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); this.organizationId = builder.organizationId; this.rateLimit = builder.rateLimit; + this.scopes = ApiTypeHelper.unmodifiable(builder.scopes); this.similarity = builder.similarity; + this.tokenUrl = builder.tokenUrl; this.url = builder.url; } @@ -99,23 +116,63 @@ public static OpenAIServiceSettings of(Function - * IMPORTANT: You need to provide the API key only once, during the inference - * model creation. The get inference endpoint API does not retrieve your API - * key. + * IMPORTANT: You must specify either api_key or + * client_secret. If you do not provide one or you provide more + * than one of them, you will receive an error when you try to create your + * endpoint. *

    * API name: {@code api_key} */ + @Nullable public final String apiKey() { return this.apiKey; } /** - * The number of dimensions the resulting output embeddings should have. It is - * supported only in text-embedding-3 and later models. If it is - * not set, the OpenAI defined default for the model is used. + * For OAuth 2.0 authorization using the client credentials grant flow. The + * application ID that's assigned to your app. + *

    + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, token_url, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. + *

    + * API name: {@code client_id} + */ + @Nullable + public final String clientId() { + return this.clientId; + } + + /** + * For OAuth 2.0 authorization using the client credentials grant flow. The + * application secret that you created for your app. + *

    + * IMPORTANT: You must specify either api_key or + * client_secret. If you do not provide one or you provide more + * than one of them, you will receive an error when you try to create your + * endpoint. + *

    + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, token_url, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. + *

    + * API name: {@code client_secret} + */ + @Nullable + public final String clientSecret() { + return this.clientSecret; + } + + /** + * For a text_embedding or embedding task, the number + * of dimensions the resulting output embeddings should have. It is supported + * only in text-embedding-3 and later models. If it is not set, the + * OpenAI defined default for the model is used. *

    * API name: {@code dimensions} */ @@ -149,8 +206,9 @@ public final String organizationId() { * This setting helps to minimize the number of rate limit errors returned from * OpenAI. The openai service sets a default number of requests * allowed per minute depending on the task type. For - * text_embedding, it is set to 3000. For - * completion, it is set to 500. + * text_embedding and embedding, it is set to + * 3000. For completion and + * chat_completion, it is set to 500. *

    * API name: {@code rate_limit} */ @@ -160,8 +218,32 @@ public final RateLimitSetting rateLimit() { } /** - * For a text_embedding task, the similarity measure. One of - * cosine, dot_product, l2_norm. Defaults to dot_product. + * For OAuth 2.0 authorization using the client credentials grant flow. The + * resource identifier of the resource you want. For example: + * + *

    +	 * "scopes": [
    +	 *   "scope1",
    +	 *   "scope2"
    +	 * ]
    +	 * 
    +	 * 
    + *

    + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, token_url, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. + *

    + * API name: {@code scopes} + */ + public final List scopes() { + return this.scopes; + } + + /** + * For a text_embedding or embedding task, the + * similarity measure. One of cosine, dot_product, + * l2_norm. Defaults to dot_product. *

    * API name: {@code similarity} */ @@ -170,9 +252,29 @@ public final OpenAISimilarityType similarity() { return this.similarity; } + /** + * For OAuth 2.0 authorization using the client credentials grant flow. An + * OAuth2 token endpoint where Elasticsearch sends a request to exchange client + * credentials for an access token. + *

    + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, token_url, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. + *

    + * API name: {@code token_url} + */ + @Nullable + public final String tokenUrl() { + return this.tokenUrl; + } + /** * The URL endpoint to use for the requests. It can be changed for testing - * purposes. + * purposes. Default value is https://api.openai.com/v1/embeddings + * for a text_embedding or embedding task, + * https://api.openai.com/v1/chat/completions for a + * completion or chat_completion task. *

    * API name: {@code url} */ @@ -192,9 +294,21 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("api_key"); - generator.write(this.apiKey); + if (this.apiKey != null) { + generator.writeKey("api_key"); + generator.write(this.apiKey); + + } + if (this.clientId != null) { + generator.writeKey("client_id"); + generator.write(this.clientId); + + } + if (this.clientSecret != null) { + generator.writeKey("client_secret"); + generator.write(this.clientSecret); + } if (this.dimensions != null) { generator.writeKey("dimensions"); generator.write(this.dimensions); @@ -212,11 +326,26 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("rate_limit"); this.rateLimit.serialize(generator, mapper); + } + if (ApiTypeHelper.isDefined(this.scopes)) { + generator.writeKey("scopes"); + generator.writeStartArray(); + for (String item0 : this.scopes) { + generator.write(item0); + + } + generator.writeEnd(); + } if (this.similarity != null) { generator.writeKey("similarity"); this.similarity.serialize(generator, mapper); } + if (this.tokenUrl != null) { + generator.writeKey("token_url"); + generator.write(this.tokenUrl); + + } if (this.url != null) { generator.writeKey("url"); generator.write(this.url); @@ -239,8 +368,15 @@ public String toString() { public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable private String apiKey; + @Nullable + private String clientId; + + @Nullable + private String clientSecret; + @Nullable private Integer dimensions; @@ -252,9 +388,15 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private RateLimitSetting rateLimit; + @Nullable + private List scopes; + @Nullable private OpenAISimilarityType similarity; + @Nullable + private String tokenUrl; + @Nullable private String url; @@ -262,33 +404,76 @@ public Builder() { } private Builder(OpenAIServiceSettings instance) { this.apiKey = instance.apiKey; + this.clientId = instance.clientId; + this.clientSecret = instance.clientSecret; this.dimensions = instance.dimensions; this.modelId = instance.modelId; this.organizationId = instance.organizationId; this.rateLimit = instance.rateLimit; + this.scopes = instance.scopes; this.similarity = instance.similarity; + this.tokenUrl = instance.tokenUrl; this.url = instance.url; } /** - * Required - A valid API key of your OpenAI account. You can find your OpenAI - * API keys in your OpenAI account under the API keys section. + * A valid API key of your OpenAI account. You can find your OpenAI API keys in + * your OpenAI account under the API keys section. *

    - * IMPORTANT: You need to provide the API key only once, during the inference - * model creation. The get inference endpoint API does not retrieve your API - * key. + * IMPORTANT: You must specify either api_key or + * client_secret. If you do not provide one or you provide more + * than one of them, you will receive an error when you try to create your + * endpoint. *

    * API name: {@code api_key} */ - public final Builder apiKey(String value) { + public final Builder apiKey(@Nullable String value) { this.apiKey = value; return this; } /** - * The number of dimensions the resulting output embeddings should have. It is - * supported only in text-embedding-3 and later models. If it is - * not set, the OpenAI defined default for the model is used. + * For OAuth 2.0 authorization using the client credentials grant flow. The + * application ID that's assigned to your app. + *

    + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, token_url, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. + *

    + * API name: {@code client_id} + */ + public final Builder clientId(@Nullable String value) { + this.clientId = value; + return this; + } + + /** + * For OAuth 2.0 authorization using the client credentials grant flow. The + * application secret that you created for your app. + *

    + * IMPORTANT: You must specify either api_key or + * client_secret. If you do not provide one or you provide more + * than one of them, you will receive an error when you try to create your + * endpoint. + *

    + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, token_url, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. + *

    + * API name: {@code client_secret} + */ + public final Builder clientSecret(@Nullable String value) { + this.clientSecret = value; + return this; + } + + /** + * For a text_embedding or embedding task, the number + * of dimensions the resulting output embeddings should have. It is supported + * only in text-embedding-3 and later models. If it is not set, the + * OpenAI defined default for the model is used. *

    * API name: {@code dimensions} */ @@ -323,8 +508,9 @@ public final Builder organizationId(@Nullable String value) { * This setting helps to minimize the number of rate limit errors returned from * OpenAI. The openai service sets a default number of requests * allowed per minute depending on the task type. For - * text_embedding, it is set to 3000. For - * completion, it is set to 500. + * text_embedding and embedding, it is set to + * 3000. For completion and + * chat_completion, it is set to 500. *

    * API name: {@code rate_limit} */ @@ -337,8 +523,9 @@ public final Builder rateLimit(@Nullable RateLimitSetting value) { * This setting helps to minimize the number of rate limit errors returned from * OpenAI. The openai service sets a default number of requests * allowed per minute depending on the task type. For - * text_embedding, it is set to 3000. For - * completion, it is set to 500. + * text_embedding and embedding, it is set to + * 3000. For completion and + * chat_completion, it is set to 500. *

    * API name: {@code rate_limit} */ @@ -347,8 +534,61 @@ public final Builder rateLimit(Functiontext_embedding task, the similarity measure. One of - * cosine, dot_product, l2_norm. Defaults to dot_product. + * For OAuth 2.0 authorization using the client credentials grant flow. The + * resource identifier of the resource you want. For example: + * + *

    +		 * "scopes": [
    +		 *   "scope1",
    +		 *   "scope2"
    +		 * ]
    +		 * 
    +		 * 
    + *

    + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, token_url, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. + *

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

    + * Adds all elements of list to scopes. + */ + public final Builder scopes(List list) { + this.scopes = _listAddAll(this.scopes, list); + return this; + } + + /** + * For OAuth 2.0 authorization using the client credentials grant flow. The + * resource identifier of the resource you want. For example: + * + *

    +		 * "scopes": [
    +		 *   "scope1",
    +		 *   "scope2"
    +		 * ]
    +		 * 
    +		 * 
    + *

    + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, token_url, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. + *

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

    + * Adds one or more values to scopes. + */ + public final Builder scopes(String value, String... values) { + this.scopes = _listAdd(this.scopes, value, values); + return this; + } + + /** + * For a text_embedding or embedding task, the + * similarity measure. One of cosine, dot_product, + * l2_norm. Defaults to dot_product. *

    * API name: {@code similarity} */ @@ -357,9 +597,29 @@ public final Builder similarity(@Nullable OpenAISimilarityType value) { return this; } + /** + * For OAuth 2.0 authorization using the client credentials grant flow. An + * OAuth2 token endpoint where Elasticsearch sends a request to exchange client + * credentials for an access token. + *

    + * IMPORTANT: To configure OAuth 2.0, you must specify client_id, + * scopes, token_url, and client_secret + * together. If one of the fields is missing, you will receive an error when you + * try to create your endpoint. + *

    + * API name: {@code token_url} + */ + public final Builder tokenUrl(@Nullable String value) { + this.tokenUrl = value; + return this; + } + /** * The URL endpoint to use for the requests. It can be changed for testing - * purposes. + * purposes. Default value is https://api.openai.com/v1/embeddings + * for a text_embedding or embedding task, + * https://api.openai.com/v1/chat/completions for a + * completion or chat_completion task. *

    * API name: {@code url} */ @@ -403,11 +663,15 @@ public Builder rebuild() { protected static void setupOpenAIServiceSettingsDeserializer(ObjectDeserializer op) { op.add(Builder::apiKey, JsonpDeserializer.stringDeserializer(), "api_key"); + op.add(Builder::clientId, JsonpDeserializer.stringDeserializer(), "client_id"); + op.add(Builder::clientSecret, JsonpDeserializer.stringDeserializer(), "client_secret"); op.add(Builder::dimensions, JsonpDeserializer.integerDeserializer(), "dimensions"); op.add(Builder::modelId, JsonpDeserializer.stringDeserializer(), "model_id"); op.add(Builder::organizationId, JsonpDeserializer.stringDeserializer(), "organization_id"); op.add(Builder::rateLimit, RateLimitSetting._DESERIALIZER, "rate_limit"); + op.add(Builder::scopes, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "scopes"); op.add(Builder::similarity, OpenAISimilarityType._DESERIALIZER, "similarity"); + op.add(Builder::tokenUrl, JsonpDeserializer.stringDeserializer(), "token_url"); op.add(Builder::url, JsonpDeserializer.stringDeserializer(), "url"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/OpenAITaskType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/OpenAITaskType.java index 99a1cdf362..a0a88d4fef 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/OpenAITaskType.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/OpenAITaskType.java @@ -51,6 +51,8 @@ public enum OpenAITaskType implements JsonEnum { TextEmbedding("text_embedding"), + Embedding("embedding"), + ; private final String jsonValue; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAnthropicRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAnthropicRequest.java index 4d707e09b8..6dfb3b665a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAnthropicRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAnthropicRequest.java @@ -141,8 +141,10 @@ public final AnthropicTaskSettings taskSettings() { } /** - * Required - The task type. The only valid task type for the model to perform - * is completion. + * Required - The task type. The valid task types for the model to perform are + * completion and chat_completion. NOTE: The + * chat_completion task type only supports streaming and only + * through the _stream API. *

    * API name: {@code task_type} */ @@ -285,8 +287,10 @@ public final Builder taskSettings( } /** - * Required - The task type. The only valid task type for the model to perform - * is completion. + * Required - The task type. The valid task types for the model to perform are + * completion and chat_completion. NOTE: The + * chat_completion task type only supports streaming and only + * through the _stream API. *

    * API name: {@code task_type} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutRequest.java index 026d06e00c..a32dedef7b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutRequest.java @@ -81,7 +81,7 @@ *

  • Amazon SageMaker (chat_completion, completion, * rerank, sparse_embedding, * text_embedding)
  • - *
  • Anthropic (completion)
  • + *
  • Anthropic (chat_completion, completion)
  • *
  • Azure AI Studio (completion, rerank, * text_embedding)
  • *
  • Azure OpenAI (chat_completion, completion, diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/RequestEmbedding.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/RequestEmbedding.java index d3f6425f18..32e2bf781e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/RequestEmbedding.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/RequestEmbedding.java @@ -86,6 +86,10 @@ public static RequestEmbedding of(Functioncontent object, or an array of content objects. + * content objects may contain a single item or an array of items. + * Models that support multiple items per content object will + * return a single embedding for each content object, regardless of + * how many items it contains. *

    * string example: * @@ -136,6 +140,27 @@ public static RequestEmbedding of(Function * *

    + * Multiple items in one content object example: + * + *

    +	 * "input": [
    +	 *   {
    +	 *     "content": [
    +	 *       {
    +	 *         "type": "image",
    +	 *         "format": "base64",
    +	 *         "value": "data:image/jpeg;base64,..."
    +	 *       },
    +	 *       {
    +	 *         "type": "text",
    +	 *         "value": "Some text to create an embedding"
    +	 *       }
    +	 *     ]
    +	 *   }
    +	 * ]
    +	 * 
    +	 * 
    + *

    * API name: {@code input} */ public final EmbeddingInput input() { @@ -239,6 +264,10 @@ private Builder(RequestEmbedding instance) { /** * Required - Inference input. Either a string, an array of strings, a * content object, or an array of content objects. + * content objects may contain a single item or an array of items. + * Models that support multiple items per content object will + * return a single embedding for each content object, regardless of + * how many items it contains. *

    * string example: * @@ -289,6 +318,27 @@ private Builder(RequestEmbedding instance) { * * *

    + * Multiple items in one content object example: + * + *

    +		 * "input": [
    +		 *   {
    +		 *     "content": [
    +		 *       {
    +		 *         "type": "image",
    +		 *         "format": "base64",
    +		 *         "value": "data:image/jpeg;base64,..."
    +		 *       },
    +		 *       {
    +		 *         "type": "text",
    +		 *         "value": "Some text to create an embedding"
    +		 *       }
    +		 *     ]
    +		 *   }
    +		 * ]
    +		 * 
    +		 * 
    + *

    * API name: {@code input} */ public final Builder input(EmbeddingInput value) { @@ -299,6 +349,10 @@ public final Builder input(EmbeddingInput value) { /** * Required - Inference input. Either a string, an array of strings, a * content object, or an array of content objects. + * content objects may contain a single item or an array of items. + * Models that support multiple items per content object will + * return a single embedding for each content object, regardless of + * how many items it contains. *

    * string example: * @@ -349,6 +403,27 @@ public final Builder input(EmbeddingInput value) { * * *

    + * Multiple items in one content object example: + * + *

    +		 * "input": [
    +		 *   {
    +		 *     "content": [
    +		 *       {
    +		 *         "type": "image",
    +		 *         "format": "base64",
    +		 *         "value": "data:image/jpeg;base64,..."
    +		 *       },
    +		 *       {
    +		 *         "type": "text",
    +		 *         "value": "Some text to create an embedding"
    +		 *       }
    +		 *     ]
    +		 *   }
    +		 * ]
    +		 * 
    +		 * 
    + *

    * API name: {@code input} */ public final Builder input(Function> fn) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskTypeAnthropic.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskTypeAnthropic.java index 2c63b8fe8c..edd55998e6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskTypeAnthropic.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskTypeAnthropic.java @@ -48,6 +48,8 @@ public enum TaskTypeAnthropic implements JsonEnum { Completion("completion"), + ChatCompletion("chat_completion"), + ; private final String jsonValue; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskTypeOpenAI.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskTypeOpenAI.java index 795958e9e9..8085b47825 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskTypeOpenAI.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskTypeOpenAI.java @@ -51,6 +51,8 @@ public enum TaskTypeOpenAI implements JsonEnum { Completion("completion"), + Embedding("embedding"), + ; private final String jsonValue; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/AttachmentProcessor.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/AttachmentProcessor.java index ea0063198d..c9a8d46a0c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/AttachmentProcessor.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/AttachmentProcessor.java @@ -71,6 +71,9 @@ public class AttachmentProcessor extends ProcessorBase implements ProcessorVaria @Nullable private final String indexedCharsField; + @Nullable + private final String maxFieldBytes; + private final List properties; @Nullable @@ -91,6 +94,7 @@ private AttachmentProcessor(Builder builder) { this.ignoreMissing = builder.ignoreMissing; this.indexedChars = builder.indexedChars; this.indexedCharsField = builder.indexedCharsField; + this.maxFieldBytes = builder.maxFieldBytes; this.properties = ApiTypeHelper.unmodifiable(builder.properties); this.targetField = builder.targetField; this.removeBinary = builder.removeBinary; @@ -152,6 +156,20 @@ public final String indexedCharsField() { return this.indexedCharsField; } + /** + * Maximum allowed size of the attachment field value in bytes: + * length of a string (if base64 in JSON, checked before base64 decoding) or + * byte array length for binary (for example, CBOR). If set to -1, + * there is no per-processor limit. The node setting + * ingest.attachment.max_field_size also applies. + *

    + * API name: {@code max_field_bytes} + */ + @Nullable + public final String maxFieldBytes() { + return this.maxFieldBytes; + } + /** * Array of properties to select to be stored. Can be content, * title, name, author, @@ -216,6 +234,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("indexed_chars_field"); generator.write(this.indexedCharsField); + } + if (this.maxFieldBytes != null) { + generator.writeKey("max_field_bytes"); + generator.write(this.maxFieldBytes); + } if (ApiTypeHelper.isDefined(this.properties)) { generator.writeKey("properties"); @@ -265,6 +288,9 @@ public static class Builder extends ProcessorBase.AbstractBuilder @Nullable private String indexedCharsField; + @Nullable + private String maxFieldBytes; + @Nullable private List properties; @@ -284,6 +310,7 @@ private Builder(AttachmentProcessor instance) { this.ignoreMissing = instance.ignoreMissing; this.indexedChars = instance.indexedChars; this.indexedCharsField = instance.indexedCharsField; + this.maxFieldBytes = instance.maxFieldBytes; this.properties = instance.properties; this.targetField = instance.targetField; this.removeBinary = instance.removeBinary; @@ -333,6 +360,20 @@ public final Builder indexedCharsField(@Nullable String value) { return this; } + /** + * Maximum allowed size of the attachment field value in bytes: + * length of a string (if base64 in JSON, checked before base64 decoding) or + * byte array length for binary (for example, CBOR). If set to -1, + * there is no per-processor limit. The node setting + * ingest.attachment.max_field_size also applies. + *

    + * API name: {@code max_field_bytes} + */ + public final Builder maxFieldBytes(@Nullable String value) { + this.maxFieldBytes = value; + return this; + } + /** * Array of properties to select to be stored. Can be content, * title, name, author, @@ -433,6 +474,7 @@ protected static void setupAttachmentProcessorDeserializer(ObjectDeserializerlinux-x86_64, - * linux-aarch64, darwin-x86_64, - * darwin-aarch64, or windows-x86_64. For portable - * models (those that work independent of processor architecture or OS - * features), leave this field unset. + * linux-aarch64, darwin-aarch64, or + * windows-x86_64. For portable models (those that work independent + * of processor architecture or OS features), leave this field unset. *

    * API name: {@code platform_architecture} */ @@ -597,10 +596,9 @@ public final Builder modelType(@Nullable TrainedModelType value) { * processor architecture and OS combination, then this field specifies which. * The format of the string must match the platform identifiers used by * Elasticsearch, so one of, linux-x86_64, - * linux-aarch64, darwin-x86_64, - * darwin-aarch64, or windows-x86_64. For portable - * models (those that work independent of processor architecture or OS - * features), leave this field unset. + * linux-aarch64, darwin-aarch64, or + * windows-x86_64. For portable models (those that work independent + * of processor architecture or OS features), leave this field unset. *

    * API name: {@code platform_architecture} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelDeploymentNodesStats.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelDeploymentNodesStats.java index 6b745983bf..9fdb61d66c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelDeploymentNodesStats.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/TrainedModelDeploymentNodesStats.java @@ -33,6 +33,7 @@ import java.lang.Double; import java.lang.Integer; import java.lang.Long; +import java.lang.String; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -71,6 +72,9 @@ public class TrainedModelDeploymentNodesStats implements JsonpSerializable { @Nullable private final Double averageInferenceTimeMsExcludingCacheHits; + @Nullable + private final String averageInferenceProcessMemoryRssBytes; + @Nullable private final Integer errorCount; @@ -120,6 +124,7 @@ private TrainedModelDeploymentNodesStats(Builder builder) { this.averageInferenceTimeMs = builder.averageInferenceTimeMs; this.averageInferenceTimeMsLastMinute = builder.averageInferenceTimeMsLastMinute; this.averageInferenceTimeMsExcludingCacheHits = builder.averageInferenceTimeMsExcludingCacheHits; + this.averageInferenceProcessMemoryRssBytes = builder.averageInferenceProcessMemoryRssBytes; this.errorCount = builder.errorCount; this.inferenceCount = builder.inferenceCount; this.inferenceCacheHitCount = builder.inferenceCacheHitCount; @@ -174,6 +179,14 @@ public final Double averageInferenceTimeMsExcludingCacheHits() { return this.averageInferenceTimeMsExcludingCacheHits; } + /** + * API name: {@code average_inference_process_memory_rss_bytes} + */ + @Nullable + public final String averageInferenceProcessMemoryRssBytes() { + return this.averageInferenceProcessMemoryRssBytes; + } + /** * The number of errors when evaluating the trained model. *

    @@ -340,6 +353,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("average_inference_time_ms_excluding_cache_hits"); generator.write(this.averageInferenceTimeMsExcludingCacheHits); + } + if (this.averageInferenceProcessMemoryRssBytes != null) { + generator.writeKey("average_inference_process_memory_rss_bytes"); + generator.write(this.averageInferenceProcessMemoryRssBytes); + } if (this.errorCount != null) { generator.writeKey("error_count"); @@ -436,6 +454,9 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private Double averageInferenceTimeMsExcludingCacheHits; + @Nullable + private String averageInferenceProcessMemoryRssBytes; + @Nullable private Integer errorCount; @@ -484,6 +505,7 @@ private Builder(TrainedModelDeploymentNodesStats instance) { this.averageInferenceTimeMs = instance.averageInferenceTimeMs; this.averageInferenceTimeMsLastMinute = instance.averageInferenceTimeMsLastMinute; this.averageInferenceTimeMsExcludingCacheHits = instance.averageInferenceTimeMsExcludingCacheHits; + this.averageInferenceProcessMemoryRssBytes = instance.averageInferenceProcessMemoryRssBytes; this.errorCount = instance.errorCount; this.inferenceCount = instance.inferenceCount; this.inferenceCacheHitCount = instance.inferenceCacheHitCount; @@ -530,6 +552,14 @@ public final Builder averageInferenceTimeMsExcludingCacheHits(@Nullable Double v return this; } + /** + * API name: {@code average_inference_process_memory_rss_bytes} + */ + public final Builder averageInferenceProcessMemoryRssBytes(@Nullable String value) { + this.averageInferenceProcessMemoryRssBytes = value; + return this; + } + /** * The number of errors when evaluating the trained model. *

    @@ -734,6 +764,8 @@ protected static void setupTrainedModelDeploymentNodesStatsDeserializer( "average_inference_time_ms_last_minute"); op.add(Builder::averageInferenceTimeMsExcludingCacheHits, JsonpDeserializer.doubleDeserializer(), "average_inference_time_ms_excluding_cache_hits"); + op.add(Builder::averageInferenceProcessMemoryRssBytes, JsonpDeserializer.stringDeserializer(), + "average_inference_process_memory_rss_bytes"); op.add(Builder::errorCount, JsonpDeserializer.integerDeserializer(), "error_count"); op.add(Builder::inferenceCount, JsonpDeserializer.longDeserializer(), "inference_count"); op.add(Builder::inferenceCacheHitCount, JsonpDeserializer.longDeserializer(), "inference_cache_hit_count"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClusterPrivilege.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClusterPrivilege.java index e0f8365e99..334a42f354 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClusterPrivilege.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ClusterPrivilege.java @@ -96,6 +96,8 @@ public enum ClusterPrivilege implements JsonEnum { ManagePipeline("manage_pipeline"), + ManageReindex("manage_reindex"), + ManageRollup("manage_rollup"), ManageSaml("manage_saml"), @@ -134,6 +136,8 @@ public enum ClusterPrivilege implements JsonEnum { MonitorMl("monitor_ml"), + MonitorReindex("monitor_reindex"), + MonitorRollup("monitor_rollup"), MonitorSnapshot("monitor_snapshot"), diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateServiceTokenRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateServiceTokenRequest.java index 613092924c..c3d04edf80 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateServiceTokenRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CreateServiceTokenRequest.java @@ -63,6 +63,11 @@ *

    * NOTE: Service account tokens never expire. You must actively delete them if * they are no longer needed. + *

    + * IMPORTANT: On Serverless, non-operator users can create tokens for only + * elastic/fleet-server and + * elastic/fleet-server-remote. Creating tokens for any other + * service account requires operator privileges. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteServiceTokenRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteServiceTokenRequest.java index aacfacfe20..6097b24311 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteServiceTokenRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/DeleteServiceTokenRequest.java @@ -59,6 +59,11 @@ * Delete service account tokens. *

    * Delete service account tokens for a service in a specified namespace. + *

    + * IMPORTANT: On Serverless, non-operator users can delete tokens for only + * elastic/fleet-server and + * elastic/fleet-server-remote. Deleting tokens for any other + * service account requires operator privileges. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java index 1c8002387a..1c6940b488 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityAsyncClient.java @@ -852,6 +852,11 @@ public final CompletableFuture createCrossClus *

    * NOTE: Service account tokens never expire. You must actively delete them if * they are no longer needed. + *

    + * IMPORTANT: On Serverless, non-operator users can create tokens for only + * elastic/fleet-server and + * elastic/fleet-server-remote. Creating tokens for any other + * service account requires operator privileges. * * @see Documentation @@ -873,6 +878,11 @@ public CompletableFuture createServiceToken(CreateSe *

    * NOTE: Service account tokens never expire. You must actively delete them if * they are no longer needed. + *

    + * IMPORTANT: On Serverless, non-operator users can create tokens for only + * elastic/fleet-server and + * elastic/fleet-server-remote. Creating tokens for any other + * service account requires operator privileges. * * @param fn * a function that initializes a builder to create the @@ -1095,6 +1105,11 @@ public final CompletableFuture deleteRoleMapping( * Delete service account tokens. *

    * Delete service account tokens for a service in a specified namespace. + *

    + * IMPORTANT: On Serverless, non-operator users can delete tokens for only + * elastic/fleet-server and + * elastic/fleet-server-remote. Deleting tokens for any other + * service account requires operator privileges. * * @see Documentation @@ -1112,6 +1127,11 @@ public CompletableFuture deleteServiceToken(DeleteSe * Delete service account tokens. *

    * Delete service account tokens for a service in a specified namespace. + *

    + * IMPORTANT: On Serverless, non-operator users can delete tokens for only + * elastic/fleet-server and + * elastic/fleet-server-remote. Deleting tokens for any other + * service account requires operator privileges. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityClient.java index 583ded6787..933c3ecb0f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ElasticsearchSecurityClient.java @@ -870,6 +870,11 @@ public final CreateCrossClusterApiKeyResponse createCrossClusterApiKey( *

    * NOTE: Service account tokens never expire. You must actively delete them if * they are no longer needed. + *

    + * IMPORTANT: On Serverless, non-operator users can create tokens for only + * elastic/fleet-server and + * elastic/fleet-server-remote. Creating tokens for any other + * service account requires operator privileges. * * @see Documentation @@ -892,6 +897,11 @@ public CreateServiceTokenResponse createServiceToken(CreateServiceTokenRequest r *

    * NOTE: Service account tokens never expire. You must actively delete them if * they are no longer needed. + *

    + * IMPORTANT: On Serverless, non-operator users can create tokens for only + * elastic/fleet-server and + * elastic/fleet-server-remote. Creating tokens for any other + * service account requires operator privileges. * * @param fn * a function that initializes a builder to create the @@ -1120,6 +1130,11 @@ public final DeleteRoleMappingResponse deleteRoleMapping( * Delete service account tokens. *

    * Delete service account tokens for a service in a specified namespace. + *

    + * IMPORTANT: On Serverless, non-operator users can delete tokens for only + * elastic/fleet-server and + * elastic/fleet-server-remote. Deleting tokens for any other + * service account requires operator privileges. * * @see Documentation @@ -1138,6 +1153,11 @@ public DeleteServiceTokenResponse deleteServiceToken(DeleteServiceTokenRequest r * Delete service account tokens. *

    * Delete service account tokens for a service in a specified namespace. + *

    + * IMPORTANT: On Serverless, non-operator users can delete tokens for only + * elastic/fleet-server and + * elastic/fleet-server-remote. Deleting tokens for any other + * service account requires operator privileges. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetRoleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetRoleRequest.java index 3065bb88fe..440c53dbae 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetRoleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/GetRoleRequest.java @@ -30,8 +30,8 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.lang.String; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -69,12 +69,16 @@ */ public class GetRoleRequest extends RequestBase { + @Nullable + private final Boolean includeImplicit; + private final List name; // --------------------------------------------------------------------------------------------- private GetRoleRequest(Builder builder) { + this.includeImplicit = builder.includeImplicit; this.name = ApiTypeHelper.unmodifiable(builder.name); } @@ -83,6 +87,19 @@ public static GetRoleRequest of(Function> return fn.apply(new Builder()).build(); } + /** + * If true, include privileges that are implicitly granted by + * registered ImplicitPrivilegesProviders alongside the explicitly + * configured privileges. Each implicit entry in the response is annotated with + * implicitly_granted: true. + *

    + * API name: {@code include_implicit} + */ + @Nullable + public final Boolean includeImplicit() { + return this.includeImplicit; + } + /** * The name of the role. You can specify multiple roles as a comma-separated * list. If you do not specify this parameter, the API returns information about @@ -101,15 +118,32 @@ public final List name() { */ public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Boolean includeImplicit; + @Nullable private List name; public Builder() { } private Builder(GetRoleRequest instance) { + this.includeImplicit = instance.includeImplicit; this.name = instance.name; } + /** + * If true, include privileges that are implicitly granted by + * registered ImplicitPrivilegesProviders alongside the explicitly + * configured privileges. Each implicit entry in the response is annotated with + * implicitly_granted: true. + *

    + * API name: {@code include_implicit} + */ + public final Builder includeImplicit(@Nullable Boolean value) { + this.includeImplicit = value; + return this; + } + /** * The name of the role. You can specify multiple roles as a comma-separated * list. If you do not specify this parameter, the API returns information about @@ -226,7 +260,11 @@ public Builder rebuild() { // Request parameters request -> { - return Collections.emptyMap(); + Map params = new HashMap<>(); + if (request.includeImplicit != null) { + params.put("include_implicit", String.valueOf(request.includeImplicit)); + } + return params; }, SimpleEndpoint.emptyMap(), false, GetRoleResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/IndicesPrivilegesRead.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/IndicesPrivilegesRead.java new file mode 100644 index 0000000000..9d24f48e06 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/IndicesPrivilegesRead.java @@ -0,0 +1,453 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.security.get_role; + +import co.elastic.clients.elasticsearch.security.FieldSecurity; +import co.elastic.clients.elasticsearch.security.IndexPrivilege; +import co.elastic.clients.elasticsearch.security.IndicesPrivilegesQuery; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: security.get_role.IndicesPrivilegesRead + +/** + * Read-side variant of IndicesPrivileges returned by the get role + * API. Carries the implicitly_granted marker that is set on + * entries contributed by a registered ImplicitPrivilegesProvider + * when include_implicit is true. + * + * @see API + * specification + */ +@JsonpDeserializable +public class IndicesPrivilegesRead implements JsonpSerializable { + @Nullable + private final Boolean implicitlyGranted; + + @Nullable + private final FieldSecurity fieldSecurity; + + private final List names; + + private final List privileges; + + @Nullable + private final IndicesPrivilegesQuery query; + + @Nullable + private final Boolean allowRestrictedIndices; + + // --------------------------------------------------------------------------------------------- + + private IndicesPrivilegesRead(Builder builder) { + + this.implicitlyGranted = builder.implicitlyGranted; + this.fieldSecurity = builder.fieldSecurity; + this.names = ApiTypeHelper.unmodifiableRequired(builder.names, this, "names"); + this.privileges = ApiTypeHelper.unmodifiableRequired(builder.privileges, this, "privileges"); + this.query = builder.query; + this.allowRestrictedIndices = builder.allowRestrictedIndices; + + } + + public static IndicesPrivilegesRead of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Set to true on entries that were contributed by a registered + * ImplicitPrivilegesProvider rather than explicitly stored on the + * role. Only present when the get role API is called with + * include_implicit=true. The put role API rejects this field, so + * clients must not echo it back on a GET-then-PUT round-trip. + *

    + * API name: {@code implicitly_granted} + */ + @Nullable + public final Boolean implicitlyGranted() { + return this.implicitlyGranted; + } + + /** + * The document fields that the owners of the role have read access to. + *

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

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

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

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

    + * API name: {@code allow_restricted_indices} + */ + @Nullable + public final Boolean allowRestrictedIndices() { + return this.allowRestrictedIndices; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.implicitlyGranted != null) { + generator.writeKey("implicitly_granted"); + generator.write(this.implicitlyGranted); + + } + if (this.fieldSecurity != null) { + generator.writeKey("field_security"); + this.fieldSecurity.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.names)) { + generator.writeKey("names"); + generator.writeStartArray(); + for (String item0 : this.names) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.privileges)) { + generator.writeKey("privileges"); + generator.writeStartArray(); + for (String item0 : this.privileges) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.query != null) { + generator.writeKey("query"); + this.query.serialize(generator, mapper); + + } + if (this.allowRestrictedIndices != null) { + generator.writeKey("allow_restricted_indices"); + generator.write(this.allowRestrictedIndices); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link IndicesPrivilegesRead}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private Boolean implicitlyGranted; + + @Nullable + private FieldSecurity fieldSecurity; + + private List names; + + private List privileges; + + @Nullable + private IndicesPrivilegesQuery query; + + @Nullable + private Boolean allowRestrictedIndices; + + public Builder() { + } + private Builder(IndicesPrivilegesRead instance) { + this.implicitlyGranted = instance.implicitlyGranted; + this.fieldSecurity = instance.fieldSecurity; + this.names = instance.names; + this.privileges = instance.privileges; + this.query = instance.query; + this.allowRestrictedIndices = instance.allowRestrictedIndices; + + } + /** + * Set to true on entries that were contributed by a registered + * ImplicitPrivilegesProvider rather than explicitly stored on the + * role. Only present when the get role API is called with + * include_implicit=true. The put role API rejects this field, so + * clients must not echo it back on a GET-then-PUT round-trip. + *

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

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

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

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

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

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

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

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

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

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

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

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

    + * Adds one or more enum values to privileges. + */ + public final Builder privileges(IndexPrivilege value, IndexPrivilege... values) { + this.privileges = _listAdd(this.privileges, value.jsonValue(), + Arrays.stream(values).map(IndexPrivilege::jsonValue).toArray(String[]::new)); + return this; + } + + /** + * A search query that defines the documents the owners of the role have access + * to. A document within the specified indices must match this query for it to + * be accessible by the owners of the role. + *

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

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

    + * API name: {@code allow_restricted_indices} + */ + public final Builder allowRestrictedIndices(@Nullable Boolean value) { + this.allowRestrictedIndices = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link IndicesPrivilegesRead}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public IndicesPrivilegesRead build() { + _checkSingleUse(); + + return new IndicesPrivilegesRead(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link IndicesPrivilegesRead} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, IndicesPrivilegesRead::setupIndicesPrivilegesReadDeserializer); + + protected static void setupIndicesPrivilegesReadDeserializer(ObjectDeserializer op) { + + op.add(Builder::implicitlyGranted, JsonpDeserializer.booleanDeserializer(), "implicitly_granted"); + op.add(Builder::fieldSecurity, FieldSecurity._DESERIALIZER, "field_security"); + op.add(Builder::names, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "names"); + op.add(Builder::privileges, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), + "privileges"); + op.add(Builder::query, IndicesPrivilegesQuery._DESERIALIZER, "query"); + op.add(Builder::allowRestrictedIndices, JsonpDeserializer.booleanDeserializer(), "allow_restricted_indices"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/Role.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/Role.java index df8dd30c30..a0b0ba5d5c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/Role.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/get_role/Role.java @@ -21,7 +21,6 @@ import co.elastic.clients.elasticsearch.security.ApplicationPrivileges; import co.elastic.clients.elasticsearch.security.ClusterPrivilege; -import co.elastic.clients.elasticsearch.security.IndicesPrivileges; import co.elastic.clients.elasticsearch.security.RemoteClusterPrivileges; import co.elastic.clients.elasticsearch.security.RemoteIndicesPrivileges; import co.elastic.clients.elasticsearch.security.RoleTemplate; @@ -71,7 +70,7 @@ public class Role implements JsonpSerializable { private final List cluster; - private final List indices; + private final List indices; private final List remoteIndices; @@ -124,7 +123,7 @@ public final List cluster() { /** * Required - API name: {@code indices} */ - public final List indices() { + public final List indices() { return this.indices; } @@ -216,7 +215,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { if (ApiTypeHelper.isDefined(this.indices)) { generator.writeKey("indices"); generator.writeStartArray(); - for (IndicesPrivileges item0 : this.indices) { + for (IndicesPrivilegesRead item0 : this.indices) { item0.serialize(generator, mapper); } @@ -351,7 +350,7 @@ public String toString() { public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { private List cluster; - private List indices; + private List indices; @Nullable private List remoteIndices; @@ -430,7 +429,7 @@ public final Builder cluster(ClusterPrivilege value, ClusterPrivilege... values) *

    * Adds all elements of list to indices. */ - public final Builder indices(List list) { + public final Builder indices(List list) { this.indices = _listAddAll(this.indices, list); return this; } @@ -440,7 +439,7 @@ public final Builder indices(List list) { *

    * Adds one or more values to indices. */ - public final Builder indices(IndicesPrivileges value, IndicesPrivileges... values) { + public final Builder indices(IndicesPrivilegesRead value, IndicesPrivilegesRead... values) { this.indices = _listAdd(this.indices, value, values); return this; } @@ -450,8 +449,8 @@ public final Builder indices(IndicesPrivileges value, IndicesPrivileges... value *

    * Adds a value to indices using a builder lambda. */ - public final Builder indices(Function> fn) { - return indices(fn.apply(new IndicesPrivileges.Builder()).build()); + public final Builder indices(Function> fn) { + return indices(fn.apply(new IndicesPrivilegesRead.Builder()).build()); } /** @@ -697,7 +696,7 @@ protected static void setupRoleDeserializer(ObjectDeserializer op) op.add(Builder::cluster, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "cluster"); - op.add(Builder::indices, JsonpDeserializer.arrayDeserializer(IndicesPrivileges._DESERIALIZER), "indices"); + op.add(Builder::indices, JsonpDeserializer.arrayDeserializer(IndicesPrivilegesRead._DESERIALIZER), "indices"); op.add(Builder::remoteIndices, JsonpDeserializer.arrayDeserializer(RemoteIndicesPrivileges._DESERIALIZER), "remote_indices"); op.add(Builder::remoteCluster, JsonpDeserializer.arrayDeserializer(RemoteClusterPrivileges._DESERIALIZER), diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/PutNodeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/PutNodeRequest.java index b70f1e3556..94b0a33bd0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/PutNodeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/PutNodeRequest.java @@ -127,9 +127,10 @@ public static PutNodeRequest of(Function> * Only valid if type is restart. Controls how long Elasticsearch will wait for * the node to restart and join the cluster before reassigning its shards to * other nodes. This works the same as delaying allocation with the - * index.unassigned.node_left.delayed_timeout setting. If you specify both a - * restart allocation delay and an index-level allocation delay, the longer of - * the two is used. + * index.unassigned.node_left.delayed_timeout setting. If you don't specify a + * restart allocation delay, a default value of 5 minutes will be used. If both + * a restart allocation delay and an index-level allocation delay are + * configured, the longer of the two is used. *

    * API name: {@code allocation_delay} */ @@ -285,9 +286,10 @@ private Builder(PutNodeRequest instance) { * Only valid if type is restart. Controls how long Elasticsearch will wait for * the node to restart and join the cluster before reassigning its shards to * other nodes. This works the same as delaying allocation with the - * index.unassigned.node_left.delayed_timeout setting. If you specify both a - * restart allocation delay and an index-level allocation delay, the longer of - * the two is used. + * index.unassigned.node_left.delayed_timeout setting. If you don't specify a + * restart allocation delay, a default value of 5 minutes will be used. If both + * a restart allocation delay and an index-level allocation delay are + * configured, the longer of the two is used. *

    * API name: {@code allocation_delay} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RepositoryAnalyzeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RepositoryAnalyzeRequest.java index fdeb00df03..2cfb93f296 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RepositoryAnalyzeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/RepositoryAnalyzeRequest.java @@ -258,6 +258,9 @@ public class RepositoryAnalyzeRequest extends RequestBase { @Nullable private final Integer blobCount; + @Nullable + private final Boolean checkOverwriteProtection; + @Nullable private final Integer concurrency; @@ -298,6 +301,7 @@ public class RepositoryAnalyzeRequest extends RequestBase { private RepositoryAnalyzeRequest(Builder builder) { this.blobCount = builder.blobCount; + this.checkOverwriteProtection = builder.checkOverwriteProtection; this.concurrency = builder.concurrency; this.detailed = builder.detailed; this.earlyReadNodeCount = builder.earlyReadNodeCount; @@ -328,6 +332,17 @@ public final Integer blobCount() { return this.blobCount; } + /** + * Whether to run the overwrite protection check. For realistic experiments, + * leave this parameter unset. + *

    + * API name: {@code check_overwrite_protection} + */ + @Nullable + public final Boolean checkOverwriteProtection() { + return this.checkOverwriteProtection; + } + /** * The number of operations to run concurrently during the test. For realistic * experiments, leave this parameter unset. @@ -478,6 +493,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private Integer blobCount; + @Nullable + private Boolean checkOverwriteProtection; + @Nullable private Integer concurrency; @@ -517,6 +535,7 @@ public Builder() { } private Builder(RepositoryAnalyzeRequest instance) { this.blobCount = instance.blobCount; + this.checkOverwriteProtection = instance.checkOverwriteProtection; this.concurrency = instance.concurrency; this.detailed = instance.detailed; this.earlyReadNodeCount = instance.earlyReadNodeCount; @@ -542,6 +561,17 @@ public final Builder blobCount(@Nullable Integer value) { return this; } + /** + * Whether to run the overwrite protection check. For realistic experiments, + * leave this parameter unset. + *

    + * API name: {@code check_overwrite_protection} + */ + public final Builder checkOverwriteProtection(@Nullable Boolean value) { + this.checkOverwriteProtection = value; + return this; + } + /** * The number of operations to run concurrently during the test. For realistic * experiments, leave this parameter unset. @@ -769,33 +799,18 @@ public Builder rebuild() { // Request parameters request -> { Map params = new HashMap<>(); - if (request.rareActionProbability != null) { - params.put("rare_action_probability", String.valueOf(request.rareActionProbability)); - } if (request.seed != null) { params.put("seed", String.valueOf(request.seed)); } - if (request.detailed != null) { - params.put("detailed", String.valueOf(request.detailed)); - } - if (request.maxBlobSize != null) { - params.put("max_blob_size", request.maxBlobSize); - } - if (request.earlyReadNodeCount != null) { - params.put("early_read_node_count", String.valueOf(request.earlyReadNodeCount)); - } if (request.blobCount != null) { params.put("blob_count", String.valueOf(request.blobCount)); } - if (request.rarelyAbortWrites != null) { - params.put("rarely_abort_writes", String.valueOf(request.rarelyAbortWrites)); + if (request.checkOverwriteProtection != null) { + params.put("check_overwrite_protection", String.valueOf(request.checkOverwriteProtection)); } if (request.maxTotalDataSize != null) { params.put("max_total_data_size", request.maxTotalDataSize); } - if (request.readNodeCount != null) { - params.put("read_node_count", String.valueOf(request.readNodeCount)); - } if (request.registerOperationCount != null) { params.put("register_operation_count", String.valueOf(request.registerOperationCount)); } @@ -805,6 +820,24 @@ public Builder rebuild() { if (request.concurrency != null) { params.put("concurrency", String.valueOf(request.concurrency)); } + if (request.rareActionProbability != null) { + params.put("rare_action_probability", String.valueOf(request.rareActionProbability)); + } + if (request.detailed != null) { + params.put("detailed", String.valueOf(request.detailed)); + } + if (request.maxBlobSize != null) { + params.put("max_blob_size", request.maxBlobSize); + } + if (request.earlyReadNodeCount != null) { + params.put("early_read_node_count", String.valueOf(request.earlyReadNodeCount)); + } + if (request.rarelyAbortWrites != null) { + params.put("rarely_abort_writes", String.valueOf(request.rarelyAbortWrites)); + } + if (request.readNodeCount != null) { + params.put("read_node_count", String.valueOf(request.readNodeCount)); + } return params; }, SimpleEndpoint.emptyMap(), false, RepositoryAnalyzeResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettings.java index e6e8ed7c13..a8a241547f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettings.java @@ -19,16 +19,20 @@ package co.elastic.clients.elasticsearch.snapshot; +import co.elastic.clients.json.JsonEnum; 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.TaggedUnion; +import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; -import java.lang.Boolean; -import java.lang.Integer; -import java.lang.String; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -51,30 +55,76 @@ // typedef: snapshot._types.SourceOnlyRepositorySettings /** - * + * The delegated repository type. Source repositories can use + * settings properties for its delegated repository type. + * * @see API * specification */ @JsonpDeserializable -public class SourceOnlyRepositorySettings extends RepositorySettingsBase { - @Nullable - private final String delegateType; +public class SourceOnlyRepositorySettings + implements + TaggedUnion, + JsonpSerializable { + + /** + * {@link SourceOnlyRepositorySettings} variant kinds. + * + * @see API + * specification + */ + + public enum Kind implements JsonEnum { + Azure("azure"), - @Nullable - private final Integer maxNumberOfSnapshots; + Gcs("gcs"), - @Nullable - private final Boolean readOnly; + Url("url"), - // --------------------------------------------------------------------------------------------- + S3("s3"), + + Fs("fs"), + + ; + + private final String jsonValue; + + Kind(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + } + + private final Kind _kind; + private final SourceOnlyRepositorySettingsVariant _value; + + @Override + public final Kind _kind() { + return _kind; + } + + @Override + public final SourceOnlyRepositorySettingsVariant _get() { + return _value; + } + + public SourceOnlyRepositorySettings(SourceOnlyRepositorySettingsVariant value) { + + this._kind = ApiTypeHelper.requireNonNull(value._sourceOnlyRepositorySettingsKind(), this, ""); + this._value = ApiTypeHelper.requireNonNull(value, this, ""); + + } private SourceOnlyRepositorySettings(Builder builder) { - super(builder); - this.delegateType = builder.delegateType; - this.maxNumberOfSnapshots = builder.maxNumberOfSnapshots; - this.readOnly = builder.readOnly; + this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); + this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); } @@ -83,185 +133,186 @@ public static SourceOnlyRepositorySettings of(Functiontype parameter. Source repositories can use - * settings properties for its delegated repository type. - *

    - * API name: {@code delegate_type} + * Is this variant instance of kind {@code azure}? */ - @Nullable - public final String delegateType() { - return this.delegateType; + public boolean isAzure() { + return _kind == Kind.Azure; } /** - * The maximum number of snapshots the repository can contain. The default is - * Integer.MAX_VALUE, which is 2^31-1 or 2147483647. - *

    - * API name: {@code max_number_of_snapshots} + * Get the {@code azure} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code azure} kind. */ - @Nullable - public final Integer maxNumberOfSnapshots() { - return this.maxNumberOfSnapshots; + public SourceOnlyRepositorySettingsForAzure azure() { + return TaggedUnionUtils.get(this, Kind.Azure); } /** - * If true, the repository is read-only. The cluster can retrieve - * and restore snapshots from the repository but not write to the repository or - * create snapshots in it. - *

    - * Only a cluster with write access can create snapshots in the repository. All - * other clusters connected to the repository should have the - * readonly parameter set to true. - *

    - * If false, the cluster can write to the repository and create - * snapshots in it. - *

    - * IMPORTANT: If you register the same snapshot repository with multiple - * clusters, only one cluster should have write access to the repository. Having - * multiple clusters write to the repository at the same time risks corrupting - * the contents of the repository. - *

    - * API name: {@code read_only} + * Is this variant instance of kind {@code gcs}? */ - @Nullable - public final Boolean readOnly() { - return this.readOnly; + public boolean isGcs() { + return _kind == Kind.Gcs; } - protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - - super.serializeInternal(generator, mapper); - if (this.delegateType != null) { - generator.writeKey("delegate_type"); - generator.write(this.delegateType); + /** + * Get the {@code gcs} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code gcs} kind. + */ + public SourceOnlyRepositorySettingsForGcs gcs() { + return TaggedUnionUtils.get(this, Kind.Gcs); + } - } - if (this.maxNumberOfSnapshots != null) { - generator.writeKey("max_number_of_snapshots"); - generator.write(this.maxNumberOfSnapshots); + /** + * Is this variant instance of kind {@code url}? + */ + public boolean isUrl() { + return _kind == Kind.Url; + } - } - if (this.readOnly != null) { - generator.writeKey("read_only"); - generator.write(this.readOnly); + /** + * Get the {@code url} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code url} kind. + */ + public SourceOnlyRepositorySettingsForReadOnlyUrl url() { + return TaggedUnionUtils.get(this, Kind.Url); + } - } + /** + * Is this variant instance of kind {@code s3}? + */ + public boolean isS3() { + return _kind == Kind.S3; + } + /** + * Get the {@code s3} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code s3} kind. + */ + public SourceOnlyRepositorySettingsForS3 s3() { + return TaggedUnionUtils.get(this, Kind.S3); } - // --------------------------------------------------------------------------------------------- + /** + * Is this variant instance of kind {@code fs}? + */ + public boolean isFs() { + return _kind == Kind.Fs; + } /** - * Builder for {@link SourceOnlyRepositorySettings}. + * Get the {@code fs} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code fs} kind. */ + public SourceOnlyRepositorySettingsForSharedFileSystem fs() { + return TaggedUnionUtils.get(this, Kind.Fs); + } + + @Override + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + + mapper.serialize(_value, generator); - public static class Builder extends RepositorySettingsBase.AbstractBuilder + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - @Nullable - private String delegateType; + private Kind _kind; + private SourceOnlyRepositorySettingsVariant _value; - @Nullable - private Integer maxNumberOfSnapshots; + @Override + protected Builder self() { + return this; + } + public ObjectBuilder azure(SourceOnlyRepositorySettingsForAzure v) { + this._kind = Kind.Azure; + this._value = v; + return this; + } - @Nullable - private Boolean readOnly; + public ObjectBuilder azure( + Function> fn) { + return this.azure(fn.apply(new SourceOnlyRepositorySettingsForAzure.Builder()).build()); + } - public Builder() { + public ObjectBuilder gcs(SourceOnlyRepositorySettingsForGcs v) { + this._kind = Kind.Gcs; + this._value = v; + return this; } - private Builder(SourceOnlyRepositorySettings instance) { - this.delegateType = instance.delegateType; - this.maxNumberOfSnapshots = instance.maxNumberOfSnapshots; - this.readOnly = instance.readOnly; + public ObjectBuilder gcs( + Function> fn) { + return this.gcs(fn.apply(new SourceOnlyRepositorySettingsForGcs.Builder()).build()); } - /** - * The delegated repository type. For valid values, refer to the - * type parameter. Source repositories can use - * settings properties for its delegated repository type. - *

    - * API name: {@code delegate_type} - */ - public final Builder delegateType(@Nullable String value) { - this.delegateType = value; + + public ObjectBuilder url(SourceOnlyRepositorySettingsForReadOnlyUrl v) { + this._kind = Kind.Url; + this._value = v; return this; } - /** - * The maximum number of snapshots the repository can contain. The default is - * Integer.MAX_VALUE, which is 2^31-1 or 2147483647. - *

    - * API name: {@code max_number_of_snapshots} - */ - public final Builder maxNumberOfSnapshots(@Nullable Integer value) { - this.maxNumberOfSnapshots = value; - return this; + public ObjectBuilder url( + Function> fn) { + return this.url(fn.apply(new SourceOnlyRepositorySettingsForReadOnlyUrl.Builder()).build()); } - /** - * If true, the repository is read-only. The cluster can retrieve - * and restore snapshots from the repository but not write to the repository or - * create snapshots in it. - *

    - * Only a cluster with write access can create snapshots in the repository. All - * other clusters connected to the repository should have the - * readonly parameter set to true. - *

    - * If false, the cluster can write to the repository and create - * snapshots in it. - *

    - * IMPORTANT: If you register the same snapshot repository with multiple - * clusters, only one cluster should have write access to the repository. Having - * multiple clusters write to the repository at the same time risks corrupting - * the contents of the repository. - *

    - * API name: {@code read_only} - */ - public final Builder readOnly(@Nullable Boolean value) { - this.readOnly = value; + public ObjectBuilder s3(SourceOnlyRepositorySettingsForS3 v) { + this._kind = Kind.S3; + this._value = v; return this; } - @Override - protected Builder self() { + public ObjectBuilder s3( + Function> fn) { + return this.s3(fn.apply(new SourceOnlyRepositorySettingsForS3.Builder()).build()); + } + + public ObjectBuilder fs(SourceOnlyRepositorySettingsForSharedFileSystem v) { + this._kind = Kind.Fs; + this._value = v; return this; } - /** - * Builds a {@link SourceOnlyRepositorySettings}. - * - * @throws NullPointerException - * if some of the required fields are null. - */ + public ObjectBuilder fs( + Function> fn) { + return this.fs(fn.apply(new SourceOnlyRepositorySettingsForSharedFileSystem.Builder()).build()); + } + public SourceOnlyRepositorySettings build() { _checkSingleUse(); - return new SourceOnlyRepositorySettings(this); } - } - /** - * @return New {@link Builder} initialized with field values of this instance - */ - public Builder rebuild() { - return new Builder(this); } - // --------------------------------------------------------------------------------------------- - /** - * Json deserializer for {@link SourceOnlyRepositorySettings} - */ - public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer - .lazy(Builder::new, SourceOnlyRepositorySettings::setupSourceOnlyRepositorySettingsDeserializer); + protected static void setupSourceOnlyRepositorySettingsDeserializer(ObjectDeserializer op) { + + op.add(Builder::azure, SourceOnlyRepositorySettingsForAzure._DESERIALIZER, "azure"); + op.add(Builder::gcs, SourceOnlyRepositorySettingsForGcs._DESERIALIZER, "gcs"); + op.add(Builder::url, SourceOnlyRepositorySettingsForReadOnlyUrl._DESERIALIZER, "url"); + op.add(Builder::s3, SourceOnlyRepositorySettingsForS3._DESERIALIZER, "s3"); + op.add(Builder::fs, SourceOnlyRepositorySettingsForSharedFileSystem._DESERIALIZER, "fs"); - protected static void setupSourceOnlyRepositorySettingsDeserializer( - ObjectDeserializer op) { - RepositorySettingsBase.setupRepositorySettingsBaseDeserializer(op); - op.add(Builder::delegateType, JsonpDeserializer.stringDeserializer(), "delegate_type"); - op.add(Builder::maxNumberOfSnapshots, JsonpDeserializer.integerDeserializer(), "max_number_of_snapshots"); - op.add(Builder::readOnly, JsonpDeserializer.booleanDeserializer(), "read_only", "readonly"); + op.setTypeProperty("delegate_type", null); } + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy( + Builder::new, SourceOnlyRepositorySettings::setupSourceOnlyRepositorySettingsDeserializer, Builder::build); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsBuilders.java new file mode 100644 index 0000000000..32d13643e8 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsBuilders.java @@ -0,0 +1,148 @@ +/* + * 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.snapshot; + +import co.elastic.clients.util.ObjectBuilder; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Builders for {@link SourceOnlyRepositorySettings} variants. + */ +public class SourceOnlyRepositorySettingsBuilders { + private SourceOnlyRepositorySettingsBuilders() { + } + + /** + * Creates a builder for the {@link SourceOnlyRepositorySettingsForAzure azure} + * {@code SourceOnlyRepositorySettings} variant. + */ + public static SourceOnlyRepositorySettingsForAzure.Builder azure() { + return new SourceOnlyRepositorySettingsForAzure.Builder(); + } + + /** + * Creates a SourceOnlyRepositorySettings of the + * {@link SourceOnlyRepositorySettingsForAzure azure} + * {@code SourceOnlyRepositorySettings} variant. + */ + public static SourceOnlyRepositorySettings azure( + Function> fn) { + SourceOnlyRepositorySettings.Builder builder = new SourceOnlyRepositorySettings.Builder(); + builder.azure(fn.apply(new SourceOnlyRepositorySettingsForAzure.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link SourceOnlyRepositorySettingsForGcs gcs} + * {@code SourceOnlyRepositorySettings} variant. + */ + public static SourceOnlyRepositorySettingsForGcs.Builder gcs() { + return new SourceOnlyRepositorySettingsForGcs.Builder(); + } + + /** + * Creates a SourceOnlyRepositorySettings of the + * {@link SourceOnlyRepositorySettingsForGcs gcs} + * {@code SourceOnlyRepositorySettings} variant. + */ + public static SourceOnlyRepositorySettings gcs( + Function> fn) { + SourceOnlyRepositorySettings.Builder builder = new SourceOnlyRepositorySettings.Builder(); + builder.gcs(fn.apply(new SourceOnlyRepositorySettingsForGcs.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link SourceOnlyRepositorySettingsForReadOnlyUrl + * url} {@code SourceOnlyRepositorySettings} variant. + */ + public static SourceOnlyRepositorySettingsForReadOnlyUrl.Builder url() { + return new SourceOnlyRepositorySettingsForReadOnlyUrl.Builder(); + } + + /** + * Creates a SourceOnlyRepositorySettings of the + * {@link SourceOnlyRepositorySettingsForReadOnlyUrl url} + * {@code SourceOnlyRepositorySettings} variant. + */ + public static SourceOnlyRepositorySettings url( + Function> fn) { + SourceOnlyRepositorySettings.Builder builder = new SourceOnlyRepositorySettings.Builder(); + builder.url(fn.apply(new SourceOnlyRepositorySettingsForReadOnlyUrl.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link SourceOnlyRepositorySettingsForS3 s3} + * {@code SourceOnlyRepositorySettings} variant. + */ + public static SourceOnlyRepositorySettingsForS3.Builder s3() { + return new SourceOnlyRepositorySettingsForS3.Builder(); + } + + /** + * Creates a SourceOnlyRepositorySettings of the + * {@link SourceOnlyRepositorySettingsForS3 s3} + * {@code SourceOnlyRepositorySettings} variant. + */ + public static SourceOnlyRepositorySettings s3( + Function> fn) { + SourceOnlyRepositorySettings.Builder builder = new SourceOnlyRepositorySettings.Builder(); + builder.s3(fn.apply(new SourceOnlyRepositorySettingsForS3.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the + * {@link SourceOnlyRepositorySettingsForSharedFileSystem fs} + * {@code SourceOnlyRepositorySettings} variant. + */ + public static SourceOnlyRepositorySettingsForSharedFileSystem.Builder fs() { + return new SourceOnlyRepositorySettingsForSharedFileSystem.Builder(); + } + + /** + * Creates a SourceOnlyRepositorySettings of the + * {@link SourceOnlyRepositorySettingsForSharedFileSystem fs} + * {@code SourceOnlyRepositorySettings} variant. + */ + public static SourceOnlyRepositorySettings fs( + Function> fn) { + SourceOnlyRepositorySettings.Builder builder = new SourceOnlyRepositorySettings.Builder(); + builder.fs(fn.apply(new SourceOnlyRepositorySettingsForSharedFileSystem.Builder()).build()); + return builder.build(); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForAzure.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForAzure.java new file mode 100644 index 0000000000..31faf8dd00 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForAzure.java @@ -0,0 +1,452 @@ +/* + * 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.snapshot; + +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.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.Integer; +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: snapshot._types.SourceOnlyRepositorySettingsForAzure + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SourceOnlyRepositorySettingsForAzure implements SourceOnlyRepositorySettingsVariant, JsonpSerializable { + @Nullable + private final String basePath; + + @Nullable + private final String client; + + @Nullable + private final String container; + + @Nullable + private final Integer deleteObjectsMaxSize; + + @Nullable + private final String locationMode; + + @Nullable + private final Integer maxConcurrentBatchDeletes; + + @Nullable + private final Boolean readonly; + + // --------------------------------------------------------------------------------------------- + + private SourceOnlyRepositorySettingsForAzure(Builder builder) { + + this.basePath = builder.basePath; + this.client = builder.client; + this.container = builder.container; + this.deleteObjectsMaxSize = builder.deleteObjectsMaxSize; + this.locationMode = builder.locationMode; + this.maxConcurrentBatchDeletes = builder.maxConcurrentBatchDeletes; + this.readonly = builder.readonly; + + } + + public static SourceOnlyRepositorySettingsForAzure of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * SourceOnlyRepositorySettings variant kind. + */ + @Override + public SourceOnlyRepositorySettings.Kind _sourceOnlyRepositorySettingsKind() { + return SourceOnlyRepositorySettings.Kind.Azure; + } + + /** + * The path to the repository data within the container. It defaults to the root + * directory. + *

    + * NOTE: Don't set base_path when configuring a snapshot repository + * for Elastic Cloud Enterprise. Elastic Cloud Enterprise automatically + * generates the base_path for each deployment so that multiple + * deployments can share the same bucket. + *

    + * API name: {@code base_path} + */ + @Nullable + public final String basePath() { + return this.basePath; + } + + /** + * The name of the Azure repository client to use. + *

    + * API name: {@code client} + */ + @Nullable + public final String client() { + return this.client; + } + + /** + * The Azure container. + *

    + * API name: {@code container} + */ + @Nullable + public final String container() { + return this.container; + } + + /** + * The maxmimum batch size, between 1 and 256, used for BlobBatch + * requests. Defaults to 256 which is the maximum number supported by the Azure + * blob batch API. + *

    + * API name: {@code delete_objects_max_size} + */ + @Nullable + public final Integer deleteObjectsMaxSize() { + return this.deleteObjectsMaxSize; + } + + /** + * Either primary_only or secondary_only. Note that if + * you set it to secondary_only, it will force + * readonly to true. + *

    + * API name: {@code location_mode} + */ + @Nullable + public final String locationMode() { + return this.locationMode; + } + + /** + * The maximum number of concurrent batch delete requests that will be submitted + * for any individual bulk delete with BlobBatch. Note that the + * effective number of concurrent deletes is further limited by the Azure client + * connection and event loop thread limits. Defaults to 10, minimum is 1, + * maximum is 100. + *

    + * API name: {@code max_concurrent_batch_deletes} + */ + @Nullable + public final Integer maxConcurrentBatchDeletes() { + return this.maxConcurrentBatchDeletes; + } + + /** + * If true, the repository is read-only. The cluster can retrieve + * and restore snapshots from the repository but not write to the repository or + * create snapshots in it. + *

    + * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. If + * false, the cluster can write to the repository and create + * snapshots in it. + *

    + * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

    + * API name: {@code readonly} + */ + @Nullable + public final Boolean readonly() { + return this.readonly; + } + + /** + * 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.write("delegate_type", "azure"); + + if (this.basePath != null) { + generator.writeKey("base_path"); + generator.write(this.basePath); + + } + if (this.client != null) { + generator.writeKey("client"); + generator.write(this.client); + + } + if (this.container != null) { + generator.writeKey("container"); + generator.write(this.container); + + } + if (this.deleteObjectsMaxSize != null) { + generator.writeKey("delete_objects_max_size"); + generator.write(this.deleteObjectsMaxSize); + + } + if (this.locationMode != null) { + generator.writeKey("location_mode"); + generator.write(this.locationMode); + + } + if (this.maxConcurrentBatchDeletes != null) { + generator.writeKey("max_concurrent_batch_deletes"); + generator.write(this.maxConcurrentBatchDeletes); + + } + if (this.readonly != null) { + generator.writeKey("readonly"); + generator.write(this.readonly); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SourceOnlyRepositorySettingsForAzure}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private String basePath; + + @Nullable + private String client; + + @Nullable + private String container; + + @Nullable + private Integer deleteObjectsMaxSize; + + @Nullable + private String locationMode; + + @Nullable + private Integer maxConcurrentBatchDeletes; + + @Nullable + private Boolean readonly; + + public Builder() { + } + private Builder(SourceOnlyRepositorySettingsForAzure instance) { + this.basePath = instance.basePath; + this.client = instance.client; + this.container = instance.container; + this.deleteObjectsMaxSize = instance.deleteObjectsMaxSize; + this.locationMode = instance.locationMode; + this.maxConcurrentBatchDeletes = instance.maxConcurrentBatchDeletes; + this.readonly = instance.readonly; + + } + /** + * The path to the repository data within the container. It defaults to the root + * directory. + *

    + * NOTE: Don't set base_path when configuring a snapshot repository + * for Elastic Cloud Enterprise. Elastic Cloud Enterprise automatically + * generates the base_path for each deployment so that multiple + * deployments can share the same bucket. + *

    + * API name: {@code base_path} + */ + public final Builder basePath(@Nullable String value) { + this.basePath = value; + return this; + } + + /** + * The name of the Azure repository client to use. + *

    + * API name: {@code client} + */ + public final Builder client(@Nullable String value) { + this.client = value; + return this; + } + + /** + * The Azure container. + *

    + * API name: {@code container} + */ + public final Builder container(@Nullable String value) { + this.container = value; + return this; + } + + /** + * The maxmimum batch size, between 1 and 256, used for BlobBatch + * requests. Defaults to 256 which is the maximum number supported by the Azure + * blob batch API. + *

    + * API name: {@code delete_objects_max_size} + */ + public final Builder deleteObjectsMaxSize(@Nullable Integer value) { + this.deleteObjectsMaxSize = value; + return this; + } + + /** + * Either primary_only or secondary_only. Note that if + * you set it to secondary_only, it will force + * readonly to true. + *

    + * API name: {@code location_mode} + */ + public final Builder locationMode(@Nullable String value) { + this.locationMode = value; + return this; + } + + /** + * The maximum number of concurrent batch delete requests that will be submitted + * for any individual bulk delete with BlobBatch. Note that the + * effective number of concurrent deletes is further limited by the Azure client + * connection and event loop thread limits. Defaults to 10, minimum is 1, + * maximum is 100. + *

    + * API name: {@code max_concurrent_batch_deletes} + */ + public final Builder maxConcurrentBatchDeletes(@Nullable Integer value) { + this.maxConcurrentBatchDeletes = value; + return this; + } + + /** + * If true, the repository is read-only. The cluster can retrieve + * and restore snapshots from the repository but not write to the repository or + * create snapshots in it. + *

    + * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. If + * false, the cluster can write to the repository and create + * snapshots in it. + *

    + * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

    + * API name: {@code readonly} + */ + public final Builder readonly(@Nullable Boolean value) { + this.readonly = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SourceOnlyRepositorySettingsForAzure}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SourceOnlyRepositorySettingsForAzure build() { + _checkSingleUse(); + + return new SourceOnlyRepositorySettingsForAzure(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SourceOnlyRepositorySettingsForAzure} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, + SourceOnlyRepositorySettingsForAzure::setupSourceOnlyRepositorySettingsForAzureDeserializer); + + protected static void setupSourceOnlyRepositorySettingsForAzureDeserializer( + ObjectDeserializer op) { + + op.add(Builder::basePath, JsonpDeserializer.stringDeserializer(), "base_path"); + op.add(Builder::client, JsonpDeserializer.stringDeserializer(), "client"); + op.add(Builder::container, JsonpDeserializer.stringDeserializer(), "container"); + op.add(Builder::deleteObjectsMaxSize, JsonpDeserializer.integerDeserializer(), "delete_objects_max_size"); + op.add(Builder::locationMode, JsonpDeserializer.stringDeserializer(), "location_mode"); + op.add(Builder::maxConcurrentBatchDeletes, JsonpDeserializer.integerDeserializer(), + "max_concurrent_batch_deletes"); + op.add(Builder::readonly, JsonpDeserializer.booleanDeserializer(), "readonly"); + + op.ignore("delegate_type"); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForGcs.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForGcs.java new file mode 100644 index 0000000000..ddc36a5afd --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForGcs.java @@ -0,0 +1,370 @@ +/* + * 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.snapshot; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.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: snapshot._types.SourceOnlyRepositorySettingsForGcs + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SourceOnlyRepositorySettingsForGcs implements SourceOnlyRepositorySettingsVariant, JsonpSerializable { + private final String bucket; + + @Nullable + private final String applicationName; + + @Nullable + private final String basePath; + + @Nullable + private final String client; + + @Nullable + private final Boolean readonly; + + // --------------------------------------------------------------------------------------------- + + private SourceOnlyRepositorySettingsForGcs(Builder builder) { + + this.bucket = ApiTypeHelper.requireNonNull(builder.bucket, this, "bucket"); + this.applicationName = builder.applicationName; + this.basePath = builder.basePath; + this.client = builder.client; + this.readonly = builder.readonly; + + } + + public static SourceOnlyRepositorySettingsForGcs of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * SourceOnlyRepositorySettings variant kind. + */ + @Override + public SourceOnlyRepositorySettings.Kind _sourceOnlyRepositorySettingsKind() { + return SourceOnlyRepositorySettings.Kind.Gcs; + } + + /** + * Required - The name of the bucket to be used for snapshots. + *

    + * API name: {@code bucket} + */ + public final String bucket() { + return this.bucket; + } + + /** + * The name used by the client when it uses the Google Cloud Storage service. + *

    + * API name: {@code application_name} + * + * @deprecated 6.3.0 + */ + @Deprecated + @Nullable + public final String applicationName() { + return this.applicationName; + } + + /** + * The path to the repository data within the bucket. It defaults to the root of + * the bucket. + *

    + * NOTE: Don't set base_path when configuring a snapshot repository + * for Elastic Cloud Enterprise. Elastic Cloud Enterprise automatically + * generates the base_path for each deployment so that multiple + * deployments can share the same bucket. + *

    + * API name: {@code base_path} + */ + @Nullable + public final String basePath() { + return this.basePath; + } + + /** + * The name of the client to use to connect to Google Cloud Storage. + *

    + * API name: {@code client} + */ + @Nullable + public final String client() { + return this.client; + } + + /** + * If true, the repository is read-only. The cluster can retrieve + * and restore snapshots from the repository but not write to the repository or + * create snapshots in it. + *

    + * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. + *

    + * If false, the cluster can write to the repository and create + * snapshots in it. + *

    + * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

    + * API name: {@code readonly} + */ + @Nullable + public final Boolean readonly() { + return this.readonly; + } + + /** + * 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.write("delegate_type", "gcs"); + + generator.writeKey("bucket"); + generator.write(this.bucket); + + if (this.applicationName != null) { + generator.writeKey("application_name"); + generator.write(this.applicationName); + + } + if (this.basePath != null) { + generator.writeKey("base_path"); + generator.write(this.basePath); + + } + if (this.client != null) { + generator.writeKey("client"); + generator.write(this.client); + + } + if (this.readonly != null) { + generator.writeKey("readonly"); + generator.write(this.readonly); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SourceOnlyRepositorySettingsForGcs}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private String bucket; + + @Nullable + private String applicationName; + + @Nullable + private String basePath; + + @Nullable + private String client; + + @Nullable + private Boolean readonly; + + public Builder() { + } + private Builder(SourceOnlyRepositorySettingsForGcs instance) { + this.bucket = instance.bucket; + this.applicationName = instance.applicationName; + this.basePath = instance.basePath; + this.client = instance.client; + this.readonly = instance.readonly; + + } + /** + * Required - The name of the bucket to be used for snapshots. + *

    + * API name: {@code bucket} + */ + public final Builder bucket(String value) { + this.bucket = value; + return this; + } + + /** + * The name used by the client when it uses the Google Cloud Storage service. + *

    + * API name: {@code application_name} + * + * @deprecated 6.3.0 + */ + @Deprecated + public final Builder applicationName(@Nullable String value) { + this.applicationName = value; + return this; + } + + /** + * The path to the repository data within the bucket. It defaults to the root of + * the bucket. + *

    + * NOTE: Don't set base_path when configuring a snapshot repository + * for Elastic Cloud Enterprise. Elastic Cloud Enterprise automatically + * generates the base_path for each deployment so that multiple + * deployments can share the same bucket. + *

    + * API name: {@code base_path} + */ + public final Builder basePath(@Nullable String value) { + this.basePath = value; + return this; + } + + /** + * The name of the client to use to connect to Google Cloud Storage. + *

    + * API name: {@code client} + */ + public final Builder client(@Nullable String value) { + this.client = value; + return this; + } + + /** + * If true, the repository is read-only. The cluster can retrieve + * and restore snapshots from the repository but not write to the repository or + * create snapshots in it. + *

    + * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. + *

    + * If false, the cluster can write to the repository and create + * snapshots in it. + *

    + * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

    + * API name: {@code readonly} + */ + public final Builder readonly(@Nullable Boolean value) { + this.readonly = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SourceOnlyRepositorySettingsForGcs}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SourceOnlyRepositorySettingsForGcs build() { + _checkSingleUse(); + + return new SourceOnlyRepositorySettingsForGcs(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SourceOnlyRepositorySettingsForGcs} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, + SourceOnlyRepositorySettingsForGcs::setupSourceOnlyRepositorySettingsForGcsDeserializer); + + protected static void setupSourceOnlyRepositorySettingsForGcsDeserializer( + ObjectDeserializer op) { + + op.add(Builder::bucket, JsonpDeserializer.stringDeserializer(), "bucket"); + op.add(Builder::applicationName, JsonpDeserializer.stringDeserializer(), "application_name"); + op.add(Builder::basePath, JsonpDeserializer.stringDeserializer(), "base_path"); + op.add(Builder::client, JsonpDeserializer.stringDeserializer(), "client"); + op.add(Builder::readonly, JsonpDeserializer.booleanDeserializer(), "readonly"); + + op.ignore("delegate_type"); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForReadOnlyUrl.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForReadOnlyUrl.java new file mode 100644 index 0000000000..4742e46118 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForReadOnlyUrl.java @@ -0,0 +1,342 @@ +/* + * 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.snapshot; + +import co.elastic.clients.elasticsearch._types.Time; +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.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: snapshot._types.SourceOnlyRepositorySettingsForReadOnlyUrl + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SourceOnlyRepositorySettingsForReadOnlyUrl + implements + SourceOnlyRepositorySettingsVariant, + JsonpSerializable { + @Nullable + private final Integer httpMaxRetries; + + @Nullable + private final Time httpSocketTimeout; + + @Nullable + private final Integer maxNumberOfSnapshots; + + private final String url; + + // --------------------------------------------------------------------------------------------- + + private SourceOnlyRepositorySettingsForReadOnlyUrl(Builder builder) { + + this.httpMaxRetries = builder.httpMaxRetries; + this.httpSocketTimeout = builder.httpSocketTimeout; + this.maxNumberOfSnapshots = builder.maxNumberOfSnapshots; + this.url = ApiTypeHelper.requireNonNull(builder.url, this, "url"); + + } + + public static SourceOnlyRepositorySettingsForReadOnlyUrl of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * SourceOnlyRepositorySettings variant kind. + */ + @Override + public SourceOnlyRepositorySettings.Kind _sourceOnlyRepositorySettingsKind() { + return SourceOnlyRepositorySettings.Kind.Url; + } + + /** + * The maximum number of retries for HTTP and HTTPS URLs. + *

    + * API name: {@code http_max_retries} + */ + @Nullable + public final Integer httpMaxRetries() { + return this.httpMaxRetries; + } + + /** + * The maximum wait time for data transfers over a connection. + *

    + * API name: {@code http_socket_timeout} + */ + @Nullable + public final Time httpSocketTimeout() { + return this.httpSocketTimeout; + } + + /** + * The maximum number of snapshots the repository can contain. The default is + * Integer.MAX_VALUE, which is 2^31-1 or 2147483647. + *

    + * API name: {@code max_number_of_snapshots} + */ + @Nullable + public final Integer maxNumberOfSnapshots() { + return this.maxNumberOfSnapshots; + } + + /** + * Required - The URL location of the root of the shared filesystem repository. + * The following protocols are supported: + *

      + *
    • file
    • + *
    • ftp
    • + *
    • http
    • + *
    • https
    • + *
    • jar
    • + *
    + *

    + * URLs using the HTTP, HTTPS, or FTP protocols must be explicitly allowed with + * the repositories.url.allowed_urls cluster setting. This setting + * supports wildcards in the place of a host, path, query, or fragment in the + * URL. + *

    + * URLs using the file protocol must point to the location of a shared + * filesystem accessible to all master and data nodes in the cluster. This + * location must be registered in the path.repo setting. You don't + * need to register URLs using the FTP, HTTP, HTTPS, or JAR protocols in the + * path.repo setting. + *

    + * API name: {@code url} + */ + public final String url() { + return this.url; + } + + /** + * 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.write("delegate_type", "url"); + + if (this.httpMaxRetries != null) { + generator.writeKey("http_max_retries"); + generator.write(this.httpMaxRetries); + + } + if (this.httpSocketTimeout != null) { + generator.writeKey("http_socket_timeout"); + this.httpSocketTimeout.serialize(generator, mapper); + + } + if (this.maxNumberOfSnapshots != null) { + generator.writeKey("max_number_of_snapshots"); + generator.write(this.maxNumberOfSnapshots); + + } + generator.writeKey("url"); + generator.write(this.url); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SourceOnlyRepositorySettingsForReadOnlyUrl}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private Integer httpMaxRetries; + + @Nullable + private Time httpSocketTimeout; + + @Nullable + private Integer maxNumberOfSnapshots; + + private String url; + + public Builder() { + } + private Builder(SourceOnlyRepositorySettingsForReadOnlyUrl instance) { + this.httpMaxRetries = instance.httpMaxRetries; + this.httpSocketTimeout = instance.httpSocketTimeout; + this.maxNumberOfSnapshots = instance.maxNumberOfSnapshots; + this.url = instance.url; + + } + /** + * The maximum number of retries for HTTP and HTTPS URLs. + *

    + * API name: {@code http_max_retries} + */ + public final Builder httpMaxRetries(@Nullable Integer value) { + this.httpMaxRetries = value; + return this; + } + + /** + * The maximum wait time for data transfers over a connection. + *

    + * API name: {@code http_socket_timeout} + */ + public final Builder httpSocketTimeout(@Nullable Time value) { + this.httpSocketTimeout = value; + return this; + } + + /** + * The maximum wait time for data transfers over a connection. + *

    + * API name: {@code http_socket_timeout} + */ + public final Builder httpSocketTimeout(Function> fn) { + return this.httpSocketTimeout(fn.apply(new Time.Builder()).build()); + } + + /** + * The maximum number of snapshots the repository can contain. The default is + * Integer.MAX_VALUE, which is 2^31-1 or 2147483647. + *

    + * API name: {@code max_number_of_snapshots} + */ + public final Builder maxNumberOfSnapshots(@Nullable Integer value) { + this.maxNumberOfSnapshots = value; + return this; + } + + /** + * Required - The URL location of the root of the shared filesystem repository. + * The following protocols are supported: + *

      + *
    • file
    • + *
    • ftp
    • + *
    • http
    • + *
    • https
    • + *
    • jar
    • + *
    + *

    + * URLs using the HTTP, HTTPS, or FTP protocols must be explicitly allowed with + * the repositories.url.allowed_urls cluster setting. This setting + * supports wildcards in the place of a host, path, query, or fragment in the + * URL. + *

    + * URLs using the file protocol must point to the location of a shared + * filesystem accessible to all master and data nodes in the cluster. This + * location must be registered in the path.repo setting. You don't + * need to register URLs using the FTP, HTTP, HTTPS, or JAR protocols in the + * path.repo setting. + *

    + * API name: {@code url} + */ + public final Builder url(String value) { + this.url = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SourceOnlyRepositorySettingsForReadOnlyUrl}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SourceOnlyRepositorySettingsForReadOnlyUrl build() { + _checkSingleUse(); + + return new SourceOnlyRepositorySettingsForReadOnlyUrl(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SourceOnlyRepositorySettingsForReadOnlyUrl} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, + SourceOnlyRepositorySettingsForReadOnlyUrl::setupSourceOnlyRepositorySettingsForReadOnlyUrlDeserializer); + + protected static void setupSourceOnlyRepositorySettingsForReadOnlyUrlDeserializer( + ObjectDeserializer op) { + + op.add(Builder::httpMaxRetries, JsonpDeserializer.integerDeserializer(), "http_max_retries"); + op.add(Builder::httpSocketTimeout, Time._DESERIALIZER, "http_socket_timeout"); + op.add(Builder::maxNumberOfSnapshots, JsonpDeserializer.integerDeserializer(), "max_number_of_snapshots"); + op.add(Builder::url, JsonpDeserializer.stringDeserializer(), "url"); + + op.ignore("delegate_type"); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForS3.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForS3.java new file mode 100644 index 0000000000..e31db8e114 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForS3.java @@ -0,0 +1,814 @@ +/* + * 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.snapshot; + +import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.Integer; +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: snapshot._types.SourceOnlyRepositorySettingsForS3 + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SourceOnlyRepositorySettingsForS3 implements SourceOnlyRepositorySettingsVariant, JsonpSerializable { + private final String bucket; + + @Nullable + private final String basePath; + + @Nullable + private final String bufferSize; + + @Nullable + private final String cannedAcl; + + @Nullable + private final String client; + + @Nullable + private final Integer deleteObjectsMaxSize; + + @Nullable + private final Time getRegisterRetryDelay; + + @Nullable + private final Integer maxMultipartParts; + + @Nullable + private final Integer maxMultipartUploadCleanupSize; + + @Nullable + private final Boolean readonly; + + @Nullable + private final Boolean serverSideEncryption; + + @Nullable + private final String storageClass; + + @Nullable + private final Time throttledDeleteRetryDelayIncrement; + + @Nullable + private final Time throttledDeleteRetryMaximumDelay; + + @Nullable + private final Integer throttledDeleteRetryMaximumNumberOfRetries; + + // --------------------------------------------------------------------------------------------- + + private SourceOnlyRepositorySettingsForS3(Builder builder) { + + this.bucket = ApiTypeHelper.requireNonNull(builder.bucket, this, "bucket"); + this.basePath = builder.basePath; + this.bufferSize = builder.bufferSize; + this.cannedAcl = builder.cannedAcl; + this.client = builder.client; + this.deleteObjectsMaxSize = builder.deleteObjectsMaxSize; + this.getRegisterRetryDelay = builder.getRegisterRetryDelay; + this.maxMultipartParts = builder.maxMultipartParts; + this.maxMultipartUploadCleanupSize = builder.maxMultipartUploadCleanupSize; + this.readonly = builder.readonly; + this.serverSideEncryption = builder.serverSideEncryption; + this.storageClass = builder.storageClass; + this.throttledDeleteRetryDelayIncrement = builder.throttledDeleteRetryDelayIncrement; + this.throttledDeleteRetryMaximumDelay = builder.throttledDeleteRetryMaximumDelay; + this.throttledDeleteRetryMaximumNumberOfRetries = builder.throttledDeleteRetryMaximumNumberOfRetries; + + } + + public static SourceOnlyRepositorySettingsForS3 of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * SourceOnlyRepositorySettings variant kind. + */ + @Override + public SourceOnlyRepositorySettings.Kind _sourceOnlyRepositorySettingsKind() { + return SourceOnlyRepositorySettings.Kind.S3; + } + + /** + * Required - The name of the S3 bucket to use for snapshots. The bucket name + * must adhere to Amazon's S3 bucket naming rules. + *

    + * API name: {@code bucket} + */ + public final String bucket() { + return this.bucket; + } + + /** + * The path to the repository data within its bucket. It defaults to an empty + * string, meaning that the repository is at the root of the bucket. The value + * of this setting should not start or end with a forward slash + * (/). + *

    + * NOTE: Don't set base_path when configuring a snapshot repository for Elastic + * Cloud Enterprise. Elastic Cloud Enterprise automatically generates the + * base_path for each deployment so that multiple deployments may + * share the same bucket. + *

    + * API name: {@code base_path} + */ + @Nullable + public final String basePath() { + return this.basePath; + } + + /** + * The minimum threshold below which the chunk is uploaded using a single + * request. Beyond this threshold, the S3 repository will use the AWS Multipart + * Upload API to split the chunk into several parts, each of + * buffer_size length, and to upload each part in its own request. + * Note that setting a buffer size lower than 5mb is not allowed since it will + * prevent the use of the Multipart API and may result in upload errors. It is + * also not possible to set a buffer size greater than 5gb as it is the maximum + * upload size allowed by S3. Defaults to 100mb or 5% of JVM heap, + * whichever is smaller. + *

    + * API name: {@code buffer_size} + */ + @Nullable + public final String bufferSize() { + return this.bufferSize; + } + + /** + * The S3 repository supports all S3 canned ACLs: private, + * public-read, public-read-write, + * authenticated-read, log-delivery-write, + * bucket-owner-read, bucket-owner-full-control. You + * could specify a canned ACL using the canned_acl setting. When + * the S3 repository creates buckets and objects, it adds the canned ACL into + * the buckets and objects. + *

    + * API name: {@code canned_acl} + */ + @Nullable + public final String cannedAcl() { + return this.cannedAcl; + } + + /** + * The name of the S3 client to use to connect to S3. + *

    + * API name: {@code client} + */ + @Nullable + public final String client() { + return this.client; + } + + /** + * The maxmimum batch size, between 1 and 1000, used for + * DeleteObjects requests. Defaults to 1000 which is the maximum + * number supported by the AWS DeleteObjects API. + *

    + * API name: {@code delete_objects_max_size} + */ + @Nullable + public final Integer deleteObjectsMaxSize() { + return this.deleteObjectsMaxSize; + } + + /** + * The time to wait before trying again if an attempt to read a linearizable + * register fails. + *

    + * API name: {@code get_register_retry_delay} + */ + @Nullable + public final Time getRegisterRetryDelay() { + return this.getRegisterRetryDelay; + } + + /** + * The maximum number of parts that Elasticsearch will write during a multipart + * upload of a single object. Files which are larger than + * buffer_size × max_multipart_parts will be chunked into several + * smaller objects. Elasticsearch may also split a file across multiple objects + * to satisfy other constraints such as the chunk_size limit. + * Defaults to 10000 which is the maximum number of parts in a + * multipart upload in AWS S3. + *

    + * API name: {@code max_multipart_parts} + */ + @Nullable + public final Integer maxMultipartParts() { + return this.maxMultipartParts; + } + + /** + * The maximum number of possibly-dangling multipart uploads to clean up in each + * batch of snapshot deletions. Defaults to 1000 which is the maximum number + * supported by the AWS ListMultipartUploads API. If set to 0, + * Elasticsearch will not attempt to clean up dangling multipart uploads. + *

    + * API name: {@code max_multipart_upload_cleanup_size} + */ + @Nullable + public final Integer maxMultipartUploadCleanupSize() { + return this.maxMultipartUploadCleanupSize; + } + + /** + * If true, the repository is read-only. The cluster can retrieve and restore + * snapshots from the repository but not write to the repository or create + * snapshots in it. + *

    + * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. + *

    + * If false, the cluster can write to the repository and create + * snapshots in it. + *

    + * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

    + * API name: {@code readonly} + */ + @Nullable + public final Boolean readonly() { + return this.readonly; + } + + /** + * When set to true, files are encrypted on server side using an + * AES256 algorithm. + *

    + * API name: {@code server_side_encryption} + */ + @Nullable + public final Boolean serverSideEncryption() { + return this.serverSideEncryption; + } + + /** + * The S3 storage class for objects written to the repository. Values may be + * standard, reduced_redundancy, + * standard_ia, onezone_ia, and + * intelligent_tiering. + *

    + * API name: {@code storage_class} + */ + @Nullable + public final String storageClass() { + return this.storageClass; + } + + /** + * The delay before the first retry and the amount the delay is incremented by + * on each subsequent retry. The default is 50ms and the minimum is 0ms. + *

    + * API name: {@code throttled_delete_retry.delay_increment} + */ + @Nullable + public final Time throttledDeleteRetryDelayIncrement() { + return this.throttledDeleteRetryDelayIncrement; + } + + /** + * The upper bound on how long the delays between retries will grow to. The + * default is 5s and the minimum is 0ms. + *

    + * API name: {@code throttled_delete_retry.maximum_delay} + */ + @Nullable + public final Time throttledDeleteRetryMaximumDelay() { + return this.throttledDeleteRetryMaximumDelay; + } + + /** + * The number times to retry a throttled snapshot deletion. The default is 10 + * and the minimum value is 0 which will disable retries altogether. Note that + * if retries are enabled in the Azure client, each of these retries comprises + * that many client-level retries. + *

    + * API name: {@code throttled_delete_retry.maximum_number_of_retries} + */ + @Nullable + public final Integer throttledDeleteRetryMaximumNumberOfRetries() { + return this.throttledDeleteRetryMaximumNumberOfRetries; + } + + /** + * 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.write("delegate_type", "s3"); + + generator.writeKey("bucket"); + generator.write(this.bucket); + + if (this.basePath != null) { + generator.writeKey("base_path"); + generator.write(this.basePath); + + } + if (this.bufferSize != null) { + generator.writeKey("buffer_size"); + generator.write(this.bufferSize); + + } + if (this.cannedAcl != null) { + generator.writeKey("canned_acl"); + generator.write(this.cannedAcl); + + } + if (this.client != null) { + generator.writeKey("client"); + generator.write(this.client); + + } + if (this.deleteObjectsMaxSize != null) { + generator.writeKey("delete_objects_max_size"); + generator.write(this.deleteObjectsMaxSize); + + } + if (this.getRegisterRetryDelay != null) { + generator.writeKey("get_register_retry_delay"); + this.getRegisterRetryDelay.serialize(generator, mapper); + + } + if (this.maxMultipartParts != null) { + generator.writeKey("max_multipart_parts"); + generator.write(this.maxMultipartParts); + + } + if (this.maxMultipartUploadCleanupSize != null) { + generator.writeKey("max_multipart_upload_cleanup_size"); + generator.write(this.maxMultipartUploadCleanupSize); + + } + if (this.readonly != null) { + generator.writeKey("readonly"); + generator.write(this.readonly); + + } + if (this.serverSideEncryption != null) { + generator.writeKey("server_side_encryption"); + generator.write(this.serverSideEncryption); + + } + if (this.storageClass != null) { + generator.writeKey("storage_class"); + generator.write(this.storageClass); + + } + if (this.throttledDeleteRetryDelayIncrement != null) { + generator.writeKey("throttled_delete_retry.delay_increment"); + this.throttledDeleteRetryDelayIncrement.serialize(generator, mapper); + + } + if (this.throttledDeleteRetryMaximumDelay != null) { + generator.writeKey("throttled_delete_retry.maximum_delay"); + this.throttledDeleteRetryMaximumDelay.serialize(generator, mapper); + + } + if (this.throttledDeleteRetryMaximumNumberOfRetries != null) { + generator.writeKey("throttled_delete_retry.maximum_number_of_retries"); + generator.write(this.throttledDeleteRetryMaximumNumberOfRetries); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SourceOnlyRepositorySettingsForS3}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private String bucket; + + @Nullable + private String basePath; + + @Nullable + private String bufferSize; + + @Nullable + private String cannedAcl; + + @Nullable + private String client; + + @Nullable + private Integer deleteObjectsMaxSize; + + @Nullable + private Time getRegisterRetryDelay; + + @Nullable + private Integer maxMultipartParts; + + @Nullable + private Integer maxMultipartUploadCleanupSize; + + @Nullable + private Boolean readonly; + + @Nullable + private Boolean serverSideEncryption; + + @Nullable + private String storageClass; + + @Nullable + private Time throttledDeleteRetryDelayIncrement; + + @Nullable + private Time throttledDeleteRetryMaximumDelay; + + @Nullable + private Integer throttledDeleteRetryMaximumNumberOfRetries; + + public Builder() { + } + private Builder(SourceOnlyRepositorySettingsForS3 instance) { + this.bucket = instance.bucket; + this.basePath = instance.basePath; + this.bufferSize = instance.bufferSize; + this.cannedAcl = instance.cannedAcl; + this.client = instance.client; + this.deleteObjectsMaxSize = instance.deleteObjectsMaxSize; + this.getRegisterRetryDelay = instance.getRegisterRetryDelay; + this.maxMultipartParts = instance.maxMultipartParts; + this.maxMultipartUploadCleanupSize = instance.maxMultipartUploadCleanupSize; + this.readonly = instance.readonly; + this.serverSideEncryption = instance.serverSideEncryption; + this.storageClass = instance.storageClass; + this.throttledDeleteRetryDelayIncrement = instance.throttledDeleteRetryDelayIncrement; + this.throttledDeleteRetryMaximumDelay = instance.throttledDeleteRetryMaximumDelay; + this.throttledDeleteRetryMaximumNumberOfRetries = instance.throttledDeleteRetryMaximumNumberOfRetries; + + } + /** + * Required - The name of the S3 bucket to use for snapshots. The bucket name + * must adhere to Amazon's S3 bucket naming rules. + *

    + * API name: {@code bucket} + */ + public final Builder bucket(String value) { + this.bucket = value; + return this; + } + + /** + * The path to the repository data within its bucket. It defaults to an empty + * string, meaning that the repository is at the root of the bucket. The value + * of this setting should not start or end with a forward slash + * (/). + *

    + * NOTE: Don't set base_path when configuring a snapshot repository for Elastic + * Cloud Enterprise. Elastic Cloud Enterprise automatically generates the + * base_path for each deployment so that multiple deployments may + * share the same bucket. + *

    + * API name: {@code base_path} + */ + public final Builder basePath(@Nullable String value) { + this.basePath = value; + return this; + } + + /** + * The minimum threshold below which the chunk is uploaded using a single + * request. Beyond this threshold, the S3 repository will use the AWS Multipart + * Upload API to split the chunk into several parts, each of + * buffer_size length, and to upload each part in its own request. + * Note that setting a buffer size lower than 5mb is not allowed since it will + * prevent the use of the Multipart API and may result in upload errors. It is + * also not possible to set a buffer size greater than 5gb as it is the maximum + * upload size allowed by S3. Defaults to 100mb or 5% of JVM heap, + * whichever is smaller. + *

    + * API name: {@code buffer_size} + */ + public final Builder bufferSize(@Nullable String value) { + this.bufferSize = value; + return this; + } + + /** + * The S3 repository supports all S3 canned ACLs: private, + * public-read, public-read-write, + * authenticated-read, log-delivery-write, + * bucket-owner-read, bucket-owner-full-control. You + * could specify a canned ACL using the canned_acl setting. When + * the S3 repository creates buckets and objects, it adds the canned ACL into + * the buckets and objects. + *

    + * API name: {@code canned_acl} + */ + public final Builder cannedAcl(@Nullable String value) { + this.cannedAcl = value; + return this; + } + + /** + * The name of the S3 client to use to connect to S3. + *

    + * API name: {@code client} + */ + public final Builder client(@Nullable String value) { + this.client = value; + return this; + } + + /** + * The maxmimum batch size, between 1 and 1000, used for + * DeleteObjects requests. Defaults to 1000 which is the maximum + * number supported by the AWS DeleteObjects API. + *

    + * API name: {@code delete_objects_max_size} + */ + public final Builder deleteObjectsMaxSize(@Nullable Integer value) { + this.deleteObjectsMaxSize = value; + return this; + } + + /** + * The time to wait before trying again if an attempt to read a linearizable + * register fails. + *

    + * API name: {@code get_register_retry_delay} + */ + public final Builder getRegisterRetryDelay(@Nullable Time value) { + this.getRegisterRetryDelay = value; + return this; + } + + /** + * The time to wait before trying again if an attempt to read a linearizable + * register fails. + *

    + * API name: {@code get_register_retry_delay} + */ + public final Builder getRegisterRetryDelay(Function> fn) { + return this.getRegisterRetryDelay(fn.apply(new Time.Builder()).build()); + } + + /** + * The maximum number of parts that Elasticsearch will write during a multipart + * upload of a single object. Files which are larger than + * buffer_size × max_multipart_parts will be chunked into several + * smaller objects. Elasticsearch may also split a file across multiple objects + * to satisfy other constraints such as the chunk_size limit. + * Defaults to 10000 which is the maximum number of parts in a + * multipart upload in AWS S3. + *

    + * API name: {@code max_multipart_parts} + */ + public final Builder maxMultipartParts(@Nullable Integer value) { + this.maxMultipartParts = value; + return this; + } + + /** + * The maximum number of possibly-dangling multipart uploads to clean up in each + * batch of snapshot deletions. Defaults to 1000 which is the maximum number + * supported by the AWS ListMultipartUploads API. If set to 0, + * Elasticsearch will not attempt to clean up dangling multipart uploads. + *

    + * API name: {@code max_multipart_upload_cleanup_size} + */ + public final Builder maxMultipartUploadCleanupSize(@Nullable Integer value) { + this.maxMultipartUploadCleanupSize = value; + return this; + } + + /** + * If true, the repository is read-only. The cluster can retrieve and restore + * snapshots from the repository but not write to the repository or create + * snapshots in it. + *

    + * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. + *

    + * If false, the cluster can write to the repository and create + * snapshots in it. + *

    + * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

    + * API name: {@code readonly} + */ + public final Builder readonly(@Nullable Boolean value) { + this.readonly = value; + return this; + } + + /** + * When set to true, files are encrypted on server side using an + * AES256 algorithm. + *

    + * API name: {@code server_side_encryption} + */ + public final Builder serverSideEncryption(@Nullable Boolean value) { + this.serverSideEncryption = value; + return this; + } + + /** + * The S3 storage class for objects written to the repository. Values may be + * standard, reduced_redundancy, + * standard_ia, onezone_ia, and + * intelligent_tiering. + *

    + * API name: {@code storage_class} + */ + public final Builder storageClass(@Nullable String value) { + this.storageClass = value; + return this; + } + + /** + * The delay before the first retry and the amount the delay is incremented by + * on each subsequent retry. The default is 50ms and the minimum is 0ms. + *

    + * API name: {@code throttled_delete_retry.delay_increment} + */ + public final Builder throttledDeleteRetryDelayIncrement(@Nullable Time value) { + this.throttledDeleteRetryDelayIncrement = value; + return this; + } + + /** + * The delay before the first retry and the amount the delay is incremented by + * on each subsequent retry. The default is 50ms and the minimum is 0ms. + *

    + * API name: {@code throttled_delete_retry.delay_increment} + */ + public final Builder throttledDeleteRetryDelayIncrement(Function> fn) { + return this.throttledDeleteRetryDelayIncrement(fn.apply(new Time.Builder()).build()); + } + + /** + * The upper bound on how long the delays between retries will grow to. The + * default is 5s and the minimum is 0ms. + *

    + * API name: {@code throttled_delete_retry.maximum_delay} + */ + public final Builder throttledDeleteRetryMaximumDelay(@Nullable Time value) { + this.throttledDeleteRetryMaximumDelay = value; + return this; + } + + /** + * The upper bound on how long the delays between retries will grow to. The + * default is 5s and the minimum is 0ms. + *

    + * API name: {@code throttled_delete_retry.maximum_delay} + */ + public final Builder throttledDeleteRetryMaximumDelay(Function> fn) { + return this.throttledDeleteRetryMaximumDelay(fn.apply(new Time.Builder()).build()); + } + + /** + * The number times to retry a throttled snapshot deletion. The default is 10 + * and the minimum value is 0 which will disable retries altogether. Note that + * if retries are enabled in the Azure client, each of these retries comprises + * that many client-level retries. + *

    + * API name: {@code throttled_delete_retry.maximum_number_of_retries} + */ + public final Builder throttledDeleteRetryMaximumNumberOfRetries(@Nullable Integer value) { + this.throttledDeleteRetryMaximumNumberOfRetries = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SourceOnlyRepositorySettingsForS3}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SourceOnlyRepositorySettingsForS3 build() { + _checkSingleUse(); + + return new SourceOnlyRepositorySettingsForS3(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SourceOnlyRepositorySettingsForS3} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, SourceOnlyRepositorySettingsForS3::setupSourceOnlyRepositorySettingsForS3Deserializer); + + protected static void setupSourceOnlyRepositorySettingsForS3Deserializer( + ObjectDeserializer op) { + + op.add(Builder::bucket, JsonpDeserializer.stringDeserializer(), "bucket"); + op.add(Builder::basePath, JsonpDeserializer.stringDeserializer(), "base_path"); + op.add(Builder::bufferSize, JsonpDeserializer.stringDeserializer(), "buffer_size"); + op.add(Builder::cannedAcl, JsonpDeserializer.stringDeserializer(), "canned_acl"); + op.add(Builder::client, JsonpDeserializer.stringDeserializer(), "client"); + op.add(Builder::deleteObjectsMaxSize, JsonpDeserializer.integerDeserializer(), "delete_objects_max_size"); + op.add(Builder::getRegisterRetryDelay, Time._DESERIALIZER, "get_register_retry_delay"); + op.add(Builder::maxMultipartParts, JsonpDeserializer.integerDeserializer(), "max_multipart_parts"); + op.add(Builder::maxMultipartUploadCleanupSize, JsonpDeserializer.integerDeserializer(), + "max_multipart_upload_cleanup_size"); + op.add(Builder::readonly, JsonpDeserializer.booleanDeserializer(), "readonly"); + op.add(Builder::serverSideEncryption, JsonpDeserializer.booleanDeserializer(), "server_side_encryption"); + op.add(Builder::storageClass, JsonpDeserializer.stringDeserializer(), "storage_class"); + op.add(Builder::throttledDeleteRetryDelayIncrement, Time._DESERIALIZER, + "throttled_delete_retry.delay_increment"); + op.add(Builder::throttledDeleteRetryMaximumDelay, Time._DESERIALIZER, "throttled_delete_retry.maximum_delay"); + op.add(Builder::throttledDeleteRetryMaximumNumberOfRetries, JsonpDeserializer.integerDeserializer(), + "throttled_delete_retry.maximum_number_of_retries"); + + op.ignore("delegate_type"); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForSharedFileSystem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForSharedFileSystem.java new file mode 100644 index 0000000000..27f80c4317 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsForSharedFileSystem.java @@ -0,0 +1,296 @@ +/* + * 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.snapshot; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.Integer; +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: snapshot._types.SourceOnlyRepositorySettingsForSharedFileSystem + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class SourceOnlyRepositorySettingsForSharedFileSystem + implements + SourceOnlyRepositorySettingsVariant, + JsonpSerializable { + private final String location; + + @Nullable + private final Integer maxNumberOfSnapshots; + + @Nullable + private final Boolean readonly; + + // --------------------------------------------------------------------------------------------- + + private SourceOnlyRepositorySettingsForSharedFileSystem(Builder builder) { + + this.location = ApiTypeHelper.requireNonNull(builder.location, this, "location"); + this.maxNumberOfSnapshots = builder.maxNumberOfSnapshots; + this.readonly = builder.readonly; + + } + + public static SourceOnlyRepositorySettingsForSharedFileSystem of( + Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * SourceOnlyRepositorySettings variant kind. + */ + @Override + public SourceOnlyRepositorySettings.Kind _sourceOnlyRepositorySettingsKind() { + return SourceOnlyRepositorySettings.Kind.Fs; + } + + /** + * Required - The location of the shared filesystem used to store and retrieve + * snapshots. This location must be registered in the path.repo + * setting on all master and data nodes in the cluster. Unlike + * path.repo, this setting supports only a single file path. + *

    + * API name: {@code location} + */ + public final String location() { + return this.location; + } + + /** + * The maximum number of snapshots the repository can contain. The default is + * Integer.MAX_VALUE, which is 2^31-1 or 2147483647. + *

    + * API name: {@code max_number_of_snapshots} + */ + @Nullable + public final Integer maxNumberOfSnapshots() { + return this.maxNumberOfSnapshots; + } + + /** + * If true, the repository is read-only. The cluster can retrieve + * and restore snapshots from the repository but not write to the repository or + * create snapshots in it. + *

    + * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. + *

    + * If false, the cluster can write to the repository and create + * snapshots in it. + *

    + * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

    + * API name: {@code readonly} + */ + @Nullable + public final Boolean readonly() { + return this.readonly; + } + + /** + * 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.write("delegate_type", "fs"); + + generator.writeKey("location"); + generator.write(this.location); + + if (this.maxNumberOfSnapshots != null) { + generator.writeKey("max_number_of_snapshots"); + generator.write(this.maxNumberOfSnapshots); + + } + if (this.readonly != null) { + generator.writeKey("readonly"); + generator.write(this.readonly); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link SourceOnlyRepositorySettingsForSharedFileSystem}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private String location; + + @Nullable + private Integer maxNumberOfSnapshots; + + @Nullable + private Boolean readonly; + + public Builder() { + } + private Builder(SourceOnlyRepositorySettingsForSharedFileSystem instance) { + this.location = instance.location; + this.maxNumberOfSnapshots = instance.maxNumberOfSnapshots; + this.readonly = instance.readonly; + + } + /** + * Required - The location of the shared filesystem used to store and retrieve + * snapshots. This location must be registered in the path.repo + * setting on all master and data nodes in the cluster. Unlike + * path.repo, this setting supports only a single file path. + *

    + * API name: {@code location} + */ + public final Builder location(String value) { + this.location = value; + return this; + } + + /** + * The maximum number of snapshots the repository can contain. The default is + * Integer.MAX_VALUE, which is 2^31-1 or 2147483647. + *

    + * API name: {@code max_number_of_snapshots} + */ + public final Builder maxNumberOfSnapshots(@Nullable Integer value) { + this.maxNumberOfSnapshots = value; + return this; + } + + /** + * If true, the repository is read-only. The cluster can retrieve + * and restore snapshots from the repository but not write to the repository or + * create snapshots in it. + *

    + * Only a cluster with write access can create snapshots in the repository. All + * other clusters connected to the repository should have the + * readonly parameter set to true. + *

    + * If false, the cluster can write to the repository and create + * snapshots in it. + *

    + * IMPORTANT: If you register the same snapshot repository with multiple + * clusters, only one cluster should have write access to the repository. Having + * multiple clusters write to the repository at the same time risks corrupting + * the contents of the repository. + *

    + * API name: {@code readonly} + */ + public final Builder readonly(@Nullable Boolean value) { + this.readonly = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link SourceOnlyRepositorySettingsForSharedFileSystem}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public SourceOnlyRepositorySettingsForSharedFileSystem build() { + _checkSingleUse(); + + return new SourceOnlyRepositorySettingsForSharedFileSystem(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link SourceOnlyRepositorySettingsForSharedFileSystem} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, + SourceOnlyRepositorySettingsForSharedFileSystem::setupSourceOnlyRepositorySettingsForSharedFileSystemDeserializer); + + protected static void setupSourceOnlyRepositorySettingsForSharedFileSystemDeserializer( + ObjectDeserializer op) { + + op.add(Builder::location, JsonpDeserializer.stringDeserializer(), "location"); + op.add(Builder::maxNumberOfSnapshots, JsonpDeserializer.integerDeserializer(), "max_number_of_snapshots"); + op.add(Builder::readonly, JsonpDeserializer.booleanDeserializer(), "readonly"); + + op.ignore("delegate_type"); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsVariant.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsVariant.java new file mode 100644 index 0000000000..fd7d38d880 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SourceOnlyRepositorySettingsVariant.java @@ -0,0 +1,50 @@ +/* + * 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.snapshot; + +import co.elastic.clients.json.JsonpSerializable; + +//---------------------------------------------------------------- +// 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. +// +//---------------------------------------------------------------- + +/** + * Base interface for {@link SourceOnlyRepositorySettings} variants. + */ +public interface SourceOnlyRepositorySettingsVariant extends JsonpSerializable { + + SourceOnlyRepositorySettings.Kind _sourceOnlyRepositorySettingsKind(); + + default SourceOnlyRepositorySettings _toSourceOnlyRepositorySettings() { + return new SourceOnlyRepositorySettings(this); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsAsyncClient.java index 0a937ff7db..85be8ea516 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsAsyncClient.java @@ -306,7 +306,9 @@ public CompletableFuture getSynonymsSets() { /** * Create or update a synonym set. *

    - * Synonyms sets are limited to a maximum of 10,000 synonym rules per set. + * Synonym sets are limited to a maximum of 100,000 synonym rules per set by + * default. This limit is configurable using the + * synonyms.max_synonym_rules cluster setting. *

    * When an existing synonyms set is updated, the search analyzers that use the * synonyms set are reloaded automatically for all indices. This is equivalent @@ -331,7 +333,9 @@ public CompletableFuture putSynonym(PutSynonymRequest reques /** * Create or update a synonym set. *

    - * Synonyms sets are limited to a maximum of 10,000 synonym rules per set. + * Synonym sets are limited to a maximum of 100,000 synonym rules per set by + * default. This limit is configurable using the + * synonyms.max_synonym_rules cluster setting. *

    * When an existing synonyms set is updated, the search analyzers that use the * synonyms set are reloaded automatically for all indices. This is equivalent diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsClient.java index e26a4985c4..5ca0b86a14 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsClient.java @@ -312,7 +312,9 @@ public GetSynonymsSetsResponse getSynonymsSets() throws IOException, Elasticsear /** * Create or update a synonym set. *

    - * Synonyms sets are limited to a maximum of 10,000 synonym rules per set. + * Synonym sets are limited to a maximum of 100,000 synonym rules per set by + * default. This limit is configurable using the + * synonyms.max_synonym_rules cluster setting. *

    * When an existing synonyms set is updated, the search analyzers that use the * synonyms set are reloaded automatically for all indices. This is equivalent @@ -337,7 +339,9 @@ public PutSynonymResponse putSynonym(PutSynonymRequest request) throws IOExcepti /** * Create or update a synonym set. *

    - * Synonyms sets are limited to a maximum of 10,000 synonym rules per set. + * Synonym sets are limited to a maximum of 100,000 synonym rules per set by + * default. This limit is configurable using the + * synonyms.max_synonym_rules cluster setting. *

    * When an existing synonyms set is updated, the search analyzers that use the * synonyms set are reloaded automatically for all indices. This is equivalent diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRequest.java index c490f3427a..5d98183610 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRequest.java @@ -68,6 +68,9 @@ public class GetSynonymRequest extends RequestBase { private final String id; + @Nullable + private final String searchAfter; + @Nullable private final Integer size; @@ -77,6 +80,7 @@ private GetSynonymRequest(Builder builder) { this.from = builder.from; this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.searchAfter = builder.searchAfter; this.size = builder.size; } @@ -86,7 +90,7 @@ public static GetSynonymRequest of(Function * API name: {@code from} */ @@ -105,7 +109,19 @@ public final String id() { } /** - * The max number of query rules to retrieve. + * The synonym rule ID to use as a cursor for pagination. The next page of + * results will start after this rule ID. This parameter cannot be used with + * from. + *

    + * API name: {@code search_after} + */ + @Nullable + public final String searchAfter() { + return this.searchAfter; + } + + /** + * The max number of synonym rules to retrieve. *

    * API name: {@code size} */ @@ -128,6 +144,9 @@ public static class Builder extends RequestBase.AbstractBuilder private String id; + @Nullable + private String searchAfter; + @Nullable private Integer size; @@ -136,11 +155,12 @@ public Builder() { private Builder(GetSynonymRequest instance) { this.from = instance.from; this.id = instance.id; + this.searchAfter = instance.searchAfter; this.size = instance.size; } /** - * The starting offset for query rules to retrieve. + * The starting offset for synonym rules to retrieve. *

    * API name: {@code from} */ @@ -160,7 +180,19 @@ public final Builder id(String value) { } /** - * The max number of query rules to retrieve. + * The synonym rule ID to use as a cursor for pagination. The next page of + * results will start after this rule ID. This parameter cannot be used with + * from. + *

    + * API name: {@code search_after} + */ + public final Builder searchAfter(@Nullable String value) { + this.searchAfter = value; + return this; + } + + /** + * The max number of synonym rules to retrieve. *

    * API name: {@code size} */ @@ -244,6 +276,9 @@ public Builder rebuild() { // Request parameters request -> { Map params = new HashMap<>(); + if (request.searchAfter != null) { + params.put("search_after", request.searchAfter); + } if (request.size != null) { params.put("size", String.valueOf(request.size)); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRequest.java index 00396382a1..97e1278922 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRequest.java @@ -61,7 +61,9 @@ /** * Create or update a synonym set. *

    - * Synonyms sets are limited to a maximum of 10,000 synonym rules per set. + * Synonym sets are limited to a maximum of 100,000 synonym rules per set by + * default. This limit is configurable using the + * synonyms.max_synonym_rules cluster setting. *

    * When an existing synonyms set is updated, the search analyzers that use the * synonyms set are reloaded automatically for all indices. This is equivalent @@ -76,6 +78,9 @@ */ @JsonpDeserializable public class PutSynonymRequest extends RequestBase implements JsonpSerializable { + @Nullable + private final Boolean append; + private final String id; @Nullable @@ -87,6 +92,7 @@ public class PutSynonymRequest extends RequestBase implements JsonpSerializable private PutSynonymRequest(Builder builder) { + this.append = builder.append; this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); this.refresh = builder.refresh; this.synonymsSet = ApiTypeHelper.unmodifiableRequired(builder.synonymsSet, this, "synonymsSet"); @@ -97,6 +103,18 @@ public static PutSynonymRequest of(Functiontrue, the provided synonym rules are appended to the existing + * set, with matching IDs overwriting existing rules. If false, the + * entire synonyms set is replaced with the new synonym rules definitions. + *

    + * API name: {@code append} + */ + @Nullable + public final Boolean append() { + return this.append; + } + /** * Required - The ID of the synonyms set to be created or updated. *

    @@ -161,6 +179,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Boolean append; + private String id; @Nullable @@ -171,11 +192,24 @@ public static class Builder extends RequestBase.AbstractBuilder public Builder() { } private Builder(PutSynonymRequest instance) { + this.append = instance.append; this.id = instance.id; this.refresh = instance.refresh; this.synonymsSet = instance.synonymsSet; } + /** + * If true, the provided synonym rules are appended to the existing + * set, with matching IDs overwriting existing rules. If false, the + * entire synonyms set is replaced with the new synonym rules definitions. + *

    + * API name: {@code append} + */ + public final Builder append(@Nullable Boolean value) { + this.append = value; + return this; + } + /** * Required - The ID of the synonyms set to be created or updated. *

    @@ -326,6 +360,9 @@ protected static void setupPutSynonymRequestDeserializer(ObjectDeserializer + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksAsyncClient.java index 620209c699..a735a7aa9c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksAsyncClient.java @@ -86,6 +86,12 @@ public ElasticsearchTasksAsyncClient withTransportOptions(@Nullable TransportOpt * the other tasks the system is running. You can also use the node hot threads * API to obtain detailed information about the work the system is doing instead * of completing the cancelled task. + *

    + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. * * @see Documentation @@ -118,6 +124,12 @@ public CompletableFuture cancel(CancelRequest request) { * the other tasks the system is running. You can also use the node hot threads * API to obtain detailed information about the work the system is doing instead * of completing the cancelled task. + *

    + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. * * @param fn * a function that initializes a builder to create the @@ -151,6 +163,12 @@ public final CompletableFuture cancel( * the other tasks the system is running. You can also use the node hot threads * API to obtain detailed information about the work the system is doing instead * of completing the cancelled task. + *

    + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. * * @see Documentation @@ -174,6 +192,12 @@ public CompletableFuture cancel() { *

    * If the task identifier is not found, a 404 response code indicates that there * are no resources that match the request. + *

    + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. * * @see Documentation @@ -197,6 +221,12 @@ public CompletableFuture get(GetTasksRequest request) { *

    * If the task identifier is not found, a 404 response code indicates that there * are no resources that match the request. + *

    + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. * * @param fn * a function that initializes a builder to create the @@ -222,6 +252,12 @@ public final CompletableFuture get( * WARNING: The task management API is new and should still be considered a beta * feature. The API may change in ways that are not backwards compatible. *

    + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. + *

    * Identifying running tasks *

    * The X-Opaque-Id header, when provided on the HTTP request @@ -304,6 +340,12 @@ public CompletableFuture list(ListRequest request) { * WARNING: The task management API is new and should still be considered a beta * feature. The API may change in ways that are not backwards compatible. *

    + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. + *

    * Identifying running tasks *

    * The X-Opaque-Id header, when provided on the HTTP request @@ -386,6 +428,12 @@ public final CompletableFuture list(Function + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. + *

    * Identifying running tasks *

    * The X-Opaque-Id header, when provided on the HTTP request diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksClient.java index 7398254854..083bd3cfa4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ElasticsearchTasksClient.java @@ -86,6 +86,12 @@ public ElasticsearchTasksClient withTransportOptions(@Nullable TransportOptions * the other tasks the system is running. You can also use the node hot threads * API to obtain detailed information about the work the system is doing instead * of completing the cancelled task. + *

    + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. * * @see Documentation @@ -118,6 +124,12 @@ public CancelResponse cancel(CancelRequest request) throws IOException, Elastics * the other tasks the system is running. You can also use the node hot threads * API to obtain detailed information about the work the system is doing instead * of completing the cancelled task. + *

    + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. * * @param fn * a function that initializes a builder to create the @@ -151,6 +163,12 @@ public final CancelResponse cancel(Function + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. * * @see Documentation @@ -174,6 +192,12 @@ public CancelResponse cancel() throws IOException, ElasticsearchException { *

    * If the task identifier is not found, a 404 response code indicates that there * are no resources that match the request. + *

    + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. * * @see Documentation @@ -197,6 +221,12 @@ public GetTasksResponse get(GetTasksRequest request) throws IOException, Elastic *

    * If the task identifier is not found, a 404 response code indicates that there * are no resources that match the request. + *

    + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. * * @param fn * a function that initializes a builder to create the @@ -222,6 +252,12 @@ public final GetTasksResponse get(Function + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. + *

    * Identifying running tasks *

    * The X-Opaque-Id header, when provided on the HTTP request @@ -304,6 +340,12 @@ public ListResponse list(ListRequest request) throws IOException, ElasticsearchE * WARNING: The task management API is new and should still be considered a beta * feature. The API may change in ways that are not backwards compatible. *

    + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. + *

    * Identifying running tasks *

    * The X-Opaque-Id header, when provided on the HTTP request @@ -387,6 +429,12 @@ public final ListResponse list(Function + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. + *

    * Identifying running tasks *

    * The X-Opaque-Id header, when provided on the HTTP request diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java index bb9e113644..6822392a64 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java @@ -66,6 +66,12 @@ *

    * If the task identifier is not found, a 404 response code indicates that there * are no resources that match the request. + *

    + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ListRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ListRequest.java index 3e2b54c905..fa7d19ae4a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ListRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/ListRequest.java @@ -68,6 +68,12 @@ * WARNING: The task management API is new and should still be considered a beta * feature. The API may change in ways that are not backwards compatible. *

    + * For relocatable tasks, this API transparently follows the task across + * graceful shutdown relocations, so callers can keep using the original task + * ID. The returned task reports its original_task_id and + * original_start_time_in_millis if it is continuing work from an + * earlier task. + *

    * Identifying running tasks *

    * The X-Opaque-Id header, when provided on the HTTP request diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/TaskInfo.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/TaskInfo.java index 83de0f1a12..a923bd2903 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/TaskInfo.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/TaskInfo.java @@ -95,6 +95,15 @@ public class TaskInfo implements JsonpSerializable { @Nullable private final String parentTaskId; + @Nullable + private final String originalTaskId; + + @Nullable + private final Long originalStartTimeInMillis; + + @Nullable + private final String originalStartTime; + // --------------------------------------------------------------------------------------------- protected TaskInfo(AbstractBuilder builder) { @@ -113,6 +122,9 @@ protected TaskInfo(AbstractBuilder builder) { this.status = builder.status; this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); this.parentTaskId = builder.parentTaskId; + this.originalTaskId = builder.originalTaskId; + this.originalStartTimeInMillis = builder.originalStartTimeInMillis; + this.originalStartTime = builder.originalStartTime; } @@ -232,6 +244,42 @@ public final String parentTaskId() { return this.parentTaskId; } + /** + * The task ID of the original task. Only present when the task is continuing + * the work of an earlier task that was running on a node which has since shut + * down (i.e. a relocatable task). For tasks that have not been relocated this + * is always equal to the task's own ID and is omitted from the response. + *

    + * API name: {@code original_task_id} + */ + @Nullable + public final String originalTaskId() { + return this.originalTaskId; + } + + /** + * The time at which the original task started, in milliseconds since the Unix + * epoch. Only present together with original_task_id. + *

    + * API name: {@code original_start_time_in_millis} + */ + @Nullable + public final Long originalStartTimeInMillis() { + return this.originalStartTimeInMillis; + } + + /** + * The time at which the original task started, as an ISO 8601 formatted string. + * Only present together with original_task_id and when the request + * includes the ?human=true query parameter. + *

    + * API name: {@code original_start_time} + */ + @Nullable + public final String originalStartTime() { + return this.originalStartTime; + } + /** * Serialize this object to JSON. */ @@ -300,6 +348,21 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.parentTaskId); } + if (this.originalTaskId != null) { + generator.writeKey("original_task_id"); + generator.write(this.originalTaskId); + + } + if (this.originalStartTimeInMillis != null) { + generator.writeKey("original_start_time_in_millis"); + generator.write(this.originalStartTimeInMillis); + + } + if (this.originalStartTime != null) { + generator.writeKey("original_start_time"); + generator.write(this.originalStartTime); + + } } @@ -367,6 +430,15 @@ public abstract static class AbstractBuilder + * API name: {@code original_task_id} + */ + public final BuilderT originalTaskId(@Nullable String value) { + this.originalTaskId = value; + return self(); + } + + /** + * The time at which the original task started, in milliseconds since the Unix + * epoch. Only present together with original_task_id. + *

    + * API name: {@code original_start_time_in_millis} + */ + public final BuilderT originalStartTimeInMillis(@Nullable Long value) { + this.originalStartTimeInMillis = value; + return self(); + } + + /** + * The time at which the original task started, as an ISO 8601 formatted string. + * Only present together with original_task_id and when the request + * includes the ?human=true query parameter. + *

    + * API name: {@code original_start_time} + */ + public final BuilderT originalStartTime(@Nullable String value) { + this.originalStartTime = value; + return self(); + } + protected abstract BuilderT self(); } @@ -535,6 +643,10 @@ protected static > void setupTaskInfo op.add(AbstractBuilder::status, JsonData._DESERIALIZER, "status"); op.add(AbstractBuilder::type, JsonpDeserializer.stringDeserializer(), "type"); op.add(AbstractBuilder::parentTaskId, JsonpDeserializer.stringDeserializer(), "parent_task_id"); + op.add(AbstractBuilder::originalTaskId, JsonpDeserializer.stringDeserializer(), "original_task_id"); + op.add(AbstractBuilder::originalStartTimeInMillis, JsonpDeserializer.longDeserializer(), + "original_start_time_in_millis"); + op.add(AbstractBuilder::originalStartTime, JsonpDeserializer.stringDeserializer(), "original_start_time"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/Settings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/Settings.java index 05bb5b7313..5f46e5cb82 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/Settings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/Settings.java @@ -158,7 +158,9 @@ public final Float docsPerSecond() { * Defines the initial page size to use for the composite aggregation for each * checkpoint. If circuit breaker exceptions occur, the page size is dynamically * adjusted to a lower value. The minimum value is 10 and the - * maximum is 65,536. + * maximum is 65,536. The default value is 500 for + * pivot transforms and 5000 for latest + * transforms. *

    * API name: {@code max_page_search_size} */ @@ -370,7 +372,9 @@ public final Builder docsPerSecond(@Nullable Float value) { * Defines the initial page size to use for the composite aggregation for each * checkpoint. If circuit breaker exceptions occur, the page size is dynamically * adjusted to a lower value. The minimum value is 10 and the - * maximum is 65,536. + * maximum is 65,536. The default value is 500 for + * pivot transforms and 5000 for latest + * transforms. *

    * API name: {@code max_page_search_size} */