From d2c8b4ce916c13d6873ebc81d74af5f89a6011cb Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Tue, 2 Dec 2025 11:40:21 +0000 Subject: [PATCH] [codegen] update to latest spec --- .../ElasticsearchAsyncClient.java | 6 ++ .../elasticsearch/ElasticsearchClient.java | 6 ++ .../async_search/AsyncSearchResponseBase.java | 38 ++++++++++ .../elasticsearch/core/BulkRequest.java | 2 + .../core/DeleteByQueryRethrottleRequest.java | 23 +++--- .../core/ReindexRethrottleRequest.java | 23 +++--- .../core/UpdateByQueryRethrottleRequest.java | 23 +++--- .../DeleteDanglingIndexRequest.java | 23 +++--- .../ImportDanglingIndexRequest.java | 23 +++--- .../elasticsearch/doc-files/api-spec.html | 54 +++++++------- .../elasticsearch/eql/EqlSearchRequest.java | 4 +- .../elasticsearch/monitoring/BulkRequest.java | 72 +------------------ 12 files changed, 139 insertions(+), 158 deletions(-) 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 f88d57e04f..d067c514c5 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 @@ -462,6 +462,8 @@ public ElasticsearchXpackAsyncClient xpack() { * Search::Elasticsearch::Client::5_0::Scroll *
  • Python: Check out elasticsearch.helpers.*
  • *
  • JavaScript: Check out client.helpers.*
  • + *
  • Java: Check out + * co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester
  • *
  • .NET: Check out BulkAllObservable
  • *
  • PHP: Check out bulk indexing.
  • *
  • Ruby: Check out Elasticsearch::Helpers::BulkHelper
  • @@ -637,6 +639,8 @@ public CompletableFuture bulk(BulkRequest request) { * Search::Elasticsearch::Client::5_0::Scroll *
  • Python: Check out elasticsearch.helpers.*
  • *
  • JavaScript: Check out client.helpers.*
  • + *
  • Java: Check out + * co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester
  • *
  • .NET: Check out BulkAllObservable
  • *
  • PHP: Check out bulk indexing.
  • *
  • Ruby: Check out Elasticsearch::Helpers::BulkHelper
  • @@ -812,6 +816,8 @@ public final CompletableFuture bulk(FunctionSearch::Elasticsearch::Client::5_0::Scroll *
  • Python: Check out elasticsearch.helpers.*
  • *
  • JavaScript: Check out client.helpers.*
  • + *
  • Java: Check out + * co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester
  • *
  • .NET: Check out BulkAllObservable
  • *
  • PHP: Check out bulk indexing.
  • *
  • Ruby: Check out Elasticsearch::Helpers::BulkHelper
  • 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 014c5f3453..81d1c5d589 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 @@ -463,6 +463,8 @@ public ElasticsearchXpackClient xpack() { * Search::Elasticsearch::Client::5_0::Scroll *
  • Python: Check out elasticsearch.helpers.*
  • *
  • JavaScript: Check out client.helpers.*
  • + *
  • Java: Check out + * co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester
  • *
  • .NET: Check out BulkAllObservable
  • *
  • PHP: Check out bulk indexing.
  • *
  • Ruby: Check out Elasticsearch::Helpers::BulkHelper
  • @@ -638,6 +640,8 @@ public BulkResponse bulk(BulkRequest request) throws IOException, ElasticsearchE * Search::Elasticsearch::Client::5_0::Scroll *
  • Python: Check out elasticsearch.helpers.*
  • *
  • JavaScript: Check out client.helpers.*
  • + *
  • Java: Check out + * co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester
  • *
  • .NET: Check out BulkAllObservable
  • *
  • PHP: Check out bulk indexing.
  • *
  • Ruby: Check out Elasticsearch::Helpers::BulkHelper
  • @@ -814,6 +818,8 @@ public final BulkResponse bulk(FunctionSearch::Elasticsearch::Client::5_0::Scroll *
  • Python: Check out elasticsearch.helpers.*
  • *
  • JavaScript: Check out client.helpers.*
  • + *
  • Java: Check out + * co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester
  • *
  • .NET: Check out BulkAllObservable
  • *
  • PHP: Check out bulk indexing.
  • *
  • Ruby: Check out Elasticsearch::Helpers::BulkHelper
  • diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java index 847f538977..4d21f812c3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchResponseBase.java @@ -19,6 +19,7 @@ package co.elastic.clients.elasticsearch.async_search; +import co.elastic.clients.elasticsearch._types.ErrorCause; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -35,6 +36,7 @@ import java.lang.Long; import java.lang.String; import java.util.Objects; +import java.util.function.Function; import javax.annotation.Nullable; //---------------------------------------------------------------- @@ -85,6 +87,9 @@ public abstract class AsyncSearchResponseBase implements JsonpSerializable { @Nullable private final Long completionTimeInMillis; + @Nullable + private final ErrorCause error; + // --------------------------------------------------------------------------------------------- protected AsyncSearchResponseBase(AbstractBuilder builder) { @@ -99,6 +104,7 @@ protected AsyncSearchResponseBase(AbstractBuilder builder) { this.startTimeInMillis = ApiTypeHelper.requireNonNull(builder.startTimeInMillis, this, "startTimeInMillis", 0); this.completionTime = builder.completionTime; this.completionTimeInMillis = builder.completionTimeInMillis; + this.error = builder.error; } @@ -189,6 +195,14 @@ public final Long completionTimeInMillis() { return this.completionTimeInMillis; } + /** + * API name: {@code error} + */ + @Nullable + public final ErrorCause error() { + return this.error; + } + /** * Serialize this object to JSON. */ @@ -234,6 +248,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.completionTimeInMillis); } + if (this.error != null) { + generator.writeKey("error"); + this.error.serialize(generator, mapper); + + } } @@ -268,6 +287,9 @@ public abstract static class AbstractBuilder> fn) { + return this.error(fn.apply(new ErrorCause.Builder()).build()); + } + protected abstract BuilderT self(); } @@ -378,6 +415,7 @@ protected static > void setupAsyncSea op.add(AbstractBuilder::completionTime, DateTime._DESERIALIZER, "completion_time"); op.add(AbstractBuilder::completionTimeInMillis, JsonpDeserializer.longDeserializer(), "completion_time_in_millis"); + op.add(AbstractBuilder::error, ErrorCause._DESERIALIZER, "error"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java index 0122390fc2..712a5c0fdd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/BulkRequest.java @@ -168,6 +168,8 @@ * Search::Elasticsearch::Client::5_0::Scroll *
  • Python: Check out elasticsearch.helpers.*
  • *
  • JavaScript: Check out client.helpers.*
  • + *
  • Java: Check out + * co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester
  • *
  • .NET: Check out BulkAllObservable
  • *
  • PHP: Check out bulk indexing.
  • *
  • Ruby: Check out Elasticsearch::Helpers::BulkHelper
  • diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java index fd56b5193d..05b90886aa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/DeleteByQueryRethrottleRequest.java @@ -69,8 +69,7 @@ */ public class DeleteByQueryRethrottleRequest extends RequestBase { - @Nullable - private final Float requestsPerSecond; + private final float requestsPerSecond; private final String taskId; @@ -78,7 +77,7 @@ public class DeleteByQueryRethrottleRequest extends RequestBase { private DeleteByQueryRethrottleRequest(Builder builder) { - this.requestsPerSecond = builder.requestsPerSecond; + this.requestsPerSecond = ApiTypeHelper.requireNonNull(builder.requestsPerSecond, this, "requestsPerSecond", 0); this.taskId = ApiTypeHelper.requireNonNull(builder.taskId, this, "taskId"); } @@ -89,13 +88,12 @@ public static DeleteByQueryRethrottleRequest of( } /** - * The throttle for this request in sub-requests per second. To disable - * throttling, set it to -1. + * Required - The throttle for this request in sub-requests per second. To + * disable throttling, set it to -1. *

    * API name: {@code requests_per_second} */ - @Nullable - public final Float requestsPerSecond() { + public final float requestsPerSecond() { return this.requestsPerSecond; } @@ -117,18 +115,17 @@ public final String taskId() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { - @Nullable private Float requestsPerSecond; private String taskId; /** - * The throttle for this request in sub-requests per second. To disable - * throttling, set it to -1. + * Required - The throttle for this request in sub-requests per second. To + * disable throttling, set it to -1. *

    * API name: {@code requests_per_second} */ - public final Builder requestsPerSecond(@Nullable Float value) { + public final Builder requestsPerSecond(float value) { this.requestsPerSecond = value; return this; } @@ -213,9 +210,7 @@ public DeleteByQueryRethrottleRequest build() { // Request parameters request -> { Map params = new HashMap<>(); - if (request.requestsPerSecond != null) { - params.put("requests_per_second", String.valueOf(request.requestsPerSecond)); - } + params.put("requests_per_second", String.valueOf(request.requestsPerSecond)); return params; }, SimpleEndpoint.emptyMap(), false, DeleteByQueryRethrottleResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java index b100e8d31b..a19e62e876 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/ReindexRethrottleRequest.java @@ -76,8 +76,7 @@ */ public class ReindexRethrottleRequest extends RequestBase { - @Nullable - private final Float requestsPerSecond; + private final float requestsPerSecond; private final String taskId; @@ -85,7 +84,7 @@ public class ReindexRethrottleRequest extends RequestBase { private ReindexRethrottleRequest(Builder builder) { - this.requestsPerSecond = builder.requestsPerSecond; + this.requestsPerSecond = ApiTypeHelper.requireNonNull(builder.requestsPerSecond, this, "requestsPerSecond", 0); this.taskId = ApiTypeHelper.requireNonNull(builder.taskId, this, "taskId"); } @@ -95,14 +94,13 @@ public static ReindexRethrottleRequest of(Function-1 to turn off throttling or any decimal number like + * Required - The throttle for this request in sub-requests per second. It can + * be either -1 to turn off throttling or any decimal number like * 1.7 or 12 to throttle to that level. *

    * API name: {@code requests_per_second} */ - @Nullable - public final Float requestsPerSecond() { + public final float requestsPerSecond() { return this.requestsPerSecond; } @@ -124,19 +122,18 @@ public final String taskId() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { - @Nullable private Float requestsPerSecond; private String taskId; /** - * The throttle for this request in sub-requests per second. It can be either - * -1 to turn off throttling or any decimal number like + * Required - The throttle for this request in sub-requests per second. It can + * be either -1 to turn off throttling or any decimal number like * 1.7 or 12 to throttle to that level. *

    * API name: {@code requests_per_second} */ - public final Builder requestsPerSecond(@Nullable Float value) { + public final Builder requestsPerSecond(float value) { this.requestsPerSecond = value; return this; } @@ -221,9 +218,7 @@ public ReindexRethrottleRequest build() { // Request parameters request -> { Map params = new HashMap<>(); - if (request.requestsPerSecond != null) { - params.put("requests_per_second", String.valueOf(request.requestsPerSecond)); - } + params.put("requests_per_second", String.valueOf(request.requestsPerSecond)); return params; }, SimpleEndpoint.emptyMap(), false, ReindexRethrottleResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java index d2db64b213..6121e90743 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/UpdateByQueryRethrottleRequest.java @@ -69,8 +69,7 @@ */ public class UpdateByQueryRethrottleRequest extends RequestBase { - @Nullable - private final Float requestsPerSecond; + private final float requestsPerSecond; private final String taskId; @@ -78,7 +77,7 @@ public class UpdateByQueryRethrottleRequest extends RequestBase { private UpdateByQueryRethrottleRequest(Builder builder) { - this.requestsPerSecond = builder.requestsPerSecond; + this.requestsPerSecond = ApiTypeHelper.requireNonNull(builder.requestsPerSecond, this, "requestsPerSecond", 0); this.taskId = ApiTypeHelper.requireNonNull(builder.taskId, this, "taskId"); } @@ -89,13 +88,12 @@ public static UpdateByQueryRethrottleRequest of( } /** - * The throttle for this request in sub-requests per second. To turn off - * throttling, set it to -1. + * Required - The throttle for this request in sub-requests per second. To turn + * off throttling, set it to -1. *

    * API name: {@code requests_per_second} */ - @Nullable - public final Float requestsPerSecond() { + public final float requestsPerSecond() { return this.requestsPerSecond; } @@ -117,18 +115,17 @@ public final String taskId() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { - @Nullable private Float requestsPerSecond; private String taskId; /** - * The throttle for this request in sub-requests per second. To turn off - * throttling, set it to -1. + * Required - The throttle for this request in sub-requests per second. To turn + * off throttling, set it to -1. *

    * API name: {@code requests_per_second} */ - public final Builder requestsPerSecond(@Nullable Float value) { + public final Builder requestsPerSecond(float value) { this.requestsPerSecond = value; return this; } @@ -213,9 +210,7 @@ public UpdateByQueryRethrottleRequest build() { // Request parameters request -> { Map params = new HashMap<>(); - if (request.requestsPerSecond != null) { - params.put("requests_per_second", String.valueOf(request.requestsPerSecond)); - } + params.put("requests_per_second", String.valueOf(request.requestsPerSecond)); return params; }, SimpleEndpoint.emptyMap(), false, UpdateByQueryRethrottleResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/DeleteDanglingIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/DeleteDanglingIndexRequest.java index 83de850904..a623fce13f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/DeleteDanglingIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/DeleteDanglingIndexRequest.java @@ -69,7 +69,8 @@ */ public class DeleteDanglingIndexRequest extends RequestBase { - private final boolean acceptDataLoss; + @Nullable + private final Boolean acceptDataLoss; private final String indexUuid; @@ -83,7 +84,7 @@ public class DeleteDanglingIndexRequest extends RequestBase { private DeleteDanglingIndexRequest(Builder builder) { - this.acceptDataLoss = ApiTypeHelper.requireNonNull(builder.acceptDataLoss, this, "acceptDataLoss", false); + this.acceptDataLoss = builder.acceptDataLoss; this.indexUuid = ApiTypeHelper.requireNonNull(builder.indexUuid, this, "indexUuid"); this.masterTimeout = builder.masterTimeout; this.timeout = builder.timeout; @@ -95,12 +96,13 @@ public static DeleteDanglingIndexRequest of(Function * API name: {@code accept_data_loss} */ - public final boolean acceptDataLoss() { + @Nullable + public final Boolean acceptDataLoss() { return this.acceptDataLoss; } @@ -143,6 +145,7 @@ public final Time timeout() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable private Boolean acceptDataLoss; private String indexUuid; @@ -154,12 +157,12 @@ public static class Builder extends RequestBase.AbstractBuilder private Time timeout; /** - * Required - This parameter must be set to true to acknowledge that it will no - * longer be possible to recove data from the dangling index. + * This parameter must be set to true to acknowledge that it will no longer be + * possible to recove data from the dangling index. *

    * API name: {@code accept_data_loss} */ - public final Builder acceptDataLoss(boolean value) { + public final Builder acceptDataLoss(@Nullable Boolean value) { this.acceptDataLoss = value; return this; } @@ -285,7 +288,9 @@ public DeleteDanglingIndexRequest build() { if (request.masterTimeout != null) { params.put("master_timeout", request.masterTimeout._toJsonString()); } - params.put("accept_data_loss", String.valueOf(request.acceptDataLoss)); + if (request.acceptDataLoss != null) { + params.put("accept_data_loss", String.valueOf(request.acceptDataLoss)); + } if (request.timeout != null) { params.put("timeout", request.timeout._toJsonString()); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ImportDanglingIndexRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ImportDanglingIndexRequest.java index 9545d02898..8866cd94f0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ImportDanglingIndexRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/dangling_indices/ImportDanglingIndexRequest.java @@ -71,7 +71,8 @@ */ public class ImportDanglingIndexRequest extends RequestBase { - private final boolean acceptDataLoss; + @Nullable + private final Boolean acceptDataLoss; private final String indexUuid; @@ -85,7 +86,7 @@ public class ImportDanglingIndexRequest extends RequestBase { private ImportDanglingIndexRequest(Builder builder) { - this.acceptDataLoss = ApiTypeHelper.requireNonNull(builder.acceptDataLoss, this, "acceptDataLoss", false); + this.acceptDataLoss = builder.acceptDataLoss; this.indexUuid = ApiTypeHelper.requireNonNull(builder.indexUuid, this, "indexUuid"); this.masterTimeout = builder.masterTimeout; this.timeout = builder.timeout; @@ -97,15 +98,16 @@ public static ImportDanglingIndexRequest of(Function * API name: {@code accept_data_loss} */ - public final boolean acceptDataLoss() { + @Nullable + public final Boolean acceptDataLoss() { return this.acceptDataLoss; } @@ -148,6 +150,7 @@ public final Time timeout() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable private Boolean acceptDataLoss; private String indexUuid; @@ -159,15 +162,15 @@ public static class Builder extends RequestBase.AbstractBuilder private Time timeout; /** - * Required - This parameter must be set to true to import a dangling index. - * Because Elasticsearch cannot know where the dangling index data came from or + * This parameter must be set to true to import a dangling index. Because + * Elasticsearch cannot know where the dangling index data came from or * determine which shard copies are fresh and which are stale, it cannot * guarantee that the imported data represents the latest state of the index * when it was last in the cluster. *

    * API name: {@code accept_data_loss} */ - public final Builder acceptDataLoss(boolean value) { + public final Builder acceptDataLoss(@Nullable Boolean value) { this.acceptDataLoss = value; return this; } @@ -293,7 +296,9 @@ public ImportDanglingIndexRequest build() { if (request.masterTimeout != null) { params.put("master_timeout", request.masterTimeout._toJsonString()); } - params.put("accept_data_loss", String.valueOf(request.acceptDataLoss)); + if (request.acceptDataLoss != null) { + params.put("accept_data_loss", String.valueOf(request.acceptDataLoss)); + } if (request.timeout != null) { params.put("timeout", request.timeout._toJsonString()); } 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 814cdc7f64..f6b1ed1a42 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 @@ -11,7 +11,7 @@ '_global.bulk.OperationBase': '_global/bulk/types.ts#L100-L117', '_global.bulk.OperationContainer': '_global/bulk/types.ts#L158-L180', '_global.bulk.OperationType': '_global/bulk/types.ts#L93-L98', -'_global.bulk.Request': '_global/bulk/BulkRequest.ts#L32-L248', +'_global.bulk.Request': '_global/bulk/BulkRequest.ts#L32-L249', '_global.bulk.Response': '_global/bulk/BulkResponse.ts#L24-L45', '_global.bulk.ResponseItem': '_global/bulk/types.ts#L37-L84', '_global.bulk.UpdateAction': '_global/bulk/types.ts#L182-L217', @@ -104,7 +104,7 @@ '_global.msearch.MultiSearchResult': '_global/msearch/types.ts#L206-L209', '_global.msearch.MultisearchBody': '_global/msearch/types.ts#L70-L204', '_global.msearch.MultisearchHeader': '_global/msearch/types.ts#L52-L67', -'_global.msearch.Request': '_global/msearch/MultiSearchRequest.ts#L25-L140', +'_global.msearch.Request': '_global/msearch/MultiSearchRequest.ts#L25-L141', '_global.msearch.Response': '_global/msearch/MultiSearchResponse.ts#L25-L27', '_global.msearch.ResponseItem': '_global/msearch/types.ts#L211-L214', '_global.msearch_template.Request': '_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L116', @@ -133,7 +133,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-L76', +'_global.rank_eval.Request': '_global/rank_eval/RankEvalRequest.ts#L24-L79', '_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', @@ -239,7 +239,7 @@ '_global.search_shards.Response': '_global/search_shards/SearchShardsResponse.ts#L34-L40', '_global.search_shards.SearchShardsNodeAttributes': '_global/search_shards/SearchShardsResponse.ts#L42-L60', '_global.search_shards.ShardStoreIndex': '_global/search_shards/SearchShardsResponse.ts#L62-L65', -'_global.search_template.Request': '_global/search_template/SearchTemplateRequest.ts#L32-L152', +'_global.search_template.Request': '_global/search_template/SearchTemplateRequest.ts#L32-L153', '_global.search_template.Response': '_global/search_template/SearchTemplateResponse.ts#L30-L48', '_global.terms_enum.Request': '_global/terms_enum/TermsEnumRequest.ts#L26-L93', '_global.terms_enum.Response': '_global/terms_enum/TermsEnumResponse.ts#L22-L32', @@ -253,9 +253,9 @@ '_global.update.Request': '_global/update/UpdateRequest.ts#L38-L194', '_global.update.Response': '_global/update/UpdateResponse.ts#L27-L29', '_global.update.UpdateWriteResponseBase': '_global/update/UpdateResponse.ts#L23-L25', -'_global.update_by_query.Request': '_global/update_by_query/UpdateByQueryRequest.ts#L37-L339', +'_global.update_by_query.Request': '_global/update_by_query/UpdateByQueryRequest.ts#L37-L340', '_global.update_by_query.Response': '_global/update_by_query/UpdateByQueryResponse.ts#L26-L67', -'_global.update_by_query_rethrottle.Request': '_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts#L24-L56', +'_global.update_by_query_rethrottle.Request': '_global/update_by_query_rethrottle/UpdateByQueryRethrottleRequest.ts#L24-L55', '_global.update_by_query_rethrottle.Response': '_global/update_by_query_rethrottle/UpdateByQueryRethrottleResponse.ts#L23-L25', '_global.update_by_query_rethrottle.UpdateByQueryRethrottleNode': '_global/update_by_query_rethrottle/UpdateByQueryRethrottleNode.ts#L25-L27', '_spec_utils.BaseNode': '_spec_utils/BaseNode.ts#L25-L32', @@ -1061,17 +1061,17 @@ '_types.query_dsl.WrapperQuery': '_types/query_dsl/abstractions.ts#L508-L517', '_types.query_dsl.ZeroTermsQuery': '_types/query_dsl/fulltext.ts#L638-L647', 'async_search._types.AsyncSearch': 'async_search/_types/AsyncSearch.ts#L30-L56', -'async_search._types.AsyncSearchDocumentResponseBase': 'async_search/_types/AsyncSearchResponseBase.ts#L52-L56', -'async_search._types.AsyncSearchResponseBase': 'async_search/_types/AsyncSearchResponseBase.ts#L24-L51', +'async_search._types.AsyncSearchDocumentResponseBase': 'async_search/_types/AsyncSearchResponseBase.ts#L54-L58', +'async_search._types.AsyncSearchResponseBase': 'async_search/_types/AsyncSearchResponseBase.ts#L25-L53', 'async_search.delete.Request': 'async_search/delete/AsyncSearchDeleteRequest.ts#L23-L46', 'async_search.delete.Response': 'async_search/delete/AsyncSearchDeleteResponse.ts#L22-L24', 'async_search.get.Request': 'async_search/get/AsyncSearchGetRequest.ts#L24-L63', -'async_search.get.Response': 'async_search/get/AsyncSearchGetResponse.ts#L22-L24', +'async_search.get.Response': 'async_search/get/AsyncSearchGetResponse.ts#L25-L33', 'async_search.status.Request': 'async_search/status/AsyncSearchStatusRequest.ts#L24-L58', 'async_search.status.Response': 'async_search/status/AsyncSearchStatusResponse.ts#L39-L41', 'async_search.status.StatusResponseBase': 'async_search/status/AsyncSearchStatusResponse.ts#L24-L38', -'async_search.submit.Request': 'async_search/submit/AsyncSearchSubmitRequest.ts#L54-L309', -'async_search.submit.Response': 'async_search/submit/AsyncSearchSubmitResponse.ts#L22-L24', +'async_search.submit.Request': 'async_search/submit/AsyncSearchSubmitRequest.ts#L54-L312', +'async_search.submit.Response': 'async_search/submit/AsyncSearchSubmitResponse.ts#L25-L33', 'autoscaling._types.AutoscalingPolicy': 'autoscaling/_types/AutoscalingPolicy.ts#L23-L30', 'autoscaling.delete_autoscaling_policy.Request': 'autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyRequest.ts#L24-L54', 'autoscaling.delete_autoscaling_policy.Response': 'autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyResponse.ts#L22-L24', @@ -1104,7 +1104,7 @@ 'cat._types.CatTrainedModelsColumn': 'cat/_types/CatBase.ts#L1486-L1560', 'cat._types.CatTransformColumn': 'cat/_types/CatBase.ts#L1565-L1769', 'cat.aliases.AliasesRecord': 'cat/aliases/types.ts#L22-L53', -'cat.aliases.Request': 'cat/aliases/CatAliasesRequest.ts#L23-L77', +'cat.aliases.Request': 'cat/aliases/CatAliasesRequest.ts#L23-L78', 'cat.aliases.Response': 'cat/aliases/CatAliasesResponse.ts#L22-L24', 'cat.allocation.AllocationRecord': 'cat/allocation/types.ts#L25-L99', 'cat.allocation.Request': 'cat/allocation/CatAllocationRequest.ts#L24-L76', @@ -1124,7 +1124,7 @@ 'cat.help.Request': 'cat/help/CatHelpRequest.ts#L20-L36', 'cat.help.Response': 'cat/help/CatHelpResponse.ts#L20-L25', 'cat.indices.IndicesRecord': 'cat/indices/types.ts#L20-L808', -'cat.indices.Request': 'cat/indices/CatIndicesRequest.ts#L24-L99', +'cat.indices.Request': 'cat/indices/CatIndicesRequest.ts#L24-L100', 'cat.indices.Response': 'cat/indices/CatIndicesResponse.ts#L22-L24', 'cat.master.MasterRecord': 'cat/master/types.ts#L20-L39', 'cat.master.Request': 'cat/master/CatMasterRequest.ts#L24-L68', @@ -1244,7 +1244,7 @@ 'cluster.get_settings.Response': 'cluster/get_settings/ClusterGetSettingsResponse.ts#L23-L32', 'cluster.health.HealthResponseBody': 'cluster/health/ClusterHealthResponse.ts#L39-L76', 'cluster.health.IndexHealthStats': 'cluster/health/types.ts#L24-L35', -'cluster.health.Request': 'cluster/health/ClusterHealthRequest.ts#L32-L118', +'cluster.health.Request': 'cluster/health/ClusterHealthRequest.ts#L32-L121', 'cluster.health.Response': 'cluster/health/ClusterHealthResponse.ts#L26-L37', 'cluster.health.ShardHealthStats': 'cluster/health/types.ts#L37-L45', 'cluster.info.Request': 'cluster/info/ClusterInfoRequest.ts#L23-L42', @@ -1272,7 +1272,7 @@ '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.Request': 'cluster/state/ClusterStateRequest.ts#L29-L95', +'cluster.state.Request': 'cluster/state/ClusterStateRequest.ts#L29-L96', 'cluster.state.Response': 'cluster/state/ClusterStateResponse.ts#L22-L29', 'cluster.stats.CCSStats': 'cluster/stats/types.ts#L769-L784', 'cluster.stats.CCSUsageClusterStats': 'cluster/stats/types.ts#L855-L862', @@ -1413,9 +1413,9 @@ 'connector.update_service_type.Response': 'connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts#L22-L26', 'connector.update_status.Request': 'connector/update_status/ConnectorUpdateStatusRequest.ts#L23-L49', 'connector.update_status.Response': 'connector/update_status/ConnectorUpdateStatusResponse.ts#L22-L26', -'dangling_indices.delete_dangling_index.Request': 'dangling_indices/delete_dangling_index/DeleteDanglingIndexRequest.ts#L24-L58', +'dangling_indices.delete_dangling_index.Request': 'dangling_indices/delete_dangling_index/DeleteDanglingIndexRequest.ts#L24-L59', 'dangling_indices.delete_dangling_index.Response': 'dangling_indices/delete_dangling_index/DeleteDanglingIndexResponse.ts#L22-L24', -'dangling_indices.import_dangling_index.Request': 'dangling_indices/import_dangling_index/ImportDanglingIndexRequest.ts#L24-L60', +'dangling_indices.import_dangling_index.Request': 'dangling_indices/import_dangling_index/ImportDanglingIndexRequest.ts#L24-L61', 'dangling_indices.import_dangling_index.Response': 'dangling_indices/import_dangling_index/ImportDanglingIndexResponse.ts#L22-L24', 'dangling_indices.list_dangling_indices.DanglingIndex': 'dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L29-L34', 'dangling_indices.list_dangling_indices.Request': 'dangling_indices/list_dangling_indices/ListDanglingIndicesRequest.ts#L22-L42', @@ -1448,7 +1448,7 @@ 'eql.get.Response': 'eql/get/EqlGetResponse.ts#L22-L24', 'eql.get_status.Request': 'eql/get_status/EqlGetStatusRequest.ts#L23-L42', 'eql.get_status.Response': 'eql/get_status/EqlGetStatusResponse.ts#L24-L51', -'eql.search.Request': 'eql/search/EqlSearchRequest.ts#L28-L166', +'eql.search.Request': 'eql/search/EqlSearchRequest.ts#L28-L167', 'eql.search.Response': 'eql/search/EqlSearchResponse.ts#L22-L24', 'eql.search.ResultPosition': 'eql/search/types.ts#L20-L32', 'esql._types.TableValuesContainer': 'esql/_types/TableValuesContainer.ts#L22-L28', @@ -1633,7 +1633,7 @@ 'indices.delete_alias.IndicesAliasesResponseBody': 'indices/delete_alias/IndicesDeleteAliasResponse.ts#L26-L28', 'indices.delete_alias.Request': 'indices/delete_alias/IndicesDeleteAliasRequest.ts#L24-L70', 'indices.delete_alias.Response': 'indices/delete_alias/IndicesDeleteAliasResponse.ts#L22-L24', -'indices.delete_data_lifecycle.Request': 'indices/delete_data_lifecycle/IndicesDeleteDataLifecycleRequest.ts#L24-L51', +'indices.delete_data_lifecycle.Request': 'indices/delete_data_lifecycle/IndicesDeleteDataLifecycleRequest.ts#L24-L54', 'indices.delete_data_lifecycle.Response': 'indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponse.ts#L22-L24', 'indices.delete_data_stream.Request': 'indices/delete_data_stream/IndicesDeleteDataStreamRequest.ts#L24-L59', 'indices.delete_data_stream.Response': 'indices/delete_data_stream/IndicesDeleteDataStreamResponse.ts#L22-L24', @@ -1655,14 +1655,14 @@ 'indices.field_usage_stats.FieldSummary': 'indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L57-L66', 'indices.field_usage_stats.FieldsUsageBody': 'indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L32-L39', 'indices.field_usage_stats.InvertedIndex': 'indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L68-L76', -'indices.field_usage_stats.Request': 'indices/field_usage_stats/IndicesFieldUsageStatsRequest.ts#L23-L73', +'indices.field_usage_stats.Request': 'indices/field_usage_stats/IndicesFieldUsageStatsRequest.ts#L23-L74', 'indices.field_usage_stats.Response': 'indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L28-L30', 'indices.field_usage_stats.ShardsStats': 'indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L52-L55', 'indices.field_usage_stats.UsageStatsIndex': 'indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L41-L43', 'indices.field_usage_stats.UsageStatsShards': 'indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L45-L50', 'indices.flush.Request': 'indices/flush/IndicesFlushRequest.ts#L23-L91', 'indices.flush.Response': 'indices/flush/IndicesFlushResponse.ts#L22-L24', -'indices.forcemerge.Request': 'indices/forcemerge/IndicesForceMergeRequest.ts#L24-L111', +'indices.forcemerge.Request': 'indices/forcemerge/IndicesForceMergeRequest.ts#L24-L114', 'indices.forcemerge.Response': 'indices/forcemerge/IndicesForceMergeResponse.ts#L22-L24', 'indices.forcemerge._types.ForceMergeResponseBody': 'indices/forcemerge/_types/response.ts#L22-L28', 'indices.get.Feature': 'indices/get/IndicesGetRequest.ts#L98-L102', @@ -1748,7 +1748,7 @@ 'indices.refresh.Response': 'indices/refresh/IndicesRefreshResponse.ts#L22-L24', '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-L63', +'indices.reload_search_analyzers.Request': 'indices/reload_search_analyzers/ReloadSearchAnalyzersRequest.ts#L23-L64', 'indices.reload_search_analyzers.Response': 'indices/reload_search_analyzers/ReloadSearchAnalyzersResponse.ts#L22-L24', 'indices.resolve_cluster.Request': 'indices/resolve_cluster/ResolveClusterRequest.ts#L24-L143', 'indices.resolve_cluster.ResolveClusterInfo': 'indices/resolve_cluster/ResolveClusterResponse.ts#L29-L55', @@ -1790,7 +1790,7 @@ 'indices.stats.IndexStats': 'indices/stats/types.ts#L52-L93', 'indices.stats.IndicesStats': 'indices/stats/types.ts#L95-L110', 'indices.stats.MappingStats': 'indices/stats/types.ts#L186-L190', -'indices.stats.Request': 'indices/stats/IndicesStatsRequest.ts#L29-L114', +'indices.stats.Request': 'indices/stats/IndicesStatsRequest.ts#L29-L115', 'indices.stats.Response': 'indices/stats/IndicesStatsResponse.ts#L24-L30', 'indices.stats.ShardCommit': 'indices/stats/types.ts#L112-L117', 'indices.stats.ShardFileSizeInfo': 'indices/stats/types.ts#L124-L131', @@ -2511,7 +2511,7 @@ 'ml.validate.Response': 'ml/validate/MlValidateJobResponse.ts#L22-L24', 'ml.validate_detector.Request': 'ml/validate_detector/MlValidateDetectorRequest.ts#L23-L40', 'ml.validate_detector.Response': 'ml/validate_detector/MlValidateDetectorResponse.ts#L22-L24', -'monitoring.bulk.Request': 'monitoring/bulk/BulkMonitoringRequest.ts#L24-L73', +'monitoring.bulk.Request': 'monitoring/bulk/BulkMonitoringRequest.ts#L24-L59', 'monitoring.bulk.Response': 'monitoring/bulk/BulkMonitoringResponse.ts#L23-L32', 'nodes._types.AdaptiveSelection': 'nodes/_types/Stats.ts#L441-L470', 'nodes._types.Breaker': 'nodes/_types/Stats.ts#L472-L497', @@ -2731,7 +2731,7 @@ 'searchable_snapshots.cache_stats.Request': 'searchable_snapshots/cache_stats/Request.ts#L24-L53', '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-L56', +'searchable_snapshots.clear_cache.Request': 'searchable_snapshots/clear_cache/SearchableSnapshotsClearCacheRequest.ts#L23-L57', '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#L26-L92', @@ -3362,10 +3362,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/6dc6c54097683e671b85dad72d2bc5604a815ff4/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/1d725f63ca17f9cc608eb3a97029d74b0e122d49/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 1bb4c789a0..45c4c36e5f 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 @@ -374,7 +374,7 @@ public final String tiebreakerField() { } /** - * Field containing event timestamp. Default "@timestamp" + * Field containing event timestamp. *

    * API name: {@code timestamp_field} */ @@ -913,7 +913,7 @@ public final Builder tiebreakerField(@Nullable String value) { } /** - * Field containing event timestamp. Default "@timestamp" + * Field containing event timestamp. *

    * API name: {@code timestamp_field} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/monitoring/BulkRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/monitoring/BulkRequest.java index a13a2aac52..90913e81a0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/monitoring/BulkRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/monitoring/BulkRequest.java @@ -37,6 +37,7 @@ 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.Iterator; import java.util.List; @@ -77,9 +78,6 @@ public class BulkRequest extends RequestBase implements NdJsonpSerializable, Jso private final String systemId; - @Nullable - private final String type; - private final List operations; // --------------------------------------------------------------------------------------------- @@ -89,7 +87,6 @@ private BulkRequest(Builder builder) { this.interval = ApiTypeHelper.requireNonNull(builder.interval, this, "interval"); this.systemApiVersion = ApiTypeHelper.requireNonNull(builder.systemApiVersion, this, "systemApiVersion"); this.systemId = ApiTypeHelper.requireNonNull(builder.systemId, this, "systemId"); - this.type = builder.type; this.operations = ApiTypeHelper.unmodifiableRequired(builder.operations, this, "operations"); } @@ -129,19 +126,6 @@ public final String systemId() { return this.systemId; } - /** - * Default document type for items which don't provide one - *

    - * API name: {@code type} - * - * @deprecated 7.0.0 - */ - @Deprecated - @Nullable - public final String type() { - return this.type; - } - /** * Required - Request body. */ @@ -175,9 +159,6 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private String systemId; - @Nullable - private String type; - private List operations; /** @@ -219,19 +200,6 @@ public final Builder systemId(String value) { return this; } - /** - * Default document type for items which don't provide one - *

    - * API name: {@code type} - * - * @deprecated 7.0.0 - */ - @Deprecated - public final Builder type(@Nullable String value) { - this.type = value; - return this; - } - /** * Required - Request body. *

    @@ -308,47 +276,13 @@ public BulkRequest build() { // Request path request -> { - final int _type = 1 << 0; - - int propsSet = 0; - - if (request.type() != null) - propsSet |= _type; - - if (propsSet == 0) { - StringBuilder buf = new StringBuilder(); - buf.append("/_monitoring"); - buf.append("/bulk"); - return buf.toString(); - } - if (propsSet == (_type)) { - StringBuilder buf = new StringBuilder(); - buf.append("/_monitoring"); - buf.append("/"); - SimpleEndpoint.pathEncode(request.type, buf); - buf.append("/bulk"); - return buf.toString(); - } - throw SimpleEndpoint.noPathTemplateFound("path"); + return "/_monitoring/bulk"; }, // Path parameters request -> { - Map params = new HashMap<>(); - final int _type = 1 << 0; - - int propsSet = 0; - - if (request.type() != null) - propsSet |= _type; - - if (propsSet == 0) { - } - if (propsSet == (_type)) { - params.put("type", request.type); - } - return params; + return Collections.emptyMap(); }, // Request parameters