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 4d8c9c725e..ff327def1f 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 @@ -29,6 +29,8 @@ import co.elastic.clients.elasticsearch.connector.ElasticsearchConnectorAsyncClient; import co.elastic.clients.elasticsearch.core.BulkRequest; import co.elastic.clients.elasticsearch.core.BulkResponse; +import co.elastic.clients.elasticsearch.core.CancelReindexRequest; +import co.elastic.clients.elasticsearch.core.CancelReindexResponse; import co.elastic.clients.elasticsearch.core.ClearScrollRequest; import co.elastic.clients.elasticsearch.core.ClearScrollResponse; import co.elastic.clients.elasticsearch.core.ClosePointInTimeRequest; @@ -51,6 +53,8 @@ import co.elastic.clients.elasticsearch.core.ExplainResponse; import co.elastic.clients.elasticsearch.core.FieldCapsRequest; import co.elastic.clients.elasticsearch.core.FieldCapsResponse; +import co.elastic.clients.elasticsearch.core.GetReindexRequest; +import co.elastic.clients.elasticsearch.core.GetReindexResponse; import co.elastic.clients.elasticsearch.core.GetRequest; import co.elastic.clients.elasticsearch.core.GetResponse; import co.elastic.clients.elasticsearch.core.GetScriptContextRequest; @@ -67,6 +71,8 @@ import co.elastic.clients.elasticsearch.core.IndexResponse; import co.elastic.clients.elasticsearch.core.InfoRequest; import co.elastic.clients.elasticsearch.core.InfoResponse; +import co.elastic.clients.elasticsearch.core.ListReindexRequest; +import co.elastic.clients.elasticsearch.core.ListReindexResponse; import co.elastic.clients.elasticsearch.core.MgetRequest; import co.elastic.clients.elasticsearch.core.MgetResponse; import co.elastic.clients.elasticsearch.core.MsearchRequest; @@ -926,6 +932,51 @@ public CompletableFuture bulk() { this.transportOptions); } + // ----- Endpoint: cancel_reindex + + /** + * 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. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture cancelReindex(CancelReindexRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) CancelReindexRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * 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. + * + * @param fn + * a function that initializes a builder to create the + * {@link CancelReindexRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture cancelReindex( + Function> fn) { + return cancelReindex(fn.apply(new CancelReindexRequest.Builder()).build()); + } + // ----- Endpoint: clear_scroll /** @@ -2566,6 +2617,43 @@ public final CompletableFuture> get( return get(fn.apply(new GetRequest.Builder()).build(), tDocumentType); } + // ----- Endpoint: get_reindex + + /** + * Get a reindex task. + *

+ * Get the status and progress of a specific reindex task. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture getReindex(GetReindexRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) GetReindexRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Get a reindex task. + *

+ * Get the status and progress of a specific reindex task. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetReindexRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture getReindex( + Function> fn) { + return getReindex(fn.apply(new GetReindexRequest.Builder()).build()); + } + // ----- Endpoint: get_script /** @@ -3344,9 +3432,13 @@ public final CompletableFuture index( /** * Get cluster info. *

- * Get basic build, version, and cluster information. ::: In Serverless, this - * API is retained for backward compatibility only. Some response fields, such - * as the version number, should be ignored. + * Get basic build, version, and cluster information. ::: In Serverless, + * version.number always reports the next target Elasticsearch + * release version at the time of the request. Serverless does not track to a + * traditional release versioning model; it is continuously updated. The version + * number is provided to maintain compatibility with existing clients, but it is + * not meaningful for assessing feature availability. Clients should detect a + * Serverless environment by checking for build_flavor: serverless. * * @see Documentation @@ -3356,6 +3448,58 @@ public CompletableFuture info() { return this.transport.performRequestAsync(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions); } + // ----- Endpoint: list_reindex + + /** + * List active reindex tasks. + *

+ * Get information about all currently running reindex tasks. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture listReindex(ListReindexRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) ListReindexRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * List active reindex tasks. + *

+ * Get information about all currently running reindex tasks. + * + * @param fn + * a function that initializes a builder to create the + * {@link ListReindexRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture listReindex( + Function> fn) { + return listReindex(fn.apply(new ListReindexRequest.Builder()).build()); + } + + /** + * List active reindex tasks. + *

+ * Get information about all currently running reindex tasks. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture listReindex() { + return this.transport.performRequestAsync(new ListReindexRequest.Builder().build(), + ListReindexRequest._ENDPOINT, this.transportOptions); + } + // ----- Endpoint: mget /** @@ -4220,9 +4364,10 @@ public final CompletableFuture rankEval( * must explicitly allow the remote host using the * reindex.remote.whitelist node setting on the destination * 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. + * project, only remote hosts from Elastic + * 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 @@ -4316,9 +4461,10 @@ public CompletableFuture reindex(ReindexRequest request) { * must explicitly allow the remote host using the * reindex.remote.whitelist node setting on the destination * 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. + * project, only remote hosts from Elastic + * 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 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 6c3e8267b5..d61f3cb2ff 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 @@ -30,6 +30,8 @@ import co.elastic.clients.elasticsearch.connector.ElasticsearchConnectorClient; import co.elastic.clients.elasticsearch.core.BulkRequest; import co.elastic.clients.elasticsearch.core.BulkResponse; +import co.elastic.clients.elasticsearch.core.CancelReindexRequest; +import co.elastic.clients.elasticsearch.core.CancelReindexResponse; import co.elastic.clients.elasticsearch.core.ClearScrollRequest; import co.elastic.clients.elasticsearch.core.ClearScrollResponse; import co.elastic.clients.elasticsearch.core.ClosePointInTimeRequest; @@ -52,6 +54,8 @@ import co.elastic.clients.elasticsearch.core.ExplainResponse; import co.elastic.clients.elasticsearch.core.FieldCapsRequest; import co.elastic.clients.elasticsearch.core.FieldCapsResponse; +import co.elastic.clients.elasticsearch.core.GetReindexRequest; +import co.elastic.clients.elasticsearch.core.GetReindexResponse; import co.elastic.clients.elasticsearch.core.GetRequest; import co.elastic.clients.elasticsearch.core.GetResponse; import co.elastic.clients.elasticsearch.core.GetScriptContextRequest; @@ -68,6 +72,8 @@ import co.elastic.clients.elasticsearch.core.IndexResponse; import co.elastic.clients.elasticsearch.core.InfoRequest; import co.elastic.clients.elasticsearch.core.InfoResponse; +import co.elastic.clients.elasticsearch.core.ListReindexRequest; +import co.elastic.clients.elasticsearch.core.ListReindexResponse; import co.elastic.clients.elasticsearch.core.MgetRequest; import co.elastic.clients.elasticsearch.core.MgetResponse; import co.elastic.clients.elasticsearch.core.MsearchRequest; @@ -927,6 +933,53 @@ public BulkResponse bulk() throws IOException, ElasticsearchException { this.transportOptions); } + // ----- Endpoint: cancel_reindex + + /** + * 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. + * + * @see Documentation + * on elastic.co + */ + + public CancelReindexResponse cancelReindex(CancelReindexRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) CancelReindexRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * 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. + * + * @param fn + * a function that initializes a builder to create the + * {@link CancelReindexRequest} + * @see Documentation + * on elastic.co + */ + + public final CancelReindexResponse cancelReindex( + Function> fn) + throws IOException, ElasticsearchException { + return cancelReindex(fn.apply(new CancelReindexRequest.Builder()).build()); + } + // ----- Endpoint: clear_scroll /** @@ -2581,6 +2634,43 @@ public final GetResponse get(Function + * Get the status and progress of a specific reindex task. + * + * @see Documentation + * on elastic.co + */ + + public GetReindexResponse getReindex(GetReindexRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) GetReindexRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Get a reindex task. + *

+ * Get the status and progress of a specific reindex task. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetReindexRequest} + * @see Documentation + * on elastic.co + */ + + public final GetReindexResponse getReindex(Function> fn) + throws IOException, ElasticsearchException { + return getReindex(fn.apply(new GetReindexRequest.Builder()).build()); + } + // ----- Endpoint: get_script /** @@ -3364,9 +3454,13 @@ public final IndexResponse index( /** * Get cluster info. *

- * Get basic build, version, and cluster information. ::: In Serverless, this - * API is retained for backward compatibility only. Some response fields, such - * as the version number, should be ignored. + * Get basic build, version, and cluster information. ::: In Serverless, + * version.number always reports the next target Elasticsearch + * release version at the time of the request. Serverless does not track to a + * traditional release versioning model; it is continuously updated. The version + * number is provided to maintain compatibility with existing clients, but it is + * not meaningful for assessing feature availability. Clients should detect a + * Serverless environment by checking for build_flavor: serverless. * * @see Documentation @@ -3376,6 +3470,59 @@ public InfoResponse info() throws IOException, ElasticsearchException { return this.transport.performRequest(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions); } + // ----- Endpoint: list_reindex + + /** + * List active reindex tasks. + *

+ * Get information about all currently running reindex tasks. + * + * @see Documentation + * on elastic.co + */ + + public ListReindexResponse listReindex(ListReindexRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) ListReindexRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * List active reindex tasks. + *

+ * Get information about all currently running reindex tasks. + * + * @param fn + * a function that initializes a builder to create the + * {@link ListReindexRequest} + * @see Documentation + * on elastic.co + */ + + public final ListReindexResponse listReindex( + Function> fn) + throws IOException, ElasticsearchException { + return listReindex(fn.apply(new ListReindexRequest.Builder()).build()); + } + + /** + * List active reindex tasks. + *

+ * Get information about all currently running reindex tasks. + * + * @see Documentation + * on elastic.co + */ + + public ListReindexResponse listReindex() throws IOException, ElasticsearchException { + return this.transport.performRequest(new ListReindexRequest.Builder().build(), ListReindexRequest._ENDPOINT, + this.transportOptions); + } + // ----- Endpoint: mget /** @@ -4249,9 +4396,10 @@ public final RankEvalResponse rankEval(Functionreindex.remote.whitelist node setting on the destination * 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. + * project, only remote hosts from Elastic + * 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 @@ -4345,9 +4493,10 @@ public ReindexResponse reindex(ReindexRequest request) throws IOException, Elast * must explicitly allow the remote host using the * reindex.remote.whitelist node setting on the destination * 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. + * project, only remote hosts from Elastic + * 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 diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/CommonStatsFlag.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/CommonStatsFlag.java index 776f9a188c..0d1be7721b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/CommonStatsFlag.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/CommonStatsFlag.java @@ -45,48 +45,123 @@ */ @JsonpDeserializable public enum CommonStatsFlag implements JsonEnum { + /** + * Return all statistics. + */ All("_all"), + /** + * Size of the index in byte units. + */ Store("store"), + /** + * Indexing statistics. + */ Indexing("indexing"), + /** + * Get statistics, including missing stats. + */ Get("get"), + /** + * Search statistics including suggest statistics. You can include statistics + * for custom groups by adding an extra groups parameter (search + * operations can be associated with one or more groups). The + * groups parameter accepts a comma-separated list of group names. + * Use _all to return statistics for all groups. + */ Search("search"), + /** + * Merge statistics. + */ Merge("merge"), + /** + * Flush statistics. + */ Flush("flush"), + /** + * Refresh statistics. + */ Refresh("refresh"), + /** + * Query cache statistics. + */ QueryCache("query_cache"), + /** + * Fielddata statistics. + */ Fielddata("fielddata"), + /** + * Number of documents and deleted docs not yet merged out. Index refreshes can + * affect this statistic. + */ Docs("docs"), + /** + * Index warming statistics. + */ Warmer("warmer"), + /** + * Completion suggester statistics. + */ Completion("completion"), + /** + * Memory use of all open segments. If the + * include_segment_file_sizes parameter is true, this + * metric includes the aggregated disk usage of each Lucene index file. + */ Segments("segments"), + /** + * Translog statistics. + */ Translog("translog"), + /** + * Shard request cache statistics. + */ RequestCache("request_cache"), + /** + * Recovery statistics. + */ Recovery("recovery"), + /** + * Bulk operations statistics. + */ Bulk("bulk"), + /** + * Shard statistics, including the total number of shards. + */ ShardStats("shard_stats"), + /** + * Mapping statistics, including the total count and estimated overhead. + */ Mappings("mappings"), + /** + * Total number of dense vectors indexed. Index refreshes can affect this + * statistic. + */ DenseVector("dense_vector"), + /** + * Total number of sparse vectors indexed. Index refreshes can affect this + * statistic. + */ SparseVector("sparse_vector"), ; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchException.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchException.java index 8694192498..bad5ca1067 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchException.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchException.java @@ -40,7 +40,7 @@ public class ElasticsearchException extends RuntimeException { public ElasticsearchException(String endpointId, ErrorResponse response, @Nullable TransportHttpClient.Response httpResponse) { - super("[" + endpointId + "] failed: [" + response.error().type() + "] " + response.error().reason() + (response.error().causedBy() != null ? " - " + response.error().causedBy().reason() : null)); + super("[" + endpointId + "] failed: [" + response.error().type() + "] " + response.error().reason()); this.response = response; this.endpointId = endpointId; this.httpResponse = httpResponse; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/IndicesOptions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/IndicesOptions.java index 87716f5e18..e22769da72 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/IndicesOptions.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/IndicesOptions.java @@ -91,11 +91,13 @@ public static IndicesOptions of(Function> } /** - * If false, the request returns an error if any wildcard expression, index - * alias, or _all value targets only missing or closed indices. - * This behavior applies even if the request targets other open indices. For - * example, a request targeting foo*,bar* returns an error if an - * index starts with foo but no index starts with bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -117,7 +119,10 @@ public final List expandWildcards() { } /** - * If true, missing or closed indices are not included in the response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -208,11 +213,13 @@ private Builder(IndicesOptions instance) { } /** - * If false, the request returns an error if any wildcard expression, index - * alias, or _all value targets only missing or closed indices. - * This behavior applies even if the request targets other open indices. For - * example, a request targeting foo*,bar* returns an error if an - * index starts with foo but no index starts with bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -252,7 +259,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If true, missing or closed indices are not included in the response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ 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 new file mode 100644 index 0000000000..c8f31f0750 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ReindexTaskInfo.java @@ -0,0 +1,430 @@ +/* + * 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.Boolean; +import java.lang.Long; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.ReindexTaskInfo + +/** + * Information about a single reindex task, as returned by the reindex + * management APIs. + * + * @see API + * specification + */ +@JsonpDeserializable +public class ReindexTaskInfo implements JsonpSerializable { + private final String id; + + @Nullable + private final String description; + + private final long startTimeInMillis; + + @Nullable + private final String startTime; + + @Nullable + private final Time runningTime; + + private final long runningTimeInNanos; + + private final boolean cancelled; + + @Nullable + private final ReindexStatus status; + + // --------------------------------------------------------------------------------------------- + + private ReindexTaskInfo(Builder builder) { + + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.description = builder.description; + this.startTimeInMillis = ApiTypeHelper.requireNonNull(builder.startTimeInMillis, this, "startTimeInMillis", 0); + this.startTime = builder.startTime; + this.runningTime = builder.runningTime; + this.runningTimeInNanos = ApiTypeHelper.requireNonNull(builder.runningTimeInNanos, this, "runningTimeInNanos", + 0); + this.cancelled = ApiTypeHelper.requireNonNull(builder.cancelled, this, "cancelled", false); + this.status = builder.status; + + } + + public static ReindexTaskInfo of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The ID of the reindex task, in nodeId:taskNum format. + *

+ * API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * A sanitized description of the reindex operation (source and destination + * indices, and optionally remote host info). + *

+ * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * Required - The time at which the reindex task started, in milliseconds since + * the Unix epoch. + *

+ * API name: {@code start_time_in_millis} + */ + public final long startTimeInMillis() { + return this.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. + *

+ * API name: {@code start_time} + */ + @Nullable + public final String startTime() { + return this.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. + *

+ * API name: {@code running_time} + */ + @Nullable + public final Time runningTime() { + return this.runningTime; + } + + /** + * Required - The elapsed running time of the reindex task, in nanoseconds. + *

+ * API name: {@code running_time_in_nanos} + */ + public final long runningTimeInNanos() { + return this.runningTimeInNanos; + } + + /** + * Required - Whether the reindex task has been cancelled. + *

+ * API name: {@code cancelled} + */ + public final boolean cancelled() { + return this.cancelled; + } + + /** + * The current progress of the reindex operation. + *

+ * API name: {@code status} + */ + @Nullable + public final ReindexStatus status() { + return this.status; + } + + /** + * 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("id"); + generator.write(this.id); + + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + + } + generator.writeKey("start_time_in_millis"); + generator.write(this.startTimeInMillis); + + if (this.startTime != null) { + generator.writeKey("start_time"); + generator.write(this.startTime); + + } + if (this.runningTime != null) { + generator.writeKey("running_time"); + this.runningTime.serialize(generator, mapper); + + } + generator.writeKey("running_time_in_nanos"); + generator.write(this.runningTimeInNanos); + + generator.writeKey("cancelled"); + generator.write(this.cancelled); + + if (this.status != null) { + generator.writeKey("status"); + this.status.serialize(generator, mapper); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ReindexTaskInfo}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private String id; + + @Nullable + private String description; + + private Long startTimeInMillis; + + @Nullable + private String startTime; + + @Nullable + private Time runningTime; + + private Long runningTimeInNanos; + + private Boolean cancelled; + + @Nullable + private ReindexStatus status; + + public Builder() { + } + private Builder(ReindexTaskInfo instance) { + this.id = instance.id; + this.description = instance.description; + this.startTimeInMillis = instance.startTimeInMillis; + this.startTime = instance.startTime; + this.runningTime = instance.runningTime; + this.runningTimeInNanos = instance.runningTimeInNanos; + this.cancelled = instance.cancelled; + this.status = instance.status; + + } + /** + * Required - The ID of the reindex task, in nodeId:taskNum format. + *

+ * API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + /** + * A sanitized description of the reindex operation (source and destination + * indices, and optionally remote host info). + *

+ * API name: {@code description} + */ + public final Builder description(@Nullable String value) { + this.description = value; + return this; + } + + /** + * Required - The time at which the reindex task started, in milliseconds since + * the Unix epoch. + *

+ * API name: {@code start_time_in_millis} + */ + public final Builder startTimeInMillis(long value) { + this.startTimeInMillis = value; + return this; + } + + /** + * 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. + *

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

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

+ * API name: {@code running_time} + */ + public final Builder runningTime(Function> fn) { + return this.runningTime(fn.apply(new Time.Builder()).build()); + } + + /** + * Required - The elapsed running time of the reindex task, in nanoseconds. + *

+ * API name: {@code running_time_in_nanos} + */ + public final Builder runningTimeInNanos(long value) { + this.runningTimeInNanos = value; + return this; + } + + /** + * Required - Whether the reindex task has been cancelled. + *

+ * API name: {@code cancelled} + */ + public final Builder cancelled(boolean value) { + this.cancelled = value; + return this; + } + + /** + * The current progress of the reindex operation. + *

+ * API name: {@code status} + */ + public final Builder status(@Nullable ReindexStatus value) { + this.status = value; + return this; + } + + /** + * The current progress of the reindex operation. + *

+ * API name: {@code status} + */ + public final Builder status(Function> fn) { + return this.status(fn.apply(new ReindexStatus.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ReindexTaskInfo}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ReindexTaskInfo build() { + _checkSingleUse(); + + return new ReindexTaskInfo(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ReindexTaskInfo} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ReindexTaskInfo::setupReindexTaskInfoDeserializer); + + protected static void setupReindexTaskInfoDeserializer(ObjectDeserializer op) { + + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(Builder::startTimeInMillis, JsonpDeserializer.longDeserializer(), "start_time_in_millis"); + op.add(Builder::startTime, JsonpDeserializer.stringDeserializer(), "start_time"); + op.add(Builder::runningTime, Time._DESERIALIZER, "running_time"); + op.add(Builder::runningTimeInNanos, JsonpDeserializer.longDeserializer(), "running_time_in_nanos"); + op.add(Builder::cancelled, JsonpDeserializer.booleanDeserializer(), "cancelled"); + op.add(Builder::status, ReindexStatus._DESERIALIZER, "status"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ReindexTaskResult.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ReindexTaskResult.java new file mode 100644 index 0000000000..f2cf9e92f3 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ReindexTaskResult.java @@ -0,0 +1,669 @@ +/* + * 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.Boolean; +import java.lang.Float; +import java.lang.Long; +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.ReindexTaskResult + +/** + * The final result of a completed reindex operation, as stored in the task + * result. This is the serialized form of BulkByScrollResponse. + * + * @see API + * specification + */ +@JsonpDeserializable +public class ReindexTaskResult implements JsonpSerializable { + @Nullable + private final Long batches; + + @Nullable + private final Long created; + + @Nullable + private final Long deleted; + + private final List failures; + + @Nullable + private final Long noops; + + @Nullable + private final Float requestsPerSecond; + + @Nullable + private final Retries retries; + + @Nullable + private final Long throttledMillis; + + @Nullable + private final Long throttledUntilMillis; + + @Nullable + private final Boolean timedOut; + + @Nullable + private final Long took; + + @Nullable + private final Long total; + + @Nullable + private final Long updated; + + @Nullable + private final Long versionConflicts; + + // --------------------------------------------------------------------------------------------- + + private ReindexTaskResult(Builder builder) { + + this.batches = builder.batches; + this.created = builder.created; + this.deleted = builder.deleted; + this.failures = ApiTypeHelper.unmodifiable(builder.failures); + this.noops = builder.noops; + this.requestsPerSecond = builder.requestsPerSecond; + this.retries = builder.retries; + this.throttledMillis = builder.throttledMillis; + this.throttledUntilMillis = builder.throttledUntilMillis; + this.timedOut = builder.timedOut; + this.took = builder.took; + this.total = builder.total; + this.updated = builder.updated; + this.versionConflicts = builder.versionConflicts; + + } + + public static ReindexTaskResult of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * The number of scroll responses pulled back by the reindex. + *

+ * API name: {@code batches} + */ + @Nullable + 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; + } + + /** + * The number of documents that were successfully deleted. + *

+ * API name: {@code deleted} + */ + @Nullable + public final Long deleted() { + return this.deleted; + } + + /** + * Any failures encountered during the reindex. If non-empty, the reindex ended + * because of these failures. + *

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

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

+ * API name: {@code requests_per_second} + */ + @Nullable + public final Float requestsPerSecond() { + return this.requestsPerSecond; + } + + /** + * The number of retries attempted by reindex. + *

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

+ * API name: {@code throttled_millis} + */ + @Nullable + public final Long throttledMillis() { + return this.throttledMillis; + } + + /** + * This field should always be equal to zero in a completed reindex result. + *

+ * API name: {@code throttled_until_millis} + */ + @Nullable + public final Long throttledUntilMillis() { + return this.throttledUntilMillis; + } + + /** + * Whether any of the requests executed during the reindex timed out. + *

+ * API name: {@code timed_out} + */ + @Nullable + public final Boolean timedOut() { + return this.timedOut; + } + + /** + * The total milliseconds the entire operation took. + *

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

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

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

+ * API name: {@code version_conflicts} + */ + @Nullable + public final Long versionConflicts() { + return this.versionConflicts; + } + + /** + * 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.batches != null) { + generator.writeKey("batches"); + generator.write(this.batches); + + } + if (this.created != null) { + generator.writeKey("created"); + generator.write(this.created); + + } + if (this.deleted != null) { + generator.writeKey("deleted"); + generator.write(this.deleted); + + } + if (ApiTypeHelper.isDefined(this.failures)) { + generator.writeKey("failures"); + generator.writeStartArray(); + for (BulkIndexByScrollFailure item0 : this.failures) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (this.noops != null) { + generator.writeKey("noops"); + generator.write(this.noops); + + } + if (this.requestsPerSecond != null) { + generator.writeKey("requests_per_second"); + generator.write(this.requestsPerSecond); + + } + if (this.retries != null) { + generator.writeKey("retries"); + this.retries.serialize(generator, mapper); + + } + if (this.throttledMillis != null) { + generator.writeKey("throttled_millis"); + generator.write(this.throttledMillis); + + } + if (this.throttledUntilMillis != null) { + generator.writeKey("throttled_until_millis"); + generator.write(this.throttledUntilMillis); + + } + if (this.timedOut != null) { + generator.writeKey("timed_out"); + generator.write(this.timedOut); + + } + if (this.took != null) { + generator.writeKey("took"); + generator.write(this.took); + + } + if (this.total != null) { + generator.writeKey("total"); + generator.write(this.total); + + } + if (this.updated != null) { + generator.writeKey("updated"); + generator.write(this.updated); + + } + if (this.versionConflicts != null) { + generator.writeKey("version_conflicts"); + generator.write(this.versionConflicts); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ReindexTaskResult}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private Long batches; + + @Nullable + private Long created; + + @Nullable + private Long deleted; + + @Nullable + private List failures; + + @Nullable + private Long noops; + + @Nullable + private Float requestsPerSecond; + + @Nullable + private Retries retries; + + @Nullable + private Long throttledMillis; + + @Nullable + private Long throttledUntilMillis; + + @Nullable + private Boolean timedOut; + + @Nullable + private Long took; + + @Nullable + private Long total; + + @Nullable + private Long updated; + + @Nullable + private Long versionConflicts; + + public Builder() { + } + private Builder(ReindexTaskResult instance) { + this.batches = instance.batches; + this.created = instance.created; + this.deleted = instance.deleted; + this.failures = instance.failures; + this.noops = instance.noops; + this.requestsPerSecond = instance.requestsPerSecond; + this.retries = instance.retries; + this.throttledMillis = instance.throttledMillis; + this.throttledUntilMillis = instance.throttledUntilMillis; + this.timedOut = instance.timedOut; + this.took = instance.took; + this.total = instance.total; + this.updated = instance.updated; + this.versionConflicts = instance.versionConflicts; + + } + /** + * The number of scroll responses pulled back by the reindex. + *

+ * API name: {@code batches} + */ + public final Builder batches(@Nullable 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; + } + + /** + * The number of documents that were successfully deleted. + *

+ * API name: {@code deleted} + */ + public final Builder deleted(@Nullable Long value) { + this.deleted = value; + return this; + } + + /** + * Any failures encountered during the reindex. If non-empty, the reindex ended + * because of these failures. + *

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

+ * Adds all elements of list to failures. + */ + public final Builder failures(List list) { + this.failures = _listAddAll(this.failures, list); + return this; + } + + /** + * Any failures encountered during the reindex. If non-empty, the reindex ended + * because of these failures. + *

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

+ * Adds one or more values to failures. + */ + public final Builder failures(BulkIndexByScrollFailure value, BulkIndexByScrollFailure... values) { + this.failures = _listAdd(this.failures, value, values); + return this; + } + + /** + * Any failures encountered during the reindex. If non-empty, the reindex ended + * because of these failures. + *

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

+ * Adds a value to failures using a builder lambda. + */ + public final Builder failures( + Function> fn) { + return failures(fn.apply(new BulkIndexByScrollFailure.Builder()).build()); + } + + /** + * The number of documents that were ignored because the script returned a + * noop value for ctx.op. + *

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

+ * API name: {@code requests_per_second} + */ + public final Builder requestsPerSecond(@Nullable Float value) { + this.requestsPerSecond = value; + return this; + } + + /** + * The number of retries attempted by reindex. + *

+ * API name: {@code retries} + */ + public final Builder retries(@Nullable Retries value) { + this.retries = value; + return this; + } + + /** + * The number of retries attempted by reindex. + *

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

+ * API name: {@code throttled_millis} + */ + public final Builder throttledMillis(@Nullable Long value) { + this.throttledMillis = value; + return this; + } + + /** + * This field should always be equal to zero in a completed reindex result. + *

+ * API name: {@code throttled_until_millis} + */ + public final Builder throttledUntilMillis(@Nullable Long value) { + this.throttledUntilMillis = value; + return this; + } + + /** + * Whether any of the requests executed during the reindex timed out. + *

+ * API name: {@code timed_out} + */ + public final Builder timedOut(@Nullable Boolean value) { + this.timedOut = value; + return this; + } + + /** + * The total milliseconds the entire operation took. + *

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

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

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

+ * API name: {@code version_conflicts} + */ + public final Builder versionConflicts(@Nullable Long value) { + this.versionConflicts = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ReindexTaskResult}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ReindexTaskResult build() { + _checkSingleUse(); + + return new ReindexTaskResult(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ReindexTaskResult} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ReindexTaskResult::setupReindexTaskResultDeserializer); + + protected static void setupReindexTaskResultDeserializer(ObjectDeserializer op) { + + op.add(Builder::batches, JsonpDeserializer.longDeserializer(), "batches"); + op.add(Builder::created, JsonpDeserializer.longDeserializer(), "created"); + op.add(Builder::deleted, JsonpDeserializer.longDeserializer(), "deleted"); + op.add(Builder::failures, JsonpDeserializer.arrayDeserializer(BulkIndexByScrollFailure._DESERIALIZER), + "failures"); + 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::throttledMillis, JsonpDeserializer.longDeserializer(), "throttled_millis"); + op.add(Builder::throttledUntilMillis, JsonpDeserializer.longDeserializer(), "throttled_until_millis"); + op.add(Builder::timedOut, JsonpDeserializer.booleanDeserializer(), "timed_out"); + op.add(Builder::took, JsonpDeserializer.longDeserializer(), "took"); + op.add(Builder::total, JsonpDeserializer.longDeserializer(), "total"); + op.add(Builder::updated, JsonpDeserializer.longDeserializer(), "updated"); + op.add(Builder::versionConflicts, JsonpDeserializer.longDeserializer(), "version_conflicts"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ThreadType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ThreadType.java index 8bebef17c6..d5ef7198a0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ThreadType.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ThreadType.java @@ -45,14 +45,29 @@ */ @JsonpDeserializable public enum ThreadType implements JsonEnum { + /** + * Threads that consume the most CPU time. + */ Cpu("cpu"), + /** + * Threads that have been in a waiting state the longest. + */ Wait("wait"), + /** + * Threads that have been blocked the longest. + */ Block("block"), + /** + * Threads that consume the most GPU time. + */ Gpu("gpu"), + /** + * Threads that allocate the most memory. + */ Mem("mem"), ; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FieldDateMath.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FieldDateMath.java index b1b6f2bde7..33c35236cd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FieldDateMath.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FieldDateMath.java @@ -32,7 +32,7 @@ import co.elastic.clients.util.TaggedUnion; import co.elastic.clients.util.TaggedUnionUtils; import jakarta.json.stream.JsonGenerator; -import java.lang.Double; +import java.lang.Long; import java.lang.Object; import java.lang.String; import java.util.Objects; @@ -143,7 +143,7 @@ public boolean isValue() { * @throws IllegalStateException * if the current variant is not of the {@code value} kind. */ - public Double value() { + public Long value() { return TaggedUnionUtils.get(this, Kind.Value); } @@ -158,7 +158,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { break; case Value : - generator.write(((Double) this._value)); + generator.write(((Long) this._value)); break; } @@ -181,7 +181,7 @@ public ObjectBuilder expr(String v) { return this; } - public ObjectBuilder value(Double v) { + public ObjectBuilder value(Long v) { this._kind = Kind.Value; this._value = v; return this; @@ -197,7 +197,7 @@ public FieldDateMath build() { private static JsonpDeserializer buildFieldDateMathDeserializer() { return new UnionDeserializer.Builder(FieldDateMath::new, false) .addMember(Kind.Expr, JsonpDeserializer.stringDeserializer()) - .addMember(Kind.Value, JsonpDeserializer.doubleDeserializer()).build(); + .addMember(Kind.Value, JsonpDeserializer.longDeserializer()).build(); } public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldType.java index ce69d5d9fb..f348c562c0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldType.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/FieldType.java @@ -61,6 +61,8 @@ public enum FieldType implements JsonEnum { SearchAsYouType("search_as_you_type"), + Wildcard("wildcard"), + Date("date"), DateNanos("date_nanos"), diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/LongNumberRangeQuery.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/LongNumberRangeQuery.java new file mode 100644 index 0000000000..a866905250 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/LongNumberRangeQuery.java @@ -0,0 +1,164 @@ +/* + * 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.query_dsl; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Long; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.query_dsl.LongNumberRangeQuery + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class LongNumberRangeQuery extends RangeQueryBase implements RangeQueryVariant { + // Single key dictionary + private final String field; + + // --------------------------------------------------------------------------------------------- + + private LongNumberRangeQuery(Builder builder) { + super(builder); + this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field"); + + } + + public static LongNumberRangeQuery of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * RangeQuery variant kind. + */ + @Override + public RangeQuery.Kind _rangeQueryKind() { + return RangeQuery.Kind.LongNumber; + } + + /** + * Required - the required field + */ + public final String field() { + return this.field; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(this.field); + + super.serializeInternal(generator, mapper); + + generator.writeEnd(); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link LongNumberRangeQuery}. + */ + + public static class Builder extends RangeQueryBase.AbstractBuilder + implements + ObjectBuilder { + private String field; + + /** + * Required - the required field + */ + public final Builder field(String value) { + this.field = value; + return this; + } + + public Builder() { + } + private Builder(LongNumberRangeQuery instance) { + + } + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link LongNumberRangeQuery}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public LongNumberRangeQuery build() { + _checkSingleUse(); + super.tSerializer(null); + + return new LongNumberRangeQuery(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link LongNumberRangeQuery} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, LongNumberRangeQuery::setupLongNumberRangeQueryDeserializer); + + protected static void setupLongNumberRangeQueryDeserializer(ObjectDeserializer op) { + RangeQueryBase.setupRangeQueryBaseDeserializer(op, JsonpDeserializer.longDeserializer()); + + op.setKey(Builder::field, JsonpDeserializer.stringDeserializer()); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQuery.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQuery.java index cf7240e9cd..6255c59e40 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQuery.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQuery.java @@ -85,6 +85,8 @@ public class RangeQuery public enum Kind implements JsonEnum { Date("date"), + LongNumber("long_number"), + Number("number"), Term("term"), @@ -190,6 +192,23 @@ public DateRangeQuery date() { return TaggedUnionUtils.get(this, Kind.Date); } + /** + * Is this variant instance of kind {@code long_number}? + */ + public boolean isLongNumber() { + return _kind == Kind.LongNumber; + } + + /** + * Get the {@code long_number} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code long_number} kind. + */ + public LongNumberRangeQuery longNumber() { + return TaggedUnionUtils.get(this, Kind.LongNumber); + } + /** * Is this variant instance of kind {@code number}? */ @@ -267,6 +286,17 @@ public ObjectBuilder date(Function longNumber(LongNumberRangeQuery v) { + this._kind = Kind.LongNumber; + this._value = v; + return this; + } + + public ObjectBuilder longNumber( + Function> fn) { + return this.longNumber(fn.apply(new LongNumberRangeQuery.Builder()).build()); + } + public ObjectBuilder number(NumberRangeQuery v) { this._kind = Kind.Number; this._value = v; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBuilders.java index 3d49c97721..62e357b343 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBuilders.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/query_dsl/RangeQueryBuilders.java @@ -62,6 +62,25 @@ public static RangeQuery date(Function> fn) { + RangeQuery.Builder builder = new RangeQuery.Builder(); + builder.longNumber(fn.apply(new LongNumberRangeQuery.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link NumberRangeQuery number} {@code RangeQuery} * variant. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java index df8e5a6a39..7714c217b2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/SubmitRequest.java @@ -342,9 +342,13 @@ public final Map aggregations() { } /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -518,8 +522,10 @@ public final Boolean ignoreThrottled() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -1437,9 +1443,13 @@ public final Builder aggregations(String key, Function_all string or when no indices have been - * specified) + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -1714,8 +1724,10 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java index a8a4d816f5..c5bd684841 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java @@ -143,11 +143,13 @@ public final Boolean allowClosed() { } /** - * If false, the request returns an error if any wildcard expression, index - * alias, or _all value targets only missing or closed indices. This behavior - * applies even if the request targets other open indices. For example, a - * request targeting foo*,bar* returns an error if an index starts with foo but - * no index starts with bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -206,7 +208,10 @@ public final Boolean ignoreThrottled() { } /** - * If true, missing or closed indices are not included in the response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -352,11 +357,13 @@ public final Builder allowClosed(@Nullable Boolean value) { } /** - * If false, the request returns an error if any wildcard expression, index - * alias, or _all value targets only missing or closed indices. This behavior - * applies even if the request targets other open indices. For example, a - * request targeting foo*,bar* returns an error if an index starts with foo but - * no index starts with bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -462,7 +469,10 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** - * If true, missing or closed indices are not included in the response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateRequest.java index 3298fce3dc..f71ad1d3f0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/StateRequest.java @@ -148,9 +148,13 @@ public static StateRequest of(Function> fn) } /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -180,8 +184,10 @@ public final Boolean flatSettings() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -307,9 +313,13 @@ private Builder(StateRequest instance) { } /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -355,8 +365,10 @@ public final Builder flatSettings(@Nullable Boolean value) { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/state/ClusterStateMetric.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/state/ClusterStateMetric.java index 80c6b5a0ff..6e414b3f72 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/state/ClusterStateMetric.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cluster/state/ClusterStateMetric.java @@ -46,22 +46,54 @@ */ @JsonpDeserializable public enum ClusterStateMetric implements JsonEnum { + /** + * Shows all metrics. + */ All("_all"), + /** + * Shows the cluster state version. + */ Version("version"), + /** + * Shows the elected master_node part of the response. + */ MasterNode("master_node"), + /** + * Shows the blocks part of the response. + */ Blocks("blocks"), + /** + * Shows the nodes part of the response. + */ Nodes("nodes"), + /** + * Shows the metadata part of the response. If you supply a + * comma-separated list of indices, the returned output will only contain + * metadata for these indices. + */ Metadata("metadata"), + /** + * Shows the routing_table part of the response. If you supply a + * comma-separated list of indices, the returned output will only contain the + * routing table for these indices. + */ RoutingTable("routing_table"), + /** + * Shows the routing_nodes part of the response. + */ RoutingNodes("routing_nodes"), + /** + * Shows the customs part of the response, which includes custom + * cluster state information. + */ Customs("customs"), ; 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 new file mode 100644 index 0000000000..27864d250e --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CancelReindexRequest.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.core; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _global.cancel_reindex.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. + * + * @see API + * specification + */ + +public class CancelReindexRequest extends RequestBase { + private final String taskId; + + @Nullable + private final Boolean waitForCompletion; + + // --------------------------------------------------------------------------------------------- + + private CancelReindexRequest(Builder builder) { + + this.taskId = ApiTypeHelper.requireNonNull(builder.taskId, this, "taskId"); + this.waitForCompletion = builder.waitForCompletion; + + } + + public static CancelReindexRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The ID of the reindex task to cancel. + *

+ * API name: {@code task_id} + */ + public final String taskId() { + return this.taskId; + } + + /** + * If true (the default), the request blocks until the cancellation + * is complete and returns the final task state. If false, the + * request returns immediately with acknowledged: true. + *

+ * API name: {@code wait_for_completion} + */ + @Nullable + public final Boolean waitForCompletion() { + return this.waitForCompletion; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CancelReindexRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String taskId; + + @Nullable + private Boolean waitForCompletion; + + public Builder() { + } + private Builder(CancelReindexRequest instance) { + this.taskId = instance.taskId; + this.waitForCompletion = instance.waitForCompletion; + + } + /** + * Required - The ID of the reindex task to cancel. + *

+ * API name: {@code task_id} + */ + public final Builder taskId(String value) { + this.taskId = value; + return this; + } + + /** + * If true (the default), the request blocks until the cancellation + * is complete and returns the final task state. If false, the + * request returns immediately with acknowledged: true. + *

+ * API name: {@code wait_for_completion} + */ + public final Builder waitForCompletion(@Nullable Boolean value) { + this.waitForCompletion = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CancelReindexRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CancelReindexRequest build() { + _checkSingleUse(); + + return new CancelReindexRequest(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code cancel_reindex}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/cancel_reindex", + + // Request method + request -> { + return "POST"; + + }, + + // Request path + request -> { + final int _taskId = 1 << 0; + + int propsSet = 0; + + propsSet |= _taskId; + + if (propsSet == (_taskId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_reindex"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.taskId, buf); + buf.append("/_cancel"); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _taskId = 1 << 0; + + int propsSet = 0; + + propsSet |= _taskId; + + if (propsSet == (_taskId)) { + params.put("taskId", request.taskId); + } + return params; + }, + + // Request parameters + request -> { + Map params = new HashMap<>(); + if (request.waitForCompletion != null) { + params.put("wait_for_completion", String.valueOf(request.waitForCompletion)); + } + return params; + + }, SimpleEndpoint.emptyMap(), false, CancelReindexResponse._DESERIALIZER); +} 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 new file mode 100644 index 0000000000..c4eb796372 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CancelReindexResponse.java @@ -0,0 +1,584 @@ +/* + * 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; + +import co.elastic.clients.elasticsearch._types.ErrorCause; +import co.elastic.clients.elasticsearch._types.ReindexStatus; +import co.elastic.clients.elasticsearch._types.ReindexTaskResult; +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.lang.Boolean; +import java.lang.Long; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _global.cancel_reindex.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CancelReindexResponse implements JsonpSerializable { + @Nullable + private final Boolean acknowledged; + + @Nullable + private final Boolean completed; + + @Nullable + private final String id; + + @Nullable + private final String description; + + @Nullable + private final Long startTimeInMillis; + + @Nullable + private final String startTime; + + @Nullable + private final Time runningTime; + + @Nullable + private final Long runningTimeInNanos; + + @Nullable + private final Boolean cancelled; + + @Nullable + private final ReindexStatus status; + + @Nullable + private final ErrorCause error; + + @Nullable + private final ReindexTaskResult response; + + // --------------------------------------------------------------------------------------------- + + private CancelReindexResponse(Builder builder) { + + this.acknowledged = builder.acknowledged; + this.completed = builder.completed; + this.id = builder.id; + this.description = builder.description; + this.startTimeInMillis = builder.startTimeInMillis; + this.startTime = builder.startTime; + this.runningTime = builder.runningTime; + this.runningTimeInNanos = builder.runningTimeInNanos; + this.cancelled = builder.cancelled; + this.status = builder.status; + this.error = builder.error; + this.response = builder.response; + + } + + public static CancelReindexResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Present and true when wait_for_completion=false. + *

+ * API name: {@code acknowledged} + */ + @Nullable + public final Boolean acknowledged() { + return this.acknowledged; + } + + /** + * Whether the reindex task has completed. Present when + * wait_for_completion=true. + *

+ * API name: {@code completed} + */ + @Nullable + public final Boolean completed() { + return this.completed; + } + + /** + * The ID of the reindex task, in nodeId:taskNum format. Present + * when wait_for_completion=true. + *

+ * API name: {@code id} + */ + @Nullable + public final String id() { + return this.id; + } + + /** + * A sanitized description of the reindex operation. + *

+ * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * The time at which the reindex task started, in milliseconds since the Unix + * epoch. + *

+ * API name: {@code start_time_in_millis} + */ + @Nullable + public final Long startTimeInMillis() { + return this.startTimeInMillis; + } + + /** + * The time at which the reindex task started, as an ISO 8601 formatted string. + *

+ * API name: {@code start_time} + */ + @Nullable + public final String startTime() { + return this.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. + *

+ * API name: {@code running_time} + */ + @Nullable + public final Time runningTime() { + return this.runningTime; + } + + /** + * The elapsed running time of the reindex task, in nanoseconds. + *

+ * API name: {@code running_time_in_nanos} + */ + @Nullable + public final Long runningTimeInNanos() { + return this.runningTimeInNanos; + } + + /** + * Whether the reindex task has been cancelled. + *

+ * API name: {@code cancelled} + */ + @Nullable + public final Boolean cancelled() { + return this.cancelled; + } + + /** + * The status of the reindex operation at the time of cancellation. + *

+ * API name: {@code status} + */ + @Nullable + public final ReindexStatus status() { + return this.status; + } + + /** + * The error that caused the reindex task to fail, if any. + *

+ * API name: {@code error} + */ + @Nullable + public final ErrorCause error() { + return this.error; + } + + /** + * The final result of the reindex operation, if it completed before being + * cancelled. + *

+ * API name: {@code response} + */ + @Nullable + public final ReindexTaskResult response() { + return this.response; + } + + /** + * 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.acknowledged != null) { + generator.writeKey("acknowledged"); + generator.write(this.acknowledged); + + } + if (this.completed != null) { + generator.writeKey("completed"); + generator.write(this.completed); + + } + if (this.id != null) { + generator.writeKey("id"); + generator.write(this.id); + + } + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + + } + if (this.startTimeInMillis != null) { + generator.writeKey("start_time_in_millis"); + generator.write(this.startTimeInMillis); + + } + if (this.startTime != null) { + generator.writeKey("start_time"); + generator.write(this.startTime); + + } + if (this.runningTime != null) { + generator.writeKey("running_time"); + this.runningTime.serialize(generator, mapper); + + } + if (this.runningTimeInNanos != null) { + generator.writeKey("running_time_in_nanos"); + generator.write(this.runningTimeInNanos); + + } + if (this.cancelled != null) { + generator.writeKey("cancelled"); + generator.write(this.cancelled); + + } + if (this.status != null) { + generator.writeKey("status"); + this.status.serialize(generator, mapper); + + } + if (this.error != null) { + generator.writeKey("error"); + this.error.serialize(generator, mapper); + + } + if (this.response != null) { + generator.writeKey("response"); + this.response.serialize(generator, mapper); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CancelReindexResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + @Nullable + private Boolean acknowledged; + + @Nullable + private Boolean completed; + + @Nullable + private String id; + + @Nullable + private String description; + + @Nullable + private Long startTimeInMillis; + + @Nullable + private String startTime; + + @Nullable + private Time runningTime; + + @Nullable + private Long runningTimeInNanos; + + @Nullable + private Boolean cancelled; + + @Nullable + private ReindexStatus status; + + @Nullable + private ErrorCause error; + + @Nullable + private ReindexTaskResult response; + + /** + * Present and true when wait_for_completion=false. + *

+ * API name: {@code acknowledged} + */ + public final Builder acknowledged(@Nullable Boolean value) { + this.acknowledged = value; + return this; + } + + /** + * Whether the reindex task has completed. Present when + * wait_for_completion=true. + *

+ * API name: {@code completed} + */ + public final Builder completed(@Nullable Boolean value) { + this.completed = value; + return this; + } + + /** + * The ID of the reindex task, in nodeId:taskNum format. Present + * when wait_for_completion=true. + *

+ * API name: {@code id} + */ + public final Builder id(@Nullable String value) { + this.id = value; + return this; + } + + /** + * A sanitized description of the reindex operation. + *

+ * API name: {@code description} + */ + public final Builder description(@Nullable String value) { + this.description = value; + return this; + } + + /** + * The time at which the reindex task started, in milliseconds since the Unix + * epoch. + *

+ * API name: {@code start_time_in_millis} + */ + public final Builder startTimeInMillis(@Nullable Long value) { + this.startTimeInMillis = value; + return this; + } + + /** + * The time at which the reindex task started, as an ISO 8601 formatted string. + *

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

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

+ * API name: {@code running_time} + */ + public final Builder runningTime(Function> fn) { + return this.runningTime(fn.apply(new Time.Builder()).build()); + } + + /** + * The elapsed running time of the reindex task, in nanoseconds. + *

+ * API name: {@code running_time_in_nanos} + */ + public final Builder runningTimeInNanos(@Nullable Long value) { + this.runningTimeInNanos = value; + return this; + } + + /** + * Whether the reindex task has been cancelled. + *

+ * API name: {@code cancelled} + */ + public final Builder cancelled(@Nullable Boolean value) { + this.cancelled = value; + return this; + } + + /** + * The status of the reindex operation at the time of cancellation. + *

+ * API name: {@code status} + */ + public final Builder status(@Nullable ReindexStatus value) { + this.status = value; + return this; + } + + /** + * The status of the reindex operation at the time of cancellation. + *

+ * API name: {@code status} + */ + public final Builder status(Function> fn) { + return this.status(fn.apply(new ReindexStatus.Builder()).build()); + } + + /** + * The error that caused the reindex task to fail, if any. + *

+ * API name: {@code error} + */ + public final Builder error(@Nullable ErrorCause value) { + this.error = value; + return this; + } + + /** + * The error that caused the reindex task to fail, if any. + *

+ * API name: {@code error} + */ + public final Builder error(Function> fn) { + return this.error(fn.apply(new ErrorCause.Builder()).build()); + } + + /** + * The final result of the reindex operation, if it completed before being + * cancelled. + *

+ * API name: {@code response} + */ + public final Builder response(@Nullable ReindexTaskResult value) { + this.response = value; + return this; + } + + /** + * The final result of the reindex operation, if it completed before being + * cancelled. + *

+ * API name: {@code response} + */ + public final Builder response(Function> fn) { + return this.response(fn.apply(new ReindexTaskResult.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CancelReindexResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CancelReindexResponse build() { + _checkSingleUse(); + + return new CancelReindexResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CancelReindexResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, CancelReindexResponse::setupCancelReindexResponseDeserializer); + + protected static void setupCancelReindexResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::acknowledged, JsonpDeserializer.booleanDeserializer(), "acknowledged"); + op.add(Builder::completed, JsonpDeserializer.booleanDeserializer(), "completed"); + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(Builder::startTimeInMillis, JsonpDeserializer.longDeserializer(), "start_time_in_millis"); + op.add(Builder::startTime, JsonpDeserializer.stringDeserializer(), "start_time"); + op.add(Builder::runningTime, Time._DESERIALIZER, "running_time"); + op.add(Builder::runningTimeInNanos, JsonpDeserializer.longDeserializer(), "running_time_in_nanos"); + op.add(Builder::cancelled, JsonpDeserializer.booleanDeserializer(), "cancelled"); + op.add(Builder::status, ReindexStatus._DESERIALIZER, "status"); + op.add(Builder::error, ErrorCause._DESERIALIZER, "error"); + op.add(Builder::response, ReindexTaskResult._DESERIALIZER, "response"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java index 178007bd4c..4f8aeb6a78 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/CountRequest.java @@ -164,12 +164,13 @@ public static CountRequest of(Function> fn) } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -252,8 +253,10 @@ public final Boolean ignoreThrottled() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -473,12 +476,13 @@ private Builder(CountRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -579,8 +583,10 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ 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 fdcb5fe3b7..bd771e8d84 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 @@ -344,12 +344,13 @@ public static DeleteByQueryRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -439,8 +440,10 @@ public final Long from() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -885,12 +888,13 @@ private Builder(DeleteByQueryRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -998,8 +1002,10 @@ public final Builder from(@Nullable Long value) { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsRequest.java index 4a83f3d6d6..26d7614956 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/FieldCapsRequest.java @@ -132,11 +132,13 @@ public static FieldCapsRequest of(Function_all value targets only missing or closed indices. - * This behavior applies even if the request targets other open indices. For - * example, a request targeting foo*,bar* returns an error if an - * index starts with foo but no index starts with bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -177,8 +179,10 @@ public final List filters() { } /** - * If true, missing or closed indices are not included in the - * response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -381,11 +385,13 @@ private Builder(FieldCapsRequest instance) { } /** - * If false, the request returns an error if any wildcard expression, index - * alias, or _all value targets only missing or closed indices. - * This behavior applies even if the request targets other open indices. For - * example, a request targeting foo*,bar* returns an error if an - * index starts with foo but no index starts with bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -475,8 +481,10 @@ public final Builder filters(String value, String... values) { } /** - * If true, missing or closed indices are not included in the - * response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ 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 new file mode 100644 index 0000000000..511e2e56fe --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetReindexRequest.java @@ -0,0 +1,273 @@ +/* + * 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; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.String; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _global.get_reindex.Request + +/** + * Get a reindex task. + *

+ * Get the status and progress of a specific reindex task. + * + * @see API + * specification + */ + +public class GetReindexRequest extends RequestBase { + private final String taskId; + + @Nullable + private final Time timeout; + + @Nullable + private final Boolean waitForCompletion; + + // --------------------------------------------------------------------------------------------- + + private GetReindexRequest(Builder builder) { + + this.taskId = ApiTypeHelper.requireNonNull(builder.taskId, this, "taskId"); + this.timeout = builder.timeout; + this.waitForCompletion = builder.waitForCompletion; + + } + + public static GetReindexRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The ID of the reindex task to retrieve. + *

+ * API name: {@code task_id} + */ + public final String taskId() { + return this.taskId; + } + + /** + * The period to wait for the reindex task to complete when + * wait_for_completion is true. + *

+ * API name: {@code timeout} + */ + @Nullable + public final Time timeout() { + return this.timeout; + } + + /** + * If true, the request blocks until the reindex task completes, + * then returns the result. + *

+ * API name: {@code wait_for_completion} + */ + @Nullable + public final Boolean waitForCompletion() { + return this.waitForCompletion; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GetReindexRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String taskId; + + @Nullable + private Time timeout; + + @Nullable + private Boolean waitForCompletion; + + public Builder() { + } + private Builder(GetReindexRequest instance) { + this.taskId = instance.taskId; + this.timeout = instance.timeout; + this.waitForCompletion = instance.waitForCompletion; + + } + /** + * Required - The ID of the reindex task to retrieve. + *

+ * API name: {@code task_id} + */ + public final Builder taskId(String value) { + this.taskId = value; + return this; + } + + /** + * The period to wait for the reindex task to complete when + * wait_for_completion is true. + *

+ * API name: {@code timeout} + */ + public final Builder timeout(@Nullable Time value) { + this.timeout = value; + return this; + } + + /** + * The period to wait for the reindex task to complete when + * wait_for_completion is true. + *

+ * API name: {@code timeout} + */ + public final Builder timeout(Function> fn) { + return this.timeout(fn.apply(new Time.Builder()).build()); + } + + /** + * If true, the request blocks until the reindex task completes, + * then returns the result. + *

+ * API name: {@code wait_for_completion} + */ + public final Builder waitForCompletion(@Nullable Boolean value) { + this.waitForCompletion = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GetReindexRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GetReindexRequest build() { + _checkSingleUse(); + + return new GetReindexRequest(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code get_reindex}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/get_reindex", + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + final int _taskId = 1 << 0; + + int propsSet = 0; + + propsSet |= _taskId; + + if (propsSet == (_taskId)) { + StringBuilder buf = new StringBuilder(); + buf.append("/_reindex"); + buf.append("/"); + SimpleEndpoint.pathEncode(request.taskId, buf); + return buf.toString(); + } + throw SimpleEndpoint.noPathTemplateFound("path"); + + }, + + // Path parameters + request -> { + Map params = new HashMap<>(); + final int _taskId = 1 << 0; + + int propsSet = 0; + + propsSet |= _taskId; + + if (propsSet == (_taskId)) { + params.put("taskId", request.taskId); + } + return params; + }, + + // Request parameters + request -> { + Map params = new HashMap<>(); + if (request.waitForCompletion != null) { + params.put("wait_for_completion", String.valueOf(request.waitForCompletion)); + } + if (request.timeout != null) { + params.put("timeout", request.timeout._toJsonString()); + } + return params; + + }, SimpleEndpoint.emptyMap(), false, GetReindexResponse._DESERIALIZER); +} 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 new file mode 100644 index 0000000000..7612a057f8 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/GetReindexResponse.java @@ -0,0 +1,530 @@ +/* + * 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; + +import co.elastic.clients.elasticsearch._types.ErrorCause; +import co.elastic.clients.elasticsearch._types.ReindexStatus; +import co.elastic.clients.elasticsearch._types.ReindexTaskResult; +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.Long; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _global.get_reindex.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class GetReindexResponse implements JsonpSerializable { + private final boolean completed; + + private final String id; + + @Nullable + private final String description; + + private final long startTimeInMillis; + + @Nullable + private final String startTime; + + @Nullable + private final Time runningTime; + + private final long runningTimeInNanos; + + private final boolean cancelled; + + @Nullable + private final ReindexStatus status; + + @Nullable + private final ErrorCause error; + + @Nullable + private final ReindexTaskResult response; + + // --------------------------------------------------------------------------------------------- + + private GetReindexResponse(Builder builder) { + + this.completed = ApiTypeHelper.requireNonNull(builder.completed, this, "completed", false); + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.description = builder.description; + this.startTimeInMillis = ApiTypeHelper.requireNonNull(builder.startTimeInMillis, this, "startTimeInMillis", 0); + this.startTime = builder.startTime; + this.runningTime = builder.runningTime; + this.runningTimeInNanos = ApiTypeHelper.requireNonNull(builder.runningTimeInNanos, this, "runningTimeInNanos", + 0); + this.cancelled = ApiTypeHelper.requireNonNull(builder.cancelled, this, "cancelled", false); + this.status = builder.status; + this.error = builder.error; + this.response = builder.response; + + } + + public static GetReindexResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - Whether the reindex task has completed. + *

+ * API name: {@code completed} + */ + public final boolean completed() { + return this.completed; + } + + /** + * Required - The ID of the reindex task, in nodeId:taskNum format. + *

+ * API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * A sanitized description of the reindex operation (source and destination + * indices, and optionally remote host info). + *

+ * API name: {@code description} + */ + @Nullable + public final String description() { + return this.description; + } + + /** + * Required - The time at which the reindex task started, in milliseconds since + * the Unix epoch. + *

+ * API name: {@code start_time_in_millis} + */ + public final long startTimeInMillis() { + return this.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. + *

+ * API name: {@code start_time} + */ + @Nullable + public final String startTime() { + return this.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. + *

+ * API name: {@code running_time} + */ + @Nullable + public final Time runningTime() { + return this.runningTime; + } + + /** + * Required - The elapsed running time of the reindex task, in nanoseconds. + *

+ * API name: {@code running_time_in_nanos} + */ + public final long runningTimeInNanos() { + return this.runningTimeInNanos; + } + + /** + * Required - Whether the reindex task has been cancelled. + *

+ * API name: {@code cancelled} + */ + public final boolean cancelled() { + return this.cancelled; + } + + /** + * The current progress of the reindex operation. + *

+ * API name: {@code status} + */ + @Nullable + public final ReindexStatus status() { + return this.status; + } + + /** + * The error that caused the reindex task to fail, if any. + *

+ * API name: {@code error} + */ + @Nullable + public final ErrorCause error() { + return this.error; + } + + /** + * The final result of the completed reindex operation, if the task has finished + * successfully. + *

+ * API name: {@code response} + */ + @Nullable + public final ReindexTaskResult response() { + return this.response; + } + + /** + * 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("completed"); + generator.write(this.completed); + + generator.writeKey("id"); + generator.write(this.id); + + if (this.description != null) { + generator.writeKey("description"); + generator.write(this.description); + + } + generator.writeKey("start_time_in_millis"); + generator.write(this.startTimeInMillis); + + if (this.startTime != null) { + generator.writeKey("start_time"); + generator.write(this.startTime); + + } + if (this.runningTime != null) { + generator.writeKey("running_time"); + this.runningTime.serialize(generator, mapper); + + } + generator.writeKey("running_time_in_nanos"); + generator.write(this.runningTimeInNanos); + + generator.writeKey("cancelled"); + generator.write(this.cancelled); + + if (this.status != null) { + generator.writeKey("status"); + this.status.serialize(generator, mapper); + + } + if (this.error != null) { + generator.writeKey("error"); + this.error.serialize(generator, mapper); + + } + if (this.response != null) { + generator.writeKey("response"); + this.response.serialize(generator, mapper); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link GetReindexResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Boolean completed; + + private String id; + + @Nullable + private String description; + + private Long startTimeInMillis; + + @Nullable + private String startTime; + + @Nullable + private Time runningTime; + + private Long runningTimeInNanos; + + private Boolean cancelled; + + @Nullable + private ReindexStatus status; + + @Nullable + private ErrorCause error; + + @Nullable + private ReindexTaskResult response; + + /** + * Required - Whether the reindex task has completed. + *

+ * API name: {@code completed} + */ + public final Builder completed(boolean value) { + this.completed = value; + return this; + } + + /** + * Required - The ID of the reindex task, in nodeId:taskNum format. + *

+ * API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + /** + * A sanitized description of the reindex operation (source and destination + * indices, and optionally remote host info). + *

+ * API name: {@code description} + */ + public final Builder description(@Nullable String value) { + this.description = value; + return this; + } + + /** + * Required - The time at which the reindex task started, in milliseconds since + * the Unix epoch. + *

+ * API name: {@code start_time_in_millis} + */ + public final Builder startTimeInMillis(long value) { + this.startTimeInMillis = value; + return this; + } + + /** + * 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. + *

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

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

+ * API name: {@code running_time} + */ + public final Builder runningTime(Function> fn) { + return this.runningTime(fn.apply(new Time.Builder()).build()); + } + + /** + * Required - The elapsed running time of the reindex task, in nanoseconds. + *

+ * API name: {@code running_time_in_nanos} + */ + public final Builder runningTimeInNanos(long value) { + this.runningTimeInNanos = value; + return this; + } + + /** + * Required - Whether the reindex task has been cancelled. + *

+ * API name: {@code cancelled} + */ + public final Builder cancelled(boolean value) { + this.cancelled = value; + return this; + } + + /** + * The current progress of the reindex operation. + *

+ * API name: {@code status} + */ + public final Builder status(@Nullable ReindexStatus value) { + this.status = value; + return this; + } + + /** + * The current progress of the reindex operation. + *

+ * API name: {@code status} + */ + public final Builder status(Function> fn) { + return this.status(fn.apply(new ReindexStatus.Builder()).build()); + } + + /** + * The error that caused the reindex task to fail, if any. + *

+ * API name: {@code error} + */ + public final Builder error(@Nullable ErrorCause value) { + this.error = value; + return this; + } + + /** + * The error that caused the reindex task to fail, if any. + *

+ * API name: {@code error} + */ + public final Builder error(Function> fn) { + return this.error(fn.apply(new ErrorCause.Builder()).build()); + } + + /** + * The final result of the completed reindex operation, if the task has finished + * successfully. + *

+ * API name: {@code response} + */ + public final Builder response(@Nullable ReindexTaskResult value) { + this.response = value; + return this; + } + + /** + * The final result of the completed reindex operation, if the task has finished + * successfully. + *

+ * API name: {@code response} + */ + public final Builder response(Function> fn) { + return this.response(fn.apply(new ReindexTaskResult.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GetReindexResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GetReindexResponse build() { + _checkSingleUse(); + + return new GetReindexResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link GetReindexResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, GetReindexResponse::setupGetReindexResponseDeserializer); + + protected static void setupGetReindexResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::completed, JsonpDeserializer.booleanDeserializer(), "completed"); + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description"); + op.add(Builder::startTimeInMillis, JsonpDeserializer.longDeserializer(), "start_time_in_millis"); + op.add(Builder::startTime, JsonpDeserializer.stringDeserializer(), "start_time"); + op.add(Builder::runningTime, Time._DESERIALIZER, "running_time"); + op.add(Builder::runningTimeInNanos, JsonpDeserializer.longDeserializer(), "running_time_in_nanos"); + op.add(Builder::cancelled, JsonpDeserializer.booleanDeserializer(), "cancelled"); + op.add(Builder::status, ReindexStatus._DESERIALIZER, "status"); + op.add(Builder::error, ErrorCause._DESERIALIZER, "error"); + op.add(Builder::response, ReindexTaskResult._DESERIALIZER, "response"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java index 3519e403a8..0dfd128b67 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java @@ -52,9 +52,13 @@ /** * Get cluster info. *

- * Get basic build, version, and cluster information. ::: In Serverless, this - * API is retained for backward compatibility only. Some response fields, such - * as the version number, should be ignored. + * Get basic build, version, and cluster information. ::: In Serverless, + * version.number always reports the next target Elasticsearch + * release version at the time of the request. Serverless does not track to a + * traditional release versioning model; it is continuously updated. The version + * number is provided to maintain compatibility with existing clients, but it is + * not meaningful for assessing feature availability. Clients should detect a + * Serverless environment by checking for build_flavor: serverless. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoResponse.java index e5fbe75dd7..1368726477 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoResponse.java @@ -119,7 +119,12 @@ public final String tagline() { } /** - * Required - The running version of Elasticsearch. + * Required - Version information for the Elasticsearch cluster. In Serverless, + * version.number always reports the next target Elasticsearch + * release version at the time of the request, not an actual deployed version. + * The version number is provided to maintain client compatibility but is not + * meaningful for assessing feature availability. Use + * build_flavor: serverless to detect a Serverless environment. *

* API name: {@code version} */ @@ -214,7 +219,12 @@ public final Builder tagline(String value) { } /** - * Required - The running version of Elasticsearch. + * Required - Version information for the Elasticsearch cluster. In Serverless, + * version.number always reports the next target Elasticsearch + * release version at the time of the request, not an actual deployed version. + * The version number is provided to maintain client compatibility but is not + * meaningful for assessing feature availability. Use + * build_flavor: serverless to detect a Serverless environment. *

* API name: {@code version} */ @@ -224,7 +234,12 @@ public final Builder version(ElasticsearchVersionInfo value) { } /** - * Required - The running version of Elasticsearch. + * Required - Version information for the Elasticsearch cluster. In Serverless, + * version.number always reports the next target Elasticsearch + * release version at the time of the request, not an actual deployed version. + * The version number is provided to maintain client compatibility but is not + * meaningful for assessing feature availability. Use + * build_flavor: serverless to detect a Serverless environment. *

* API name: {@code version} */ 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 new file mode 100644 index 0000000000..939619c84a --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ListReindexRequest.java @@ -0,0 +1,180 @@ +/* + * 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; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// 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.list_reindex.Request + +/** + * List active reindex tasks. + *

+ * Get information about all currently running reindex tasks. + * + * @see API + * specification + */ + +public class ListReindexRequest extends RequestBase { + @Nullable + private final Boolean detailed; + + // --------------------------------------------------------------------------------------------- + + private ListReindexRequest(Builder builder) { + + this.detailed = builder.detailed; + + } + + public static ListReindexRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * If true, include detailed task status information in the + * response. + *

+ * API name: {@code detailed} + */ + @Nullable + public final Boolean detailed() { + return this.detailed; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ListReindexRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private Boolean detailed; + + public Builder() { + } + private Builder(ListReindexRequest instance) { + this.detailed = instance.detailed; + + } + /** + * If true, include detailed task status information in the + * response. + *

+ * API name: {@code detailed} + */ + public final Builder detailed(@Nullable Boolean value) { + this.detailed = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ListReindexRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ListReindexRequest build() { + _checkSingleUse(); + + return new ListReindexRequest(this); + } + } + + /** + * @return New {@link Builder} initialized with field values of this instance + */ + public Builder rebuild() { + return new Builder(this); + } + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code list_reindex}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/list_reindex", + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + return "/_reindex"; + + }, + + // Path parameters + request -> { + return Collections.emptyMap(); + }, + + // Request parameters + request -> { + Map params = new HashMap<>(); + if (request.detailed != null) { + params.put("detailed", String.valueOf(request.detailed)); + } + return params; + + }, SimpleEndpoint.emptyMap(), false, ListReindexResponse._DESERIALIZER); +} 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 new file mode 100644 index 0000000000..76332aeed9 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ListReindexResponse.java @@ -0,0 +1,317 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.core; + +import co.elastic.clients.elasticsearch._types.ErrorCause; +import co.elastic.clients.elasticsearch._types.ReindexTaskInfo; +import co.elastic.clients.elasticsearch._types.TaskFailure; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.List; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _global.list_reindex.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ListReindexResponse implements JsonpSerializable { + private final List reindex; + + private final List taskFailures; + + private final List nodeFailures; + + // --------------------------------------------------------------------------------------------- + + private ListReindexResponse(Builder builder) { + + this.reindex = ApiTypeHelper.unmodifiableRequired(builder.reindex, this, "reindex"); + this.taskFailures = ApiTypeHelper.unmodifiable(builder.taskFailures); + this.nodeFailures = ApiTypeHelper.unmodifiable(builder.nodeFailures); + + } + + public static ListReindexResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The list of currently running reindex tasks. + *

+ * API name: {@code reindex} + */ + public final List reindex() { + return this.reindex; + } + + /** + * Task-level failures that occurred while listing reindex tasks. + *

+ * API name: {@code task_failures} + */ + public final List taskFailures() { + return this.taskFailures; + } + + /** + * Node-level failures that occurred while listing reindex tasks. + *

+ * API name: {@code node_failures} + */ + public final List nodeFailures() { + return this.nodeFailures; + } + + /** + * 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.reindex)) { + generator.writeKey("reindex"); + generator.writeStartArray(); + for (ReindexTaskInfo item0 : this.reindex) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.taskFailures)) { + generator.writeKey("task_failures"); + generator.writeStartArray(); + for (TaskFailure item0 : this.taskFailures) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (ApiTypeHelper.isDefined(this.nodeFailures)) { + generator.writeKey("node_failures"); + generator.writeStartArray(); + for (ErrorCause item0 : this.nodeFailures) { + item0.serialize(generator, mapper); + + } + generator.writeEnd(); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ListReindexResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private List reindex; + + @Nullable + private List taskFailures; + + @Nullable + private List nodeFailures; + + /** + * Required - The list of currently running reindex tasks. + *

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

+ * Adds all elements of list to reindex. + */ + public final Builder reindex(List list) { + this.reindex = _listAddAll(this.reindex, list); + return this; + } + + /** + * Required - The list of currently running reindex tasks. + *

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

+ * Adds one or more values to reindex. + */ + public final Builder reindex(ReindexTaskInfo value, ReindexTaskInfo... values) { + this.reindex = _listAdd(this.reindex, value, values); + return this; + } + + /** + * Required - The list of currently running reindex tasks. + *

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

+ * Adds a value to reindex using a builder lambda. + */ + public final Builder reindex(Function> fn) { + return reindex(fn.apply(new ReindexTaskInfo.Builder()).build()); + } + + /** + * Task-level failures that occurred while listing reindex tasks. + *

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

+ * Adds all elements of list to taskFailures. + */ + public final Builder taskFailures(List list) { + this.taskFailures = _listAddAll(this.taskFailures, list); + return this; + } + + /** + * Task-level failures that occurred while listing reindex tasks. + *

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

+ * Adds one or more values to taskFailures. + */ + public final Builder taskFailures(TaskFailure value, TaskFailure... values) { + this.taskFailures = _listAdd(this.taskFailures, value, values); + return this; + } + + /** + * Task-level failures that occurred while listing reindex tasks. + *

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

+ * Adds a value to taskFailures using a builder lambda. + */ + public final Builder taskFailures(Function> fn) { + return taskFailures(fn.apply(new TaskFailure.Builder()).build()); + } + + /** + * Node-level failures that occurred while listing reindex tasks. + *

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

+ * Adds all elements of list to nodeFailures. + */ + public final Builder nodeFailures(List list) { + this.nodeFailures = _listAddAll(this.nodeFailures, list); + return this; + } + + /** + * Node-level failures that occurred while listing reindex tasks. + *

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

+ * Adds one or more values to nodeFailures. + */ + public final Builder nodeFailures(ErrorCause value, ErrorCause... values) { + this.nodeFailures = _listAdd(this.nodeFailures, value, values); + return this; + } + + /** + * Node-level failures that occurred while listing reindex tasks. + *

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

+ * Adds a value to nodeFailures using a builder lambda. + */ + public final Builder nodeFailures(Function> fn) { + return nodeFailures(fn.apply(new ErrorCause.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ListReindexResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ListReindexResponse build() { + _checkSingleUse(); + + return new ListReindexResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ListReindexResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ListReindexResponse::setupListReindexResponseDeserializer); + + protected static void setupListReindexResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::reindex, JsonpDeserializer.arrayDeserializer(ReindexTaskInfo._DESERIALIZER), "reindex"); + op.add(Builder::taskFailures, JsonpDeserializer.arrayDeserializer(TaskFailure._DESERIALIZER), "task_failures"); + op.add(Builder::nodeFailures, JsonpDeserializer.arrayDeserializer(ErrorCause._DESERIALIZER), "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 37dd013808..4406caa97e 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 @@ -162,11 +162,13 @@ public Iterator _serializables() { return this.searches.iterator(); } /** - * If false, the request returns an error if any wildcard expression, index - * alias, or _all value targets only missing or closed indices. This behavior - * applies even if the request targets other open indices. For example, a - * request targeting foo*,bar* returns an error if an index starts with foo but - * no index starts with bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -212,7 +214,10 @@ public final Boolean ignoreThrottled() { } /** - * If true, missing or closed indices are not included in the response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -405,11 +410,13 @@ private Builder(MsearchRequest instance) { } /** - * If false, the request returns an error if any wildcard expression, index - * alias, or _all value targets only missing or closed indices. This behavior - * applies even if the request targets other open indices. For example, a - * request targeting foo*,bar* returns an error if an index starts with foo but - * no index starts with bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -472,7 +479,10 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** - * If true, missing or closed indices are not included in the response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java index 3cc63c9315..165517d43c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java @@ -202,8 +202,10 @@ public final List expandWildcards() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -408,8 +410,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalRequest.java index 261194bcdb..d3b86a0c80 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/RankEvalRequest.java @@ -111,12 +111,13 @@ public static RankEvalRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -136,8 +137,10 @@ public final List expandWildcards() { } /** - * If true, missing or closed indices are not included in the - * response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -257,12 +260,13 @@ private Builder(RankEvalRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -298,8 +302,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If true, missing or closed indices are not included in the - * response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ 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 b2ed575322..147f96c579 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 @@ -101,9 +101,10 @@ * must explicitly allow the remote host using the * reindex.remote.whitelist node setting on the destination * 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. + * project, only remote hosts from Elastic + * 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 diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java index 74de6879b2..93a163edab 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchRequest.java @@ -376,12 +376,13 @@ public final Map aggregations() { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -594,8 +595,10 @@ public final Boolean ignoreThrottled() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -1654,12 +1657,13 @@ public final Builder aggregations(String key, Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -1984,8 +1988,10 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ 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 92f9255152..581621a9b7 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 @@ -117,12 +117,13 @@ public static SearchShardsRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -144,8 +145,10 @@ public final List expandWildcards() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -256,12 +259,13 @@ private Builder(SearchShardsRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -301,8 +305,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java index bdfc75eab1..d1486a31e3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/SearchTemplateRequest.java @@ -144,12 +144,13 @@ public static SearchTemplateRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -219,8 +220,10 @@ public final Boolean ignoreThrottled() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -455,12 +458,13 @@ private Builder(SearchTemplateRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -548,8 +552,10 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ 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 9793cf86fe..a4d77ba17f 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 @@ -374,12 +374,13 @@ public static UpdateByQueryRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -469,8 +470,10 @@ public final Long from() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -963,12 +966,13 @@ private Builder(UpdateByQueryRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -1076,8 +1080,10 @@ public final Builder from(@Nullable Long value) { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ 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 e9e385c2ef..683505c897 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 @@ -123,6 +123,14 @@ public static MultisearchHeader of(Functionfalse, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. + *

* API name: {@code allow_no_indices} */ @Nullable @@ -138,6 +146,11 @@ public final List expandWildcards() { } /** + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. + *

* API name: {@code ignore_unavailable} */ @Nullable @@ -368,6 +381,14 @@ private Builder(MultisearchHeader instance) { } /** + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. + *

* API name: {@code allow_no_indices} */ public final Builder allowNoIndices(@Nullable Boolean value) { @@ -396,6 +417,11 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. + *

* API name: {@code ignore_unavailable} */ public final Builder ignoreUnavailable(@Nullable Boolean value) { 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 df87dac8c9..c068dcac2b 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,17 +17,19 @@ '_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.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', '_global.close_point_in_time.Request': '_global/close_point_in_time/ClosePointInTimeRequest.ts#L23-L51', '_global.close_point_in_time.Response': '_global/close_point_in_time/ClosePointInTimeResponse.ts#L22-L42', -'_global.count.Request': '_global/count/CountRequest.ts#L32-L176', +'_global.count.Request': '_global/count/CountRequest.ts#L32-L181', '_global.count.Response': '_global/count/CountResponse.ts#L23-L25', '_global.create.Request': '_global/create/CreateRequest.ts#L33-L203', '_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-L325', +'_global.delete_by_query.Request': '_global/delete_by_query/DeleteByQueryRequest.ts#L38-L330', '_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', @@ -40,11 +42,13 @@ '_global.explain.Request': '_global/explain/ExplainRequest.ts#L26-L128', '_global.explain.Response': '_global/explain/ExplainResponse.ts#L23-L31', '_global.field_caps.FieldCapability': '_global/field_caps/types.ts#L23-L81', -'_global.field_caps.Request': '_global/field_caps/FieldCapabilitiesRequest.ts#L31-L150', +'_global.field_caps.Request': '_global/field_caps/FieldCapabilitiesRequest.ts#L31-L155', '_global.field_caps.Response': '_global/field_caps/FieldCapabilitiesResponse.ts#L24-L38', '_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.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', '_global.get_script_context.Context': '_global/get_script_context/types.ts#L22-L25', @@ -92,19 +96,21 @@ '_global.health_report.StagnatingBackingIndices': '_global/health_report/types.ts#L159-L163', '_global.index.Request': '_global/index/IndexRequest.ts#L36-L279', '_global.index.Response': '_global/index/IndexResponse.ts#L22-L25', -'_global.info.Request': '_global/info/RootNodeInfoRequest.ts#L23-L43', +'_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.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#L65-L68', -'_global.msearch.MultiSearchResult': '_global/msearch/types.ts#L55-L58', -'_global.msearch.MultisearchHeader': '_global/msearch/types.ts#L37-L53', -'_global.msearch.Request': '_global/msearch/MultiSearchRequest.ts#L32-L162', +'_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.Response': '_global/msearch/MultiSearchResponse.ts#L25-L28', -'_global.msearch.ResponseItem': '_global/msearch/types.ts#L60-L63', +'_global.msearch.ResponseItem': '_global/msearch/types.ts#L73-L76', '_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', @@ -112,7 +118,7 @@ '_global.mtermvectors.Request': '_global/mtermvectors/MultiTermVectorsRequest.ts#L32-L140', '_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-L151', +'_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.ping.Request': '_global/ping/PingRequest.ts#L23-L41', '_global.put_script.Request': '_global/put_script/PutScriptRequest.ts#L25-L90', @@ -131,7 +137,7 @@ '_global.rank_eval.RankEvalMetricRecall': '_global/rank_eval/types.ts#L54-L58', '_global.rank_eval.RankEvalQuery': '_global/rank_eval/types.ts#L111-L117', '_global.rank_eval.RankEvalRequestItem': '_global/rank_eval/types.ts#L98-L109', -'_global.rank_eval.Request': '_global/rank_eval/RankEvalRequest.ts#L24-L86', +'_global.rank_eval.Request': '_global/rank_eval/RankEvalRequest.ts#L24-L93', '_global.rank_eval.Response': '_global/rank_eval/RankEvalResponse.ts#L26-L34', '_global.rank_eval.UnratedDocument': '_global/rank_eval/types.ts#L150-L153', '_global.reindex.Destination': '_global/reindex/types.ts#L39-L67', @@ -153,7 +159,7 @@ '_global.scripts_painless_execute.Response': '_global/scripts_painless_execute/ExecutePainlessScriptResponse.ts#L20-L24', '_global.scroll.Request': '_global/scroll/ScrollRequest.ts#L24-L96', '_global.scroll.Response': '_global/scroll/ScrollResponse.ts#L22-L25', -'_global.search.Request': '_global/search/SearchRequest.ts#L55-L618', +'_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', @@ -236,11 +242,11 @@ '_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-L101', +'_global.search_shards.Request': '_global/search_shards/SearchShardsRequest.ts#L24-L106', '_global.search_shards.Response': '_global/search_shards/SearchShardsResponse.ts#L34-L40', '_global.search_shards.SearchShardsNodeAttributes': '_global/search_shards/SearchShardsResponse.ts#L42-L60', '_global.search_shards.ShardStoreIndex': '_global/search_shards/SearchShardsResponse.ts#L62-L65', -'_global.search_template.Request': '_global/search_template/SearchTemplateRequest.ts#L35-L173', +'_global.search_template.Request': '_global/search_template/SearchTemplateRequest.ts#L35-L179', '_global.search_template.Response': '_global/search_template/SearchTemplateResponse.ts#L30-L48', '_global.terms_enum.Request': '_global/terms_enum/TermsEnumRequest.ts#L26-L95', '_global.terms_enum.Response': '_global/terms_enum/TermsEnumResponse.ts#L22-L32', @@ -254,7 +260,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-L359', +'_global.update_by_query.Request': '_global/update_by_query/UpdateByQueryRequest.ts#L38-L364', '_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', @@ -267,10 +273,10 @@ '_types.CartesianPoint': '_types/Geo.ts#L125-L128', '_types.ChunkRescorer': '_types/Retriever.ts#L205-L210', '_types.ClusterDetails': '_types/Stats.ts#L45-L52', -'_types.ClusterInfoTarget': '_types/common.ts#L398-L404', +'_types.ClusterInfoTarget': '_types/common.ts#L408-L414', '_types.ClusterSearchStatus': '_types/Stats.ts#L37-L43', '_types.ClusterStatistics': '_types/Stats.ts#L27-L35', -'_types.CommonStatsFlag': '_types/common.ts#L408-L431', +'_types.CommonStatsFlag': '_types/common.ts#L418-L472', '_types.CompletionStats': '_types/Stats.ts#L83-L93', '_types.Conflicts': '_types/common.ts#L178-L187', '_types.CoordsGeoBounds': '_types/Geo.ts#L153-L158', @@ -308,9 +314,9 @@ '_types.IBDistribution': '_types/Similarity.ts#L42-L45', '_types.IBLambda': '_types/Similarity.ts#L47-L50', '_types.IndexingStats': '_types/Stats.ts#L168-L186', -'_types.IndicesOptions': '_types/common.ts#L352-L379', +'_types.IndicesOptions': '_types/common.ts#L357-L389', '_types.IndicesResponseBase': '_types/Base.ts#L146-L148', -'_types.InlineGet': '_types/common.ts#L337-L350', +'_types.InlineGet': '_types/common.ts#L342-L355', '_types.InnerRetriever': '_types/Retriever.ts#L88-L92', '_types.KnnQuery': '_types/Knn.ts#L74-L104', '_types.KnnRetriever': '_types/Retriever.ts#L118-L143', @@ -341,7 +347,9 @@ '_types.RecoveryStats': '_types/Stats.ts#L255-L260', '_types.Refresh': '_types/common.ts#L283-L290', '_types.RefreshStats': '_types/Stats.ts#L262-L269', -'_types.ReindexStatus': '_types/Reindex.ts#L24-L80', +'_types.ReindexStatus': '_types/Reindex.ts#L32-L88', +'_types.ReindexTaskInfo': '_types/Reindex.ts#L153-L191', +'_types.ReindexTaskResult': '_types/Reindex.ts#L90-L151', '_types.RelocationFailureInfo': '_types/Node.ts#L67-L69', '_types.RequestBase': '_types/Base.ts#L35-L35', '_types.RequestCacheStats': '_types/Stats.ts#L271-L277', @@ -370,8 +378,8 @@ '_types.ShardStatistics': '_types/Stats.ts#L54-L69', '_types.ShardsOperationResponseBase': '_types/Base.ts#L150-L153', '_types.SlicedScroll': '_types/SlicedScroll.ts#L23-L27', -'_types.Slices': '_types/common.ts#L381-L386', -'_types.SlicesCalculation': '_types/common.ts#L388-L396', +'_types.Slices': '_types/common.ts#L391-L396', +'_types.SlicesCalculation': '_types/common.ts#L398-L406', '_types.SortMode': '_types/sort.ts#L108-L117', '_types.SortOptions': '_types/sort.ts#L86-L96', '_types.SortOrder': '_types/sort.ts#L119-L128', @@ -383,7 +391,7 @@ '_types.TaskFailure': '_types/Errors.ts#L71-L76', '_types.TextEmbedding': '_types/Knn.ts#L118-L128', '_types.TextSimilarityReranker': '_types/Retriever.ts#L175-L192', -'_types.ThreadType': '_types/common.ts#L314-L320', +'_types.ThreadType': '_types/common.ts#L314-L325', '_types.TimeUnit': '_types/Time.ts#L70-L78', '_types.TokenPruningConfig': '_types/TokenPruningConfig.ts#L22-L38', '_types.TopLeftBottomRightGeoBounds': '_types/Geo.ts#L160-L163', @@ -391,9 +399,9 @@ '_types.TransformContainer': '_types/Transform.ts#L28-L35', '_types.TranslogStats': '_types/Stats.ts#L427-L435', '_types.VersionType': '_types/common.ts#L102-L117', -'_types.WaitForActiveShardOptions': '_types/common.ts#L322-L326', +'_types.WaitForActiveShardOptions': '_types/common.ts#L327-L331', '_types.WaitForActiveShards': '_types/common.ts#L137-L138', -'_types.WaitForEvents': '_types/common.ts#L328-L335', +'_types.WaitForEvents': '_types/common.ts#L333-L340', '_types.WarmerStats': '_types/Stats.ts#L437-L442', '_types.WktGeoBounds': '_types/Geo.ts#L149-L151', '_types.WriteResponseBase': '_types/Base.ts#L37-L72', @@ -886,7 +894,7 @@ '_types.mapping.FieldAliasProperty': '_types/mapping/specialized.ts#L66-L69', '_types.mapping.FieldMapping': '_types/mapping/meta-fields.ts#L24-L27', '_types.mapping.FieldNamesField': '_types/mapping/meta-fields.ts#L42-L44', -'_types.mapping.FieldType': '_types/mapping/Property.ts#L195-L244', +'_types.mapping.FieldType': '_types/mapping/Property.ts#L195-L245', '_types.mapping.FlattenedProperty': '_types/mapping/complex.ts#L26-L38', '_types.mapping.FloatNumberProperty': '_types/mapping/core.ts#L158-L161', '_types.mapping.FloatRangeProperty': '_types/mapping/range.ts#L38-L40', @@ -1006,6 +1014,7 @@ '_types.query_dsl.IntervalsWildcard': '_types/query_dsl/fulltext.ts#L319-L334', '_types.query_dsl.Like': '_types/query_dsl/specialized.ts#L198-L203', '_types.query_dsl.LikeDocument': '_types/query_dsl/specialized.ts#L174-L196', +'_types.query_dsl.LongNumberRangeQuery': '_types/query_dsl/term.ts#L170-L170', '_types.query_dsl.MatchAllQuery': '_types/query_dsl/MatchAllQuery.ts#L22-L25', '_types.query_dsl.MatchBoolPrefixQuery': '_types/query_dsl/fulltext.ts#L407-L464', '_types.query_dsl.MatchNoneQuery': '_types/query_dsl/MatchNoneQuery.ts#L22-L25', @@ -1028,16 +1037,16 @@ '_types.query_dsl.QueryContainer': '_types/query_dsl/abstractions.ts#L97-L428', '_types.query_dsl.QueryStringQuery': '_types/query_dsl/fulltext.ts#L650-L773', '_types.query_dsl.RandomScoreFunction': '_types/query_dsl/compound.ts#L145-L149', -'_types.query_dsl.RangeQuery': '_types/query_dsl/term.ts#L172-L182', +'_types.query_dsl.RangeQuery': '_types/query_dsl/term.ts#L174-L185', '_types.query_dsl.RangeQueryBase': '_types/query_dsl/term.ts#L122-L144', -'_types.query_dsl.RangeRelation': '_types/query_dsl/term.ts#L184-L197', +'_types.query_dsl.RangeRelation': '_types/query_dsl/term.ts#L187-L200', '_types.query_dsl.RankFeatureFunction': '_types/query_dsl/specialized.ts#L280-L280', '_types.query_dsl.RankFeatureFunctionLinear': '_types/query_dsl/specialized.ts#L282-L282', '_types.query_dsl.RankFeatureFunctionLogarithm': '_types/query_dsl/specialized.ts#L284-L289', '_types.query_dsl.RankFeatureFunctionSaturation': '_types/query_dsl/specialized.ts#L291-L296', '_types.query_dsl.RankFeatureFunctionSigmoid': '_types/query_dsl/specialized.ts#L298-L307', '_types.query_dsl.RankFeatureQuery': '_types/query_dsl/specialized.ts#L309-L335', -'_types.query_dsl.RegexpQuery': '_types/query_dsl/term.ts#L199-L232', +'_types.query_dsl.RegexpQuery': '_types/query_dsl/term.ts#L202-L235', '_types.query_dsl.RuleQuery': '_types/query_dsl/specialized.ts#L398-L406', '_types.query_dsl.ScriptQuery': '_types/query_dsl/specialized.ts#L337-L346', '_types.query_dsl.ScriptScoreFunction': '_types/query_dsl/compound.ts#L138-L143', @@ -1058,20 +1067,20 @@ '_types.query_dsl.SpanTermQuery': '_types/query_dsl/span.ts#L134-L141', '_types.query_dsl.SpanWithinQuery': '_types/query_dsl/span.ts#L143-L157', '_types.query_dsl.SparseVectorQuery': '_types/query_dsl/SparseVectorQuery.ts#L26-L80', -'_types.query_dsl.TermQuery': '_types/query_dsl/term.ts#L234-L251', -'_types.query_dsl.TermRangeQuery': '_types/query_dsl/term.ts#L170-L170', -'_types.query_dsl.TermsLookup': '_types/query_dsl/term.ts#L266-L271', -'_types.query_dsl.TermsQuery': '_types/query_dsl/term.ts#L253-L259', -'_types.query_dsl.TermsQueryField': '_types/query_dsl/term.ts#L261-L264', -'_types.query_dsl.TermsSetQuery': '_types/query_dsl/term.ts#L273-L295', +'_types.query_dsl.TermQuery': '_types/query_dsl/term.ts#L237-L254', +'_types.query_dsl.TermRangeQuery': '_types/query_dsl/term.ts#L172-L172', +'_types.query_dsl.TermsLookup': '_types/query_dsl/term.ts#L269-L274', +'_types.query_dsl.TermsQuery': '_types/query_dsl/term.ts#L256-L262', +'_types.query_dsl.TermsQueryField': '_types/query_dsl/term.ts#L264-L267', +'_types.query_dsl.TermsSetQuery': '_types/query_dsl/term.ts#L276-L298', '_types.query_dsl.TextExpansionQuery': '_types/query_dsl/TextExpansionQuery.ts#L23-L37', '_types.query_dsl.TextQueryType': '_types/query_dsl/fulltext.ts#L611-L637', -'_types.query_dsl.TypeQuery': '_types/query_dsl/term.ts#L297-L299', +'_types.query_dsl.TypeQuery': '_types/query_dsl/term.ts#L300-L302', '_types.query_dsl.UntypedDecayFunction': '_types/query_dsl/compound.ts#L206-L209', '_types.query_dsl.UntypedDistanceFeatureQuery': '_types/query_dsl/specialized.ts#L61-L64', '_types.query_dsl.UntypedRangeQuery': '_types/query_dsl/term.ts#L146-L155', '_types.query_dsl.WeightedTokensQuery': '_types/query_dsl/WeightedTokensQuery.ts#L25-L33', -'_types.query_dsl.WildcardQuery': '_types/query_dsl/term.ts#L301-L321', +'_types.query_dsl.WildcardQuery': '_types/query_dsl/term.ts#L304-L324', '_types.query_dsl.WrapperQuery': '_types/query_dsl/abstractions.ts#L502-L511', '_types.query_dsl.ZeroTermsQuery': '_types/query_dsl/fulltext.ts#L639-L648', 'async_search._types.AsyncSearch': 'async_search/_types/AsyncSearch.ts#L30-L56', @@ -1084,7 +1093,7 @@ 'async_search.status.Request': 'async_search/status/AsyncSearchStatusRequest.ts#L24-L59', 'async_search.status.Response': 'async_search/status/AsyncSearchStatusResponse.ts#L39-L42', 'async_search.status.StatusResponseBase': 'async_search/status/AsyncSearchStatusResponse.ts#L24-L38', -'async_search.submit.Request': 'async_search/submit/AsyncSearchSubmitRequest.ts#L56-L434', +'async_search.submit.Request': 'async_search/submit/AsyncSearchSubmitRequest.ts#L56-L440', 'async_search.submit.Response': 'async_search/submit/AsyncSearchSubmitResponse.ts#L25-L34', 'autoscaling._types.AutoscalingPolicy': 'autoscaling/_types/AutoscalingPolicy.ts#L23-L30', 'autoscaling.delete_autoscaling_policy.Request': 'autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyRequest.ts#L24-L56', @@ -1180,7 +1189,7 @@ 'cat.repositories.RepositoriesRecord': 'cat/repositories/types.ts#L20-L31', 'cat.repositories.Request': 'cat/repositories/CatRepositoriesRequest.ts#L24-L68', 'cat.repositories.Response': 'cat/repositories/CatRepositoriesResponse.ts#L22-L25', -'cat.segments.Request': 'cat/segments/CatSegmentsRequest.ts#L24-L114', +'cat.segments.Request': 'cat/segments/CatSegmentsRequest.ts#L24-L119', 'cat.segments.Response': 'cat/segments/CatSegmentsResponse.ts#L22-L25', 'cat.segments.SegmentsRecord': 'cat/segments/types.ts#L22-L107', 'cat.shards.Request': 'cat/shards/CatShardsRequest.ts#L24-L74', @@ -1295,8 +1304,8 @@ 'cluster.reroute.RerouteExplanation': 'cluster/reroute/types.ts#L92-L96', 'cluster.reroute.RerouteParameters': 'cluster/reroute/types.ts#L98-L105', 'cluster.reroute.Response': 'cluster/reroute/ClusterRerouteResponse.ts#L23-L34', -'cluster.state.ClusterStateMetric': 'cluster/state/ClusterStateRequest.ts#L123-L133', -'cluster.state.Request': 'cluster/state/ClusterStateRequest.ts#L29-L121', +'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', @@ -1477,7 +1486,7 @@ 'eql.get.Response': 'eql/get/EqlGetResponse.ts#L22-L25', 'eql.get_status.Request': 'eql/get_status/EqlGetStatusRequest.ts#L23-L44', 'eql.get_status.Response': 'eql/get_status/EqlGetStatusResponse.ts#L24-L51', -'eql.search.Request': 'eql/search/EqlSearchRequest.ts#L34-L192', +'eql.search.Request': 'eql/search/EqlSearchRequest.ts#L34-L198', 'eql.search.Response': 'eql/search/EqlSearchResponse.ts#L22-L25', 'eql.search.ResultPosition': 'eql/search/types.ts#L20-L32', 'esql._types.ESQLView': 'esql/_types/types.ts#L30-L40', @@ -1501,7 +1510,7 @@ 'features.get_features.Response': 'features/get_features/GetFeaturesResponse.ts#L22-L26', 'features.reset_features.Request': 'features/reset_features/ResetFeaturesRequest.ts#L24-L63', 'features.reset_features.Response': 'features/reset_features/ResetFeaturesResponse.ts#L22-L26', -'fleet.search.Request': 'fleet/search/SearchRequest.ts#L55-L271', +'fleet.search.Request': 'fleet/search/SearchRequest.ts#L55-L284', 'fleet.search.Response': 'fleet/search/SearchResponse.ts#L33-L50', 'graph._types.Connection': 'graph/_types/Connection.ts#L22-L27', 'graph._types.ExploreControls': 'graph/_types/ExploreControls.ts#L24-L49', @@ -1648,7 +1657,7 @@ 'indices._types.TranslogDurability': 'indices/_types/IndexSettings.ts#L399-L414', 'indices._types.TranslogRetention': 'indices/_types/IndexSettings.ts#L416-L435', 'indices.add_block.AddIndicesBlockStatus': 'indices/add_block/IndicesAddBlockResponse.ts#L30-L33', -'indices.add_block.Request': 'indices/add_block/IndicesAddBlockRequest.ts#L25-L91', +'indices.add_block.Request': 'indices/add_block/IndicesAddBlockRequest.ts#L25-L96', 'indices.add_block.Response': 'indices/add_block/IndicesAddBlockResponse.ts#L22-L28', 'indices.analyze.AnalyzeDetail': 'indices/analyze/types.ts#L24-L30', 'indices.analyze.AnalyzeToken': 'indices/analyze/types.ts#L37-L44', @@ -1660,13 +1669,13 @@ 'indices.analyze.TokenDetail': 'indices/analyze/types.ts#L71-L74', 'indices.cancel_migrate_reindex.Request': 'indices/cancel_migrate_reindex/MigrateCancelReindexRequest.ts#L23-L46', 'indices.cancel_migrate_reindex.Response': 'indices/cancel_migrate_reindex/MigrateCancelReindexResponse.ts#L22-L25', -'indices.clear_cache.Request': 'indices/clear_cache/IndicesClearCacheRequest.ts#L23-L101', +'indices.clear_cache.Request': 'indices/clear_cache/IndicesClearCacheRequest.ts#L23-L107', 'indices.clear_cache.Response': 'indices/clear_cache/IndicesClearCacheResponse.ts#L22-L25', 'indices.clone.Request': 'indices/clone/IndicesCloneRequest.ts#L27-L130', 'indices.clone.Response': 'indices/clone/IndicesCloneResponse.ts#L22-L28', 'indices.close.CloseIndexResult': 'indices/close/CloseIndexResponse.ts#L32-L35', 'indices.close.CloseShardResult': 'indices/close/CloseIndexResponse.ts#L37-L39', -'indices.close.Request': 'indices/close/CloseIndexRequest.ts#L29-L107', +'indices.close.Request': 'indices/close/CloseIndexRequest.ts#L29-L113', 'indices.close.Response': 'indices/close/CloseIndexResponse.ts#L24-L30', 'indices.create.Request': 'indices/create/IndicesCreateRequest.ts#L28-L118', 'indices.create.Response': 'indices/create/IndicesCreateResponse.ts#L22-L28', @@ -1678,7 +1687,7 @@ 'indices.data_streams_stats.DataStreamsStatsItem': 'indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L45-L65', 'indices.data_streams_stats.Request': 'indices/data_streams_stats/IndicesDataStreamsStatsRequest.ts#L23-L62', 'indices.data_streams_stats.Response': 'indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L25-L43', -'indices.delete.Request': 'indices/delete/IndicesDeleteRequest.ts#L24-L88', +'indices.delete.Request': 'indices/delete/IndicesDeleteRequest.ts#L24-L94', 'indices.delete.Response': 'indices/delete/IndicesDeleteResponse.ts#L22-L25', 'indices.delete_alias.IndicesAliasesResponseBody': 'indices/delete_alias/IndicesDeleteAliasResponse.ts#L27-L29', 'indices.delete_alias.Request': 'indices/delete_alias/IndicesDeleteAliasRequest.ts#L24-L72', @@ -1693,12 +1702,12 @@ 'indices.delete_index_template.Response': 'indices/delete_index_template/IndicesDeleteIndexTemplateResponse.ts#L22-L25', 'indices.delete_template.Request': 'indices/delete_template/IndicesDeleteTemplateRequest.ts#L24-L63', 'indices.delete_template.Response': 'indices/delete_template/IndicesDeleteTemplateResponse.ts#L22-L25', -'indices.disk_usage.Request': 'indices/disk_usage/IndicesDiskUsageRequest.ts#L23-L89', +'indices.disk_usage.Request': 'indices/disk_usage/IndicesDiskUsageRequest.ts#L23-L94', 'indices.disk_usage.Response': 'indices/disk_usage/IndicesDiskUsageResponse.ts#L22-L25', 'indices.downsample.Request': 'indices/downsample/Request.ts#L24-L66', 'indices.downsample.Response': 'indices/downsample/Response.ts#L22-L25', -'indices.exists.Request': 'indices/exists/IndicesExistsRequest.ts#L23-L81', -'indices.exists_alias.Request': 'indices/exists_alias/IndicesExistsAliasRequest.ts#L24-L82', +'indices.exists.Request': 'indices/exists/IndicesExistsRequest.ts#L23-L87', +'indices.exists_alias.Request': 'indices/exists_alias/IndicesExistsAliasRequest.ts#L24-L88', 'indices.exists_index_template.Request': 'indices/exists_index_template/IndicesExistsIndexTemplateRequest.ts#L24-L63', 'indices.exists_template.Request': 'indices/exists_template/IndicesExistsTemplateRequest.ts#L24-L72', 'indices.explain_data_lifecycle.DataStreamLifecycleExplain': 'indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L31-L41', @@ -1707,20 +1716,20 @@ 'indices.field_usage_stats.FieldSummary': 'indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L58-L67', 'indices.field_usage_stats.FieldsUsageBody': 'indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L33-L40', 'indices.field_usage_stats.InvertedIndex': 'indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L69-L77', -'indices.field_usage_stats.Request': 'indices/field_usage_stats/IndicesFieldUsageStatsRequest.ts#L23-L76', +'indices.field_usage_stats.Request': 'indices/field_usage_stats/IndicesFieldUsageStatsRequest.ts#L23-L81', 'indices.field_usage_stats.Response': 'indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L28-L31', 'indices.field_usage_stats.ShardsStats': 'indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L53-L56', 'indices.field_usage_stats.UsageStatsIndex': 'indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L42-L44', 'indices.field_usage_stats.UsageStatsShards': 'indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L46-L51', -'indices.flush.Request': 'indices/flush/IndicesFlushRequest.ts#L23-L93', +'indices.flush.Request': 'indices/flush/IndicesFlushRequest.ts#L23-L99', 'indices.flush.Response': 'indices/flush/IndicesFlushResponse.ts#L22-L25', -'indices.forcemerge.Request': 'indices/forcemerge/IndicesForceMergeRequest.ts#L24-L139', +'indices.forcemerge.Request': 'indices/forcemerge/IndicesForceMergeRequest.ts#L24-L145', 'indices.forcemerge.Response': 'indices/forcemerge/IndicesForceMergeResponse.ts#L22-L25', 'indices.forcemerge._types.ForceMergeResponseBody': 'indices/forcemerge/_types/response.ts#L22-L28', -'indices.get.Feature': 'indices/get/IndicesGetRequest.ts#L100-L104', -'indices.get.Request': 'indices/get/IndicesGetRequest.ts#L24-L98', +'indices.get.Feature': 'indices/get/IndicesGetRequest.ts#L105-L109', +'indices.get.Request': 'indices/get/IndicesGetRequest.ts#L24-L103', 'indices.get.Response': 'indices/get/IndicesGetResponse.ts#L24-L27', -'indices.get_alias.Request': 'indices/get_alias/IndicesGetAliasRequest.ts#L24-L94', +'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', @@ -1740,20 +1749,20 @@ 'indices.get_data_stream_settings.DataStreamSettings': 'indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L29-L39', 'indices.get_data_stream_settings.Request': 'indices/get_data_stream_settings/IndicesGetDataStreamSettingsRequest.ts#L24-L58', 'indices.get_data_stream_settings.Response': 'indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L22-L27', -'indices.get_field_mapping.Request': 'indices/get_field_mapping/IndicesGetFieldMappingRequest.ts#L23-L85', +'indices.get_field_mapping.Request': 'indices/get_field_mapping/IndicesGetFieldMappingRequest.ts#L23-L91', 'indices.get_field_mapping.Response': 'indices/get_field_mapping/IndicesGetFieldMappingResponse.ts#L24-L27', 'indices.get_field_mapping.TypeFieldMappings': 'indices/get_field_mapping/types.ts#L24-L26', 'indices.get_index_template.IndexTemplateItem': 'indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L29-L32', 'indices.get_index_template.Request': 'indices/get_index_template/IndicesGetIndexTemplateRequest.ts#L24-L75', 'indices.get_index_template.Response': 'indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L23-L27', 'indices.get_mapping.IndexMappingRecord': 'indices/get_mapping/IndicesGetMappingResponse.ts#L29-L32', -'indices.get_mapping.Request': 'indices/get_mapping/IndicesGetMappingRequest.ts#L24-L86', +'indices.get_mapping.Request': 'indices/get_mapping/IndicesGetMappingRequest.ts#L24-L92', 'indices.get_mapping.Response': 'indices/get_mapping/IndicesGetMappingResponse.ts#L24-L27', 'indices.get_migrate_reindex_status.Request': 'indices/get_migrate_reindex_status/MigrateGetReindexStatusRequest.ts#L23-L46', 'indices.get_migrate_reindex_status.Response': 'indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L23-L36', 'indices.get_migrate_reindex_status.StatusError': 'indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L44-L47', 'indices.get_migrate_reindex_status.StatusInProgress': 'indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L38-L42', -'indices.get_settings.Request': 'indices/get_settings/IndicesGetSettingsRequest.ts#L24-L114', +'indices.get_settings.Request': 'indices/get_settings/IndicesGetSettingsRequest.ts#L24-L117', 'indices.get_settings.Response': 'indices/get_settings/IndicesGetSettingsResponse.ts#L24-L27', 'indices.get_template.Request': 'indices/get_template/IndicesGetTemplateRequest.ts#L24-L76', 'indices.get_template.Response': 'indices/get_template/IndicesGetTemplateResponse.ts#L23-L26', @@ -1768,7 +1777,7 @@ 'indices.modify_data_stream.IndexAndDataStreamAction': 'indices/modify_data_stream/types.ts#L39-L44', 'indices.modify_data_stream.Request': 'indices/modify_data_stream/IndicesModifyDataStreamRequest.ts#L24-L49', 'indices.modify_data_stream.Response': 'indices/modify_data_stream/IndicesModifyDataStreamResponse.ts#L22-L25', -'indices.open.Request': 'indices/open/IndicesOpenRequest.ts#L29-L117', +'indices.open.Request': 'indices/open/IndicesOpenRequest.ts#L29-L123', 'indices.open.Response': 'indices/open/IndicesOpenResponse.ts#L20-L25', 'indices.promote_data_stream.Request': 'indices/promote_data_stream/IndicesPromoteDataStreamRequest.ts#L24-L61', 'indices.promote_data_stream.Response': 'indices/promote_data_stream/IndicesPromoteDataStreamResponse.ts#L22-L25', @@ -1789,9 +1798,9 @@ 'indices.put_index_template.IndexTemplateMapping': 'indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L167-L194', 'indices.put_index_template.Request': 'indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L39-L165', 'indices.put_index_template.Response': 'indices/put_index_template/IndicesPutIndexTemplateResponse.ts#L22-L25', -'indices.put_mapping.Request': 'indices/put_mapping/IndicesPutMappingRequest.ts#L42-L172', +'indices.put_mapping.Request': 'indices/put_mapping/IndicesPutMappingRequest.ts#L42-L178', 'indices.put_mapping.Response': 'indices/put_mapping/IndicesPutMappingResponse.ts#L22-L25', -'indices.put_settings.Request': 'indices/put_settings/IndicesPutSettingsRequest.ts#L25-L169', +'indices.put_settings.Request': 'indices/put_settings/IndicesPutSettingsRequest.ts#L25-L172', 'indices.put_settings.Response': 'indices/put_settings/IndicesPutSettingsResponse.ts#L22-L25', 'indices.put_template.Request': 'indices/put_template/IndicesPutTemplateRequest.ts#L29-L131', 'indices.put_template.Response': 'indices/put_template/IndicesPutTemplateResponse.ts#L22-L25', @@ -1800,26 +1809,28 @@ 'indices.recovery.RecoveryFiles': 'indices/recovery/types.ts#L56-L62', 'indices.recovery.RecoveryIndexStatus': 'indices/recovery/types.ts#L64-L74', 'indices.recovery.RecoveryOrigin': 'indices/recovery/types.ts#L76-L89', +'indices.recovery.RecoveryStage': 'indices/recovery/types.ts#L118-L131', 'indices.recovery.RecoveryStartStatus': 'indices/recovery/types.ts#L91-L96', 'indices.recovery.RecoveryStatus': 'indices/recovery/types.ts#L98-L100', -'indices.recovery.Request': 'indices/recovery/IndicesRecoveryRequest.ts#L23-L104', +'indices.recovery.RecoveryType': 'indices/recovery/types.ts#L133-L144', +'indices.recovery.Request': 'indices/recovery/IndicesRecoveryRequest.ts#L23-L110', 'indices.recovery.Response': 'indices/recovery/IndicesRecoveryResponse.ts#L24-L27', -'indices.recovery.ShardRecovery': 'indices/recovery/types.ts#L118-L135', +'indices.recovery.ShardRecovery': 'indices/recovery/types.ts#L146-L165', 'indices.recovery.TranslogStatus': 'indices/recovery/types.ts#L102-L109', 'indices.recovery.VerifyIndex': 'indices/recovery/types.ts#L111-L116', -'indices.refresh.Request': 'indices/refresh/IndicesRefreshRequest.ts#L23-L88', +'indices.refresh.Request': 'indices/refresh/IndicesRefreshRequest.ts#L23-L94', 'indices.refresh.Response': 'indices/refresh/IndicesRefreshResponse.ts#L22-L25', 'indices.reload_search_analyzers.ReloadDetails': 'indices/reload_search_analyzers/types.ts#L27-L31', 'indices.reload_search_analyzers.ReloadResult': 'indices/reload_search_analyzers/types.ts#L22-L25', -'indices.reload_search_analyzers.Request': 'indices/reload_search_analyzers/ReloadSearchAnalyzersRequest.ts#L23-L77', +'indices.reload_search_analyzers.Request': 'indices/reload_search_analyzers/ReloadSearchAnalyzersRequest.ts#L23-L83', 'indices.reload_search_analyzers.Response': 'indices/reload_search_analyzers/ReloadSearchAnalyzersResponse.ts#L22-L25', 'indices.remove_block.RemoveIndicesBlockStatus': 'indices/remove_block/IndicesRemoveBlockResponse.ts#L30-L34', -'indices.remove_block.Request': 'indices/remove_block/IndicesRemoveBlockRequest.ts#L25-L92', +'indices.remove_block.Request': 'indices/remove_block/IndicesRemoveBlockRequest.ts#L25-L97', 'indices.remove_block.Response': 'indices/remove_block/IndicesRemoveBlockResponse.ts#L23-L28', -'indices.resolve_cluster.Request': 'indices/resolve_cluster/ResolveClusterRequest.ts#L24-L144', +'indices.resolve_cluster.Request': 'indices/resolve_cluster/ResolveClusterRequest.ts#L24-L149', 'indices.resolve_cluster.ResolveClusterInfo': 'indices/resolve_cluster/ResolveClusterResponse.ts#L29-L55', 'indices.resolve_cluster.Response': 'indices/resolve_cluster/ResolveClusterResponse.ts#L24-L27', -'indices.resolve_index.Request': 'indices/resolve_index/ResolveIndexRequest.ts#L29-L96', +'indices.resolve_index.Request': 'indices/resolve_index/ResolveIndexRequest.ts#L29-L101', 'indices.resolve_index.ResolveIndexAliasItem': 'indices/resolve_index/ResolveIndexResponse.ts#L39-L42', 'indices.resolve_index.ResolveIndexDataStreamsItem': 'indices/resolve_index/ResolveIndexResponse.ts#L44-L48', 'indices.resolve_index.ResolveIndexItem': 'indices/resolve_index/ResolveIndexResponse.ts#L31-L37', @@ -1828,20 +1839,20 @@ 'indices.rollover.Response': 'indices/rollover/IndicesRolloverResponse.ts#L22-L32', 'indices.rollover.RolloverConditions': 'indices/rollover/types.ts#L24-L43', 'indices.segments.IndexSegment': 'indices/segments/types.ts#L24-L26', -'indices.segments.Request': 'indices/segments/IndicesSegmentsRequest.ts#L23-L74', +'indices.segments.Request': 'indices/segments/IndicesSegmentsRequest.ts#L23-L80', 'indices.segments.Response': 'indices/segments/IndicesSegmentsResponse.ts#L24-L29', -'indices.segments.Segment': 'indices/segments/types.ts#L28-L38', -'indices.segments.ShardSegmentRouting': 'indices/segments/types.ts#L40-L44', -'indices.segments.ShardsSegment': 'indices/segments/types.ts#L46-L51', +'indices.segments.Segment': 'indices/segments/types.ts#L28-L62', +'indices.segments.ShardSegmentRouting': 'indices/segments/types.ts#L64-L71', +'indices.segments.ShardsSegment': 'indices/segments/types.ts#L73-L78', 'indices.shard_stores.IndicesShardStores': 'indices/shard_stores/types.ts#L25-L27', -'indices.shard_stores.Request': 'indices/shard_stores/IndicesShardStoresRequest.ts#L24-L84', +'indices.shard_stores.Request': 'indices/shard_stores/IndicesShardStoresRequest.ts#L24-L89', 'indices.shard_stores.Response': 'indices/shard_stores/IndicesShardStoresResponse.ts#L24-L26', -'indices.shard_stores.ShardStore': 'indices/shard_stores/types.ts#L29-L36', -'indices.shard_stores.ShardStoreAllocation': 'indices/shard_stores/types.ts#L47-L51', -'indices.shard_stores.ShardStoreException': 'indices/shard_stores/types.ts#L53-L56', -'indices.shard_stores.ShardStoreNode': 'indices/shard_stores/types.ts#L38-L45', -'indices.shard_stores.ShardStoreStatus': 'indices/shard_stores/types.ts#L62-L71', -'indices.shard_stores.ShardStoreWrapper': 'indices/shard_stores/types.ts#L58-L60', +'indices.shard_stores.ShardStore': 'indices/shard_stores/types.ts#L29-L39', +'indices.shard_stores.ShardStoreAllocation': 'indices/shard_stores/types.ts#L50-L57', +'indices.shard_stores.ShardStoreException': 'indices/shard_stores/types.ts#L59-L62', +'indices.shard_stores.ShardStoreNode': 'indices/shard_stores/types.ts#L41-L48', +'indices.shard_stores.ShardStoreStatus': 'indices/shard_stores/types.ts#L68-L77', +'indices.shard_stores.ShardStoreWrapper': 'indices/shard_stores/types.ts#L64-L66', 'indices.shrink.Request': 'indices/shrink/IndicesShrinkRequest.ts#L27-L118', 'indices.shrink.Response': 'indices/shrink/IndicesShrinkResponse.ts#L22-L28', 'indices.simulate_index_template.Request': 'indices/simulate_index_template/IndicesSimulateIndexTemplateRequest.ts#L25-L74', @@ -1876,105 +1887,108 @@ 'indices.update_aliases.Request': 'indices/update_aliases/IndicesUpdateAliasesRequest.ts#L25-L63', 'indices.update_aliases.Response': 'indices/update_aliases/IndicesUpdateAliasesResponse.ts#L22-L25', 'indices.validate_query.IndicesValidationExplanation': 'indices/validate_query/IndicesValidateQueryResponse.ts#L33-L39', -'indices.validate_query.Request': 'indices/validate_query/IndicesValidateQueryRequest.ts#L25-L125', +'indices.validate_query.Request': 'indices/validate_query/IndicesValidateQueryRequest.ts#L25-L131', 'indices.validate_query.Response': 'indices/validate_query/IndicesValidateQueryResponse.ts#L24-L31', -'inference._types.AdaptiveAllocations': 'inference/_types/CommonTypes.ts#L134-L151', -'inference._types.Ai21ServiceSettings': 'inference/_types/CommonTypes.ts#L647-L670', -'inference._types.Ai21ServiceType': 'inference/_types/CommonTypes.ts#L677-L679', -'inference._types.Ai21TaskType': 'inference/_types/CommonTypes.ts#L672-L675', -'inference._types.AlibabaCloudServiceSettings': 'inference/_types/CommonTypes.ts#L681-L726', -'inference._types.AlibabaCloudServiceType': 'inference/_types/CommonTypes.ts#L751-L753', -'inference._types.AlibabaCloudTaskSettings': 'inference/_types/CommonTypes.ts#L728-L742', -'inference._types.AlibabaCloudTaskType': 'inference/_types/CommonTypes.ts#L744-L749', -'inference._types.AmazonBedrockServiceSettings': 'inference/_types/CommonTypes.ts#L755-L797', -'inference._types.AmazonBedrockServiceType': 'inference/_types/CommonTypes.ts#L831-L833', -'inference._types.AmazonBedrockTaskSettings': 'inference/_types/CommonTypes.ts#L799-L823', -'inference._types.AmazonBedrockTaskType': 'inference/_types/CommonTypes.ts#L825-L829', -'inference._types.AmazonSageMakerApi': 'inference/_types/CommonTypes.ts#L891-L894', -'inference._types.AmazonSageMakerServiceSettings': 'inference/_types/CommonTypes.ts#L835-L889', -'inference._types.AmazonSageMakerServiceType': 'inference/_types/CommonTypes.ts#L974-L976', -'inference._types.AmazonSageMakerTaskSettings': 'inference/_types/CommonTypes.ts#L925-L954', -'inference._types.AnthropicServiceSettings': 'inference/_types/CommonTypes.ts#L978-L994', -'inference._types.AnthropicServiceType': 'inference/_types/CommonTypes.ts#L1027-L1029', -'inference._types.AnthropicTaskSettings': 'inference/_types/CommonTypes.ts#L996-L1021', -'inference._types.AnthropicTaskType': 'inference/_types/CommonTypes.ts#L1023-L1025', -'inference._types.AzureAiStudioServiceSettings': 'inference/_types/CommonTypes.ts#L1031-L1071', -'inference._types.AzureAiStudioServiceType': 'inference/_types/CommonTypes.ts#L1118-L1120', -'inference._types.AzureAiStudioTaskSettings': 'inference/_types/CommonTypes.ts#L1073-L1110', -'inference._types.AzureAiStudioTaskType': 'inference/_types/CommonTypes.ts#L1112-L1116', -'inference._types.AzureOpenAIServiceSettings': 'inference/_types/CommonTypes.ts#L1122-L1165', -'inference._types.AzureOpenAIServiceType': 'inference/_types/CommonTypes.ts#L1181-L1183', -'inference._types.AzureOpenAITaskSettings': 'inference/_types/CommonTypes.ts#L1167-L1173', -'inference._types.AzureOpenAITaskType': 'inference/_types/CommonTypes.ts#L1175-L1179', -'inference._types.BaseReasoningDetail': 'inference/_types/CommonTypes.ts#L404-L421', -'inference._types.CohereEmbeddingType': 'inference/_types/CommonTypes.ts#L1236-L1242', -'inference._types.CohereInputType': 'inference/_types/CommonTypes.ts#L1244-L1249', -'inference._types.CohereServiceSettings': 'inference/_types/CommonTypes.ts#L1185-L1224', -'inference._types.CohereServiceType': 'inference/_types/CommonTypes.ts#L1232-L1234', -'inference._types.CohereSimilarityType': 'inference/_types/CommonTypes.ts#L1251-L1255', -'inference._types.CohereTaskSettings': 'inference/_types/CommonTypes.ts#L1263-L1295', -'inference._types.CohereTaskType': 'inference/_types/CommonTypes.ts#L1226-L1230', -'inference._types.CohereTruncateType': 'inference/_types/CommonTypes.ts#L1257-L1261', +'inference._types.AdaptiveAllocations': 'inference/_types/CommonTypes.ts#L135-L152', +'inference._types.Ai21ServiceSettings': 'inference/_types/Ai21Types.ts#L22-L45', +'inference._types.Ai21ServiceType': 'inference/_types/Ai21Types.ts#L52-L54', +'inference._types.Ai21TaskType': 'inference/_types/Ai21Types.ts#L47-L50', +'inference._types.AlibabaCloudServiceSettings': 'inference/_types/AlibabaCloudTypes.ts#L22-L67', +'inference._types.AlibabaCloudServiceType': 'inference/_types/AlibabaCloudTypes.ts#L92-L94', +'inference._types.AlibabaCloudTaskSettings': 'inference/_types/AlibabaCloudTypes.ts#L69-L83', +'inference._types.AlibabaCloudTaskType': 'inference/_types/AlibabaCloudTypes.ts#L85-L90', +'inference._types.AmazonBedrockServiceSettings': 'inference/_types/AmazonBedrockTypes.ts#L23-L65', +'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#L724-L727', +'inference._types.AmazonSageMakerElementType': 'inference/_types/CommonTypes.ts#L735-L739', +'inference._types.AmazonSageMakerServiceSettings': 'inference/_types/CommonTypes.ts#L656-L722', +'inference._types.AmazonSageMakerServiceType': 'inference/_types/CommonTypes.ts#L790-L792', +'inference._types.AmazonSageMakerSimilarity': 'inference/_types/CommonTypes.ts#L729-L733', +'inference._types.AmazonSageMakerTaskSettings': 'inference/_types/CommonTypes.ts#L741-L770', +'inference._types.AnthropicServiceSettings': 'inference/_types/CommonTypes.ts#L794-L810', +'inference._types.AnthropicServiceType': 'inference/_types/CommonTypes.ts#L843-L845', +'inference._types.AnthropicTaskSettings': 'inference/_types/CommonTypes.ts#L812-L837', +'inference._types.AnthropicTaskType': 'inference/_types/CommonTypes.ts#L839-L841', +'inference._types.AzureAiStudioServiceSettings': 'inference/_types/CommonTypes.ts#L847-L887', +'inference._types.AzureAiStudioServiceType': 'inference/_types/CommonTypes.ts#L933-L935', +'inference._types.AzureAiStudioTaskSettings': 'inference/_types/CommonTypes.ts#L889-L925', +'inference._types.AzureAiStudioTaskType': 'inference/_types/CommonTypes.ts#L927-L931', +'inference._types.AzureOpenAIServiceSettings': 'inference/_types/CommonTypes.ts#L937-L1024', +'inference._types.AzureOpenAIServiceType': 'inference/_types/CommonTypes.ts#L1051-L1053', +'inference._types.AzureOpenAITaskSettings': 'inference/_types/CommonTypes.ts#L1026-L1043', +'inference._types.AzureOpenAITaskType': 'inference/_types/CommonTypes.ts#L1045-L1049', +'inference._types.BaseReasoningDetail': 'inference/_types/CommonTypes.ts#L405-L422', +'inference._types.CohereEmbeddingType': 'inference/_types/CommonTypes.ts#L1106-L1112', +'inference._types.CohereInputType': 'inference/_types/CommonTypes.ts#L1114-L1119', +'inference._types.CohereServiceSettings': 'inference/_types/CommonTypes.ts#L1055-L1094', +'inference._types.CohereServiceType': 'inference/_types/CommonTypes.ts#L1102-L1104', +'inference._types.CohereSimilarityType': 'inference/_types/CommonTypes.ts#L1121-L1125', +'inference._types.CohereTaskSettings': 'inference/_types/CommonTypes.ts#L1133-L1165', +'inference._types.CohereTaskType': 'inference/_types/CommonTypes.ts#L1096-L1100', +'inference._types.CohereTruncateType': 'inference/_types/CommonTypes.ts#L1127-L1131', '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#L512-L524', -'inference._types.CompletionToolChoice': 'inference/_types/CommonTypes.ts#L475-L487', -'inference._types.CompletionToolChoiceFunction': 'inference/_types/CommonTypes.ts#L464-L473', -'inference._types.CompletionToolFunction': 'inference/_types/CommonTypes.ts#L489-L510', -'inference._types.CompletionToolType': 'inference/_types/CommonTypes.ts#L153-L156', -'inference._types.ContentObject': 'inference/_types/CommonTypes.ts#L158-L179', -'inference._types.ContentType': 'inference/_types/CommonTypes.ts#L181-L185', -'inference._types.ContextualAIServiceSettings': 'inference/_types/CommonTypes.ts#L1574-L1595', -'inference._types.ContextualAIServiceType': 'inference/_types/CommonTypes.ts#L1570-L1572', -'inference._types.ContextualAITaskSettings': 'inference/_types/CommonTypes.ts#L1597-L1615', -'inference._types.CustomRequestParams': 'inference/_types/CommonTypes.ts#L1374-L1385', -'inference._types.CustomResponseParams': 'inference/_types/CommonTypes.ts#L1387-L1541', -'inference._types.CustomServiceSettings': 'inference/_types/CommonTypes.ts#L1297-L1372', -'inference._types.CustomServiceType': 'inference/_types/CommonTypes.ts#L1550-L1552', -'inference._types.CustomTaskSettings': 'inference/_types/CommonTypes.ts#L1554-L1568', -'inference._types.CustomTaskType': 'inference/_types/CommonTypes.ts#L1543-L1548', -'inference._types.DeepSeekServiceSettings': 'inference/_types/CommonTypes.ts#L1617-L1637', -'inference._types.DeepSeekServiceType': 'inference/_types/CommonTypes.ts#L1639-L1641', +'inference._types.CompletionTool': 'inference/_types/CommonTypes.ts#L513-L525', +'inference._types.CompletionToolChoice': 'inference/_types/CommonTypes.ts#L476-L488', +'inference._types.CompletionToolChoiceFunction': 'inference/_types/CommonTypes.ts#L465-L474', +'inference._types.CompletionToolFunction': 'inference/_types/CommonTypes.ts#L490-L511', +'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#L1455-L1476', +'inference._types.ContextualAIServiceType': 'inference/_types/CommonTypes.ts#L1451-L1453', +'inference._types.ContextualAITaskSettings': 'inference/_types/CommonTypes.ts#L1478-L1490', +'inference._types.CustomRequestParams': 'inference/_types/CommonTypes.ts#L1253-L1264', +'inference._types.CustomResponseParams': 'inference/_types/CommonTypes.ts#L1266-L1420', +'inference._types.CustomServiceInputType': 'inference/_types/CommonTypes.ts#L1167-L1172', +'inference._types.CustomServiceSettings': 'inference/_types/CommonTypes.ts#L1176-L1251', +'inference._types.CustomServiceType': 'inference/_types/CommonTypes.ts#L1429-L1431', +'inference._types.CustomTaskSettings': 'inference/_types/CommonTypes.ts#L1435-L1449', +'inference._types.CustomTaskType': 'inference/_types/CommonTypes.ts#L1422-L1427', +'inference._types.DeepSeekServiceSettings': 'inference/_types/CommonTypes.ts#L1492-L1512', +'inference._types.DeepSeekServiceType': 'inference/_types/CommonTypes.ts#L1514-L1516', '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#L1643-L1699', -'inference._types.ElasticsearchServiceType': 'inference/_types/CommonTypes.ts#L1715-L1717', -'inference._types.ElasticsearchTaskSettings': 'inference/_types/CommonTypes.ts#L1701-L1707', -'inference._types.ElasticsearchTaskType': 'inference/_types/CommonTypes.ts#L1709-L1713', -'inference._types.ElserServiceSettings': 'inference/_types/CommonTypes.ts#L1719-L1745', -'inference._types.ElserServiceType': 'inference/_types/CommonTypes.ts#L1751-L1753', -'inference._types.ElserTaskType': 'inference/_types/CommonTypes.ts#L1747-L1749', -'inference._types.EmbeddingContentFormat': 'inference/_types/CommonTypes.ts#L642-L645', -'inference._types.EmbeddingContentObject': 'inference/_types/CommonTypes.ts#L609-L617', -'inference._types.EmbeddingContentObjectContents': 'inference/_types/CommonTypes.ts#L619-L635', -'inference._types.EmbeddingContentType': 'inference/_types/CommonTypes.ts#L637-L640', +'inference._types.ElasticsearchServiceSettings': 'inference/_types/CommonTypes.ts#L1518-L1574', +'inference._types.ElasticsearchServiceType': 'inference/_types/CommonTypes.ts#L1590-L1592', +'inference._types.ElasticsearchTaskSettings': 'inference/_types/CommonTypes.ts#L1576-L1582', +'inference._types.ElasticsearchTaskType': 'inference/_types/CommonTypes.ts#L1584-L1588', +'inference._types.ElserServiceSettings': 'inference/_types/CommonTypes.ts#L1594-L1620', +'inference._types.ElserServiceType': 'inference/_types/CommonTypes.ts#L1626-L1628', +'inference._types.ElserTaskType': 'inference/_types/CommonTypes.ts#L1622-L1624', +'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.EmbeddingInferenceResult': 'inference/_types/Results.ts#L81-L89', -'inference._types.EmbeddingInput': 'inference/_types/CommonTypes.ts#L590-L595', -'inference._types.EncryptedReasoningDetail': 'inference/_types/CommonTypes.ts#L423-L433', -'inference._types.FileContent': 'inference/_types/CommonTypes.ts#L204-L213', -'inference._types.FireworksAIServiceSettings': 'inference/_types/CommonTypes.ts#L2288-L2328', -'inference._types.FireworksAIServiceType': 'inference/_types/CommonTypes.ts#L2336-L2338', -'inference._types.FireworksAISimilarityType': 'inference/_types/CommonTypes.ts#L2340-L2344', -'inference._types.FireworksAITaskSettings': 'inference/_types/CommonTypes.ts#L2346-L2363', -'inference._types.FireworksAITaskType': 'inference/_types/CommonTypes.ts#L2330-L2334', -'inference._types.GoogleAiServiceType': 'inference/_types/CommonTypes.ts#L1778-L1780', -'inference._types.GoogleAiStudioServiceSettings': 'inference/_types/CommonTypes.ts#L1755-L1771', -'inference._types.GoogleAiStudioTaskType': 'inference/_types/CommonTypes.ts#L1773-L1776', -'inference._types.GoogleModelGardenProvider': 'inference/_types/CommonTypes.ts#L1869-L1876', -'inference._types.GoogleVertexAIServiceSettings': 'inference/_types/CommonTypes.ts#L1782-L1867', -'inference._types.GoogleVertexAIServiceType': 'inference/_types/CommonTypes.ts#L1917-L1919', -'inference._types.GoogleVertexAITaskSettings': 'inference/_types/CommonTypes.ts#L1878-L1901', -'inference._types.GoogleVertexAITaskType': 'inference/_types/CommonTypes.ts#L1910-L1915', -'inference._types.GroqServiceSettings': 'inference/_types/CommonTypes.ts#L1921-L1943', -'inference._types.GroqServiceType': 'inference/_types/CommonTypes.ts#L1949-L1951', -'inference._types.GroqTaskType': 'inference/_types/CommonTypes.ts#L1945-L1947', -'inference._types.HuggingFaceServiceSettings': 'inference/_types/CommonTypes.ts#L1953-L1983', -'inference._types.HuggingFaceServiceType': 'inference/_types/CommonTypes.ts#L2004-L2006', -'inference._types.HuggingFaceTaskSettings': 'inference/_types/CommonTypes.ts#L1985-L1995', -'inference._types.HuggingFaceTaskType': 'inference/_types/CommonTypes.ts#L1997-L2002', -'inference._types.ImageUrl': 'inference/_types/CommonTypes.ts#L187-L196', -'inference._types.ImageUrlDetail': 'inference/_types/CommonTypes.ts#L198-L202', +'inference._types.EmbeddingInput': 'inference/_types/CommonTypes.ts#L591-L596', +'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#L2042-L2082', +'inference._types.FireworksAIServiceType': 'inference/_types/CommonTypes.ts#L2090-L2092', +'inference._types.FireworksAISimilarityType': 'inference/_types/CommonTypes.ts#L2094-L2098', +'inference._types.FireworksAITaskSettings': 'inference/_types/CommonTypes.ts#L2100-L2117', +'inference._types.FireworksAITaskType': 'inference/_types/CommonTypes.ts#L2084-L2088', +'inference._types.GoogleAiServiceType': 'inference/_types/CommonTypes.ts#L1653-L1655', +'inference._types.GoogleAiStudioServiceSettings': 'inference/_types/CommonTypes.ts#L1630-L1646', +'inference._types.GoogleAiStudioTaskType': 'inference/_types/CommonTypes.ts#L1648-L1651', +'inference._types.GoogleModelGardenProvider': 'inference/_types/CommonTypes.ts#L1744-L1751', +'inference._types.GoogleVertexAIServiceSettings': 'inference/_types/CommonTypes.ts#L1657-L1742', +'inference._types.GoogleVertexAIServiceType': 'inference/_types/CommonTypes.ts#L1792-L1794', +'inference._types.GoogleVertexAITaskSettings': 'inference/_types/CommonTypes.ts#L1753-L1776', +'inference._types.GoogleVertexAITaskType': 'inference/_types/CommonTypes.ts#L1785-L1790', +'inference._types.GroqServiceSettings': 'inference/_types/CommonTypes.ts#L1796-L1818', +'inference._types.GroqServiceType': 'inference/_types/CommonTypes.ts#L1824-L1826', +'inference._types.GroqTaskType': 'inference/_types/CommonTypes.ts#L1820-L1822', +'inference._types.HuggingFaceServiceSettings': 'inference/_types/CommonTypes.ts#L1828-L1858', +'inference._types.HuggingFaceServiceType': 'inference/_types/CommonTypes.ts#L1879-L1881', +'inference._types.HuggingFaceTaskSettings': 'inference/_types/CommonTypes.ts#L1860-L1870', +'inference._types.HuggingFaceTaskType': 'inference/_types/CommonTypes.ts#L1872-L1877', +'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', 'inference._types.InferenceEndpoint': 'inference/_types/Services.ts#L52-L74', 'inference._types.InferenceEndpointInfo': 'inference/_types/Services.ts#L76-L88', @@ -2005,50 +2019,50 @@ '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#L2113-L2117', -'inference._types.JinaAIServiceSettings': 'inference/_types/CommonTypes.ts#L2008-L2056', -'inference._types.JinaAIServiceType': 'inference/_types/CommonTypes.ts#L2096-L2098', -'inference._types.JinaAISimilarityType': 'inference/_types/CommonTypes.ts#L2100-L2104', -'inference._types.JinaAITaskSettings': 'inference/_types/CommonTypes.ts#L2058-L2088', -'inference._types.JinaAITaskType': 'inference/_types/CommonTypes.ts#L2090-L2094', -'inference._types.JinaAITextEmbeddingTask': 'inference/_types/CommonTypes.ts#L2106-L2111', -'inference._types.LlamaServiceSettings': 'inference/_types/CommonTypes.ts#L2119-L2149', -'inference._types.LlamaServiceType': 'inference/_types/CommonTypes.ts#L2157-L2159', -'inference._types.LlamaSimilarityType': 'inference/_types/CommonTypes.ts#L2161-L2165', -'inference._types.LlamaTaskType': 'inference/_types/CommonTypes.ts#L2151-L2155', -'inference._types.Message': 'inference/_types/CommonTypes.ts#L299-L392', -'inference._types.MessageContent': 'inference/_types/CommonTypes.ts#L294-L297', -'inference._types.MistralServiceSettings': 'inference/_types/CommonTypes.ts#L2167-L2192', -'inference._types.MistralServiceType': 'inference/_types/CommonTypes.ts#L2200-L2202', -'inference._types.MistralTaskType': 'inference/_types/CommonTypes.ts#L2194-L2198', -'inference._types.NvidiaInputType': 'inference/_types/CommonTypes.ts#L2283-L2286', -'inference._types.NvidiaServiceSettings': 'inference/_types/CommonTypes.ts#L2204-L2242', -'inference._types.NvidiaServiceType': 'inference/_types/CommonTypes.ts#L2251-L2253', -'inference._types.NvidiaSimilarityType': 'inference/_types/CommonTypes.ts#L2255-L2259', -'inference._types.NvidiaTaskSettings': 'inference/_types/CommonTypes.ts#L2261-L2281', -'inference._types.NvidiaTaskType': 'inference/_types/CommonTypes.ts#L2244-L2249', -'inference._types.OpenAIServiceSettings': 'inference/_types/CommonTypes.ts#L2365-L2409', -'inference._types.OpenAIServiceType': 'inference/_types/CommonTypes.ts#L2442-L2444', -'inference._types.OpenAISimilarityType': 'inference/_types/CommonTypes.ts#L2411-L2415', -'inference._types.OpenAITaskSettings': 'inference/_types/CommonTypes.ts#L2417-L2434', -'inference._types.OpenAITaskType': 'inference/_types/CommonTypes.ts#L2436-L2440', -'inference._types.OpenShiftAiServiceSettings': 'inference/_types/CommonTypes.ts#L2446-L2479', -'inference._types.OpenShiftAiServiceType': 'inference/_types/CommonTypes.ts#L2488-L2490', -'inference._types.OpenShiftAiSimilarityType': 'inference/_types/CommonTypes.ts#L2492-L2496', -'inference._types.OpenShiftAiTaskSettings': 'inference/_types/CommonTypes.ts#L2498-L2507', -'inference._types.OpenShiftAiTaskType': 'inference/_types/CommonTypes.ts#L2481-L2486', +'inference._types.JinaAIElementType': 'inference/_types/CommonTypes.ts#L1988-L1992', +'inference._types.JinaAIServiceSettings': 'inference/_types/CommonTypes.ts#L1883-L1931', +'inference._types.JinaAIServiceType': 'inference/_types/CommonTypes.ts#L1971-L1973', +'inference._types.JinaAISimilarityType': 'inference/_types/CommonTypes.ts#L1975-L1979', +'inference._types.JinaAITaskSettings': 'inference/_types/CommonTypes.ts#L1933-L1963', +'inference._types.JinaAITaskType': 'inference/_types/CommonTypes.ts#L1965-L1969', +'inference._types.JinaAITextEmbeddingTask': 'inference/_types/CommonTypes.ts#L1981-L1986', +'inference._types.LlamaServiceSettings': 'inference/_types/CommonTypes.ts#L1994-L2024', +'inference._types.LlamaServiceType': 'inference/_types/CommonTypes.ts#L2032-L2034', +'inference._types.LlamaSimilarityType': 'inference/_types/CommonTypes.ts#L2036-L2040', +'inference._types.LlamaTaskType': 'inference/_types/CommonTypes.ts#L2026-L2030', +'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', +'inference._types.MistralServiceType': 'inference/_types/MistralTypes.ts#L56-L58', +'inference._types.MistralTaskType': 'inference/_types/MistralTypes.ts#L50-L54', +'inference._types.NvidiaInputType': 'inference/_types/NvidiaTypes.ts#L103-L106', +'inference._types.NvidiaServiceSettings': 'inference/_types/NvidiaTypes.ts#L24-L62', +'inference._types.NvidiaServiceType': 'inference/_types/NvidiaTypes.ts#L71-L73', +'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#L2119-L2163', +'inference._types.OpenAIServiceType': 'inference/_types/CommonTypes.ts#L2196-L2198', +'inference._types.OpenAISimilarityType': 'inference/_types/CommonTypes.ts#L2165-L2169', +'inference._types.OpenAITaskSettings': 'inference/_types/CommonTypes.ts#L2171-L2188', +'inference._types.OpenAITaskType': 'inference/_types/CommonTypes.ts#L2190-L2194', +'inference._types.OpenShiftAiServiceSettings': 'inference/_types/CommonTypes.ts#L2200-L2233', +'inference._types.OpenShiftAiServiceType': 'inference/_types/CommonTypes.ts#L2242-L2244', +'inference._types.OpenShiftAiSimilarityType': 'inference/_types/CommonTypes.ts#L2246-L2250', +'inference._types.OpenShiftAiTaskSettings': 'inference/_types/CommonTypes.ts#L2252-L2261', +'inference._types.OpenShiftAiTaskType': 'inference/_types/CommonTypes.ts#L2235-L2240', '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#L215-L245', -'inference._types.ReasoningDetail': 'inference/_types/CommonTypes.ts#L394-L402', -'inference._types.ReasoningEffort': 'inference/_types/CommonTypes.ts#L247-L254', -'inference._types.ReasoningSummary': 'inference/_types/CommonTypes.ts#L256-L260', -'inference._types.RequestChatCompletion': 'inference/_types/CommonTypes.ts#L25-L132', -'inference._types.RequestEmbedding': 'inference/_types/CommonTypes.ts#L526-L588', +'inference._types.Reasoning': 'inference/_types/CommonTypes.ts#L216-L246', +'inference._types.ReasoningDetail': 'inference/_types/CommonTypes.ts#L395-L403', +'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.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', -'inference._types.SummaryReasoningDetail': 'inference/_types/CommonTypes.ts#L435-L445', +'inference._types.SummaryReasoningDetail': 'inference/_types/CommonTypes.ts#L436-L446', 'inference._types.TaskType': 'inference/_types/TaskType.ts#L20-L30', 'inference._types.TaskTypeAi21': 'inference/_types/TaskType.ts#L38-L41', 'inference._types.TaskTypeAlibabaCloudAI': 'inference/_types/TaskType.ts#L43-L48', @@ -2077,17 +2091,17 @@ 'inference._types.TaskTypeVoyageAI': 'inference/_types/TaskType.ts#L167-L170', 'inference._types.TaskTypeWatsonx': 'inference/_types/TaskType.ts#L178-L182', 'inference._types.TextEmbeddingInferenceResult': 'inference/_types/Results.ts#L71-L79', -'inference._types.TextReasoningDetail': 'inference/_types/CommonTypes.ts#L447-L462', -'inference._types.ThinkingConfig': 'inference/_types/CommonTypes.ts#L1903-L1908', -'inference._types.ToolCall': 'inference/_types/CommonTypes.ts#L276-L292', -'inference._types.ToolCallFunction': 'inference/_types/CommonTypes.ts#L262-L274', -'inference._types.VoyageAIServiceSettings': 'inference/_types/CommonTypes.ts#L2509-L2540', -'inference._types.VoyageAIServiceType': 'inference/_types/CommonTypes.ts#L2573-L2575', -'inference._types.VoyageAITaskSettings': 'inference/_types/CommonTypes.ts#L2542-L2566', -'inference._types.VoyageAITaskType': 'inference/_types/CommonTypes.ts#L2568-L2571', -'inference._types.WatsonxServiceSettings': 'inference/_types/CommonTypes.ts#L2577-L2613', -'inference._types.WatsonxServiceType': 'inference/_types/CommonTypes.ts#L2622-L2624', -'inference._types.WatsonxTaskType': 'inference/_types/CommonTypes.ts#L2615-L2620', +'inference._types.TextReasoningDetail': 'inference/_types/CommonTypes.ts#L448-L463', +'inference._types.ThinkingConfig': 'inference/_types/CommonTypes.ts#L1778-L1783', +'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#L2263-L2294', +'inference._types.VoyageAIServiceType': 'inference/_types/CommonTypes.ts#L2327-L2329', +'inference._types.VoyageAITaskSettings': 'inference/_types/CommonTypes.ts#L2296-L2320', +'inference._types.VoyageAITaskType': 'inference/_types/CommonTypes.ts#L2322-L2325', +'inference._types.WatsonxServiceSettings': 'inference/_types/CommonTypes.ts#L2331-L2367', +'inference._types.WatsonxServiceType': 'inference/_types/CommonTypes.ts#L2376-L2378', +'inference._types.WatsonxTaskType': 'inference/_types/CommonTypes.ts#L2369-L2374', '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', @@ -2158,11 +2172,11 @@ 'inference.rerank.Response': 'inference/rerank/RerankResponse.ts#L22-L25', 'inference.sparse_embedding.Request': 'inference/sparse_embedding/SparseEmbeddingRequest.ts#L25-L66', 'inference.sparse_embedding.Response': 'inference/sparse_embedding/SparseEmbeddingResponse.ts#L22-L25', -'inference.stream_completion.Request': 'inference/stream_completion/StreamInferenceRequest.ts#L25-L74', +'inference.stream_completion.Request': 'inference/stream_completion/StreamInferenceRequest.ts#L25-L75', 'inference.stream_completion.Response': 'inference/stream_completion/StreamInferenceResponse.ts#L22-L25', 'inference.text_embedding.Request': 'inference/text_embedding/TextEmbeddingRequest.ts#L25-L79', 'inference.text_embedding.Response': 'inference/text_embedding/TextEmbeddingResponse.ts#L22-L25', -'inference.update.Request': 'inference/update/UpdateInferenceRequest.ts#L25-L63', +'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', @@ -2192,50 +2206,50 @@ '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-L1032', -'ingest._types.GsubProcessor': 'ingest/_types/Processors.ts#L1034-L1058', -'ingest._types.HtmlStripProcessor': 'ingest/_types/Processors.ts#L1060-L1076', -'ingest._types.InferenceConfig': 'ingest/_types/Processors.ts#L1117-L1129', -'ingest._types.InferenceConfigClassification': 'ingest/_types/Processors.ts#L1144-L1170', -'ingest._types.InferenceConfigRegression': 'ingest/_types/Processors.ts#L1131-L1142', -'ingest._types.InferenceProcessor': 'ingest/_types/Processors.ts#L1078-L1110', +'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.Ingest': 'ingest/_types/Simulation.ts#L28-L36', -'ingest._types.InputConfig': 'ingest/_types/Processors.ts#L1112-L1115', +'ingest._types.InputConfig': 'ingest/_types/Processors.ts#L1119-L1122', 'ingest._types.IpLocationProcessor': 'ingest/_types/Processors.ts#L501-L535', 'ingest._types.Ipinfo': 'ingest/_types/Database.ts#L59-L59', -'ingest._types.JoinProcessor': 'ingest/_types/Processors.ts#L1172-L1187', -'ingest._types.JsonProcessor': 'ingest/_types/Processors.ts#L1189-L1218', -'ingest._types.JsonProcessorConflictStrategy': 'ingest/_types/Processors.ts#L1220-L1225', -'ingest._types.KeyValueProcessor': 'ingest/_types/Processors.ts#L1227-L1279', +'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.Local': 'ingest/_types/Database.ts#L63-L65', -'ingest._types.LowercaseProcessor': 'ingest/_types/Processors.ts#L1281-L1297', +'ingest._types.LowercaseProcessor': 'ingest/_types/Processors.ts#L1288-L1304', 'ingest._types.Maxmind': 'ingest/_types/Database.ts#L55-L57', -'ingest._types.NetworkDirectionProcessor': 'ingest/_types/Processors.ts#L1299-L1333', +'ingest._types.NetworkDirectionProcessor': 'ingest/_types/Processors.ts#L1306-L1340', '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#L1335-L1346', +'ingest._types.PipelineProcessor': 'ingest/_types/Processors.ts#L1342-L1353', '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#L1348-L1389', -'ingest._types.RegisteredDomainProcessor': 'ingest/_types/Processors.ts#L1391-L1407', -'ingest._types.RemoveProcessor': 'ingest/_types/Processors.ts#L1409-L1423', -'ingest._types.RenameProcessor': 'ingest/_types/Processors.ts#L1425-L1441', -'ingest._types.RerouteProcessor': 'ingest/_types/Processors.ts#L1443-L1471', -'ingest._types.ScriptProcessor': 'ingest/_types/Processors.ts#L1473-L1493', -'ingest._types.SetProcessor': 'ingest/_types/Processors.ts#L1495-L1530', -'ingest._types.SetSecurityUserProcessor': 'ingest/_types/Processors.ts#L1532-L1541', -'ingest._types.ShapeType': 'ingest/_types/Processors.ts#L1543-L1546', +'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.SimulateDocumentResult': 'ingest/_types/Simulation.ts#L45-L49', -'ingest._types.SortProcessor': 'ingest/_types/Processors.ts#L1548-L1564', -'ingest._types.SplitProcessor': 'ingest/_types/Processors.ts#L1566-L1591', -'ingest._types.TerminateProcessor': 'ingest/_types/Processors.ts#L1593-L1593', -'ingest._types.TrimProcessor': 'ingest/_types/Processors.ts#L1595-L1611', -'ingest._types.UppercaseProcessor': 'ingest/_types/Processors.ts#L1613-L1629', -'ingest._types.UriPartsProcessor': 'ingest/_types/Processors.ts#L1649-L1675', -'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L1631-L1647', +'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.Web': 'ingest/_types/Database.ts#L61-L61', @@ -2597,11 +2611,11 @@ 'ml.put_calendar_job.Response': 'ml/put_calendar_job/MlPutCalendarJobResponse.ts#L22-L31', 'ml.put_data_frame_analytics.Request': 'ml/put_data_frame_analytics/MlPutDataFrameAnalyticsRequest.ts#L36-L164', 'ml.put_data_frame_analytics.Response': 'ml/put_data_frame_analytics/MlPutDataFrameAnalyticsResponse.ts#L31-L47', -'ml.put_datafeed.Request': 'ml/put_datafeed/MlPutDatafeedRequest.ts#L38-L188', +'ml.put_datafeed.Request': 'ml/put_datafeed/MlPutDatafeedRequest.ts#L38-L194', 'ml.put_datafeed.Response': 'ml/put_datafeed/MlPutDatafeedResponse.ts#L31-L49', 'ml.put_filter.Request': 'ml/put_filter/MlPutFilterRequest.ts#L23-L61', 'ml.put_filter.Response': 'ml/put_filter/MlPutFilterResponse.ts#L22-L28', -'ml.put_job.Request': 'ml/put_job/MlPutJobRequest.ts#L30-L153', +'ml.put_job.Request': 'ml/put_job/MlPutJobRequest.ts#L30-L159', 'ml.put_job.Response': 'ml/put_job/MlPutJobResponse.ts#L29-L52', 'ml.put_trained_model.AggregateOutput': 'ml/put_trained_model/types.ts#L101-L106', 'ml.put_trained_model.Definition': 'ml/put_trained_model/types.ts#L24-L29', @@ -2643,7 +2657,7 @@ 'ml.stop_trained_model_deployment.Response': 'ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentResponse.ts#L20-L22', 'ml.update_data_frame_analytics.Request': 'ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsRequest.ts#L24-L83', 'ml.update_data_frame_analytics.Response': 'ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsResponse.ts#L30-L45', -'ml.update_datafeed.Request': 'ml/update_datafeed/MlUpdateDatafeedRequest.ts#L31-L167', +'ml.update_datafeed.Request': 'ml/update_datafeed/MlUpdateDatafeedRequest.ts#L31-L173', 'ml.update_datafeed.Response': 'ml/update_datafeed/MlUpdateDatafeedResponse.ts#L31-L52', 'ml.update_filter.Request': 'ml/update_filter/MlUpdateFilterRequest.ts#L23-L63', 'ml.update_filter.Response': 'ml/update_filter/MlUpdateFilterResponse.ts#L22-L28', @@ -2896,7 +2910,7 @@ 'searchable_snapshots.cache_stats.Request': 'searchable_snapshots/cache_stats/Request.ts#L23-L51', 'searchable_snapshots.cache_stats.Response': 'searchable_snapshots/cache_stats/Response.ts#L24-L28', 'searchable_snapshots.cache_stats.Shared': 'searchable_snapshots/cache_stats/Response.ts#L34-L43', -'searchable_snapshots.clear_cache.Request': 'searchable_snapshots/clear_cache/SearchableSnapshotsClearCacheRequest.ts#L23-L69', +'searchable_snapshots.clear_cache.Request': 'searchable_snapshots/clear_cache/SearchableSnapshotsClearCacheRequest.ts#L23-L75', 'searchable_snapshots.clear_cache.Response': 'searchable_snapshots/clear_cache/SearchableSnapshotsClearCacheResponse.ts#L22-L25', 'searchable_snapshots.mount.MountedSnapshot': 'searchable_snapshots/mount/types.ts#L23-L27', 'searchable_snapshots.mount.Request': 'searchable_snapshots/mount/SearchableSnapshotsMountRequest.ts#L27-L97', @@ -2906,7 +2920,6 @@ 'searchable_snapshots.stats.Response': 'searchable_snapshots/stats/SearchableSnapshotsStatsResponse.ts#L22-L27', 'security._types.Access': 'security/_types/Access.ts#L22-L31', 'security._types.ApiKey': 'security/_types/ApiKey.ts#L27-L120', -'security._types.ApiKeyManagedBy': 'security/_types/ApiKey.ts#L127-L130', 'security._types.ApiKeyType': 'security/_types/ApiKey.ts#L122-L125', 'security._types.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L412-L414', 'security._types.ApplicationPrivileges': 'security/_types/Privileges.ts#L28-L41', @@ -2914,6 +2927,7 @@ 'security._types.ClusterNode': 'security/_types/ClusterNode.ts#L22-L24', 'security._types.ClusterPrivilege': 'security/_types/Privileges.ts#L43-L210', '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.GrantType': 'security/_types/GrantType.ts#L20-L30', @@ -2953,7 +2967,7 @@ 'security.authenticate.AuthenticateApiKey': 'security/authenticate/SecurityAuthenticateResponse.ts#L45-L50', 'security.authenticate.Request': 'security/authenticate/SecurityAuthenticateRequest.ts#L23-L43', 'security.authenticate.Response': 'security/authenticate/SecurityAuthenticateResponse.ts#L25-L43', -'security.authenticate.Token': 'security/authenticate/types.ts#L22-L29', +'security.authenticate.Token': 'security/authenticate/types.ts#L23-L35', 'security.bulk_delete_role.Request': 'security/bulk_delete_role/SecurityBulkDeleteRoleRequest.ts#L23-L55', 'security.bulk_delete_role.Response': 'security/bulk_delete_role/SecurityBulkDeleteRoleResponse.ts#L22-L37', 'security.bulk_put_role.Request': 'security/bulk_put_role/SecurityBulkPutRoleRequest.ts#L25-L57', @@ -2972,6 +2986,8 @@ 'security.clear_cached_roles.Response': 'security/clear_cached_roles/ClearCachedRolesResponse.ts#L25-L32', 'security.clear_cached_service_tokens.Request': 'security/clear_cached_service_tokens/ClearCachedServiceTokensRequest.ts#L23-L59', 'security.clear_cached_service_tokens.Response': 'security/clear_cached_service_tokens/ClearCachedServiceTokensResponse.ts#L25-L32', +'security.clone_api_key.Request': 'security/clone_api_key/SecurityCloneApiKeyRequest.ts#L24-L77', +'security.clone_api_key.Response': 'security/clone_api_key/SecurityCloneApiKeyResponse.ts#L23-L48', 'security.create_api_key.Request': 'security/create_api_key/SecurityCreateApiKeyRequest.ts#L26-L91', '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', @@ -3206,7 +3222,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-L227', +'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', @@ -3272,7 +3288,7 @@ 'tasks._types.TaskListResponseBase': 'tasks/_types/TaskListResponseBase.ts#L26-L38', 'tasks.cancel.Request': 'tasks/cancel/CancelTasksRequest.ts#L23-L79', 'tasks.cancel.Response': 'tasks/cancel/CancelTasksResponse.ts#L22-L25', -'tasks.get.Request': 'tasks/get/GetTaskRequest.ts#L24-L66', +'tasks.get.Request': 'tasks/get/GetTaskRequest.ts#L24-L72', 'tasks.get.Response': 'tasks/get/GetTaskResponse.ts#L24-L31', 'tasks.list.Request': 'tasks/list/ListTasksRequest.ts#L25-L141', 'tasks.list.Response': 'tasks/list/ListTasksResponse.ts#L22-L25', @@ -3294,10 +3310,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-L154', -'transform._types.Source': 'transform/_types/Transform.ts#L156-L187', -'transform._types.SyncContainer': 'transform/_types/Transform.ts#L191-L197', -'transform._types.TimeSync': 'transform/_types/Transform.ts#L199-L211', +'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', @@ -3323,7 +3339,7 @@ 'transform.put_transform.Response': 'transform/put_transform/PutTransformResponse.ts#L22-L25', 'transform.reset_transform.Request': 'transform/reset_transform/ResetTransformRequest.ts#L24-L63', 'transform.reset_transform.Response': 'transform/reset_transform/ResetTransformResponse.ts#L22-L25', -'transform.schedule_now_transform.Request': 'transform/schedule_now_transform/ScheduleNowTransformRequest.ts#L23-L59', +'transform.schedule_now_transform.Request': 'transform/schedule_now_transform/ScheduleNowTransformRequest.ts#L23-L68', 'transform.schedule_now_transform.Response': 'transform/schedule_now_transform/ScheduleNowTransformResponse.ts#L21-L24', 'transform.set_upgrade_mode.Request': 'transform/set_upgrade_mode/TransformSetUpgradeModeRequest.ts#L24-L67', 'transform.set_upgrade_mode.Response': 'transform/set_upgrade_mode/TransformSetUpgradeModeResponse.ts#L22-L25', @@ -3541,10 +3557,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/44d1f02c7fc7aa8e212795e2a508830ca9ca0298/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/5965499a37c8bc59b568b5ab9153c30f4d17df42/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/eql/EqlSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlSearchRequest.java index cfc5437a0e..b81c3df183 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlSearchRequest.java @@ -177,9 +177,13 @@ public static EqlSearchRequest of(Function_all string or when no indices have been - * specified) + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -284,7 +288,10 @@ public final List filter() { } /** - * If true, missing or closed indices are not included in the response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -631,9 +638,13 @@ private Builder(EqlSearchRequest instance) { } /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -826,7 +837,10 @@ public final Builder filter(Function> fn) { } /** - * If true, missing or closed indices are not included in the response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/FleetSearchRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/FleetSearchRequest.java index 92ed560183..a5da81c9b6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/FleetSearchRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/FleetSearchRequest.java @@ -324,6 +324,14 @@ public final Map aggregations() { } /** + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. + *

* API name: {@code allow_no_indices} */ @Nullable @@ -476,6 +484,11 @@ public final Boolean ignoreThrottled() { } /** + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. + *

* API name: {@code ignore_unavailable} */ @Nullable @@ -1323,6 +1336,14 @@ public final Builder aggregations(String key, Functionfalse, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. + *

* API name: {@code allow_no_indices} */ public final Builder allowNoIndices(@Nullable Boolean value) { @@ -1573,6 +1594,11 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. + *

* API name: {@code ignore_unavailable} */ public final Builder ignoreUnavailable(@Nullable Boolean value) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java index 34214248ad..ea7467b984 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/AddBlockRequest.java @@ -107,12 +107,13 @@ public static AddBlockRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -143,8 +144,10 @@ public final List expandWildcards() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -234,12 +237,13 @@ private Builder(AddBlockRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -289,8 +293,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ClearCacheRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ClearCacheRequest.java index ca9a13a1bb..30a266950f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ClearCacheRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ClearCacheRequest.java @@ -115,10 +115,13 @@ public static ClearCacheRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -161,8 +164,10 @@ public final List fields() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -249,10 +254,13 @@ private Builder(ClearCacheRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -329,8 +337,10 @@ public final Builder fields(String value, String... values) { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CloseIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CloseIndexRequest.java index f4b72b451f..4e3e7feea2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CloseIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/CloseIndexRequest.java @@ -134,10 +134,13 @@ public static CloseIndexRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -159,8 +162,10 @@ public final List expandWildcards() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -255,10 +260,13 @@ private Builder(CloseIndexRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -298,8 +306,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java index 199c3cf222..e01bc99191 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteIndexRequest.java @@ -109,10 +109,13 @@ public static DeleteIndexRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -134,8 +137,10 @@ public final List expandWildcards() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -217,10 +222,13 @@ private Builder(DeleteIndexRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -260,8 +268,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DiskUsageRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DiskUsageRequest.java index d9fd3711d3..5047eab889 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DiskUsageRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DiskUsageRequest.java @@ -117,11 +117,13 @@ public static DiskUsageRequest of(Function_all value targets only missing or closed indices. - * This behavior applies even if the request targets other open indices. For - * example, a request targeting foo*,bar* returns an error if an - * index starts with foo but no index starts with bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -154,8 +156,10 @@ public final Boolean flush() { } /** - * If true, missing or closed indices are not included in the - * response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -225,11 +229,13 @@ private Builder(DiskUsageRequest instance) { } /** - * If false, the request returns an error if any wildcard expression, index - * alias, or _all value targets only missing or closed indices. - * This behavior applies even if the request targets other open indices. For - * example, a request targeting foo*,bar* returns an error if an - * index starts with foo but no index starts with bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -280,8 +286,10 @@ public final Builder flush(@Nullable Boolean value) { } /** - * If true, missing or closed indices are not included in the - * response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java index 87fd494c11..eb21809e01 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsAliasRequest.java @@ -104,10 +104,13 @@ public static ExistsAliasRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -129,8 +132,10 @@ public final List expandWildcards() { } /** - * If false, requests that include a missing data stream or index - * in the target indices or data streams return an error. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -209,10 +214,13 @@ private Builder(ExistsAliasRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -252,8 +260,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, requests that include a missing data stream or index - * in the target indices or data streams return an error. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java index 66a9bafbdc..54072fd598 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsRequest.java @@ -108,10 +108,13 @@ public static ExistsRequest of(Function> f } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -143,8 +146,10 @@ public final Boolean flatSettings() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -224,10 +229,13 @@ private Builder(ExistsRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -277,8 +285,10 @@ public final Builder flatSettings(@Nullable Boolean value) { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FieldUsageStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FieldUsageStatsRequest.java index de45ce735b..ab3aa997cb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FieldUsageStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FieldUsageStatsRequest.java @@ -106,12 +106,13 @@ public static FieldUsageStatsRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -143,8 +144,10 @@ public final List fields() { } /** - * If true, missing or closed indices are not included in the - * response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -197,12 +200,13 @@ private Builder(FieldUsageStatsRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -268,8 +272,10 @@ public final Builder fields(String value, String... values) { } /** - * If true, missing or closed indices are not included in the - * response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FlushRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FlushRequest.java index b48d410788..f48873ac59 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FlushRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/FlushRequest.java @@ -121,10 +121,13 @@ public static FlushRequest of(Function> fn) } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -157,8 +160,10 @@ public final Boolean force() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -227,10 +232,13 @@ private Builder(FlushRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -281,8 +289,10 @@ public final Builder force(@Nullable Boolean value) { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ForcemergeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ForcemergeRequest.java index 67abb75876..52fd77ac9f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ForcemergeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ForcemergeRequest.java @@ -183,9 +183,13 @@ public static ForcemergeRequest of(Function_all string or when no indices have been - * specified) + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -215,8 +219,10 @@ public final Boolean flush() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -312,9 +318,13 @@ private Builder(ForcemergeRequest instance) { } /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -360,8 +370,10 @@ public final Builder flush(@Nullable Boolean value) { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java index 311d9c374e..47d10078a4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetAliasRequest.java @@ -102,10 +102,13 @@ public static GetAliasRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -127,8 +130,10 @@ public final List expandWildcards() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -207,10 +212,13 @@ private Builder(GetAliasRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -250,8 +258,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetFieldMappingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetFieldMappingRequest.java index 6659c0ccc0..f496de8e2d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetFieldMappingRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetFieldMappingRequest.java @@ -106,10 +106,13 @@ public static GetFieldMappingRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -141,8 +144,10 @@ public final List fields() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -210,10 +215,13 @@ private Builder(GetFieldMappingRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -279,8 +287,10 @@ public final Builder fields(String value, String... values) { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java index ebc145466c..a8231ed81b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndexRequest.java @@ -116,11 +116,13 @@ public static GetIndexRequest of(Functionfalse, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -160,7 +162,10 @@ public final Boolean flatSettings() { } /** - * If false, requests that target a missing index return an error. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -259,11 +264,13 @@ private Builder(GetIndexRequest instance) { } /** - * If false, the request returns an error if any wildcard expression, index - * alias, or _all value targets only missing or closed indices. This behavior - * applies even if the request targets other open indices. For example, a - * request targeting foo*,bar* returns an error if an index starts with foo but - * no index starts with bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -335,7 +342,10 @@ public final Builder flatSettings(@Nullable Boolean value) { } /** - * If false, requests that target a missing index return an error. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java index 4d39582192..afae3aaa29 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetIndicesSettingsRequest.java @@ -115,11 +115,13 @@ public static GetIndicesSettingsRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -151,8 +153,10 @@ public final Boolean flatSettings() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -268,11 +272,13 @@ private Builder(GetIndicesSettingsRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -322,8 +328,10 @@ public final Builder flatSettings(@Nullable Boolean value) { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java index b6c5246092..22bb8ce04f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetMappingRequest.java @@ -104,10 +104,13 @@ public static GetMappingRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -129,8 +132,10 @@ public final List expandWildcards() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -215,10 +220,13 @@ private Builder(GetMappingRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -258,8 +266,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndicesStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndicesStatsRequest.java index f01df0a45b..57af319cf0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndicesStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/IndicesStatsRequest.java @@ -237,7 +237,7 @@ public final Level level() { } /** - * Limit the information returned the specific metrics + * Comma-separated list of metrics used to limit the request. *

* API name: {@code metric} */ @@ -505,7 +505,7 @@ public final Builder level(@Nullable Level value) { } /** - * Limit the information returned the specific metrics + * Comma-separated list of metrics used to limit the request. *

* API name: {@code metric} *

@@ -517,7 +517,7 @@ public final Builder metric(List list) { } /** - * Limit the information returned the specific metrics + * Comma-separated list of metrics used to limit the request. *

* API name: {@code metric} *

diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/OpenRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/OpenRequest.java index b37e152f3f..02e2d84eed 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/OpenRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/OpenRequest.java @@ -139,10 +139,13 @@ public static OpenRequest of(Function> fn) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -164,8 +167,10 @@ public final List expandWildcards() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -263,10 +268,13 @@ private Builder(OpenRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -306,8 +314,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java index f3e414a1c5..c60f3e05fb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutIndicesSettingsRequest.java @@ -190,12 +190,13 @@ public static PutIndicesSettingsRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -227,7 +228,10 @@ public final Boolean flatSettings() { } /** - * If true, returns settings in flat format. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -360,12 +364,13 @@ private Builder(PutIndicesSettingsRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -415,7 +420,10 @@ public final Builder flatSettings(@Nullable Boolean value) { } /** - * If true, returns settings in flat format. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java index d37ca2b51a..6a6c214b03 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutMappingRequest.java @@ -213,10 +213,13 @@ public final SourceField source() { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -278,8 +281,10 @@ public final List expandWildcards() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -636,10 +641,13 @@ public final Builder source(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -753,8 +761,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RecoveryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RecoveryRequest.java index 17222b96cc..33f5231059 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RecoveryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RecoveryRequest.java @@ -145,10 +145,13 @@ public final Boolean activeOnly() { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -181,8 +184,10 @@ public final List expandWildcards() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -249,10 +254,13 @@ public final Builder activeOnly(@Nullable Boolean value) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -303,8 +311,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java index a63c6198db..287c86cf3a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java @@ -116,10 +116,13 @@ public static RefreshRequest of(Function> } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -141,8 +144,10 @@ public final List expandWildcards() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -191,10 +196,13 @@ private Builder(RefreshRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -234,8 +242,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ReloadSearchAnalyzersRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ReloadSearchAnalyzersRequest.java index 38264a2db2..3c80a529e9 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ReloadSearchAnalyzersRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ReloadSearchAnalyzersRequest.java @@ -119,9 +119,13 @@ public static ReloadSearchAnalyzersRequest of(Function_all string or when no indices have been - * specified) + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -141,8 +145,10 @@ public final List expandWildcards() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -204,9 +210,13 @@ private Builder(ReloadSearchAnalyzersRequest instance) { } /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -242,8 +252,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RemoveBlockRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RemoveBlockRequest.java index b53c0e3c9a..7ddcbfa3c4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RemoveBlockRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RemoveBlockRequest.java @@ -107,12 +107,13 @@ public static RemoveBlockRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -143,8 +144,10 @@ public final List expandWildcards() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -236,12 +239,13 @@ private Builder(RemoveBlockRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -291,8 +295,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveClusterRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveClusterRequest.java index 4b92490307..4b879891b4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveClusterRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveClusterRequest.java @@ -181,14 +181,16 @@ public static ResolveClusterRequest of(Function_all value targets only missing or closed indices. - * This behavior applies even if the request targets other open indices. For - * example, a request targeting foo*,bar* returns an error if an - * index starts with foo but no index starts with bar. - * NOTE: This option is only supported when specifying an index expression. You - * will get an error if you specify index options to the - * _resolve/cluster API endpoint that takes no index expression. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. NOTE: This option is only supported + * when specifying an index expression. You will get an error if you specify + * index options to the _resolve/cluster API endpoint that takes no + * index expression. *

* API name: {@code allow_no_indices} */ @@ -229,9 +231,11 @@ public final Boolean ignoreThrottled() { } /** - * If false, the request returns an error if it targets a missing or closed - * index. NOTE: This option is only supported when specifying an index - * expression. You will get an error if you specify index options to the + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. NOTE: This option is only supported when specifying an + * index expression. You will get an error if you specify index options to the * _resolve/cluster API endpoint that takes no index expression. *

* API name: {@code ignore_unavailable} @@ -312,14 +316,16 @@ private Builder(ResolveClusterRequest instance) { } /** - * If false, the request returns an error if any wildcard expression, index - * alias, or _all value targets only missing or closed indices. - * This behavior applies even if the request targets other open indices. For - * example, a request targeting foo*,bar* returns an error if an - * index starts with foo but no index starts with bar. - * NOTE: This option is only supported when specifying an index expression. You - * will get an error if you specify index options to the - * _resolve/cluster API endpoint that takes no index expression. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. NOTE: This option is only supported + * when specifying an index expression. You will get an error if you specify + * index options to the _resolve/cluster API endpoint that takes no + * index expression. *

* API name: {@code allow_no_indices} */ @@ -381,9 +387,11 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** - * If false, the request returns an error if it targets a missing or closed - * index. NOTE: This option is only supported when specifying an index - * expression. You will get an error if you specify index options to the + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. NOTE: This option is only supported when specifying an + * index expression. You will get an error if you specify index options to the * _resolve/cluster API endpoint that takes no index expression. *

* API name: {@code ignore_unavailable} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveIndexRequest.java index 2445d79ac8..3ff879a60a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ResolveIndexRequest.java @@ -104,12 +104,13 @@ public static ResolveIndexRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -131,8 +132,10 @@ public final List expandWildcards() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -233,12 +236,13 @@ private Builder(ResolveIndexRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. For example, a request targeting foo*,bar* returns an - * error if an index starts with foo but no index starts with - * bar. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -278,8 +282,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsRequest.java index a2bf16367b..6ca39147eb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SegmentsRequest.java @@ -95,10 +95,13 @@ public static SegmentsRequest of(Functionfalse, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -120,8 +123,10 @@ public final List expandWildcards() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -170,10 +175,13 @@ private Builder(SegmentsRequest instance) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -213,8 +221,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ShardStoresRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ShardStoresRequest.java index 163bec68a0..7925300a71 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ShardStoresRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ShardStoresRequest.java @@ -112,9 +112,13 @@ public static ShardStoresRequest of(Functionfalse, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -135,7 +139,10 @@ public final List expandWildcards() { } /** - * If true, missing or closed indices are not included in the response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -197,9 +204,13 @@ private Builder(ShardStoresRequest instance) { } /** - * If false, the request returns an error if any wildcard expression, index - * alias, or _all value targets only missing or closed indices. This behavior - * applies even if the request targets other open indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -237,7 +248,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * If true, missing or closed indices are not included in the response. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java index 4fc6a7e30e..5dcef5e170 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ValidateQueryRequest.java @@ -150,10 +150,13 @@ public final Boolean allShards() { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -230,8 +233,10 @@ public final Boolean explain() { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -394,10 +399,13 @@ public final Builder allShards(@Nullable Boolean value) { } /** - * If false, the request returns an error if any wildcard - * expression, index alias, or _all value targets only missing or - * closed indices. This behavior applies even if the request targets other open - * indices. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -492,8 +500,10 @@ public final Builder explain(@Nullable Boolean value) { } /** - * If false, the request returns an error if it targets a missing - * or closed index. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryStage.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryStage.java new file mode 100644 index 0000000000..da866eb214 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryStage.java @@ -0,0 +1,93 @@ +/* + * 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.recovery; + +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 RecoveryStage implements JsonEnum { + /** + * Recovery has not started. + */ + Init("INIT"), + + /** + * Reading index metadata and copying bytes from source to destination. + */ + Index("INDEX"), + + /** + * Verifying the integrity of the index. + */ + VerifyIndex("VERIFY_INDEX"), + + /** + * Replaying the transaction log. + */ + Translog("TRANSLOG"), + + /** + * Cleanup. + */ + Finalize("FINALIZE"), + + /** + * Complete. + */ + Done("DONE"), + + ; + + private final String jsonValue; + + RecoveryStage(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + RecoveryStage.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryType.java new file mode 100644 index 0000000000..55d6ed9c66 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/RecoveryType.java @@ -0,0 +1,92 @@ +/* + * 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.recovery; + +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 RecoveryType implements JsonEnum { + /** + * An empty store. Indicates a new primary shard or the forced allocation of an + * empty primary shard using the cluster reroute API. + */ + EmptyStore("EMPTY_STORE"), + + /** + * The store of an existing primary shard. Indicates recovery is related to node + * startup or the allocation of an existing primary shard. + */ + ExistingStore("EXISTING_STORE"), + + /** + * Shards of another index on the same node. Indicates recovery is related to a + * clone, shrink, or split operation. + */ + LocalShards("LOCAL_SHARDS"), + + /** + * A primary shard on another node. Indicates recovery is related to shard + * replication. + */ + Peer("PEER"), + + /** + * A snapshot. Indicates recovery is related to a snapshot restore operation. + */ + Snapshot("SNAPSHOT"), + + ; + + private final String jsonValue; + + RecoveryType(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + RecoveryType.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/ShardRecovery.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/ShardRecovery.java index 439b8e85db..7e67d4a05c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/ShardRecovery.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/recovery/ShardRecovery.java @@ -34,7 +34,6 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.Long; -import java.lang.String; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -72,7 +71,7 @@ public class ShardRecovery implements JsonpSerializable { private final RecoveryOrigin source; - private final String stage; + private final RecoveryStage stage; @Nullable private final RecoveryStartStatus start; @@ -97,7 +96,7 @@ public class ShardRecovery implements JsonpSerializable { private final TranslogStatus translog; - private final String type; + private final RecoveryType type; private final VerifyIndex verifyIndex; @@ -157,9 +156,11 @@ public final RecoveryOrigin source() { } /** - * Required - API name: {@code stage} + * Required - The recovery stage. + *

+ * API name: {@code stage} */ - public final String stage() { + public final RecoveryStage stage() { return this.stage; } @@ -232,9 +233,11 @@ public final TranslogStatus translog() { } /** - * Required - API name: {@code type} + * Required - The recovery source type. + *

+ * API name: {@code type} */ - public final String type() { + public final RecoveryType type() { return this.type; } @@ -269,8 +272,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { this.source.serialize(generator, mapper); generator.writeKey("stage"); - generator.write(this.stage); - + this.stage.serialize(generator, mapper); if (this.start != null) { generator.writeKey("start"); this.start.serialize(generator, mapper); @@ -307,8 +309,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { this.translog.serialize(generator, mapper); generator.writeKey("type"); - generator.write(this.type); - + this.type.serialize(generator, mapper); generator.writeKey("verify_index"); this.verifyIndex.serialize(generator, mapper); @@ -334,7 +335,7 @@ public static class Builder extends WithJsonObjectBuilderBase implement private RecoveryOrigin source; - private String stage; + private RecoveryStage stage; @Nullable private RecoveryStartStatus start; @@ -359,7 +360,7 @@ public static class Builder extends WithJsonObjectBuilderBase implement private TranslogStatus translog; - private String type; + private RecoveryType type; private VerifyIndex verifyIndex; @@ -431,9 +432,11 @@ public final Builder source(Function + * API name: {@code stage} */ - public final Builder stage(String value) { + public final Builder stage(RecoveryStage value) { this.stage = value; return this; } @@ -539,9 +542,11 @@ public final Builder translog(Function + * API name: {@code type} */ - public final Builder type(String value) { + public final Builder type(RecoveryType value) { this.type = value; return this; } @@ -599,7 +604,7 @@ protected static void setupShardRecoveryDeserializer(ObjectDeserializer> fn) { } /** - * Required - API name: {@code attributes} + * Required - Contains information about whether high compression was enabled + * and per-field vector formats. + *

+ * API name: {@code attributes} */ public final Map attributes() { return this.attributes; } /** - * Required - API name: {@code committed} + * Required - If true, the segment is synced to disk. Segments that + * are synced can survive a hard reboot. If false, the data from + * uncommitted segments is also stored in the transaction log so that + * Elasticsearch is able to replay changes on the next start. + *

+ * API name: {@code committed} */ public final boolean committed() { return this.committed; } /** - * Required - API name: {@code compound} + * Required - If true, Lucene merged all files from the segment + * into a single file to save file descriptors. + *

+ * API name: {@code compound} */ public final boolean compound() { return this.compound; } /** - * Required - API name: {@code deleted_docs} + * Required - The number of deleted documents as reported by Lucene, which may + * be higher or lower than the number of delete operations you have performed. + * This number excludes deletes that were performed recently and do not yet + * belong to a segment. Deleted documents are cleaned up by the automatic merge + * process if it makes sense to do so. Also, Elasticsearch creates extra deleted + * documents to internally track the recent history of operations on a shard. + *

+ * API name: {@code deleted_docs} */ public final long deletedDocs() { return this.deletedDocs; } /** - * Required - API name: {@code generation} + * Required - Generation number, such as 0. Elasticsearch + * increments this generation number for each segment written then uses this + * number to derive the segment name. + *

+ * API name: {@code generation} */ public final int generation() { return this.generation; } /** - * Required - API name: {@code search} + * Required - If true, the segment is searchable. If + * false, the segment has most likely been written to disk but + * needs a refresh to be searchable. + *

+ * API name: {@code search} */ public final boolean search() { return this.search; } /** - * Required - API name: {@code size_in_bytes} + * Required - Disk space used by the segment, in bytes. + *

+ * API name: {@code size_in_bytes} */ public final double sizeInBytes() { return this.sizeInBytes; } /** - * Required - API name: {@code num_docs} + * Required - The number of documents as reported by Lucene. This excludes + * deleted documents and counts any nested documents separately from their + * parents. It also excludes documents which were indexed recently and do not + * yet belong to a segment. + *

+ * API name: {@code num_docs} */ public final long numDocs() { return this.numDocs; } /** - * Required - API name: {@code version} + * Required - Version of Lucene used to write the segment. + *

+ * API name: {@code version} */ public final String version() { return this.version; @@ -258,7 +293,10 @@ private Builder(Segment instance) { } /** - * Required - API name: {@code attributes} + * Required - Contains information about whether high compression was enabled + * and per-field vector formats. + *

+ * API name: {@code attributes} *

* Adds all entries of map to attributes. */ @@ -268,7 +306,10 @@ public final Builder attributes(Map map) { } /** - * Required - API name: {@code attributes} + * Required - Contains information about whether high compression was enabled + * and per-field vector formats. + *

+ * API name: {@code attributes} *

* Adds an entry to attributes. */ @@ -278,7 +319,12 @@ public final Builder attributes(String key, String value) { } /** - * Required - API name: {@code committed} + * Required - If true, the segment is synced to disk. Segments that + * are synced can survive a hard reboot. If false, the data from + * uncommitted segments is also stored in the transaction log so that + * Elasticsearch is able to replay changes on the next start. + *

+ * API name: {@code committed} */ public final Builder committed(boolean value) { this.committed = value; @@ -286,7 +332,10 @@ public final Builder committed(boolean value) { } /** - * Required - API name: {@code compound} + * Required - If true, Lucene merged all files from the segment + * into a single file to save file descriptors. + *

+ * API name: {@code compound} */ public final Builder compound(boolean value) { this.compound = value; @@ -294,7 +343,14 @@ public final Builder compound(boolean value) { } /** - * Required - API name: {@code deleted_docs} + * Required - The number of deleted documents as reported by Lucene, which may + * be higher or lower than the number of delete operations you have performed. + * This number excludes deletes that were performed recently and do not yet + * belong to a segment. Deleted documents are cleaned up by the automatic merge + * process if it makes sense to do so. Also, Elasticsearch creates extra deleted + * documents to internally track the recent history of operations on a shard. + *

+ * API name: {@code deleted_docs} */ public final Builder deletedDocs(long value) { this.deletedDocs = value; @@ -302,7 +358,11 @@ public final Builder deletedDocs(long value) { } /** - * Required - API name: {@code generation} + * Required - Generation number, such as 0. Elasticsearch + * increments this generation number for each segment written then uses this + * number to derive the segment name. + *

+ * API name: {@code generation} */ public final Builder generation(int value) { this.generation = value; @@ -310,7 +370,11 @@ public final Builder generation(int value) { } /** - * Required - API name: {@code search} + * Required - If true, the segment is searchable. If + * false, the segment has most likely been written to disk but + * needs a refresh to be searchable. + *

+ * API name: {@code search} */ public final Builder search(boolean value) { this.search = value; @@ -318,7 +382,9 @@ public final Builder search(boolean value) { } /** - * Required - API name: {@code size_in_bytes} + * Required - Disk space used by the segment, in bytes. + *

+ * API name: {@code size_in_bytes} */ public final Builder sizeInBytes(double value) { this.sizeInBytes = value; @@ -326,7 +392,12 @@ public final Builder sizeInBytes(double value) { } /** - * Required - API name: {@code num_docs} + * Required - The number of documents as reported by Lucene. This excludes + * deleted documents and counts any nested documents separately from their + * parents. It also excludes documents which were indexed recently and do not + * yet belong to a segment. + *

+ * API name: {@code num_docs} */ public final Builder numDocs(long value) { this.numDocs = value; @@ -334,7 +405,9 @@ public final Builder numDocs(long value) { } /** - * Required - API name: {@code version} + * Required - Version of Lucene used to write the segment. + *

+ * API name: {@code version} */ public final Builder version(String value) { this.version = value; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/ShardSegmentRouting.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/ShardSegmentRouting.java index e6ca346581..f7d5f35964 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/ShardSegmentRouting.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/segments/ShardSegmentRouting.java @@ -82,21 +82,28 @@ public static ShardSegmentRouting of(Function + * API name: {@code node} */ public final String node() { return this.node; } /** - * Required - API name: {@code primary} + * Required - If true, the shard is a primary shard. + *

+ * API name: {@code primary} */ public final boolean primary() { return this.primary; } /** - * Required - API name: {@code state} + * Required - The state of the shard, such as STARTED or + * RELOCATING. + *

+ * API name: {@code state} */ public final String state() { return this.state; @@ -153,7 +160,9 @@ private Builder(ShardSegmentRouting instance) { } /** - * Required - API name: {@code node} + * Required - The node ID of the node that holds the shard. + *

+ * API name: {@code node} */ public final Builder node(String value) { this.node = value; @@ -161,7 +170,9 @@ public final Builder node(String value) { } /** - * Required - API name: {@code primary} + * Required - If true, the shard is a primary shard. + *

+ * API name: {@code primary} */ public final Builder primary(boolean value) { this.primary = value; @@ -169,7 +180,10 @@ public final Builder primary(boolean value) { } /** - * Required - API name: {@code state} + * Required - The state of the shard, such as STARTED or + * RELOCATING. + *

+ * API name: {@code state} */ public final Builder state(String value) { this.state = value; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStore.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStore.java index c622df878a..6ae2f4bebf 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStore.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStore.java @@ -104,13 +104,18 @@ public final ShardStoreNode node() { } /** - * Required - API name: {@code allocation} + * Required - The status of the store copy, whether it is used as a primary, + * replica, or not used at all. + *

+ * API name: {@code allocation} */ public final ShardStoreAllocation allocation() { return this.allocation; } /** + * The allocation ID of the store copy. + *

* API name: {@code allocation_id} */ @Nullable @@ -119,6 +124,9 @@ public final String allocationId() { } /** + * Any exception encountered while opening the shard index or from an earlier + * engine failure. + *

* API name: {@code store_exception} */ @Nullable @@ -210,7 +218,10 @@ private Builder(ShardStore instance) { } /** - * Required - API name: {@code allocation} + * Required - The status of the store copy, whether it is used as a primary, + * replica, or not used at all. + *

+ * API name: {@code allocation} */ public final Builder allocation(ShardStoreAllocation value) { this.allocation = value; @@ -218,6 +229,8 @@ public final Builder allocation(ShardStoreAllocation value) { } /** + * The allocation ID of the store copy. + *

* API name: {@code allocation_id} */ public final Builder allocationId(@Nullable String value) { @@ -226,6 +239,9 @@ public final Builder allocationId(@Nullable String value) { } /** + * Any exception encountered while opening the shard index or from an earlier + * engine failure. + *

* API name: {@code store_exception} */ public final Builder storeException(@Nullable ShardStoreException value) { @@ -234,6 +250,9 @@ public final Builder storeException(@Nullable ShardStoreException value) { } /** + * Any exception encountered while opening the shard index or from an earlier + * engine failure. + *

* API name: {@code store_exception} */ public final Builder storeException( diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStoreAllocation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStoreAllocation.java index 83bfccd21f..c7abf9fe3b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStoreAllocation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/shard_stores/ShardStoreAllocation.java @@ -46,10 +46,19 @@ */ @JsonpDeserializable public enum ShardStoreAllocation implements JsonEnum { + /** + * The store copy is used as a primary shard. + */ Primary("primary"), + /** + * The store copy is used as a replica shard. + */ Replica("replica"), + /** + * The store copy is not used. + */ Unused("unused"), ; 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/AzureOpenAIServiceSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AzureOpenAIServiceSettings.java index 6b949d8493..af92c676cf 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 @@ -31,6 +31,7 @@ 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; @@ -65,6 +66,12 @@ public class AzureOpenAIServiceSettings implements JsonpSerializable { private final String apiVersion; + @Nullable + private final String clientId; + + @Nullable + private final String clientSecret; + private final String deploymentId; @Nullable @@ -75,16 +82,25 @@ public class AzureOpenAIServiceSettings implements JsonpSerializable { private final String resourceName; + private final List scopes; + + @Nullable + private final String tenantId; + // --------------------------------------------------------------------------------------------- private AzureOpenAIServiceSettings(Builder builder) { this.apiKey = builder.apiKey; this.apiVersion = ApiTypeHelper.requireNonNull(builder.apiVersion, this, "apiVersion"); + this.clientId = builder.clientId; + this.clientSecret = builder.clientSecret; this.deploymentId = ApiTypeHelper.requireNonNull(builder.deploymentId, this, "deploymentId"); this.entraId = builder.entraId; this.rateLimit = builder.rateLimit; this.resourceName = ApiTypeHelper.requireNonNull(builder.resourceName, this, "resourceName"); + this.scopes = ApiTypeHelper.unmodifiable(builder.scopes); + this.tenantId = builder.tenantId; } @@ -93,14 +109,12 @@ public static AzureOpenAIServiceSettings of(Functionapi_key or entra_id. If you do not provide either - * or you provide both, you will receive an error when you try to create your - * model. + * A valid API key for your Azure OpenAI account. *

- * 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, + * entra_id, 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} */ @@ -119,6 +133,42 @@ public final String apiVersion() { return this.apiVersion; } + /** + * For OAuth 2.0 authentication 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. + *

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

+ * IMPORTANT: You must specify either api_key, + * entra_id, 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, + * 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} + */ + @Nullable + public final String clientSecret() { + return this.clientSecret; + } + /** * Required - The deployment name of your deployed models. Your Azure OpenAI * deployments can be found though the Azure OpenAI Studio portal that is linked @@ -131,9 +181,12 @@ public final String deploymentId() { } /** - * A valid Microsoft Entra token. You must specify either api_key - * or entra_id. If you do not provide either or you provide both, - * you will receive an error when you try to create your model. + * A valid Microsoft Entra token. + *

+ * IMPORTANT: You must specify either api_key, + * entra_id, 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 entra_id} */ @@ -167,6 +220,43 @@ public final String resourceName() { return this.resourceName; } + /** + * For OAuth 2.0 authentication using the client credentials grant flow. The + * resource identifier (application ID URI) of the resource you want, suffixed + * with .default For example: + * + *

+	 * "scopes": [
+	 *   "https://cognitiveservices.azure.com/.default"
+	 * ]
+	 * 
+	 * 
+ *

+ * 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} + */ + public final List scopes() { + return this.scopes; + } + + /** + * For OAuth 2.0 authentication 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. + *

+ * API name: {@code tenant_id} + */ + @Nullable + public final String tenantId() { + return this.tenantId; + } + /** * Serialize this object to JSON. */ @@ -186,6 +276,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("api_version"); generator.write(this.apiVersion); + if (this.clientId != null) { + generator.writeKey("client_id"); + generator.write(this.clientId); + + } + if (this.clientSecret != null) { + generator.writeKey("client_secret"); + generator.write(this.clientSecret); + + } generator.writeKey("deployment_id"); generator.write(this.deploymentId); @@ -202,6 +302,22 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("resource_name"); generator.write(this.resourceName); + if (ApiTypeHelper.isDefined(this.scopes)) { + generator.writeKey("scopes"); + generator.writeStartArray(); + for (String item0 : this.scopes) { + generator.write(item0); + + } + generator.writeEnd(); + + } + if (this.tenantId != null) { + generator.writeKey("tenant_id"); + generator.write(this.tenantId); + + } + } @Override @@ -223,6 +339,12 @@ public static class Builder extends WithJsonObjectBuilderBase private String apiVersion; + @Nullable + private String clientId; + + @Nullable + private String clientSecret; + private String deploymentId; @Nullable @@ -233,26 +355,34 @@ public static class Builder extends WithJsonObjectBuilderBase private String resourceName; + @Nullable + private List scopes; + + @Nullable + private String tenantId; + public Builder() { } private Builder(AzureOpenAIServiceSettings instance) { this.apiKey = instance.apiKey; this.apiVersion = instance.apiVersion; + this.clientId = instance.clientId; + this.clientSecret = instance.clientSecret; this.deploymentId = instance.deploymentId; this.entraId = instance.entraId; this.rateLimit = instance.rateLimit; this.resourceName = instance.resourceName; + this.scopes = instance.scopes; + this.tenantId = instance.tenantId; } /** - * A valid API key for your Azure OpenAI account. You must specify either - * api_key or entra_id. If you do not provide either - * or you provide both, you will receive an error when you try to create your - * model. + * A valid API key for your Azure OpenAI account. *

- * 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, + * entra_id, 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} */ @@ -272,6 +402,42 @@ public final Builder apiVersion(String value) { return this; } + /** + * For OAuth 2.0 authentication 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. + *

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

+ * IMPORTANT: You must specify either api_key, + * entra_id, 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, + * 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} + */ + public final Builder clientSecret(@Nullable String value) { + this.clientSecret = value; + return this; + } + /** * Required - The deployment name of your deployed models. Your Azure OpenAI * deployments can be found though the Azure OpenAI Studio portal that is linked @@ -285,9 +451,12 @@ public final Builder deploymentId(String value) { } /** - * A valid Microsoft Entra token. You must specify either api_key - * or entra_id. If you do not provide either or you provide both, - * you will receive an error when you try to create your model. + * A valid Microsoft Entra token. + *

+ * IMPORTANT: You must specify either api_key, + * entra_id, 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 entra_id} */ @@ -336,6 +505,71 @@ public final Builder resourceName(String value) { return this; } + /** + * For OAuth 2.0 authentication using the client credentials grant flow. The + * resource identifier (application ID URI) of the resource you want, suffixed + * with .default For example: + * + *

+		 * "scopes": [
+		 *   "https://cognitiveservices.azure.com/.default"
+		 * ]
+		 * 
+		 * 
+ *

+ * 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} + *

+ * 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 authentication using the client credentials grant flow. The + * resource identifier (application ID URI) of the resource you want, suffixed + * with .default For example: + * + *

+		 * "scopes": [
+		 *   "https://cognitiveservices.azure.com/.default"
+		 * ]
+		 * 
+		 * 
+ *

+ * 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} + *

+ * 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 OAuth 2.0 authentication 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. + *

+ * API name: {@code tenant_id} + */ + public final Builder tenantId(@Nullable String value) { + this.tenantId = value; + return this; + } + @Override protected Builder self() { return this; @@ -373,10 +607,14 @@ protected static void setupAzureOpenAIServiceSettingsDeserializer( op.add(Builder::apiKey, JsonpDeserializer.stringDeserializer(), "api_key"); op.add(Builder::apiVersion, JsonpDeserializer.stringDeserializer(), "api_version"); + op.add(Builder::clientId, JsonpDeserializer.stringDeserializer(), "client_id"); + op.add(Builder::clientSecret, JsonpDeserializer.stringDeserializer(), "client_secret"); op.add(Builder::deploymentId, JsonpDeserializer.stringDeserializer(), "deployment_id"); op.add(Builder::entraId, JsonpDeserializer.stringDeserializer(), "entra_id"); op.add(Builder::rateLimit, RateLimitSetting._DESERIALIZER, "rate_limit"); op.add(Builder::resourceName, JsonpDeserializer.stringDeserializer(), "resource_name"); + op.add(Builder::scopes, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "scopes"); + op.add(Builder::tenantId, JsonpDeserializer.stringDeserializer(), "tenant_id"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AzureOpenAITaskSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AzureOpenAITaskSettings.java index 5054abad63..b12b86ff68 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AzureOpenAITaskSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/AzureOpenAITaskSettings.java @@ -26,10 +26,12 @@ 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.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -62,11 +64,14 @@ public class AzureOpenAITaskSettings implements JsonpSerializable { @Nullable private final String user; + private final Map headers; + // --------------------------------------------------------------------------------------------- private AzureOpenAITaskSettings(Builder builder) { this.user = builder.user; + this.headers = ApiTypeHelper.unmodifiable(builder.headers); } @@ -75,9 +80,8 @@ public static AzureOpenAITaskSettings of(Functioncompletion, chat_completion or - * text_embedding task, specify the user issuing the request. This - * information can be used for abuse detection. + * Specifies the user issuing the request. This information can be used for + * abuse detection. *

* API name: {@code user} */ @@ -86,6 +90,23 @@ public final String user() { return this.user; } + /** + * Specifies custom HTTP header parameters. For example: + * + *

+	 * "headers": {
+	 *   "Custom-Header": "Some-Value",
+	 *   "Another-Custom-Header": "Another-Value"
+	 * }
+	 * 
+	 * 
+ *

+ * API name: {@code headers} + */ + public final Map headers() { + return this.headers; + } + /** * Serialize this object to JSON. */ @@ -102,6 +123,17 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.user); } + if (ApiTypeHelper.isDefined(this.headers)) { + generator.writeKey("headers"); + generator.writeStartObject(); + for (Map.Entry item0 : this.headers.entrySet()) { + generator.writeKey(item0.getKey()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); + + } } @@ -122,16 +154,19 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private String user; + @Nullable + private Map headers; + public Builder() { } private Builder(AzureOpenAITaskSettings instance) { this.user = instance.user; + this.headers = instance.headers; } /** - * For a completion, chat_completion or - * text_embedding task, specify the user issuing the request. This - * information can be used for abuse detection. + * Specifies the user issuing the request. This information can be used for + * abuse detection. *

* API name: {@code user} */ @@ -140,6 +175,46 @@ public final Builder user(@Nullable String value) { return this; } + /** + * Specifies custom HTTP header parameters. For example: + * + *

+		 * "headers": {
+		 *   "Custom-Header": "Some-Value",
+		 *   "Another-Custom-Header": "Another-Value"
+		 * }
+		 * 
+		 * 
+ *

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

+ * Adds all entries of map to headers. + */ + public final Builder headers(Map map) { + this.headers = _mapPutAll(this.headers, map); + return this; + } + + /** + * Specifies custom HTTP header parameters. For example: + * + *

+		 * "headers": {
+		 *   "Custom-Header": "Some-Value",
+		 *   "Another-Custom-Header": "Another-Value"
+		 * }
+		 * 
+		 * 
+ *

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

+ * Adds an entry to headers. + */ + public final Builder headers(String key, String value) { + this.headers = _mapPut(this.headers, key, value); + return this; + } + @Override protected Builder self() { return this; @@ -176,6 +251,8 @@ protected static void setupAzureOpenAITaskSettingsDeserializer( ObjectDeserializer op) { op.add(Builder::user, JsonpDeserializer.stringDeserializer(), "user"); + op.add(Builder::headers, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), + "headers"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ContextualAITaskSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ContextualAITaskSettings.java index 86593fbb4c..02f1aacc37 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ContextualAITaskSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ContextualAITaskSettings.java @@ -29,7 +29,6 @@ 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; @@ -64,9 +63,6 @@ public class ContextualAITaskSettings implements JsonpSerializable { @Nullable private final String instruction; - @Nullable - private final Boolean returnDocuments; - @Nullable private final Integer topK; @@ -75,7 +71,6 @@ public class ContextualAITaskSettings implements JsonpSerializable { private ContextualAITaskSettings(Builder builder) { this.instruction = builder.instruction; - this.returnDocuments = builder.returnDocuments; this.topK = builder.topK; } @@ -96,17 +91,6 @@ public final String instruction() { return this.instruction; } - /** - * Whether to return the source documents in the response. Only for the - * rerank task type. - *

- * API name: {@code return_documents} - */ - @Nullable - public final Boolean returnDocuments() { - return this.returnDocuments; - } - /** * The number of most relevant documents to return. If not specified, the * reranking results of all documents will be returned. Only for the @@ -134,11 +118,6 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("instruction"); generator.write(this.instruction); - } - if (this.returnDocuments != null) { - generator.writeKey("return_documents"); - generator.write(this.returnDocuments); - } if (this.topK != null) { generator.writeKey("top_k"); @@ -165,9 +144,6 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private String instruction; - @Nullable - private Boolean returnDocuments; - @Nullable private Integer topK; @@ -175,7 +151,6 @@ public Builder() { } private Builder(ContextualAITaskSettings instance) { this.instruction = instance.instruction; - this.returnDocuments = instance.returnDocuments; this.topK = instance.topK; } @@ -191,17 +166,6 @@ public final Builder instruction(@Nullable String value) { return this; } - /** - * Whether to return the source documents in the response. Only for the - * rerank task type. - *

- * API name: {@code return_documents} - */ - public final Builder returnDocuments(@Nullable Boolean value) { - this.returnDocuments = value; - return this; - } - /** * The number of most relevant documents to return. If not specified, the * reranking results of all documents will be returned. Only for the @@ -250,7 +214,6 @@ protected static void setupContextualAITaskSettingsDeserializer( ObjectDeserializer op) { op.add(Builder::instruction, JsonpDeserializer.stringDeserializer(), "instruction"); - op.add(Builder::returnDocuments, JsonpDeserializer.booleanDeserializer(), "return_documents"); op.add(Builder::topK, JsonpDeserializer.integerDeserializer(), "top_k"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomResponseParams.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomResponseParams.java index 2075f39ddd..c95e6f2ccb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomResponseParams.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomResponseParams.java @@ -19,7 +19,6 @@ package co.elastic.clients.elasticsearch.inference; -import co.elastic.clients.json.JsonData; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -31,6 +30,8 @@ import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -60,13 +61,13 @@ */ @JsonpDeserializable public class CustomResponseParams implements JsonpSerializable { - private final JsonData jsonParser; + private final Map jsonParser; // --------------------------------------------------------------------------------------------- private CustomResponseParams(Builder builder) { - this.jsonParser = ApiTypeHelper.requireNonNull(builder.jsonParser, this, "jsonParser"); + this.jsonParser = ApiTypeHelper.unmodifiableRequired(builder.jsonParser, this, "jsonParser"); } @@ -231,7 +232,7 @@ public static CustomResponseParams of(Function * */ - public final JsonData jsonParser() { + public final Map jsonParser() { return this.jsonParser; } @@ -246,8 +247,17 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("json_parser"); - this.jsonParser.serialize(generator, mapper); + if (ApiTypeHelper.isDefined(this.jsonParser)) { + generator.writeKey("json_parser"); + generator.writeStartObject(); + for (Map.Entry item0 : this.jsonParser.entrySet()) { + generator.writeKey(item0.getKey()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); + + } } @@ -265,7 +275,7 @@ public String toString() { public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - private JsonData jsonParser; + private Map jsonParser; public Builder() { } @@ -427,11 +437,177 @@ private Builder(CustomResponseParams instance) { * } * * API name: {@code json_parser} + * + * Adds all entries of `map` to `jsonParser`. + * + * + */ + public final Builder jsonParser(Map map) { + this.jsonParser = _mapPutAll(this.jsonParser, map); + return this; + } + + /** + * Required - Specifies the JSON parser that is used to parse the response from + * the custom service. Different task types require different json_parser + * parameters. For example: + * + *

+		 * # text_embedding
+		 * # For a response like this:
+		 *
+		 * {
+		 *  "object": "list",
+		 *  "data": [
+		 *      {
+		 *        "object": "embedding",
+		 *        "index": 0,
+		 *        "embedding": [
+		 *            0.014539449,
+		 *            -0.015288644
+		 *        ]
+		 *      }
+		 *  ],
+		 *  "model": "text-embedding-ada-002-v2",
+		 *  "usage": {
+		 *      "prompt_tokens": 8,
+		 *      "total_tokens": 8
+		 *  }
+		 * }
+		 *
+		 * # the json_parser definition should look like this:
+		 *
+		 * "response":{
+		 *   "json_parser":{
+		 *     "text_embeddings":"$.data[*].embedding[*]"
+		 *   }
+		 * }
+		 *
+		 * # Elasticsearch supports the following embedding types:
+		 * * float
+		 * * byte
+		 * * bit (or binary)
+		 *
+		 * To specify the embedding type for the response, the `embedding_type`
+		 * field should be added in the `json_parser` object. Here's an example:
+		 * "response":{
+		 *   "json_parser":{
+		 *     "text_embeddings":"$.data[*].embedding[*]",
+		 *     "embedding_type":"bit"
+		 *   }
+		 * }
+		 *
+		 * If `embedding_type` is not specified, it defaults to `float`.
+		 *
+		 * # sparse_embedding
+		 * # For a response like this:
+		 *
+		 * {
+		 *   "request_id": "75C50B5B-E79E-4930-****-F48DBB392231",
+		 *   "latency": 22,
+		 *   "usage": {
+		 *      "token_count": 11
+		 *   },
+		 *   "result": {
+		 *      "sparse_embeddings": [
+		 *         {
+		 *           "index": 0,
+		 *           "embedding": [
+		 *             {
+		 *               "token_id": 6,
+		 *               "weight": 0.101
+		 *             },
+		 *             {
+		 *               "token_id": 163040,
+		 *               "weight": 0.28417
+		 *             }
+		 *           ]
+		 *         }
+		 *      ]
+		 *   }
+		 * }
+		 *
+		 * # the json_parser definition should look like this:
+		 *
+		 * "response":{
+		 *   "json_parser":{
+		 *     "token_path":"$.result.sparse_embeddings[*].embedding[*].token_id",
+		 *     "weight_path":"$.result.sparse_embeddings[*].embedding[*].weight"
+		 *   }
+		 * }
+		 *
+		 * # rerank
+		 * # For a response like this:
+		 *
+		 * {
+		 *   "results": [
+		 *     {
+		 *       "index": 3,
+		 *       "relevance_score": 0.999071,
+		 *       "document": "abc"
+		 *     },
+		 *     {
+		 *       "index": 4,
+		 *       "relevance_score": 0.7867867,
+		 *       "document": "123"
+		 *     },
+		 *     {
+		 *       "index": 0,
+		 *       "relevance_score": 0.32713068,
+		 *       "document": "super"
+		 *     }
+		 *   ],
+		 * }
+		 *
+		 * # the json_parser definition should look like this:
+		 *
+		 * "response":{
+		 *   "json_parser":{
+		 *     "reranked_index":"$.result.scores[*].index",    // optional
+		 *     "relevance_score":"$.result.scores[*].score",
+		 *     "document_text":"xxx"    // optional
+		 *   }
+		 * }
+		 *
+		 * # completion
+		 * # For a response like this:
+		 *
+		 * {
+		 *  "id": "chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT",
+		 *  "object": "chat.completion",
+		 *  "created": 1741569952,
+		 *  "model": "gpt-4.1-2025-04-14",
+		 *  "choices": [
+		 *    {
+		 *     "index": 0,
+		 *     "message": {
+		 *       "role": "assistant",
+		 *       "content": "Hello! How can I assist you today?",
+		 *       "refusal": null,
+		 *       "annotations": []
+		 *     },
+		 *     "logprobs": null,
+		 *     "finish_reason": "stop"
+		 *   }
+		 *  ]
+		 * }
+		 *
+		 * # the json_parser definition should look like this:
+		 *
+		 * "response":{
+		 *   "json_parser":{
+		 *     "completion_result":"$.choices[*].message.content"
+		 *   }
+		 * }
+		 *
+		 * API name: {@code json_parser}
+		 *
+		 * Adds an entry to `jsonParser`.
 		 * 
 		 * 
*/ - public final Builder jsonParser(JsonData value) { - this.jsonParser = value; + public final Builder jsonParser(String key, String value) { + this.jsonParser = _mapPut(this.jsonParser, key, value); return this; } @@ -469,7 +645,8 @@ public Builder rebuild() { protected static void setupCustomResponseParamsDeserializer(ObjectDeserializer op) { - op.add(Builder::jsonParser, JsonData._DESERIALIZER, "json_parser"); + op.add(Builder::jsonParser, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), + "json_parser"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomServiceInputType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomServiceInputType.java new file mode 100644 index 0000000000..423c068083 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomServiceInputType.java @@ -0,0 +1,71 @@ +/* + * 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 CustomServiceInputType implements JsonEnum { + Classification("classification"), + + Clustering("clustering"), + + Ingest("ingest"), + + Search("search"), + + ; + + private final String jsonValue; + + CustomServiceInputType(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + CustomServiceInputType.values()); +} 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 cbb146474f..a35ce5ee47 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 @@ -19,7 +19,6 @@ package co.elastic.clients.elasticsearch.inference; -import co.elastic.clients.json.JsonData; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -33,6 +32,8 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Integer; import java.lang.String; +import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -65,20 +66,17 @@ public class CustomServiceSettings implements JsonpSerializable { @Nullable private final Integer batchSize; - @Nullable - private final JsonData headers; + private final Map headers; - @Nullable - private final JsonData inputType; + private final Map inputType; - @Nullable - private final JsonData queryParameters; + private final List> queryParameters; private final CustomRequestParams request; private final CustomResponseParams response; - private final JsonData secretParameters; + private final Map secretParameters; @Nullable private final String url; @@ -88,12 +86,12 @@ public class CustomServiceSettings implements JsonpSerializable { private CustomServiceSettings(Builder builder) { this.batchSize = builder.batchSize; - this.headers = builder.headers; - this.inputType = builder.inputType; - this.queryParameters = builder.queryParameters; + this.headers = ApiTypeHelper.unmodifiable(builder.headers); + this.inputType = ApiTypeHelper.unmodifiable(builder.inputType); + this.queryParameters = ApiTypeHelper.unmodifiable(builder.queryParameters); this.request = ApiTypeHelper.requireNonNull(builder.request, this, "request"); this.response = ApiTypeHelper.requireNonNull(builder.response, this, "response"); - this.secretParameters = ApiTypeHelper.requireNonNull(builder.secretParameters, this, "secretParameters"); + this.secretParameters = ApiTypeHelper.unmodifiableRequired(builder.secretParameters, this, "secretParameters"); this.url = builder.url; } @@ -122,7 +120,7 @@ public final Integer batchSize() { * For example: * *
-	 * "headers":{
+	 * "headers": {
 	 *   "Authorization": "Bearer ${api_key}",
 	 *   "Content-Type": "application/json;charset=utf-8"
 	 * }
@@ -131,8 +129,7 @@ public final Integer batchSize() {
 	 * 

* API name: {@code headers} */ - @Nullable - public final JsonData headers() { + public final Map headers() { return this.headers; } @@ -166,8 +163,7 @@ public final JsonData headers() { *

* API name: {@code input_type} */ - @Nullable - public final JsonData inputType() { + public final Map inputType() { return this.inputType; } @@ -190,8 +186,7 @@ public final JsonData inputType() { *

* API name: {@code query_parameters} */ - @Nullable - public final JsonData queryParameters() { + public final List> queryParameters() { return this.queryParameters; } @@ -227,7 +222,7 @@ public final CustomResponseParams response() { *

* API name: {@code secret_parameters} */ - public final JsonData secretParameters() { + public final Map secretParameters() { return this.secretParameters; } @@ -257,19 +252,43 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.batchSize); } - if (this.headers != null) { + if (ApiTypeHelper.isDefined(this.headers)) { generator.writeKey("headers"); - this.headers.serialize(generator, mapper); + generator.writeStartObject(); + for (Map.Entry item0 : this.headers.entrySet()) { + generator.writeKey(item0.getKey()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); } - if (this.inputType != null) { + if (ApiTypeHelper.isDefined(this.inputType)) { generator.writeKey("input_type"); - this.inputType.serialize(generator, mapper); + generator.writeStartObject(); + for (Map.Entry item0 : this.inputType.entrySet()) { + generator.writeKey(item0.getKey().jsonValue()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); } - if (this.queryParameters != null) { + if (ApiTypeHelper.isDefined(this.queryParameters)) { generator.writeKey("query_parameters"); - this.queryParameters.serialize(generator, mapper); + generator.writeStartArray(); + for (List item0 : this.queryParameters) { + generator.writeStartArray(); + if (item0 != null) { + for (String item1 : item0) { + generator.write(item1); + + } + } + generator.writeEnd(); + + } + generator.writeEnd(); } generator.writeKey("request"); @@ -278,9 +297,17 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("response"); this.response.serialize(generator, mapper); - generator.writeKey("secret_parameters"); - this.secretParameters.serialize(generator, mapper); + if (ApiTypeHelper.isDefined(this.secretParameters)) { + generator.writeKey("secret_parameters"); + generator.writeStartObject(); + for (Map.Entry item0 : this.secretParameters.entrySet()) { + generator.writeKey(item0.getKey()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); + } if (this.url != null) { generator.writeKey("url"); generator.write(this.url); @@ -307,19 +334,19 @@ public static class Builder extends WithJsonObjectBuilderBase private Integer batchSize; @Nullable - private JsonData headers; + private Map headers; @Nullable - private JsonData inputType; + private Map inputType; @Nullable - private JsonData queryParameters; + private List> queryParameters; private CustomRequestParams request; private CustomResponseParams response; - private JsonData secretParameters; + private Map secretParameters; @Nullable private String url; @@ -357,7 +384,7 @@ public final Builder batchSize(@Nullable Integer value) { * For example: * *

-		 * "headers":{
+		 * "headers": {
 		 *   "Authorization": "Bearer ${api_key}",
 		 *   "Content-Type": "application/json;charset=utf-8"
 		 * }
@@ -365,9 +392,33 @@ public final Builder batchSize(@Nullable Integer value) {
 		 * 
*

* API name: {@code headers} + *

+ * Adds all entries of map to headers. */ - public final Builder headers(@Nullable JsonData value) { - this.headers = value; + public final Builder headers(Map map) { + this.headers = _mapPutAll(this.headers, map); + return this; + } + + /** + * Specifies the HTTP header parameters – such as Authentication or + * Content-Type – that are required to access the custom service. + * For example: + * + *

+		 * "headers": {
+		 *   "Authorization": "Bearer ${api_key}",
+		 *   "Content-Type": "application/json;charset=utf-8"
+		 * }
+		 * 
+		 * 
+ *

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

+ * Adds an entry to headers. + */ + public final Builder headers(String key, String value) { + this.headers = _mapPut(this.headers, key, value); return this; } @@ -400,9 +451,74 @@ public final Builder headers(@Nullable JsonData value) { * *

* API name: {@code input_type} + *

+ * Adds all entries of map to inputType. */ - public final Builder inputType(@Nullable JsonData value) { - this.inputType = value; + public final Builder inputType(Map map) { + this.inputType = _mapPutAll(this.inputType, map); + return this; + } + + /** + * Specifies the input type translation values that are used to replace the + * ${input_type} template in the request body. For example: + * + *

+		 * "input_type": {
+		 *   "translation": {
+		 *     "ingest": "do_ingest",
+		 *     "search": "do_search"
+		 *   },
+		 *   "default": "a_default"
+		 * },
+		 * 
+		 * 
+ *

+ * If the subsequent inference requests come from a search context, the + * search key will be used and the template will be replaced with + * do_search. If it comes from the ingest context + * do_ingest is used. If it's a different context that is not + * specified, the default value will be used. If no default is specified an + * empty string is used. translation can be: + *

    + *
  • classification
  • + *
  • clustering
  • + *
  • ingest
  • + *
  • search
  • + *
+ *

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

+ * Adds an entry to inputType. + */ + public final Builder inputType(CustomServiceInputType key, String value) { + this.inputType = _mapPut(this.inputType, key, value); + return this; + } + + /** + * Specifies the query parameters as a list of tuples. The arrays inside the + * query_parameters must have two items, a key and a value. For + * example: + * + *

+		 * "query_parameters":[
+		 *   ["param_key", "some_value"],
+		 *   ["param_key", "another_value"],
+		 *   ["other_key", "other_value"]
+		 * ]
+		 * 
+		 * 
+ *

+ * If the base url is https://www.elastic.co it results in: + * https://www.elastic.co?param_key=some_value&param_key=another_value&other_key=other_value. + *

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

+ * Adds all elements of list to queryParameters. + */ + public final Builder queryParameters(List> list) { + this.queryParameters = _listAddAll(this.queryParameters, list); return this; } @@ -424,9 +540,11 @@ public final Builder inputType(@Nullable JsonData value) { * https://www.elastic.co?param_key=some_value&param_key=another_value&other_key=other_value. *

* API name: {@code query_parameters} + *

+ * Adds one or more values to queryParameters. */ - public final Builder queryParameters(@Nullable JsonData value) { - this.queryParameters = value; + public final Builder queryParameters(List value, List... values) { + this.queryParameters = _listAdd(this.queryParameters, value, values); return this; } @@ -481,9 +599,32 @@ public final Builder response(Function *

* API name: {@code secret_parameters} + *

+ * Adds all entries of map to secretParameters. + */ + public final Builder secretParameters(Map map) { + this.secretParameters = _mapPutAll(this.secretParameters, map); + return this; + } + + /** + * Required - Specifies secret parameters, like api_key or + * api_token, that are required to access the custom service. For + * example: + * + *

+		 * "secret_parameters":{
+		 *   "api_key":"<api_key>"
+		 * }
+		 * 
+		 * 
+ *

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

+ * Adds an entry to secretParameters. */ - public final Builder secretParameters(JsonData value) { - this.secretParameters = value; + public final Builder secretParameters(String key, String value) { + this.secretParameters = _mapPut(this.secretParameters, key, value); return this; } @@ -532,12 +673,18 @@ public Builder rebuild() { protected static void setupCustomServiceSettingsDeserializer(ObjectDeserializer op) { op.add(Builder::batchSize, JsonpDeserializer.integerDeserializer(), "batch_size"); - op.add(Builder::headers, JsonData._DESERIALIZER, "headers"); - op.add(Builder::inputType, JsonData._DESERIALIZER, "input_type"); - op.add(Builder::queryParameters, JsonData._DESERIALIZER, "query_parameters"); + op.add(Builder::headers, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), + "headers"); + op.add(Builder::inputType, JsonpDeserializer.enumMapDeserializer(CustomServiceInputType._DESERIALIZER, + JsonpDeserializer.stringDeserializer()), "input_type"); + op.add(Builder::queryParameters, + JsonpDeserializer + .arrayDeserializer(JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer())), + "query_parameters"); op.add(Builder::request, CustomRequestParams._DESERIALIZER, "request"); op.add(Builder::response, CustomResponseParams._DESERIALIZER, "response"); - op.add(Builder::secretParameters, JsonData._DESERIALIZER, "secret_parameters"); + op.add(Builder::secretParameters, + JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), "secret_parameters"); op.add(Builder::url, JsonpDeserializer.stringDeserializer(), "url"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomTaskSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomTaskSettings.java index f41a184ed2..f0ddcddf2f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomTaskSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/CustomTaskSettings.java @@ -19,7 +19,7 @@ package co.elastic.clients.elasticsearch.inference; -import co.elastic.clients.json.JsonData; +import co.elastic.clients.elasticsearch._types.FieldValue; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -27,9 +27,12 @@ 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.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -59,14 +62,13 @@ */ @JsonpDeserializable public class CustomTaskSettings implements JsonpSerializable { - @Nullable - private final JsonData parameters; + private final Map parameters; // --------------------------------------------------------------------------------------------- private CustomTaskSettings(Builder builder) { - this.parameters = builder.parameters; + this.parameters = ApiTypeHelper.unmodifiable(builder.parameters); } @@ -90,8 +92,7 @@ public static CustomTaskSettings of(Function * API name: {@code parameters} */ - @Nullable - public final JsonData parameters() { + public final Map parameters() { return this.parameters; } @@ -106,9 +107,15 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - if (this.parameters != null) { + if (ApiTypeHelper.isDefined(this.parameters)) { generator.writeKey("parameters"); - this.parameters.serialize(generator, mapper); + generator.writeStartObject(); + for (Map.Entry item0 : this.parameters.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); } @@ -129,7 +136,7 @@ public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable - private JsonData parameters; + private Map parameters; public Builder() { } @@ -152,12 +159,59 @@ private Builder(CustomTaskSettings instance) { *

*

* API name: {@code parameters} + *

+ * Adds all entries of map to parameters. */ - public final Builder parameters(@Nullable JsonData value) { - this.parameters = value; + public final Builder parameters(Map map) { + this.parameters = _mapPutAll(this.parameters, map); return this; } + /** + * Specifies parameters that are required to run the custom service. The + * parameters depend on the model your custom service uses. For example: + * + *

+		 * "task_settings":{
+		 *   "parameters":{
+		 *     "input_type":"query",
+		 *     "return_token":true
+		 *   }
+		 * }
+		 * 
+		 * 
+ *

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

+ * Adds an entry to parameters. + */ + public final Builder parameters(String key, FieldValue value) { + this.parameters = _mapPut(this.parameters, key, value); + return this; + } + + /** + * Specifies parameters that are required to run the custom service. The + * parameters depend on the model your custom service uses. For example: + * + *

+		 * "task_settings":{
+		 *   "parameters":{
+		 *     "input_type":"query",
+		 *     "return_token":true
+		 *   }
+		 * }
+		 * 
+		 * 
+ *

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

+ * Adds an entry to parameters using a builder lambda. + */ + public final Builder parameters(String key, Function> fn) { + return parameters(key, fn.apply(new FieldValue.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -192,7 +246,7 @@ public Builder rebuild() { protected static void setupCustomTaskSettingsDeserializer(ObjectDeserializer op) { - op.add(Builder::parameters, JsonData._DESERIALIZER, "parameters"); + op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(FieldValue._DESERIALIZER), "parameters"); } 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/EmbeddingContentObjectContents.java index 9bc1c66651..7920ca4a96 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/EmbeddingContentObjectContents.java @@ -93,9 +93,11 @@ public final EmbeddingContentType type() { } /** - * The format of the input. For the text type this defaults to - * text. For the image type, this defaults to - * base64. + * 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. *

* API name: {@code format} */ @@ -105,7 +107,8 @@ public final EmbeddingContentFormat format() { } /** - * Required - The value of the input to embed. + * Required - The value of the input to embed. For images, this must be a + * base64-encoded data URI, i.e. "data:content/type;base64,..." *

* API name: {@code value} */ @@ -175,9 +178,11 @@ public final Builder type(EmbeddingContentType value) { } /** - * The format of the input. For the text type this defaults to - * text. For the image type, this defaults to - * base64. + * 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. *

* API name: {@code format} */ @@ -187,7 +192,8 @@ public final Builder format(@Nullable EmbeddingContentFormat value) { } /** - * Required - The value of the input to embed. + * Required - The value of the input to embed. For images, this must be a + * base64-encoded data URI, i.e. "data:content/type;base64,..." *

* API name: {@code value} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/FireworksAITaskSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/FireworksAITaskSettings.java index c2adf24629..b4914cd7f3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/FireworksAITaskSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/FireworksAITaskSettings.java @@ -19,7 +19,6 @@ package co.elastic.clients.elasticsearch.inference; -import co.elastic.clients.json.JsonData; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -27,10 +26,12 @@ 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.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -63,15 +64,14 @@ public class FireworksAITaskSettings implements JsonpSerializable { @Nullable private final String user; - @Nullable - private final JsonData headers; + private final Map headers; // --------------------------------------------------------------------------------------------- private FireworksAITaskSettings(Builder builder) { this.user = builder.user; - this.headers = builder.headers; + this.headers = ApiTypeHelper.unmodifiable(builder.headers); } @@ -96,7 +96,7 @@ public final String user() { * custom HTTP header parameters. For example: * *

-	 * "headers":{
+	 * "headers": {
 	 *   "Custom-Header": "Some-Value",
 	 *   "Another-Custom-Header": "Another-Value"
 	 * }
@@ -105,8 +105,7 @@ public final String user() {
 	 * 

* API name: {@code headers} */ - @Nullable - public final JsonData headers() { + public final Map headers() { return this.headers; } @@ -126,9 +125,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.user); } - if (this.headers != null) { + if (ApiTypeHelper.isDefined(this.headers)) { generator.writeKey("headers"); - this.headers.serialize(generator, mapper); + generator.writeStartObject(); + for (Map.Entry item0 : this.headers.entrySet()) { + generator.writeKey(item0.getKey()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); } @@ -152,7 +157,7 @@ public static class Builder extends WithJsonObjectBuilderBase private String user; @Nullable - private JsonData headers; + private Map headers; public Builder() { } @@ -178,7 +183,7 @@ public final Builder user(@Nullable String value) { * custom HTTP header parameters. For example: * *

-		 * "headers":{
+		 * "headers": {
 		 *   "Custom-Header": "Some-Value",
 		 *   "Another-Custom-Header": "Another-Value"
 		 * }
@@ -186,9 +191,32 @@ public final Builder user(@Nullable String value) {
 		 * 
*

* API name: {@code headers} + *

+ * Adds all entries of map to headers. + */ + public final Builder headers(Map map) { + this.headers = _mapPutAll(this.headers, map); + return this; + } + + /** + * For a completion orchat_completion task. Specifies + * custom HTTP header parameters. For example: + * + *

+		 * "headers": {
+		 *   "Custom-Header": "Some-Value",
+		 *   "Another-Custom-Header": "Another-Value"
+		 * }
+		 * 
+		 * 
+ *

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

+ * Adds an entry to headers. */ - public final Builder headers(@Nullable JsonData value) { - this.headers = value; + public final Builder headers(String key, String value) { + this.headers = _mapPut(this.headers, key, value); return this; } @@ -228,7 +256,8 @@ protected static void setupFireworksAITaskSettingsDeserializer( ObjectDeserializer op) { op.add(Builder::user, JsonpDeserializer.stringDeserializer(), "user"); - op.add(Builder::headers, JsonData._DESERIALIZER, "headers"); + op.add(Builder::headers, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), + "headers"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/Message.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/Message.java index d5fd39ee9a..261e29aaab 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/Message.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/Message.java @@ -126,7 +126,7 @@ public static Message of(Function> fn) { * "content": [ * { * "image_url": { - * "url": "data:image/jpg;base64,..." + * "url": "data:image/jpeg;base64,..." * }, * "type": "image_url" * } @@ -356,7 +356,7 @@ private Builder(Message instance) { * "content": [ * { * "image_url": { - * "url": "data:image/jpg;base64,..." + * "url": "data:image/jpeg;base64,..." * }, * "type": "image_url" * } @@ -422,7 +422,7 @@ public final Builder content(@Nullable MessageContent value) { * "content": [ * { * "image_url": { - * "url": "data:image/jpg;base64,..." + * "url": "data:image/jpeg;base64,..." * }, * "type": "image_url" * } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/OpenAITaskSettings.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/OpenAITaskSettings.java index aefb8eb7f0..a0c6fbb810 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/OpenAITaskSettings.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/OpenAITaskSettings.java @@ -19,7 +19,6 @@ package co.elastic.clients.elasticsearch.inference; -import co.elastic.clients.json.JsonData; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -27,10 +26,12 @@ 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.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -63,15 +64,14 @@ public class OpenAITaskSettings implements JsonpSerializable { @Nullable private final String user; - @Nullable - private final JsonData headers; + private final Map headers; // --------------------------------------------------------------------------------------------- private OpenAITaskSettings(Builder builder) { this.user = builder.user; - this.headers = builder.headers; + this.headers = ApiTypeHelper.unmodifiable(builder.headers); } @@ -80,9 +80,8 @@ public static OpenAITaskSettings of(Functioncompletion, chat_completion, or - * text_embedding task, specify the user issuing the request. This - * information can be used for abuse detection. + * Specifies the user issuing the request. This information can be used for + * abuse detection. *

* API name: {@code user} */ @@ -95,7 +94,7 @@ public final String user() { * Specifies custom HTTP header parameters. For example: * *

-	 * "headers":{
+	 * "headers": {
 	 *   "Custom-Header": "Some-Value",
 	 *   "Another-Custom-Header": "Another-Value"
 	 * }
@@ -104,8 +103,7 @@ public final String user() {
 	 * 

* API name: {@code headers} */ - @Nullable - public final JsonData headers() { + public final Map headers() { return this.headers; } @@ -125,9 +123,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.user); } - if (this.headers != null) { + if (ApiTypeHelper.isDefined(this.headers)) { generator.writeKey("headers"); - this.headers.serialize(generator, mapper); + generator.writeStartObject(); + for (Map.Entry item0 : this.headers.entrySet()) { + generator.writeKey(item0.getKey()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); } @@ -151,7 +155,7 @@ public static class Builder extends WithJsonObjectBuilderBase private String user; @Nullable - private JsonData headers; + private Map headers; public Builder() { } @@ -161,9 +165,8 @@ private Builder(OpenAITaskSettings instance) { } /** - * For a completion, chat_completion, or - * text_embedding task, specify the user issuing the request. This - * information can be used for abuse detection. + * Specifies the user issuing the request. This information can be used for + * abuse detection. *

* API name: {@code user} */ @@ -176,7 +179,27 @@ public final Builder user(@Nullable String value) { * Specifies custom HTTP header parameters. For example: * *

-		 * "headers":{
+		 * "headers": {
+		 *   "Custom-Header": "Some-Value",
+		 *   "Another-Custom-Header": "Another-Value"
+		 * }
+		 * 
+		 * 
+ *

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

+ * Adds all entries of map to headers. + */ + public final Builder headers(Map map) { + this.headers = _mapPutAll(this.headers, map); + return this; + } + + /** + * Specifies custom HTTP header parameters. For example: + * + *

+		 * "headers": {
 		 *   "Custom-Header": "Some-Value",
 		 *   "Another-Custom-Header": "Another-Value"
 		 * }
@@ -184,9 +207,11 @@ public final Builder user(@Nullable String value) {
 		 * 
*

* API name: {@code headers} + *

+ * Adds an entry to headers. */ - public final Builder headers(@Nullable JsonData value) { - this.headers = value; + public final Builder headers(String key, String value) { + this.headers = _mapPut(this.headers, key, value); return this; } @@ -225,7 +250,8 @@ public Builder rebuild() { protected static void setupOpenAITaskSettingsDeserializer(ObjectDeserializer op) { op.add(Builder::user, JsonpDeserializer.stringDeserializer(), "user"); - op.add(Builder::headers, JsonData._DESERIALIZER, "headers"); + op.add(Builder::headers, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()), + "headers"); } 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 605094aecd..d3f6425f18 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 @@ -108,7 +108,7 @@ public static RequestEmbedding of(Function @@ -129,7 +129,7 @@ public static RequestEmbedding of(Function @@ -282,7 +282,7 @@ private Builder(RequestEmbedding instance) { * "content": { * "type": "image", * "format": "base64", - * "value": "data:image/jpg;base64,..." + * "value": "data:image/jpeg;base64,..." * } * } * ] @@ -321,7 +321,7 @@ public final Builder input(EmbeddingInput value) { * "content": { * "type": "image", * "format": "base64", - * "value": "data:image/jpg;base64,..." + * "value": "data:image/jpeg;base64,..." * } * } * @@ -342,7 +342,7 @@ public final Builder input(EmbeddingInput value) { * "content": { * "type": "image", * "format": "base64", - * "value": "data:image/jpg;base64,..." + * "value": "data:image/jpeg;base64,..." * } * } * ] diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GrokProcessor.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GrokProcessor.java index a5610d87c1..e1c109f53d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GrokProcessor.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GrokProcessor.java @@ -74,6 +74,9 @@ public class GrokProcessor extends ProcessorBase implements ProcessorVariant { @Nullable private final Boolean traceMatch; + @Nullable + private final Boolean validateOnly; + // --------------------------------------------------------------------------------------------- private GrokProcessor(Builder builder) { @@ -85,6 +88,7 @@ private GrokProcessor(Builder builder) { this.patternDefinitions = ApiTypeHelper.unmodifiable(builder.patternDefinitions); this.patterns = ApiTypeHelper.unmodifiableRequired(builder.patterns, this, "patterns"); this.traceMatch = builder.traceMatch; + this.validateOnly = builder.validateOnly; } @@ -165,6 +169,17 @@ public final Boolean traceMatch() { return this.traceMatch; } + /** + * When true, the processor does matching but does not extract + * structured fields + *

+ * API name: {@code validate_only} + */ + @Nullable + public final Boolean validateOnly() { + return this.validateOnly; + } + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { super.serializeInternal(generator, mapper); @@ -207,6 +222,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.traceMatch); } + if (this.validateOnly != null) { + generator.writeKey("validate_only"); + generator.write(this.validateOnly); + + } } @@ -233,6 +253,9 @@ public static class Builder extends ProcessorBase.AbstractBuilder imple @Nullable private Boolean traceMatch; + @Nullable + private Boolean validateOnly; + public Builder() { } private Builder(GrokProcessor instance) { @@ -242,6 +265,7 @@ private Builder(GrokProcessor instance) { this.patternDefinitions = instance.patternDefinitions; this.patterns = instance.patterns; this.traceMatch = instance.traceMatch; + this.validateOnly = instance.validateOnly; } /** @@ -343,6 +367,17 @@ public final Builder traceMatch(@Nullable Boolean value) { return this; } + /** + * When true, the processor does matching but does not extract + * structured fields + *

+ * API name: {@code validate_only} + */ + public final Builder validateOnly(@Nullable Boolean value) { + this.validateOnly = value; + return this; + } + @Override protected Builder self() { return this; @@ -385,6 +420,7 @@ protected static void setupGrokProcessorDeserializer(ObjectDeserializer aggregations() { } /** - * If true, wildcard indices expressions that resolve into no concrete indices - * are ignored. This includes the _all string or when no indices - * are specified. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -285,7 +289,10 @@ public final Boolean ignoreThrottled() { } /** - * If true, unavailable indices (missing or closed) are ignored. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -662,9 +669,13 @@ public final Builder aggregations(String key, Function_all string or when no indices - * are specified. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -838,7 +849,10 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** - * If true, unavailable indices (missing or closed) are ignored. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutJobRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutJobRequest.java index b4fbe5ff50..cbd035c309 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutJobRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/PutJobRequest.java @@ -181,9 +181,13 @@ public final Boolean allowLazyOpen() { } /** - * If true, wildcard indices expressions that resolve into no - * concrete indices are ignored. This includes the _all string or - * when no indices are specified. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -327,7 +331,10 @@ public final Boolean ignoreThrottled() { } /** - * If true, unavailable indices (missing or closed) are ignored. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -617,9 +624,13 @@ public final Builder allowLazyOpen(@Nullable Boolean value) { } /** - * If true, wildcard indices expressions that resolve into no - * concrete indices are ignored. This includes the _all string or - * when no indices are specified. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -860,7 +871,10 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** - * If true, unavailable indices (missing or closed) are ignored. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java index d38a64bdc4..1b54b67757 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedRequest.java @@ -171,9 +171,13 @@ public final Map aggregations() { } /** - * If true, wildcard indices expressions that resolve into no - * concrete indices are ignored. This includes the _all string or - * when no indices are specified. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -265,7 +269,10 @@ public final Boolean ignoreThrottled() { } /** - * If true, unavailable indices (missing or closed) are ignored. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -623,9 +630,13 @@ public final Builder aggregations(String key, Functiontrue, wildcard indices expressions that resolve into no - * concrete indices are ignored. This includes the _all string or - * when no indices are specified. + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -778,7 +789,10 @@ public final Builder ignoreThrottled(@Nullable Boolean value) { } /** - * If true, unavailable indices (missing or closed) are ignored. + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/ClearCacheRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/ClearCacheRequest.java index 7127f82f2c..6b987ba524 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/ClearCacheRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/searchable_snapshots/ClearCacheRequest.java @@ -96,9 +96,13 @@ public static ClearCacheRequest of(Function_all string or when no indices have been - * specified) + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -118,8 +122,10 @@ public final List expandWildcards() { } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ @@ -169,9 +175,13 @@ private Builder(ClearCacheRequest instance) { } /** - * Whether to ignore if a wildcard indices expression resolves into no concrete - * indices. (This includes _all string or when no indices have been - * specified) + * A setting that does two separate checks on the index expression. If + * false, the request returns an error (1) if any wildcard + * expression (including _all and *) resolves to zero + * matching indices or (2) if the complete set of resolved indices, aliases or + * data streams is empty after all expressions are evaluated. If + * true, index expressions that resolve to no indices are allowed + * and the request returns an empty result. *

* API name: {@code allow_no_indices} */ @@ -207,8 +217,10 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * Whether specified concrete indices should be ignored when unavailable - * (missing or closed) + * If false, the request returns an error if it targets a concrete + * (non-wildcarded) index, alias, or data stream that is missing, closed, or + * otherwise unavailable. If true, unavailable concrete targets are + * silently ignored. *

* API name: {@code ignore_unavailable} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CloneApiKeyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CloneApiKeyRequest.java new file mode 100644 index 0000000000..d2c8817db8 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CloneApiKeyRequest.java @@ -0,0 +1,395 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.security; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.Refresh; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.json.JsonData; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: security.clone_api_key.Request + +/** + * Clone an API key. + *

+ * Create a copy of an existing API key with a new ID. The cloned key inherits + * the role descriptors of the source key. This is intended for applications + * (such as Kibana) that need to create API keys on behalf of a user using an + * existing API key credential, since derived API keys (API keys created by API + * keys) are not otherwise supported. + * + * @see API + * specification + */ +@JsonpDeserializable +public class CloneApiKeyRequest extends RequestBase implements JsonpSerializable { + private final String apiKey; + + @Nullable + private final Time expiration; + + private final Map metadata; + + @Nullable + private final String name; + + @Nullable + private final Refresh refresh; + + // --------------------------------------------------------------------------------------------- + + private CloneApiKeyRequest(Builder builder) { + + this.apiKey = ApiTypeHelper.requireNonNull(builder.apiKey, this, "apiKey"); + this.expiration = builder.expiration; + this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); + this.name = builder.name; + this.refresh = builder.refresh; + + } + + public static CloneApiKeyRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - The credentials of the API key to clone. This is the secret value + * returned when the key was originally created. + *

+ * API name: {@code api_key} + */ + public final String apiKey() { + return this.apiKey; + } + + /** + * The expiration time for the cloned API key. By default, API keys never + * expire. Set to null to explicitly create a key with no + * expiration. + *

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

+ * API name: {@code metadata} + */ + public final Map metadata() { + return this.metadata; + } + + /** + * A name for the cloned API key. If not provided, the name of the source key is + * used. + *

+ * API name: {@code name} + */ + @Nullable + public final String name() { + return this.name; + } + + /** + * If true (the default) then refresh the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false then + * do nothing with refreshes. + *

+ * API name: {@code refresh} + */ + @Nullable + public final Refresh refresh() { + return this.refresh; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("api_key"); + generator.write(this.apiKey); + + if (this.expiration != null) { + generator.writeKey("expiration"); + this.expiration.serialize(generator, mapper); + + } + if (ApiTypeHelper.isDefined(this.metadata)) { + generator.writeKey("metadata"); + generator.writeStartObject(); + for (Map.Entry item0 : this.metadata.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + if (this.name != null) { + generator.writeKey("name"); + generator.write(this.name); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CloneApiKeyRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + private String apiKey; + + @Nullable + private Time expiration; + + @Nullable + private Map metadata; + + @Nullable + private String name; + + @Nullable + private Refresh refresh; + + public Builder() { + } + private Builder(CloneApiKeyRequest instance) { + this.apiKey = instance.apiKey; + this.expiration = instance.expiration; + this.metadata = instance.metadata; + this.name = instance.name; + this.refresh = instance.refresh; + + } + /** + * Required - The credentials of the API key to clone. This is the secret value + * returned when the key was originally created. + *

+ * API name: {@code api_key} + */ + public final Builder apiKey(String value) { + this.apiKey = value; + return this; + } + + /** + * The expiration time for the cloned API key. By default, API keys never + * expire. Set to null to explicitly create a key with no + * expiration. + *

+ * API name: {@code expiration} + */ + public final Builder expiration(@Nullable Time value) { + this.expiration = value; + return this; + } + + /** + * The expiration time for the cloned API key. By default, API keys never + * expire. Set to null to explicitly create a key with no + * expiration. + *

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

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

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

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

+ * Adds an entry to metadata. + */ + public final Builder metadata(String key, JsonData value) { + this.metadata = _mapPut(this.metadata, key, value); + return this; + } + + /** + * A name for the cloned API key. If not provided, the name of the source key is + * used. + *

+ * API name: {@code name} + */ + public final Builder name(@Nullable String value) { + this.name = value; + return this; + } + + /** + * If true (the default) then refresh the affected shards to make + * this operation visible to search, if wait_for then wait for a + * refresh to make this operation visible to search, if false then + * do nothing with refreshes. + *

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

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

+ * API name: {@code expiration} + */ + @Nullable + public final Long expiration() { + return this.expiration; + } + + /** + * Required - The unique ID of the cloned API key. + *

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

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

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

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

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

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

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

+ * API name: {@code encoded} + */ + public final Builder encoded(String value) { + this.encoded = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CloneApiKeyResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CloneApiKeyResponse build() { + _checkSingleUse(); + + return new CloneApiKeyResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CloneApiKeyResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, CloneApiKeyResponse::setupCloneApiKeyResponseDeserializer); + + protected static void setupCloneApiKeyResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::apiKey, JsonpDeserializer.stringDeserializer(), "api_key"); + op.add(Builder::expiration, JsonpDeserializer.longDeserializer(), "expiration"); + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::encoded, JsonpDeserializer.stringDeserializer(), "encoded"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ApiKeyManagedBy.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CredentialManagedBy.java similarity index 84% rename from java-client/src/main/java/co/elastic/clients/elasticsearch/security/ApiKeyManagedBy.java rename to java-client/src/main/java/co/elastic/clients/elasticsearch/security/CredentialManagedBy.java index 480a8170cb..4002f2515f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ApiKeyManagedBy.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/CredentialManagedBy.java @@ -40,11 +40,12 @@ /** * - * @see API + * @see API * specification */ @JsonpDeserializable -public enum ApiKeyManagedBy implements JsonEnum { +public enum CredentialManagedBy implements JsonEnum { Cloud("cloud"), Elasticsearch("elasticsearch"), @@ -53,7 +54,7 @@ public enum ApiKeyManagedBy implements JsonEnum { private final String jsonValue; - ApiKeyManagedBy(String jsonValue) { + CredentialManagedBy(String jsonValue) { this.jsonValue = jsonValue; } @@ -61,6 +62,6 @@ public String jsonValue() { return this.jsonValue; } - public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( - ApiKeyManagedBy.values()); + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + CredentialManagedBy.values()); } 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 31a7ff21a5..1c8002387a 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 @@ -614,6 +614,51 @@ public final CompletableFuture clearCachedServ return clearCachedServiceTokens(fn.apply(new ClearCachedServiceTokensRequest.Builder()).build()); } + // ----- Endpoint: security.clone_api_key + + /** + * Clone an API key. + *

+ * Create a copy of an existing API key with a new ID. The cloned key inherits + * the role descriptors of the source key. This is intended for applications + * (such as Kibana) that need to create API keys on behalf of a user using an + * existing API key credential, since derived API keys (API keys created by API + * keys) are not otherwise supported. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture cloneApiKey(CloneApiKeyRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) CloneApiKeyRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Clone an API key. + *

+ * Create a copy of an existing API key with a new ID. The cloned key inherits + * the role descriptors of the source key. This is intended for applications + * (such as Kibana) that need to create API keys on behalf of a user using an + * existing API key credential, since derived API keys (API keys created by API + * keys) are not otherwise supported. + * + * @param fn + * a function that initializes a builder to create the + * {@link CloneApiKeyRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture cloneApiKey( + Function> fn) { + return cloneApiKey(fn.apply(new CloneApiKeyRequest.Builder()).build()); + } + // ----- Endpoint: security.create_api_key /** 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 54861874d7..583ded6787 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 @@ -629,6 +629,52 @@ public final ClearCachedServiceTokensResponse clearCachedServiceTokens( return clearCachedServiceTokens(fn.apply(new ClearCachedServiceTokensRequest.Builder()).build()); } + // ----- Endpoint: security.clone_api_key + + /** + * Clone an API key. + *

+ * Create a copy of an existing API key with a new ID. The cloned key inherits + * the role descriptors of the source key. This is intended for applications + * (such as Kibana) that need to create API keys on behalf of a user using an + * existing API key credential, since derived API keys (API keys created by API + * keys) are not otherwise supported. + * + * @see Documentation + * on elastic.co + */ + + public CloneApiKeyResponse cloneApiKey(CloneApiKeyRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) CloneApiKeyRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Clone an API key. + *

+ * Create a copy of an existing API key with a new ID. The cloned key inherits + * the role descriptors of the source key. This is intended for applications + * (such as Kibana) that need to create API keys on behalf of a user using an + * existing API key credential, since derived API keys (API keys created by API + * keys) are not otherwise supported. + * + * @param fn + * a function that initializes a builder to create the + * {@link CloneApiKeyRequest} + * @see Documentation + * on elastic.co + */ + + public final CloneApiKeyResponse cloneApiKey( + Function> fn) + throws IOException, ElasticsearchException { + return cloneApiKey(fn.apply(new CloneApiKeyRequest.Builder()).build()); + } + // ----- Endpoint: security.create_api_key /** diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/authenticate/AuthenticateApiKey.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/authenticate/AuthenticateApiKey.java index 6e9fee6834..61db70128e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/authenticate/AuthenticateApiKey.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/authenticate/AuthenticateApiKey.java @@ -19,7 +19,7 @@ package co.elastic.clients.elasticsearch.security.authenticate; -import co.elastic.clients.elasticsearch.security.ApiKeyManagedBy; +import co.elastic.clients.elasticsearch.security.CredentialManagedBy; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -67,7 +67,7 @@ public class AuthenticateApiKey implements JsonpSerializable { @Nullable private final String name; - private final ApiKeyManagedBy managedBy; + private final CredentialManagedBy managedBy; @Nullable private final Boolean internal; @@ -105,7 +105,7 @@ public final String name() { /** * Required - API name: {@code managed_by} */ - public final ApiKeyManagedBy managedBy() { + public final CredentialManagedBy managedBy() { return this.managedBy; } @@ -165,7 +165,7 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private String name; - private ApiKeyManagedBy managedBy; + private CredentialManagedBy managedBy; @Nullable private Boolean internal; @@ -198,7 +198,7 @@ public final Builder name(@Nullable String value) { /** * Required - API name: {@code managed_by} */ - public final Builder managedBy(ApiKeyManagedBy value) { + public final Builder managedBy(CredentialManagedBy value) { this.managedBy = value; return this; } @@ -247,7 +247,7 @@ protected static void setupAuthenticateApiKeyDeserializer(ObjectDeserializer> fn) } /** - * Required - API name: {@code name} + * API name: {@code name} */ + @Nullable public final String name() { return this.name; } @@ -92,6 +98,14 @@ public final String type() { return this.type; } + /** + * API name: {@code managed_by} + */ + @Nullable + public final CredentialManagedBy managedBy() { + return this.managedBy; + } + /** * Serialize this object to JSON. */ @@ -103,14 +117,20 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("name"); - generator.write(this.name); + if (this.name != null) { + generator.writeKey("name"); + generator.write(this.name); + } if (this.type != null) { generator.writeKey("type"); generator.write(this.type); } + if (this.managedBy != null) { + generator.writeKey("managed_by"); + this.managedBy.serialize(generator, mapper); + } } @@ -126,22 +146,27 @@ public String toString() { */ public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable private String name; @Nullable private String type; + @Nullable + private CredentialManagedBy managedBy; + public Builder() { } private Builder(ServiceToken instance) { this.name = instance.name; this.type = instance.type; + this.managedBy = instance.managedBy; } /** - * Required - API name: {@code name} + * API name: {@code name} */ - public final Builder name(String value) { + public final Builder name(@Nullable String value) { this.name = value; return this; } @@ -154,6 +179,14 @@ public final Builder type(@Nullable String value) { return this; } + /** + * API name: {@code managed_by} + */ + public final Builder managedBy(@Nullable CredentialManagedBy value) { + this.managedBy = value; + return this; + } + @Override protected Builder self() { return this; @@ -190,6 +223,7 @@ protected static void setupServiceTokenDeserializer(ObjectDeserializer getRepository() { * supplier of your storage system to address the incompatibilities that * Elasticsearch detects. *

+ * The analysis may also report a failure if your repository experienced a + * service disruption while the analysis was running. In practice, occasional + * service disruptions are inevitable, but the analysis cannot itself + * distinguish such disruptions from incorrect behavior so must report all + * deviations from the expected behavior as failures. If you are certain that + * you can ascribe an analysis failure to such a service disruption, wait for + * your service provider to resolve the disruption and then re-run the analysis. + * Elasticsearch will be unable to create or restore snapshots during repository + * service disruptions, so you must ensure that these events occur only very + * rarely. + *

* If the analysis is successful, the API returns details of the testing * process, optionally including how long each operation took. You can use this * information to determine the performance of your storage system. If any @@ -655,6 +666,17 @@ public CompletableFuture repositoryAnalyze(Repository * supplier of your storage system to address the incompatibilities that * Elasticsearch detects. *

+ * The analysis may also report a failure if your repository experienced a + * service disruption while the analysis was running. In practice, occasional + * service disruptions are inevitable, but the analysis cannot itself + * distinguish such disruptions from incorrect behavior so must report all + * deviations from the expected behavior as failures. If you are certain that + * you can ascribe an analysis failure to such a service disruption, wait for + * your service provider to resolve the disruption and then re-run the analysis. + * Elasticsearch will be unable to create or restore snapshots during repository + * service disruptions, so you must ensure that these events occur only very + * rarely. + *

* If the analysis is successful, the API returns details of the testing * process, optionally including how long each operation took. You can use this * information to determine the performance of your storage system. If any diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ElasticsearchSnapshotClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ElasticsearchSnapshotClient.java index ffe8d81de0..df3e073eab 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ElasticsearchSnapshotClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/ElasticsearchSnapshotClient.java @@ -472,6 +472,17 @@ public GetRepositoryResponse getRepository() throws IOException, ElasticsearchEx * supplier of your storage system to address the incompatibilities that * Elasticsearch detects. *

+ * The analysis may also report a failure if your repository experienced a + * service disruption while the analysis was running. In practice, occasional + * service disruptions are inevitable, but the analysis cannot itself + * distinguish such disruptions from incorrect behavior so must report all + * deviations from the expected behavior as failures. If you are certain that + * you can ascribe an analysis failure to such a service disruption, wait for + * your service provider to resolve the disruption and then re-run the analysis. + * Elasticsearch will be unable to create or restore snapshots during repository + * service disruptions, so you must ensure that these events occur only very + * rarely. + *

* If the analysis is successful, the API returns details of the testing * process, optionally including how long each operation took. You can use this * information to determine the performance of your storage system. If any @@ -665,6 +676,17 @@ public RepositoryAnalyzeResponse repositoryAnalyze(RepositoryAnalyzeRequest requ * supplier of your storage system to address the incompatibilities that * Elasticsearch detects. *

+ * The analysis may also report a failure if your repository experienced a + * service disruption while the analysis was running. In practice, occasional + * service disruptions are inevitable, but the analysis cannot itself + * distinguish such disruptions from incorrect behavior so must report all + * deviations from the expected behavior as failures. If you are certain that + * you can ascribe an analysis failure to such a service disruption, wait for + * your service provider to resolve the disruption and then re-run the analysis. + * Elasticsearch will be unable to create or restore snapshots during repository + * service disruptions, so you must ensure that these events occur only very + * rarely. + *

* If the analysis is successful, the API returns details of the testing * process, optionally including how long each operation took. You can use this * information to determine the performance of your storage system. If any 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 06ff9504e3..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 @@ -115,6 +115,17 @@ * supplier of your storage system to address the incompatibilities that * Elasticsearch detects. *

+ * The analysis may also report a failure if your repository experienced a + * service disruption while the analysis was running. In practice, occasional + * service disruptions are inevitable, but the analysis cannot itself + * distinguish such disruptions from incorrect behavior so must report all + * deviations from the expected behavior as failures. If you are certain that + * you can ascribe an analysis failure to such a service disruption, wait for + * your service provider to resolve the disruption and then re-run the analysis. + * Elasticsearch will be unable to create or restore snapshots during repository + * service disruptions, so you must ensure that these events occur only very + * rarely. + *

* If the analysis is successful, the API returns details of the testing * process, optionally including how long each operation took. You can use this * information to determine the performance of your storage system. If any @@ -247,6 +258,9 @@ public class RepositoryAnalyzeRequest extends RequestBase { @Nullable private final Integer blobCount; + @Nullable + private final Boolean checkOverwriteProtection; + @Nullable private final Integer concurrency; @@ -287,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; @@ -317,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. @@ -467,6 +493,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private Integer blobCount; + @Nullable + private Boolean checkOverwriteProtection; + @Nullable private Integer concurrency; @@ -506,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; @@ -531,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. @@ -758,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)); } @@ -794,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/tasks/GetTasksRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/tasks/GetTasksRequest.java index 7f6ec71f06..bb9e113644 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 @@ -72,6 +72,9 @@ */ public class GetTasksRequest extends RequestBase { + @Nullable + private final Boolean followRelocations; + private final String taskId; @Nullable @@ -84,6 +87,7 @@ public class GetTasksRequest extends RequestBase { private GetTasksRequest(Builder builder) { + this.followRelocations = builder.followRelocations; this.taskId = ApiTypeHelper.requireNonNull(builder.taskId, this, "taskId"); this.timeout = builder.timeout; this.waitForCompletion = builder.waitForCompletion; @@ -94,6 +98,16 @@ public static GetTasksRequest of(Function + * API name: {@code follow_relocations} + */ + @Nullable + public final Boolean followRelocations() { + return this.followRelocations; + } + /** * Required - The task identifier. *

@@ -131,6 +145,9 @@ public final Boolean waitForCompletion() { */ public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Boolean followRelocations; + private String taskId; @Nullable @@ -142,11 +159,22 @@ public static class Builder extends RequestBase.AbstractBuilder impleme public Builder() { } private Builder(GetTasksRequest instance) { + this.followRelocations = instance.followRelocations; this.taskId = instance.taskId; this.timeout = instance.timeout; this.waitForCompletion = instance.waitForCompletion; } + /** + * Internal use only + *

+ * API name: {@code follow_relocations} + */ + public final Builder followRelocations(@Nullable Boolean value) { + this.followRelocations = value; + return this; + } + /** * Required - The task identifier. *

@@ -263,6 +291,9 @@ public Builder rebuild() { // Request parameters request -> { Map params = new HashMap<>(); + if (request.followRelocations != null) { + params.put("follow_relocations", String.valueOf(request.followRelocations)); + } if (request.waitForCompletion != null) { params.put("wait_for_completion", String.valueOf(request.waitForCompletion)); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/ScheduleNowTransformRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/ScheduleNowTransformRequest.java index fd9972f164..49bcf2a5fb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/ScheduleNowTransformRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/transform/ScheduleNowTransformRequest.java @@ -31,6 +31,7 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.lang.String; import java.util.HashMap; import java.util.Map; @@ -70,6 +71,9 @@ */ public class ScheduleNowTransformRequest extends RequestBase { + @Nullable + private final Boolean defer; + @Nullable private final Time timeout; @@ -79,6 +83,7 @@ public class ScheduleNowTransformRequest extends RequestBase { private ScheduleNowTransformRequest(Builder builder) { + this.defer = builder.defer; this.timeout = builder.timeout; this.transformId = ApiTypeHelper.requireNonNull(builder.transformId, this, "transformId"); @@ -88,6 +93,18 @@ public static ScheduleNowTransformRequest of(Function + * API name: {@code defer} + */ + @Nullable + public final Boolean defer() { + return this.defer; + } + /** * Controls the time to wait for the scheduling to take place *

@@ -116,6 +133,9 @@ public final String transformId() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Boolean defer; + @Nullable private Time timeout; @@ -124,10 +144,23 @@ public static class Builder extends RequestBase.AbstractBuilder public Builder() { } private Builder(ScheduleNowTransformRequest instance) { + this.defer = instance.defer; this.timeout = instance.timeout; this.transformId = instance.transformId; } + /** + * When true, defers the scheduling by the transform's configured sync delay + * instead of triggering immediately. The transform will process new data after + * the delay elapses rather than right away. + *

+ * API name: {@code defer} + */ + public final Builder defer(@Nullable Boolean value) { + this.defer = value; + return this; + } + /** * Controls the time to wait for the scheduling to take place *

@@ -233,6 +266,9 @@ public Builder rebuild() { // Request parameters request -> { Map params = new HashMap<>(); + if (request.defer != null) { + params.put("defer", String.valueOf(request.defer)); + } if (request.timeout != null) { params.put("timeout", request.timeout._toJsonString()); } 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 fe1a77cc03..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 @@ -79,6 +79,9 @@ public class Settings implements JsonpSerializable { @Nullable private final Boolean usePointInTime; + @Nullable + private final Integer numFailureRetries; + @Nullable private final Boolean unattended; @@ -92,6 +95,7 @@ private Settings(Builder builder) { this.docsPerSecond = builder.docsPerSecond; this.maxPageSearchSize = builder.maxPageSearchSize; this.usePointInTime = builder.usePointInTime; + this.numFailureRetries = builder.numFailureRetries; this.unattended = builder.unattended; } @@ -154,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} */ @@ -179,6 +185,23 @@ public final Boolean usePointInTime() { return this.usePointInTime; } + /** + * Defines the number of retries on a recoverable failure before the transform + * task is marked as failed. The minimum value is 0 + * and the maximum is 100, where -1 indicates that the + * transform retries indefinitely. If unset, the cluster-level setting + * num_transform_failure_retries is used. + *

+ * This setting cannot be specified when unattended is + * true, because unattended transforms always retry indefinitely. + *

+ * API name: {@code num_failure_retries} + */ + @Nullable + public final Integer numFailureRetries() { + return this.numFailureRetries; + } + /** * If true, the transform runs in unattended mode. In unattended * mode, the transform retries indefinitely in case of an error which means the @@ -232,6 +255,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("use_point_in_time"); generator.write(this.usePointInTime); + } + if (this.numFailureRetries != null) { + generator.writeKey("num_failure_retries"); + generator.write(this.numFailureRetries); + } if (this.unattended != null) { generator.writeKey("unattended"); @@ -271,6 +299,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private Boolean usePointInTime; + @Nullable + private Integer numFailureRetries; + @Nullable private Boolean unattended; @@ -283,6 +314,7 @@ private Builder(Settings instance) { this.docsPerSecond = instance.docsPerSecond; this.maxPageSearchSize = instance.maxPageSearchSize; this.usePointInTime = instance.usePointInTime; + this.numFailureRetries = instance.numFailureRetries; this.unattended = instance.unattended; } @@ -340,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} */ @@ -365,6 +399,23 @@ public final Builder usePointInTime(@Nullable Boolean value) { return this; } + /** + * Defines the number of retries on a recoverable failure before the transform + * task is marked as failed. The minimum value is 0 + * and the maximum is 100, where -1 indicates that the + * transform retries indefinitely. If unset, the cluster-level setting + * num_transform_failure_retries is used. + *

+ * This setting cannot be specified when unattended is + * true, because unattended transforms always retry indefinitely. + *

+ * API name: {@code num_failure_retries} + */ + public final Builder numFailureRetries(@Nullable Integer value) { + this.numFailureRetries = value; + return this; + } + /** * If true, the transform runs in unattended mode. In unattended * mode, the transform retries indefinitely in case of an error which means the @@ -418,6 +469,7 @@ protected static void setupSettingsDeserializer(ObjectDeserializer