From ebbf1d85c058949a5ef1477c9571aaf280bdcdd1 Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Thu, 5 Dec 2024 17:18:09 +0100 Subject: [PATCH] [codegen] update to latest spec --- .../ElasticsearchAsyncClient.java | 6 +- .../elasticsearch/ElasticsearchClient.java | 6 +- .../AsyncSearchStatusRequest.java | 47 +- .../async_search/SubmitRequest.java | 109 ---- .../DeleteAutoscalingPolicyRequest.java | 89 +++- .../ElasticsearchAutoscalingAsyncClient.java | 77 ++- .../ElasticsearchAutoscalingClient.java | 78 ++- .../GetAutoscalingCapacityRequest.java | 86 ++- .../GetAutoscalingPolicyRequest.java | 47 +- .../PutAutoscalingPolicyRequest.java | 89 +++- .../elasticsearch/cat/AllocationRequest.java | 8 +- .../cat/ElasticsearchCatAsyncClient.java | 498 +++++++++--------- .../cat/ElasticsearchCatClient.java | 498 +++++++++--------- .../elasticsearch/cat/FielddataRequest.java | 10 +- .../elasticsearch/cat/HealthRequest.java | 24 +- .../elasticsearch/cat/MasterRequest.java | 9 +- .../elasticsearch/cat/NodeattrsRequest.java | 8 +- .../elasticsearch/cat/NodesRequest.java | 8 +- .../cat/PendingTasksRequest.java | 9 +- .../elasticsearch/cat/PluginsRequest.java | 8 +- .../elasticsearch/cat/RecoveryRequest.java | 18 +- .../cat/RepositoriesRequest.java | 9 +- .../elasticsearch/cat/SegmentsRequest.java | 10 +- .../elasticsearch/cat/ShardsRequest.java | 8 +- .../elasticsearch/cat/SnapshotsRequest.java | 11 +- .../elasticsearch/cat/TasksRequest.java | 8 +- .../elasticsearch/cat/TemplatesRequest.java | 11 +- .../elasticsearch/cat/ThreadPoolRequest.java | 10 +- .../elasticsearch/cat/TransformsRequest.java | 3 +- .../elasticsearch/core/CountRequest.java | 2 +- .../core/OpenPointInTimeRequest.java | 36 ++ .../health_report/FileSettingsIndicator.java | 154 ++++++ .../FileSettingsIndicatorDetails.java | 182 +++++++ .../core/health_report/Indicators.java | 37 ++ .../elasticsearch/doc-files/api-spec.html | 216 ++++---- .../ElasticsearchEnrichAsyncClient.java | 4 +- .../enrich/ElasticsearchEnrichClient.java | 4 +- .../enrich/ExecutePolicyRequest.java | 2 +- .../eql/ElasticsearchEqlAsyncClient.java | 48 +- .../eql/ElasticsearchEqlClient.java | 48 +- .../elasticsearch/eql/EqlDeleteRequest.java | 4 +- .../elasticsearch/eql/EqlGetRequest.java | 4 +- .../elasticsearch/eql/EqlSearchRequest.java | 4 +- .../eql/GetEqlStatusRequest.java | 4 +- .../esql/ElasticsearchEsqlAsyncClient.java | 6 +- .../esql/ElasticsearchEsqlClient.java | 6 +- .../elasticsearch/esql/QueryRequest.java | 3 +- .../fleet/ElasticsearchFleetAsyncClient.java | 24 +- .../fleet/ElasticsearchFleetClient.java | 24 +- .../fleet/FleetSearchRequest.java | 6 +- .../graph/ElasticsearchGraphAsyncClient.java | 20 +- .../graph/ElasticsearchGraphClient.java | 20 +- .../elasticsearch/graph/ExploreRequest.java | 10 +- .../ElasticsearchIndicesAsyncClient.java | 14 +- .../indices/ElasticsearchIndicesClient.java | 14 +- .../indices/ExistsAliasRequest.java | 43 ++ .../indices/ExistsIndexTemplateRequest.java | 2 +- .../indices/GetAliasRequest.java | 43 ++ .../MappingLimitSettingsTotalFields.java | 12 +- .../indices/ResolveIndexRequest.java | 5 +- .../ingest/DeleteGeoipDatabaseRequest.java | 3 +- .../ingest/DeletePipelineRequest.java | 2 +- .../ElasticsearchIngestAsyncClient.java | 67 ++- .../ingest/ElasticsearchIngestClient.java | 67 ++- .../ingest/GeoIpStatsRequest.java | 3 +- .../ingest/GetGeoipDatabaseRequest.java | 3 +- .../ingest/GetPipelineRequest.java | 4 +- .../ingest/ProcessorGrokRequest.java | 9 +- .../ingest/PutGeoipDatabaseRequest.java | 3 +- .../ingest/PutPipelineRequest.java | 4 +- .../elasticsearch/ingest/SimulateRequest.java | 5 +- .../migration/deprecations/Deprecation.java | 92 +++- .../query_rules/DeleteRuleRequest.java | 2 +- .../query_rules/DeleteRulesetRequest.java | 2 +- .../ElasticsearchQueryRulesAsyncClient.java | 38 +- .../ElasticsearchQueryRulesClient.java | 38 +- .../query_rules/GetRuleRequest.java | 2 +- .../query_rules/GetRulesetRequest.java | 2 +- .../query_rules/ListRulesetsRequest.java | 2 +- .../query_rules/PutRuleRequest.java | 3 +- .../query_rules/PutRulesetRequest.java | 2 +- .../query_rules/TestRequest.java | 3 +- .../list_rulesets/QueryRulesetListItem.java | 63 ++- .../elasticsearch/security/ApiKey.java | 392 +++++++++----- .../elasticsearch/security/ApiKeyType.java | 66 +++ .../security/AuthenticateResponse.java | 15 +- .../authenticate/AuthenticateApiKey.java | 186 +++++++ .../elasticsearch/sql/ClearCursorRequest.java | 2 +- .../elasticsearch/sql/DeleteAsyncRequest.java | 4 +- .../sql/ElasticsearchSqlAsyncClient.java | 40 +- .../sql/ElasticsearchSqlClient.java | 40 +- .../elasticsearch/sql/GetAsyncRequest.java | 4 +- .../sql/GetAsyncStatusRequest.java | 4 +- .../elasticsearch/sql/QueryRequest.java | 2 +- .../elasticsearch/sql/TranslateRequest.java | 3 +- .../synonyms/DeleteSynonymRequest.java | 2 +- .../synonyms/DeleteSynonymRuleRequest.java | 2 +- .../ElasticsearchSynonymsAsyncClient.java | 36 +- .../synonyms/ElasticsearchSynonymsClient.java | 36 +- .../synonyms/GetSynonymRequest.java | 2 +- .../synonyms/GetSynonymRuleRequest.java | 2 +- .../synonyms/GetSynonymsSetsRequest.java | 2 +- .../synonyms/PutSynonymRequest.java | 4 +- .../synonyms/PutSynonymRuleRequest.java | 3 +- .../elasticsearch/watcher/Schedule.java | 30 ++ .../watcher/ScheduleBuilders.java | 6 +- 106 files changed, 2841 insertions(+), 1264 deletions(-) create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/core/health_report/FileSettingsIndicator.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/core/health_report/FileSettingsIndicatorDetails.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/security/ApiKeyType.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/security/authenticate/AuthenticateApiKey.java diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java index 57c716250..5ab973dfa 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 @@ -502,7 +502,7 @@ public final CompletableFuture closePointInTime( // ----- Endpoint: count /** - * Returns number of documents matching a query. + * Count search results. Get the number of documents matching a query. * * @see Documentation @@ -517,7 +517,7 @@ public CompletableFuture count(CountRequest request) { } /** - * Returns number of documents matching a query. + * Count search results. Get the number of documents matching a query. * * @param fn * a function that initializes a builder to create the @@ -533,7 +533,7 @@ public final CompletableFuture count( } /** - * Returns number of documents matching a query. + * Count search results. Get the number of documents matching a query. * * @see Documentation 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 8502c784c..d1bbae89a 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 @@ -507,7 +507,7 @@ public final ClosePointInTimeResponse closePointInTime( // ----- Endpoint: count /** - * Returns number of documents matching a query. + * Count search results. Get the number of documents matching a query. * * @see Documentation @@ -522,7 +522,7 @@ public CountResponse count(CountRequest request) throws IOException, Elasticsear } /** - * Returns number of documents matching a query. + * Count search results. Get the number of documents matching a query. * * @param fn * a function that initializes a builder to create the @@ -538,7 +538,7 @@ public final CountResponse count(FunctionDocumentation diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusRequest.java index eca1c109a..f0151830e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/async_search/AsyncSearchStatusRequest.java @@ -21,6 +21,7 @@ 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; @@ -31,7 +32,6 @@ 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; @@ -70,11 +70,15 @@ public class AsyncSearchStatusRequest extends RequestBase { private final String id; + @Nullable + private final Time keepAlive; + // --------------------------------------------------------------------------------------------- private AsyncSearchStatusRequest(Builder builder) { this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.keepAlive = builder.keepAlive; } @@ -91,6 +95,17 @@ public final String id() { return this.id; } + /** + * Specifies how long the async search needs to be available. Ongoing async + * searches and any saved search results are deleted after this period. + *

+ * API name: {@code keep_alive} + */ + @Nullable + public final Time keepAlive() { + return this.keepAlive; + } + // --------------------------------------------------------------------------------------------- /** @@ -102,6 +117,9 @@ public static class Builder extends RequestBase.AbstractBuilder ObjectBuilder { private String id; + @Nullable + private Time keepAlive; + /** * Required - A unique identifier for the async search. *

@@ -112,6 +130,27 @@ public final Builder id(String value) { return this; } + /** + * Specifies how long the async search needs to be available. Ongoing async + * searches and any saved search results are deleted after this period. + *

+ * API name: {@code keep_alive} + */ + public final Builder keepAlive(@Nullable Time value) { + this.keepAlive = value; + return this; + } + + /** + * Specifies how long the async search needs to be available. Ongoing async + * searches and any saved search results are deleted after this period. + *

+ * API name: {@code keep_alive} + */ + public final Builder keepAlive(Function> fn) { + return this.keepAlive(fn.apply(new Time.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -181,7 +220,11 @@ public AsyncSearchStatusRequest build() { // Request parameters request -> { - return Collections.emptyMap(); + Map params = new HashMap<>(); + if (request.keepAlive != null) { + params.put("keep_alive", request.keepAlive._toJsonString()); + } + return params; }, SimpleEndpoint.emptyMap(), false, AsyncSearchStatusResponse._DESERIALIZER); } 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 2c9ac8899..d38c35ab7 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 @@ -164,9 +164,6 @@ public class SubmitRequest extends RequestBase implements JsonpSerializable { private final List> indicesBoost; - @Nullable - private final Time keepAlive; - @Nullable private final Boolean keepOnCompletion; @@ -187,9 +184,6 @@ public class SubmitRequest extends RequestBase implements JsonpSerializable { @Nullable private final Query postFilter; - @Nullable - private final Long preFilterShardSize; - @Nullable private final String preference; @@ -214,9 +208,6 @@ public class SubmitRequest extends RequestBase implements JsonpSerializable { private final Map scriptFields; - @Nullable - private final Time scroll; - private final List searchAfter; @Nullable @@ -284,7 +275,6 @@ private SubmitRequest(Builder builder) { this.ignoreUnavailable = builder.ignoreUnavailable; this.index = ApiTypeHelper.unmodifiable(builder.index); this.indicesBoost = ApiTypeHelper.unmodifiable(builder.indicesBoost); - this.keepAlive = builder.keepAlive; this.keepOnCompletion = builder.keepOnCompletion; this.knn = ApiTypeHelper.unmodifiable(builder.knn); this.lenient = builder.lenient; @@ -292,7 +282,6 @@ private SubmitRequest(Builder builder) { this.minScore = builder.minScore; this.pit = builder.pit; this.postFilter = builder.postFilter; - this.preFilterShardSize = builder.preFilterShardSize; this.preference = builder.preference; this.profile = builder.profile; this.q = builder.q; @@ -302,7 +291,6 @@ private SubmitRequest(Builder builder) { this.routing = builder.routing; this.runtimeMappings = ApiTypeHelper.unmodifiable(builder.runtimeMappings); this.scriptFields = ApiTypeHelper.unmodifiable(builder.scriptFields); - this.scroll = builder.scroll; this.searchAfter = ApiTypeHelper.unmodifiable(builder.searchAfter); this.searchType = builder.searchType; this.seqNoPrimaryTerm = builder.seqNoPrimaryTerm; @@ -550,17 +538,6 @@ public final List> indicesBoost() { return this.indicesBoost; } - /** - * Specifies how long the async search needs to be available. Ongoing async - * searches and any saved search results are deleted after this period. - *

- * API name: {@code keep_alive} - */ - @Nullable - public final Time keepAlive() { - return this.keepAlive; - } - /** * If true, results are stored for later retrieval when the search * completes within the wait_for_completion_timeout. @@ -634,18 +611,6 @@ public final Query postFilter() { return this.postFilter; } - /** - * The default value cannot be changed, which enforces the execution of a - * pre-filter roundtrip to retrieve statistics from each shard so that the ones - * that surely don’t hold any document matching the query get skipped. - *

- * API name: {@code pre_filter_shard_size} - */ - @Nullable - public final Long preFilterShardSize() { - return this.preFilterShardSize; - } - /** * Specify the node or shard the operation should be performed on (default: * random) @@ -732,14 +697,6 @@ public final Map scriptFields() { return this.scriptFields; } - /** - * API name: {@code scroll} - */ - @Nullable - public final Time scroll() { - return this.scroll; - } - /** * API name: {@code search_after} */ @@ -1227,9 +1184,6 @@ public static class Builder extends RequestBase.AbstractBuilder impleme @Nullable private List> indicesBoost; - @Nullable - private Time keepAlive; - @Nullable private Boolean keepOnCompletion; @@ -1251,9 +1205,6 @@ public static class Builder extends RequestBase.AbstractBuilder impleme @Nullable private Query postFilter; - @Nullable - private Long preFilterShardSize; - @Nullable private String preference; @@ -1281,9 +1232,6 @@ public static class Builder extends RequestBase.AbstractBuilder impleme @Nullable private Map scriptFields; - @Nullable - private Time scroll; - @Nullable private List searchAfter; @@ -1718,27 +1666,6 @@ public final Builder indicesBoost(Map value, Map return this; } - /** - * Specifies how long the async search needs to be available. Ongoing async - * searches and any saved search results are deleted after this period. - *

- * API name: {@code keep_alive} - */ - public final Builder keepAlive(@Nullable Time value) { - this.keepAlive = value; - return this; - } - - /** - * Specifies how long the async search needs to be available. Ongoing async - * searches and any saved search results are deleted after this period. - *

- * API name: {@code keep_alive} - */ - public final Builder keepAlive(Function> fn) { - return this.keepAlive(fn.apply(new Time.Builder()).build()); - } - /** * If true, results are stored for later retrieval when the search * completes within the wait_for_completion_timeout. @@ -1855,18 +1782,6 @@ public final Builder postFilter(Function> fn return this.postFilter(fn.apply(new Query.Builder()).build()); } - /** - * The default value cannot be changed, which enforces the execution of a - * pre-filter roundtrip to retrieve statistics from each shard so that the ones - * that surely don’t hold any document matching the query get skipped. - *

- * API name: {@code pre_filter_shard_size} - */ - public final Builder preFilterShardSize(@Nullable Long value) { - this.preFilterShardSize = value; - return this; - } - /** * Specify the node or shard the operation should be performed on (default: * random) @@ -2039,21 +1954,6 @@ public final Builder scriptFields(String key, Function> fn) { - return this.scroll(fn.apply(new Time.Builder()).build()); - } - /** * API name: {@code search_after} *

@@ -2521,9 +2421,6 @@ protected static void setupSubmitRequestDeserializer(ObjectDeserializer + * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Required - the name of the autoscaling policy *

@@ -92,6 +111,17 @@ public final String name() { return this.name; } + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + @Nullable + public final Time timeout() { + return this.timeout; + } + // --------------------------------------------------------------------------------------------- /** @@ -101,8 +131,35 @@ public final String name() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Time masterTimeout; + private String name; + @Nullable + private Time timeout; + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Required - the name of the autoscaling policy *

@@ -113,6 +170,27 @@ public final Builder name(String value) { return this; } + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + public final Builder timeout(@Nullable Time value) { + this.timeout = value; + return this; + } + + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + public final Builder timeout(Function> fn) { + return this.timeout(fn.apply(new Time.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -182,7 +260,14 @@ public DeleteAutoscalingPolicyRequest build() { // Request parameters request -> { - return Collections.emptyMap(); + Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } + if (request.timeout != null) { + params.put("timeout", request.timeout._toJsonString()); + } + return params; }, SimpleEndpoint.emptyMap(), false, DeleteAutoscalingPolicyResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingAsyncClient.java index c2bb7b04b..e1fd47ce6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingAsyncClient.java @@ -139,8 +139,83 @@ public final CompletableFuture deleteAutoscalin * "https://www.elastic.co/guide/en/elasticsearch/reference/9.0/autoscaling-get-autoscaling-capacity.html">Documentation * on elastic.co */ + + public CompletableFuture getAutoscalingCapacity( + GetAutoscalingCapacityRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) GetAutoscalingCapacityRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Get the autoscaling capacity. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. + *

+ * This API gets the current autoscaling capacity based on the configured + * autoscaling policy. It will return information to size the cluster + * appropriately to the current workload. + *

+ * The required_capacity is calculated as the maximum of the + * required_capacity result of all individual deciders that are + * enabled for the policy. + *

+ * The operator should verify that the current_nodes match the + * operator’s knowledge of the cluster to avoid making autoscaling decisions + * based on stale or incomplete information. + *

+ * The response contains decider-specific information you can use to diagnose + * how and why autoscaling determined a certain capacity was required. This + * information is provided for diagnosis only. Do not use this information to + * make autoscaling decisions. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetAutoscalingCapacityRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture getAutoscalingCapacity( + Function> fn) { + return getAutoscalingCapacity(fn.apply(new GetAutoscalingCapacityRequest.Builder()).build()); + } + + /** + * Get the autoscaling capacity. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. + *

+ * This API gets the current autoscaling capacity based on the configured + * autoscaling policy. It will return information to size the cluster + * appropriately to the current workload. + *

+ * The required_capacity is calculated as the maximum of the + * required_capacity result of all individual deciders that are + * enabled for the policy. + *

+ * The operator should verify that the current_nodes match the + * operator’s knowledge of the cluster to avoid making autoscaling decisions + * based on stale or incomplete information. + *

+ * The response contains decider-specific information you can use to diagnose + * how and why autoscaling determined a certain capacity was required. This + * information is provided for diagnosis only. Do not use this information to + * make autoscaling decisions. + * + * @see Documentation + * on elastic.co + */ + public CompletableFuture getAutoscalingCapacity() { - return this.transport.performRequestAsync(GetAutoscalingCapacityRequest._INSTANCE, + return this.transport.performRequestAsync(new GetAutoscalingCapacityRequest.Builder().build(), GetAutoscalingCapacityRequest._ENDPOINT, this.transportOptions); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingClient.java index c98f8d2b9..ff756bbee 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/ElasticsearchAutoscalingClient.java @@ -139,8 +139,84 @@ public final DeleteAutoscalingPolicyResponse deleteAutoscalingPolicy( * "https://www.elastic.co/guide/en/elasticsearch/reference/9.0/autoscaling-get-autoscaling-capacity.html">Documentation * on elastic.co */ + + public GetAutoscalingCapacityResponse getAutoscalingCapacity(GetAutoscalingCapacityRequest request) + throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) GetAutoscalingCapacityRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Get the autoscaling capacity. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. + *

+ * This API gets the current autoscaling capacity based on the configured + * autoscaling policy. It will return information to size the cluster + * appropriately to the current workload. + *

+ * The required_capacity is calculated as the maximum of the + * required_capacity result of all individual deciders that are + * enabled for the policy. + *

+ * The operator should verify that the current_nodes match the + * operator’s knowledge of the cluster to avoid making autoscaling decisions + * based on stale or incomplete information. + *

+ * The response contains decider-specific information you can use to diagnose + * how and why autoscaling determined a certain capacity was required. This + * information is provided for diagnosis only. Do not use this information to + * make autoscaling decisions. + * + * @param fn + * a function that initializes a builder to create the + * {@link GetAutoscalingCapacityRequest} + * @see Documentation + * on elastic.co + */ + + public final GetAutoscalingCapacityResponse getAutoscalingCapacity( + Function> fn) + throws IOException, ElasticsearchException { + return getAutoscalingCapacity(fn.apply(new GetAutoscalingCapacityRequest.Builder()).build()); + } + + /** + * Get the autoscaling capacity. + *

+ * NOTE: This feature is designed for indirect use by Elasticsearch Service, + * Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not + * supported. + *

+ * This API gets the current autoscaling capacity based on the configured + * autoscaling policy. It will return information to size the cluster + * appropriately to the current workload. + *

+ * The required_capacity is calculated as the maximum of the + * required_capacity result of all individual deciders that are + * enabled for the policy. + *

+ * The operator should verify that the current_nodes match the + * operator’s knowledge of the cluster to avoid making autoscaling decisions + * based on stale or incomplete information. + *

+ * The response contains decider-specific information you can use to diagnose + * how and why autoscaling determined a certain capacity was required. This + * information is provided for diagnosis only. Do not use this information to + * make autoscaling decisions. + * + * @see Documentation + * on elastic.co + */ + public GetAutoscalingCapacityResponse getAutoscalingCapacity() throws IOException, ElasticsearchException { - return this.transport.performRequest(GetAutoscalingCapacityRequest._INSTANCE, + return this.transport.performRequest(new GetAutoscalingCapacityRequest.Builder().build(), GetAutoscalingCapacityRequest._ENDPOINT, this.transportOptions); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityRequest.java index 40d0c71a6..96f46db2f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingCapacityRequest.java @@ -21,6 +21,7 @@ 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; @@ -30,7 +31,11 @@ import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; 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. @@ -79,13 +84,82 @@ */ public class GetAutoscalingCapacityRequest extends RequestBase { - public GetAutoscalingCapacityRequest() { + @Nullable + private final Time masterTimeout; + + // --------------------------------------------------------------------------------------------- + + private GetAutoscalingCapacityRequest(Builder builder) { + + this.masterTimeout = builder.masterTimeout; + + } + + public static GetAutoscalingCapacityRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; } + // --------------------------------------------------------------------------------------------- + /** - * Singleton instance for {@link GetAutoscalingCapacityRequest}. + * Builder for {@link GetAutoscalingCapacityRequest}. */ - public static final GetAutoscalingCapacityRequest _INSTANCE = new GetAutoscalingCapacityRequest(); + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private Time masterTimeout; + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link GetAutoscalingCapacityRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public GetAutoscalingCapacityRequest build() { + _checkSingleUse(); + + return new GetAutoscalingCapacityRequest(this); + } + } // --------------------------------------------------------------------------------------------- @@ -114,7 +188,11 @@ public GetAutoscalingCapacityRequest() { // Request parameters request -> { - return Collections.emptyMap(); + Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } + return params; }, SimpleEndpoint.emptyMap(), false, GetAutoscalingCapacityResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java index ad1047dfc..4faccea7f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/GetAutoscalingPolicyRequest.java @@ -21,6 +21,7 @@ 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; @@ -31,7 +32,6 @@ 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; @@ -68,12 +68,16 @@ */ public class GetAutoscalingPolicyRequest extends RequestBase { + @Nullable + private final Time masterTimeout; + private final String name; // --------------------------------------------------------------------------------------------- private GetAutoscalingPolicyRequest(Builder builder) { + this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); } @@ -82,6 +86,17 @@ public static GetAutoscalingPolicyRequest of(Function + * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Required - the name of the autoscaling policy *

@@ -100,8 +115,32 @@ public final String name() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Time masterTimeout; + private String name; + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Required - the name of the autoscaling policy *

@@ -181,7 +220,11 @@ public GetAutoscalingPolicyRequest build() { // Request parameters request -> { - return Collections.emptyMap(); + Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } + return params; }, SimpleEndpoint.emptyMap(), false, GetAutoscalingPolicyResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java index e639e46c6..66e553363 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/autoscaling/PutAutoscalingPolicyRequest.java @@ -21,6 +21,7 @@ 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.JsonpMapper; @@ -34,7 +35,6 @@ import jakarta.json.stream.JsonGenerator; import jakarta.json.stream.JsonParser; import java.lang.String; -import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; @@ -71,15 +71,23 @@ */ @JsonpDeserializable public class PutAutoscalingPolicyRequest extends RequestBase implements JsonpSerializable { + @Nullable + private final Time masterTimeout; + private final String name; + @Nullable + private final Time timeout; + private final AutoscalingPolicy policy; // --------------------------------------------------------------------------------------------- private PutAutoscalingPolicyRequest(Builder builder) { + this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.timeout = builder.timeout; this.policy = ApiTypeHelper.requireNonNull(builder.policy, this, "policy"); } @@ -88,6 +96,17 @@ public static PutAutoscalingPolicyRequest of(Function + * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Required - the name of the autoscaling policy *

@@ -97,6 +116,17 @@ public final String name() { return this.name; } + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + @Nullable + public final Time timeout() { + return this.timeout; + } + /** * Required - Request body. */ @@ -121,10 +151,37 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Time masterTimeout; + private String name; + @Nullable + private Time timeout; + private AutoscalingPolicy policy; + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Required - the name of the autoscaling policy *

@@ -135,6 +192,27 @@ public final Builder name(String value) { return this; } + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + public final Builder timeout(@Nullable Time value) { + this.timeout = value; + return this; + } + + /** + * Period to wait for a response. If no response is received before the timeout + * expires, the request fails and returns an error. + *

+ * API name: {@code timeout} + */ + public final Builder timeout(Function> fn) { + return this.timeout(fn.apply(new Time.Builder()).build()); + } + /** * Required - Request body. */ @@ -236,7 +314,14 @@ protected static JsonpDeserializer createPutAutosca // Request parameters request -> { - return Collections.emptyMap(); + Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } + if (request.timeout != null) { + params.put("timeout", request.timeout._toJsonString()); + } + return params; }, SimpleEndpoint.emptyMap(), true, PutAutoscalingPolicyResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java index 5b7c6dbf7..208adcedb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java @@ -58,10 +58,10 @@ // typedef: cat.allocation.Request /** - * Provides a snapshot of the number of shards allocated to each data node and - * their disk space. IMPORTANT: cat APIs are only intended for human consumption - * using the command line or Kibana console. They are not intended for use by - * applications. + * Get shard allocation information. Get a snapshot of the number of shards + * allocated to each data node and their disk space. IMPORTANT: cat APIs are + * only intended for human consumption using the command line or Kibana console. + * They are not intended for use by applications. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java index d37c93a62..84420f15c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatAsyncClient.java @@ -128,10 +128,10 @@ public CompletableFuture aliases() { // ----- Endpoint: cat.allocation /** - * Provides a snapshot of the number of shards allocated to each data node and - * their disk space. IMPORTANT: cat APIs are only intended for human consumption - * using the command line or Kibana console. They are not intended for use by - * applications. + * Get shard allocation information. Get a snapshot of the number of shards + * allocated to each data node and their disk space. IMPORTANT: cat APIs are + * only intended for human consumption using the command line or Kibana console. + * They are not intended for use by applications. * * @see Documentation @@ -146,10 +146,10 @@ public CompletableFuture allocation(AllocationRequest reques } /** - * Provides a snapshot of the number of shards allocated to each data node and - * their disk space. IMPORTANT: cat APIs are only intended for human consumption - * using the command line or Kibana console. They are not intended for use by - * applications. + * Get shard allocation information. Get a snapshot of the number of shards + * allocated to each data node and their disk space. IMPORTANT: cat APIs are + * only intended for human consumption using the command line or Kibana console. + * They are not intended for use by applications. * * @param fn * a function that initializes a builder to create the @@ -165,10 +165,10 @@ public final CompletableFuture allocation( } /** - * Provides a snapshot of the number of shards allocated to each data node and - * their disk space. IMPORTANT: cat APIs are only intended for human consumption - * using the command line or Kibana console. They are not intended for use by - * applications. + * Get shard allocation information. Get a snapshot of the number of shards + * allocated to each data node and their disk space. IMPORTANT: cat APIs are + * only intended for human consumption using the command line or Kibana console. + * They are not intended for use by applications. * * @see Documentation @@ -314,11 +314,11 @@ public CompletableFuture count() { // ----- Endpoint: cat.fielddata /** - * Returns the amount of heap memory currently used by the field data cache on - * every data node in the cluster. IMPORTANT: cat APIs are only intended for - * human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the nodes - * stats API. + * Get field data cache information. Get the amount of heap memory currently + * used by the field data cache on every data node in the cluster. IMPORTANT: + * cat APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes stats API. * * @see Documentation @@ -333,11 +333,11 @@ public CompletableFuture fielddata(FielddataRequest request) } /** - * Returns the amount of heap memory currently used by the field data cache on - * every data node in the cluster. IMPORTANT: cat APIs are only intended for - * human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the nodes - * stats API. + * Get field data cache information. Get the amount of heap memory currently + * used by the field data cache on every data node in the cluster. IMPORTANT: + * cat APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes stats API. * * @param fn * a function that initializes a builder to create the @@ -353,11 +353,11 @@ public final CompletableFuture fielddata( } /** - * Returns the amount of heap memory currently used by the field data cache on - * every data node in the cluster. IMPORTANT: cat APIs are only intended for - * human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the nodes - * stats API. + * Get field data cache information. Get the amount of heap memory currently + * used by the field data cache on every data node in the cluster. IMPORTANT: + * cat APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes stats API. * * @see Documentation @@ -372,18 +372,18 @@ public CompletableFuture fielddata() { // ----- Endpoint: cat.health /** - * Returns the health status of a cluster, similar to the cluster health API. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the cluster health API. This API is often used - * to check malfunctioning clusters. To help you track cluster health alongside - * log files and alerting systems, the API returns timestamps in two formats: - * HH:MM:SS, which is human-readable but includes no date - * information; Unix epoch time, which is machine-sortable and - * includes date information. The latter format is useful for cluster recoveries - * that take multiple days. You can use the cat health API to verify cluster - * health across multiple nodes. You also can use the API to track the recovery - * of a large cluster over a longer period of time. + * Get the cluster health status. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the + * cluster health API. This API is often used to check malfunctioning clusters. + * To help you track cluster health alongside log files and alerting systems, + * the API returns timestamps in two formats: HH:MM:SS, which is + * human-readable but includes no date information; + * Unix epoch time, which is machine-sortable and includes date + * information. The latter format is useful for cluster recoveries that take + * multiple days. You can use the cat health API to verify cluster health across + * multiple nodes. You also can use the API to track the recovery of a large + * cluster over a longer period of time. * * @see Documentation @@ -398,18 +398,18 @@ public CompletableFuture health(HealthRequest request) { } /** - * Returns the health status of a cluster, similar to the cluster health API. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the cluster health API. This API is often used - * to check malfunctioning clusters. To help you track cluster health alongside - * log files and alerting systems, the API returns timestamps in two formats: - * HH:MM:SS, which is human-readable but includes no date - * information; Unix epoch time, which is machine-sortable and - * includes date information. The latter format is useful for cluster recoveries - * that take multiple days. You can use the cat health API to verify cluster - * health across multiple nodes. You also can use the API to track the recovery - * of a large cluster over a longer period of time. + * Get the cluster health status. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the + * cluster health API. This API is often used to check malfunctioning clusters. + * To help you track cluster health alongside log files and alerting systems, + * the API returns timestamps in two formats: HH:MM:SS, which is + * human-readable but includes no date information; + * Unix epoch time, which is machine-sortable and includes date + * information. The latter format is useful for cluster recoveries that take + * multiple days. You can use the cat health API to verify cluster health across + * multiple nodes. You also can use the API to track the recovery of a large + * cluster over a longer period of time. * * @param fn * a function that initializes a builder to create the @@ -425,18 +425,18 @@ public final CompletableFuture health( } /** - * Returns the health status of a cluster, similar to the cluster health API. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the cluster health API. This API is often used - * to check malfunctioning clusters. To help you track cluster health alongside - * log files and alerting systems, the API returns timestamps in two formats: - * HH:MM:SS, which is human-readable but includes no date - * information; Unix epoch time, which is machine-sortable and - * includes date information. The latter format is useful for cluster recoveries - * that take multiple days. You can use the cat health API to verify cluster - * health across multiple nodes. You also can use the API to track the recovery - * of a large cluster over a longer period of time. + * Get the cluster health status. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the + * cluster health API. This API is often used to check malfunctioning clusters. + * To help you track cluster health alongside log files and alerting systems, + * the API returns timestamps in two formats: HH:MM:SS, which is + * human-readable but includes no date information; + * Unix epoch time, which is machine-sortable and includes date + * information. The latter format is useful for cluster recoveries that take + * multiple days. You can use the cat health API to verify cluster health across + * multiple nodes. You also can use the API to track the recovery of a large + * cluster over a longer period of time. * * @see Documentation @@ -570,10 +570,11 @@ public CompletableFuture indices() { // ----- Endpoint: cat.master /** - * Returns information about the master node, including the ID, bound IP - * address, and name. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the nodes info API. + * Get master node information. Get information about the master node, including + * the ID, bound IP address, and name. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the nodes + * info API. * * @see Documentation @@ -588,10 +589,11 @@ public CompletableFuture master(MasterRequest request) { } /** - * Returns information about the master node, including the ID, bound IP - * address, and name. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the nodes info API. + * Get master node information. Get information about the master node, including + * the ID, bound IP address, and name. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the nodes + * info API. * * @param fn * a function that initializes a builder to create the @@ -607,10 +609,11 @@ public final CompletableFuture master( } /** - * Returns information about the master node, including the ID, bound IP - * address, and name. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the nodes info API. + * Get master node information. Get information about the master node, including + * the ID, bound IP address, and name. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the nodes + * info API. * * @see Documentation @@ -887,10 +890,10 @@ public CompletableFuture mlTrainedModels() { // ----- Endpoint: cat.nodeattrs /** - * Returns information about custom node attributes. IMPORTANT: cat APIs are - * only intended for human consumption using the command line or Kibana console. - * They are not intended for use by applications. For application consumption, - * use the nodes info API. + * Get node attribute information. Get information about custom node attributes. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes info API. * * @see Documentation @@ -905,10 +908,10 @@ public CompletableFuture nodeattrs(NodeattrsRequest request) } /** - * Returns information about custom node attributes. IMPORTANT: cat APIs are - * only intended for human consumption using the command line or Kibana console. - * They are not intended for use by applications. For application consumption, - * use the nodes info API. + * Get node attribute information. Get information about custom node attributes. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes info API. * * @param fn * a function that initializes a builder to create the @@ -924,10 +927,10 @@ public final CompletableFuture nodeattrs( } /** - * Returns information about custom node attributes. IMPORTANT: cat APIs are - * only intended for human consumption using the command line or Kibana console. - * They are not intended for use by applications. For application consumption, - * use the nodes info API. + * Get node attribute information. Get information about custom node attributes. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes info API. * * @see Documentation @@ -942,10 +945,10 @@ public CompletableFuture nodeattrs() { // ----- Endpoint: cat.nodes /** - * Returns information about the nodes in a cluster. IMPORTANT: cat APIs are - * only intended for human consumption using the command line or Kibana console. - * They are not intended for use by applications. For application consumption, - * use the nodes info API. + * Get node information. Get information about the nodes in a cluster. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes info API. * * @see Documentation @@ -960,10 +963,10 @@ public CompletableFuture nodes(NodesRequest request) { } /** - * Returns information about the nodes in a cluster. IMPORTANT: cat APIs are - * only intended for human consumption using the command line or Kibana console. - * They are not intended for use by applications. For application consumption, - * use the nodes info API. + * Get node information. Get information about the nodes in a cluster. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes info API. * * @param fn * a function that initializes a builder to create the @@ -979,10 +982,10 @@ public final CompletableFuture nodes( } /** - * Returns information about the nodes in a cluster. IMPORTANT: cat APIs are - * only intended for human consumption using the command line or Kibana console. - * They are not intended for use by applications. For application consumption, - * use the nodes info API. + * Get node information. Get information about the nodes in a cluster. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes info API. * * @see Documentation @@ -997,10 +1000,11 @@ public CompletableFuture nodes() { // ----- Endpoint: cat.pending_tasks /** - * Returns cluster-level changes that have not yet been executed. IMPORTANT: cat - * APIs are only intended for human consumption using the command line or Kibana - * console. They are not intended for use by applications. For application - * consumption, use the pending cluster tasks API. + * Get pending task information. Get information about cluster-level changes + * that have not yet taken effect. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the + * pending cluster tasks API. * * @see Documentation @@ -1015,10 +1019,11 @@ public CompletableFuture pendingTasks(PendingTasksRequest } /** - * Returns cluster-level changes that have not yet been executed. IMPORTANT: cat - * APIs are only intended for human consumption using the command line or Kibana - * console. They are not intended for use by applications. For application - * consumption, use the pending cluster tasks API. + * Get pending task information. Get information about cluster-level changes + * that have not yet taken effect. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the + * pending cluster tasks API. * * @param fn * a function that initializes a builder to create the @@ -1034,10 +1039,11 @@ public final CompletableFuture pendingTasks( } /** - * Returns cluster-level changes that have not yet been executed. IMPORTANT: cat - * APIs are only intended for human consumption using the command line or Kibana - * console. They are not intended for use by applications. For application - * consumption, use the pending cluster tasks API. + * Get pending task information. Get information about cluster-level changes + * that have not yet taken effect. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the + * pending cluster tasks API. * * @see Documentation @@ -1052,10 +1058,10 @@ public CompletableFuture pendingTasks() { // ----- Endpoint: cat.plugins /** - * Returns a list of plugins running on each node of a cluster. IMPORTANT: cat - * APIs are only intended for human consumption using the command line or Kibana - * console. They are not intended for use by applications. For application - * consumption, use the nodes info API. + * Get plugin information. Get a list of plugins running on each node of a + * cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the nodes info API. * * @see Documentation @@ -1070,10 +1076,10 @@ public CompletableFuture plugins(PluginsRequest request) { } /** - * Returns a list of plugins running on each node of a cluster. IMPORTANT: cat - * APIs are only intended for human consumption using the command line or Kibana - * console. They are not intended for use by applications. For application - * consumption, use the nodes info API. + * Get plugin information. Get a list of plugins running on each node of a + * cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the nodes info API. * * @param fn * a function that initializes a builder to create the @@ -1089,10 +1095,10 @@ public final CompletableFuture plugins( } /** - * Returns a list of plugins running on each node of a cluster. IMPORTANT: cat - * APIs are only intended for human consumption using the command line or Kibana - * console. They are not intended for use by applications. For application - * consumption, use the nodes info API. + * Get plugin information. Get a list of plugins running on each node of a + * cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the nodes info API. * * @see Documentation @@ -1107,15 +1113,15 @@ public CompletableFuture plugins() { // ----- Endpoint: cat.recovery /** - * Returns information about ongoing and completed shard recoveries. Shard - * recovery is the process of initializing a shard copy, such as restoring a - * primary shard from a snapshot or syncing a replica shard from a primary - * shard. When a shard recovery completes, the recovered shard is available for - * search and indexing. For data streams, the API returns information about the - * stream’s backing indices. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the index recovery - * API. + * Get shard recovery information. Get information about ongoing and completed + * shard recoveries. Shard recovery is the process of initializing a shard copy, + * such as restoring a primary shard from a snapshot or syncing a replica shard + * from a primary shard. When a shard recovery completes, the recovered shard is + * available for search and indexing. For data streams, the API returns + * information about the stream’s backing indices. IMPORTANT: cat APIs are only + * intended for human consumption using the command line or Kibana console. They + * are not intended for use by applications. For application consumption, use + * the index recovery API. * * @see Documentation @@ -1130,15 +1136,15 @@ public CompletableFuture recovery(RecoveryRequest request) { } /** - * Returns information about ongoing and completed shard recoveries. Shard - * recovery is the process of initializing a shard copy, such as restoring a - * primary shard from a snapshot or syncing a replica shard from a primary - * shard. When a shard recovery completes, the recovered shard is available for - * search and indexing. For data streams, the API returns information about the - * stream’s backing indices. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the index recovery - * API. + * Get shard recovery information. Get information about ongoing and completed + * shard recoveries. Shard recovery is the process of initializing a shard copy, + * such as restoring a primary shard from a snapshot or syncing a replica shard + * from a primary shard. When a shard recovery completes, the recovered shard is + * available for search and indexing. For data streams, the API returns + * information about the stream’s backing indices. IMPORTANT: cat APIs are only + * intended for human consumption using the command line or Kibana console. They + * are not intended for use by applications. For application consumption, use + * the index recovery API. * * @param fn * a function that initializes a builder to create the @@ -1154,15 +1160,15 @@ public final CompletableFuture recovery( } /** - * Returns information about ongoing and completed shard recoveries. Shard - * recovery is the process of initializing a shard copy, such as restoring a - * primary shard from a snapshot or syncing a replica shard from a primary - * shard. When a shard recovery completes, the recovered shard is available for - * search and indexing. For data streams, the API returns information about the - * stream’s backing indices. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the index recovery - * API. + * Get shard recovery information. Get information about ongoing and completed + * shard recoveries. Shard recovery is the process of initializing a shard copy, + * such as restoring a primary shard from a snapshot or syncing a replica shard + * from a primary shard. When a shard recovery completes, the recovered shard is + * available for search and indexing. For data streams, the API returns + * information about the stream’s backing indices. IMPORTANT: cat APIs are only + * intended for human consumption using the command line or Kibana console. They + * are not intended for use by applications. For application consumption, use + * the index recovery API. * * @see Documentation @@ -1177,10 +1183,11 @@ public CompletableFuture recovery() { // ----- Endpoint: cat.repositories /** - * Returns the snapshot repositories for a cluster. IMPORTANT: cat APIs are only - * intended for human consumption using the command line or Kibana console. They - * are not intended for use by applications. For application consumption, use - * the get snapshot repository API. + * Get snapshot repository information. Get a list of snapshot repositories for + * a cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the get snapshot repository + * API. * * @see Documentation @@ -1194,11 +1201,11 @@ public CompletableFuture repositories() { // ----- Endpoint: cat.segments /** - * Returns low-level information about the Lucene segments in index shards. For - * data streams, the API returns information about the backing indices. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the index segments API. + * Get segment information. Get low-level information about the Lucene segments + * in index shards. For data streams, the API returns information about the + * backing indices. IMPORTANT: cat APIs are only intended for human consumption + * using the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the index segments API. * * @see Documentation @@ -1213,11 +1220,11 @@ public CompletableFuture segments(SegmentsRequest request) { } /** - * Returns low-level information about the Lucene segments in index shards. For - * data streams, the API returns information about the backing indices. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the index segments API. + * Get segment information. Get low-level information about the Lucene segments + * in index shards. For data streams, the API returns information about the + * backing indices. IMPORTANT: cat APIs are only intended for human consumption + * using the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the index segments API. * * @param fn * a function that initializes a builder to create the @@ -1233,11 +1240,11 @@ public final CompletableFuture segments( } /** - * Returns low-level information about the Lucene segments in index shards. For - * data streams, the API returns information about the backing indices. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the index segments API. + * Get segment information. Get low-level information about the Lucene segments + * in index shards. For data streams, the API returns information about the + * backing indices. IMPORTANT: cat APIs are only intended for human consumption + * using the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the index segments API. * * @see Documentation @@ -1252,10 +1259,10 @@ public CompletableFuture segments() { // ----- Endpoint: cat.shards /** - * Returns information about the shards in a cluster. For data streams, the API - * returns information about the backing indices. IMPORTANT: cat APIs are only - * intended for human consumption using the command line or Kibana console. They - * are not intended for use by applications. + * Get shard information. Get information about the shards in a cluster. For + * data streams, the API returns information about the backing indices. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. * * @see Documentation @@ -1270,10 +1277,10 @@ public CompletableFuture shards(ShardsRequest request) { } /** - * Returns information about the shards in a cluster. For data streams, the API - * returns information about the backing indices. IMPORTANT: cat APIs are only - * intended for human consumption using the command line or Kibana console. They - * are not intended for use by applications. + * Get shard information. Get information about the shards in a cluster. For + * data streams, the API returns information about the backing indices. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. * * @param fn * a function that initializes a builder to create the @@ -1289,10 +1296,10 @@ public final CompletableFuture shards( } /** - * Returns information about the shards in a cluster. For data streams, the API - * returns information about the backing indices. IMPORTANT: cat APIs are only - * intended for human consumption using the command line or Kibana console. They - * are not intended for use by applications. + * Get shard information. Get information about the shards in a cluster. For + * data streams, the API returns information about the backing indices. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. * * @see Documentation @@ -1307,11 +1314,12 @@ public CompletableFuture shards() { // ----- Endpoint: cat.snapshots /** - * Returns information about the snapshots stored in one or more repositories. A - * snapshot is a backup of an index or running Elasticsearch cluster. IMPORTANT: - * cat APIs are only intended for human consumption using the command line or - * Kibana console. They are not intended for use by applications. For - * application consumption, use the get snapshot API. + * Get snapshot information Get information about the snapshots stored in one or + * more repositories. A snapshot is a backup of an index or running + * Elasticsearch cluster. IMPORTANT: cat APIs are only intended for human + * consumption using the command line or Kibana console. They are not intended + * for use by applications. For application consumption, use the get snapshot + * API. * * @see Documentation @@ -1326,11 +1334,12 @@ public CompletableFuture snapshots(SnapshotsRequest request) } /** - * Returns information about the snapshots stored in one or more repositories. A - * snapshot is a backup of an index or running Elasticsearch cluster. IMPORTANT: - * cat APIs are only intended for human consumption using the command line or - * Kibana console. They are not intended for use by applications. For - * application consumption, use the get snapshot API. + * Get snapshot information Get information about the snapshots stored in one or + * more repositories. A snapshot is a backup of an index or running + * Elasticsearch cluster. IMPORTANT: cat APIs are only intended for human + * consumption using the command line or Kibana console. They are not intended + * for use by applications. For application consumption, use the get snapshot + * API. * * @param fn * a function that initializes a builder to create the @@ -1346,11 +1355,12 @@ public final CompletableFuture snapshots( } /** - * Returns information about the snapshots stored in one or more repositories. A - * snapshot is a backup of an index or running Elasticsearch cluster. IMPORTANT: - * cat APIs are only intended for human consumption using the command line or - * Kibana console. They are not intended for use by applications. For - * application consumption, use the get snapshot API. + * Get snapshot information Get information about the snapshots stored in one or + * more repositories. A snapshot is a backup of an index or running + * Elasticsearch cluster. IMPORTANT: cat APIs are only intended for human + * consumption using the command line or Kibana console. They are not intended + * for use by applications. For application consumption, use the get snapshot + * API. * * @see Documentation @@ -1365,10 +1375,10 @@ public CompletableFuture snapshots() { // ----- Endpoint: cat.tasks /** - * Returns information about tasks currently executing in the cluster. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the task management API. + * Get task information. Get information about tasks currently running in the + * cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the task management API. * * @see Documentation @@ -1383,10 +1393,10 @@ public CompletableFuture tasks(TasksRequest request) { } /** - * Returns information about tasks currently executing in the cluster. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the task management API. + * Get task information. Get information about tasks currently running in the + * cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the task management API. * * @param fn * a function that initializes a builder to create the @@ -1402,10 +1412,10 @@ public final CompletableFuture tasks( } /** - * Returns information about tasks currently executing in the cluster. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the task management API. + * Get task information. Get information about tasks currently running in the + * cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the task management API. * * @see Documentation @@ -1420,11 +1430,12 @@ public CompletableFuture tasks() { // ----- Endpoint: cat.templates /** - * Returns information about index templates in a cluster. You can use index - * templates to apply index settings and field mappings to new indices at - * creation. IMPORTANT: cat APIs are only intended for human consumption using - * the command line or Kibana console. They are not intended for use by - * applications. For application consumption, use the get index template API. + * Get index template information. Get information about the index templates in + * a cluster. You can use index templates to apply index settings and field + * mappings to new indices at creation. IMPORTANT: cat APIs are only intended + * for human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the get + * index template API. * * @see Documentation @@ -1439,11 +1450,12 @@ public CompletableFuture templates(TemplatesRequest request) } /** - * Returns information about index templates in a cluster. You can use index - * templates to apply index settings and field mappings to new indices at - * creation. IMPORTANT: cat APIs are only intended for human consumption using - * the command line or Kibana console. They are not intended for use by - * applications. For application consumption, use the get index template API. + * Get index template information. Get information about the index templates in + * a cluster. You can use index templates to apply index settings and field + * mappings to new indices at creation. IMPORTANT: cat APIs are only intended + * for human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the get + * index template API. * * @param fn * a function that initializes a builder to create the @@ -1459,11 +1471,12 @@ public final CompletableFuture templates( } /** - * Returns information about index templates in a cluster. You can use index - * templates to apply index settings and field mappings to new indices at - * creation. IMPORTANT: cat APIs are only intended for human consumption using - * the command line or Kibana console. They are not intended for use by - * applications. For application consumption, use the get index template API. + * Get index template information. Get information about the index templates in + * a cluster. You can use index templates to apply index settings and field + * mappings to new indices at creation. IMPORTANT: cat APIs are only intended + * for human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the get + * index template API. * * @see Documentation @@ -1478,11 +1491,11 @@ public CompletableFuture templates() { // ----- Endpoint: cat.thread_pool /** - * Returns thread pool statistics for each node in a cluster. Returned - * information includes all built-in thread pools and custom thread pools. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the nodes info API. + * Get thread pool statistics. Get thread pool statistics for each node in a + * cluster. Returned information includes all built-in thread pools and custom + * thread pools. IMPORTANT: cat APIs are only intended for human consumption + * using the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the nodes info API. * * @see Documentation @@ -1497,11 +1510,11 @@ public CompletableFuture threadPool(ThreadPoolRequest reques } /** - * Returns thread pool statistics for each node in a cluster. Returned - * information includes all built-in thread pools and custom thread pools. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the nodes info API. + * Get thread pool statistics. Get thread pool statistics for each node in a + * cluster. Returned information includes all built-in thread pools and custom + * thread pools. IMPORTANT: cat APIs are only intended for human consumption + * using the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the nodes info API. * * @param fn * a function that initializes a builder to create the @@ -1517,11 +1530,11 @@ public final CompletableFuture threadPool( } /** - * Returns thread pool statistics for each node in a cluster. Returned - * information includes all built-in thread pools and custom thread pools. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the nodes info API. + * Get thread pool statistics. Get thread pool statistics for each node in a + * cluster. Returned information includes all built-in thread pools and custom + * thread pools. IMPORTANT: cat APIs are only intended for human consumption + * using the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the nodes info API. * * @see Documentation @@ -1536,7 +1549,8 @@ public CompletableFuture threadPool() { // ----- Endpoint: cat.transforms /** - * Get transforms. Returns configuration and usage information about transforms. + * Get transform information. Get configuration and usage information about + * transforms. *

* CAT APIs are only intended for human consumption using the Kibana console or * command line. They are not intended for use by applications. For application @@ -1555,7 +1569,8 @@ public CompletableFuture transforms(TransformsRequest reques } /** - * Get transforms. Returns configuration and usage information about transforms. + * Get transform information. Get configuration and usage information about + * transforms. *

* CAT APIs are only intended for human consumption using the Kibana console or * command line. They are not intended for use by applications. For application @@ -1575,7 +1590,8 @@ public final CompletableFuture transforms( } /** - * Get transforms. Returns configuration and usage information about transforms. + * Get transform information. Get configuration and usage information about + * transforms. *

* CAT APIs are only intended for human consumption using the Kibana console or * command line. They are not intended for use by applications. For application diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java index 8138deefb..dbc70f2db 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ElasticsearchCatClient.java @@ -129,10 +129,10 @@ public AliasesResponse aliases() throws IOException, ElasticsearchException { // ----- Endpoint: cat.allocation /** - * Provides a snapshot of the number of shards allocated to each data node and - * their disk space. IMPORTANT: cat APIs are only intended for human consumption - * using the command line or Kibana console. They are not intended for use by - * applications. + * Get shard allocation information. Get a snapshot of the number of shards + * allocated to each data node and their disk space. IMPORTANT: cat APIs are + * only intended for human consumption using the command line or Kibana console. + * They are not intended for use by applications. * * @see Documentation @@ -147,10 +147,10 @@ public AllocationResponse allocation(AllocationRequest request) throws IOExcepti } /** - * Provides a snapshot of the number of shards allocated to each data node and - * their disk space. IMPORTANT: cat APIs are only intended for human consumption - * using the command line or Kibana console. They are not intended for use by - * applications. + * Get shard allocation information. Get a snapshot of the number of shards + * allocated to each data node and their disk space. IMPORTANT: cat APIs are + * only intended for human consumption using the command line or Kibana console. + * They are not intended for use by applications. * * @param fn * a function that initializes a builder to create the @@ -166,10 +166,10 @@ public final AllocationResponse allocation(FunctionDocumentation @@ -317,11 +317,11 @@ public CountResponse count() throws IOException, ElasticsearchException { // ----- Endpoint: cat.fielddata /** - * Returns the amount of heap memory currently used by the field data cache on - * every data node in the cluster. IMPORTANT: cat APIs are only intended for - * human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the nodes - * stats API. + * Get field data cache information. Get the amount of heap memory currently + * used by the field data cache on every data node in the cluster. IMPORTANT: + * cat APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes stats API. * * @see Documentation @@ -336,11 +336,11 @@ public FielddataResponse fielddata(FielddataRequest request) throws IOException, } /** - * Returns the amount of heap memory currently used by the field data cache on - * every data node in the cluster. IMPORTANT: cat APIs are only intended for - * human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the nodes - * stats API. + * Get field data cache information. Get the amount of heap memory currently + * used by the field data cache on every data node in the cluster. IMPORTANT: + * cat APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes stats API. * * @param fn * a function that initializes a builder to create the @@ -356,11 +356,11 @@ public final FielddataResponse fielddata(FunctionDocumentation @@ -375,18 +375,18 @@ public FielddataResponse fielddata() throws IOException, ElasticsearchException // ----- Endpoint: cat.health /** - * Returns the health status of a cluster, similar to the cluster health API. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the cluster health API. This API is often used - * to check malfunctioning clusters. To help you track cluster health alongside - * log files and alerting systems, the API returns timestamps in two formats: - * HH:MM:SS, which is human-readable but includes no date - * information; Unix epoch time, which is machine-sortable and - * includes date information. The latter format is useful for cluster recoveries - * that take multiple days. You can use the cat health API to verify cluster - * health across multiple nodes. You also can use the API to track the recovery - * of a large cluster over a longer period of time. + * Get the cluster health status. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the + * cluster health API. This API is often used to check malfunctioning clusters. + * To help you track cluster health alongside log files and alerting systems, + * the API returns timestamps in two formats: HH:MM:SS, which is + * human-readable but includes no date information; + * Unix epoch time, which is machine-sortable and includes date + * information. The latter format is useful for cluster recoveries that take + * multiple days. You can use the cat health API to verify cluster health across + * multiple nodes. You also can use the API to track the recovery of a large + * cluster over a longer period of time. * * @see Documentation @@ -401,18 +401,18 @@ public HealthResponse health(HealthRequest request) throws IOException, Elastics } /** - * Returns the health status of a cluster, similar to the cluster health API. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the cluster health API. This API is often used - * to check malfunctioning clusters. To help you track cluster health alongside - * log files and alerting systems, the API returns timestamps in two formats: - * HH:MM:SS, which is human-readable but includes no date - * information; Unix epoch time, which is machine-sortable and - * includes date information. The latter format is useful for cluster recoveries - * that take multiple days. You can use the cat health API to verify cluster - * health across multiple nodes. You also can use the API to track the recovery - * of a large cluster over a longer period of time. + * Get the cluster health status. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the + * cluster health API. This API is often used to check malfunctioning clusters. + * To help you track cluster health alongside log files and alerting systems, + * the API returns timestamps in two formats: HH:MM:SS, which is + * human-readable but includes no date information; + * Unix epoch time, which is machine-sortable and includes date + * information. The latter format is useful for cluster recoveries that take + * multiple days. You can use the cat health API to verify cluster health across + * multiple nodes. You also can use the API to track the recovery of a large + * cluster over a longer period of time. * * @param fn * a function that initializes a builder to create the @@ -428,18 +428,18 @@ public final HealthResponse health(FunctionHH:MM:SS, which is human-readable but includes no date - * information; Unix epoch time, which is machine-sortable and - * includes date information. The latter format is useful for cluster recoveries - * that take multiple days. You can use the cat health API to verify cluster - * health across multiple nodes. You also can use the API to track the recovery - * of a large cluster over a longer period of time. + * Get the cluster health status. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the + * cluster health API. This API is often used to check malfunctioning clusters. + * To help you track cluster health alongside log files and alerting systems, + * the API returns timestamps in two formats: HH:MM:SS, which is + * human-readable but includes no date information; + * Unix epoch time, which is machine-sortable and includes date + * information. The latter format is useful for cluster recoveries that take + * multiple days. You can use the cat health API to verify cluster health across + * multiple nodes. You also can use the API to track the recovery of a large + * cluster over a longer period of time. * * @see Documentation @@ -573,10 +573,11 @@ public IndicesResponse indices() throws IOException, ElasticsearchException { // ----- Endpoint: cat.master /** - * Returns information about the master node, including the ID, bound IP - * address, and name. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the nodes info API. + * Get master node information. Get information about the master node, including + * the ID, bound IP address, and name. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the nodes + * info API. * * @see Documentation @@ -591,10 +592,11 @@ public MasterResponse master(MasterRequest request) throws IOException, Elastics } /** - * Returns information about the master node, including the ID, bound IP - * address, and name. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the nodes info API. + * Get master node information. Get information about the master node, including + * the ID, bound IP address, and name. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the nodes + * info API. * * @param fn * a function that initializes a builder to create the @@ -610,10 +612,11 @@ public final MasterResponse master(FunctionDocumentation @@ -895,10 +898,10 @@ public MlTrainedModelsResponse mlTrainedModels() throws IOException, Elasticsear // ----- Endpoint: cat.nodeattrs /** - * Returns information about custom node attributes. IMPORTANT: cat APIs are - * only intended for human consumption using the command line or Kibana console. - * They are not intended for use by applications. For application consumption, - * use the nodes info API. + * Get node attribute information. Get information about custom node attributes. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes info API. * * @see Documentation @@ -913,10 +916,10 @@ public NodeattrsResponse nodeattrs(NodeattrsRequest request) throws IOException, } /** - * Returns information about custom node attributes. IMPORTANT: cat APIs are - * only intended for human consumption using the command line or Kibana console. - * They are not intended for use by applications. For application consumption, - * use the nodes info API. + * Get node attribute information. Get information about custom node attributes. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes info API. * * @param fn * a function that initializes a builder to create the @@ -932,10 +935,10 @@ public final NodeattrsResponse nodeattrs(FunctionDocumentation @@ -950,10 +953,10 @@ public NodeattrsResponse nodeattrs() throws IOException, ElasticsearchException // ----- Endpoint: cat.nodes /** - * Returns information about the nodes in a cluster. IMPORTANT: cat APIs are - * only intended for human consumption using the command line or Kibana console. - * They are not intended for use by applications. For application consumption, - * use the nodes info API. + * Get node information. Get information about the nodes in a cluster. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes info API. * * @see Documentation @@ -968,10 +971,10 @@ public NodesResponse nodes(NodesRequest request) throws IOException, Elasticsear } /** - * Returns information about the nodes in a cluster. IMPORTANT: cat APIs are - * only intended for human consumption using the command line or Kibana console. - * They are not intended for use by applications. For application consumption, - * use the nodes info API. + * Get node information. Get information about the nodes in a cluster. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes info API. * * @param fn * a function that initializes a builder to create the @@ -987,10 +990,10 @@ public final NodesResponse nodes(FunctionDocumentation @@ -1005,10 +1008,11 @@ public NodesResponse nodes() throws IOException, ElasticsearchException { // ----- Endpoint: cat.pending_tasks /** - * Returns cluster-level changes that have not yet been executed. IMPORTANT: cat - * APIs are only intended for human consumption using the command line or Kibana - * console. They are not intended for use by applications. For application - * consumption, use the pending cluster tasks API. + * Get pending task information. Get information about cluster-level changes + * that have not yet taken effect. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the + * pending cluster tasks API. * * @see Documentation @@ -1023,10 +1027,11 @@ public PendingTasksResponse pendingTasks(PendingTasksRequest request) throws IOE } /** - * Returns cluster-level changes that have not yet been executed. IMPORTANT: cat - * APIs are only intended for human consumption using the command line or Kibana - * console. They are not intended for use by applications. For application - * consumption, use the pending cluster tasks API. + * Get pending task information. Get information about cluster-level changes + * that have not yet taken effect. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the + * pending cluster tasks API. * * @param fn * a function that initializes a builder to create the @@ -1043,10 +1048,11 @@ public final PendingTasksResponse pendingTasks( } /** - * Returns cluster-level changes that have not yet been executed. IMPORTANT: cat - * APIs are only intended for human consumption using the command line or Kibana - * console. They are not intended for use by applications. For application - * consumption, use the pending cluster tasks API. + * Get pending task information. Get information about cluster-level changes + * that have not yet taken effect. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the + * pending cluster tasks API. * * @see Documentation @@ -1061,10 +1067,10 @@ public PendingTasksResponse pendingTasks() throws IOException, ElasticsearchExce // ----- Endpoint: cat.plugins /** - * Returns a list of plugins running on each node of a cluster. IMPORTANT: cat - * APIs are only intended for human consumption using the command line or Kibana - * console. They are not intended for use by applications. For application - * consumption, use the nodes info API. + * Get plugin information. Get a list of plugins running on each node of a + * cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the nodes info API. * * @see Documentation @@ -1079,10 +1085,10 @@ public PluginsResponse plugins(PluginsRequest request) throws IOException, Elast } /** - * Returns a list of plugins running on each node of a cluster. IMPORTANT: cat - * APIs are only intended for human consumption using the command line or Kibana - * console. They are not intended for use by applications. For application - * consumption, use the nodes info API. + * Get plugin information. Get a list of plugins running on each node of a + * cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the nodes info API. * * @param fn * a function that initializes a builder to create the @@ -1098,10 +1104,10 @@ public final PluginsResponse plugins(FunctionDocumentation @@ -1116,15 +1122,15 @@ public PluginsResponse plugins() throws IOException, ElasticsearchException { // ----- Endpoint: cat.recovery /** - * Returns information about ongoing and completed shard recoveries. Shard - * recovery is the process of initializing a shard copy, such as restoring a - * primary shard from a snapshot or syncing a replica shard from a primary - * shard. When a shard recovery completes, the recovered shard is available for - * search and indexing. For data streams, the API returns information about the - * stream’s backing indices. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the index recovery - * API. + * Get shard recovery information. Get information about ongoing and completed + * shard recoveries. Shard recovery is the process of initializing a shard copy, + * such as restoring a primary shard from a snapshot or syncing a replica shard + * from a primary shard. When a shard recovery completes, the recovered shard is + * available for search and indexing. For data streams, the API returns + * information about the stream’s backing indices. IMPORTANT: cat APIs are only + * intended for human consumption using the command line or Kibana console. They + * are not intended for use by applications. For application consumption, use + * the index recovery API. * * @see Documentation @@ -1139,15 +1145,15 @@ public RecoveryResponse recovery(RecoveryRequest request) throws IOException, El } /** - * Returns information about ongoing and completed shard recoveries. Shard - * recovery is the process of initializing a shard copy, such as restoring a - * primary shard from a snapshot or syncing a replica shard from a primary - * shard. When a shard recovery completes, the recovered shard is available for - * search and indexing. For data streams, the API returns information about the - * stream’s backing indices. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the index recovery - * API. + * Get shard recovery information. Get information about ongoing and completed + * shard recoveries. Shard recovery is the process of initializing a shard copy, + * such as restoring a primary shard from a snapshot or syncing a replica shard + * from a primary shard. When a shard recovery completes, the recovered shard is + * available for search and indexing. For data streams, the API returns + * information about the stream’s backing indices. IMPORTANT: cat APIs are only + * intended for human consumption using the command line or Kibana console. They + * are not intended for use by applications. For application consumption, use + * the index recovery API. * * @param fn * a function that initializes a builder to create the @@ -1163,15 +1169,15 @@ public final RecoveryResponse recovery(FunctionDocumentation @@ -1186,10 +1192,11 @@ public RecoveryResponse recovery() throws IOException, ElasticsearchException { // ----- Endpoint: cat.repositories /** - * Returns the snapshot repositories for a cluster. IMPORTANT: cat APIs are only - * intended for human consumption using the command line or Kibana console. They - * are not intended for use by applications. For application consumption, use - * the get snapshot repository API. + * Get snapshot repository information. Get a list of snapshot repositories for + * a cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the get snapshot repository + * API. * * @see Documentation @@ -1203,11 +1210,11 @@ public RepositoriesResponse repositories() throws IOException, ElasticsearchExce // ----- Endpoint: cat.segments /** - * Returns low-level information about the Lucene segments in index shards. For - * data streams, the API returns information about the backing indices. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the index segments API. + * Get segment information. Get low-level information about the Lucene segments + * in index shards. For data streams, the API returns information about the + * backing indices. IMPORTANT: cat APIs are only intended for human consumption + * using the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the index segments API. * * @see Documentation @@ -1222,11 +1229,11 @@ public SegmentsResponse segments(SegmentsRequest request) throws IOException, El } /** - * Returns low-level information about the Lucene segments in index shards. For - * data streams, the API returns information about the backing indices. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the index segments API. + * Get segment information. Get low-level information about the Lucene segments + * in index shards. For data streams, the API returns information about the + * backing indices. IMPORTANT: cat APIs are only intended for human consumption + * using the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the index segments API. * * @param fn * a function that initializes a builder to create the @@ -1242,11 +1249,11 @@ public final SegmentsResponse segments(FunctionDocumentation @@ -1261,10 +1268,10 @@ public SegmentsResponse segments() throws IOException, ElasticsearchException { // ----- Endpoint: cat.shards /** - * Returns information about the shards in a cluster. For data streams, the API - * returns information about the backing indices. IMPORTANT: cat APIs are only - * intended for human consumption using the command line or Kibana console. They - * are not intended for use by applications. + * Get shard information. Get information about the shards in a cluster. For + * data streams, the API returns information about the backing indices. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. * * @see Documentation @@ -1279,10 +1286,10 @@ public ShardsResponse shards(ShardsRequest request) throws IOException, Elastics } /** - * Returns information about the shards in a cluster. For data streams, the API - * returns information about the backing indices. IMPORTANT: cat APIs are only - * intended for human consumption using the command line or Kibana console. They - * are not intended for use by applications. + * Get shard information. Get information about the shards in a cluster. For + * data streams, the API returns information about the backing indices. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. * * @param fn * a function that initializes a builder to create the @@ -1298,10 +1305,10 @@ public final ShardsResponse shards(FunctionDocumentation @@ -1316,11 +1323,12 @@ public ShardsResponse shards() throws IOException, ElasticsearchException { // ----- Endpoint: cat.snapshots /** - * Returns information about the snapshots stored in one or more repositories. A - * snapshot is a backup of an index or running Elasticsearch cluster. IMPORTANT: - * cat APIs are only intended for human consumption using the command line or - * Kibana console. They are not intended for use by applications. For - * application consumption, use the get snapshot API. + * Get snapshot information Get information about the snapshots stored in one or + * more repositories. A snapshot is a backup of an index or running + * Elasticsearch cluster. IMPORTANT: cat APIs are only intended for human + * consumption using the command line or Kibana console. They are not intended + * for use by applications. For application consumption, use the get snapshot + * API. * * @see Documentation @@ -1335,11 +1343,12 @@ public SnapshotsResponse snapshots(SnapshotsRequest request) throws IOException, } /** - * Returns information about the snapshots stored in one or more repositories. A - * snapshot is a backup of an index or running Elasticsearch cluster. IMPORTANT: - * cat APIs are only intended for human consumption using the command line or - * Kibana console. They are not intended for use by applications. For - * application consumption, use the get snapshot API. + * Get snapshot information Get information about the snapshots stored in one or + * more repositories. A snapshot is a backup of an index or running + * Elasticsearch cluster. IMPORTANT: cat APIs are only intended for human + * consumption using the command line or Kibana console. They are not intended + * for use by applications. For application consumption, use the get snapshot + * API. * * @param fn * a function that initializes a builder to create the @@ -1355,11 +1364,12 @@ public final SnapshotsResponse snapshots(FunctionDocumentation @@ -1374,10 +1384,10 @@ public SnapshotsResponse snapshots() throws IOException, ElasticsearchException // ----- Endpoint: cat.tasks /** - * Returns information about tasks currently executing in the cluster. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the task management API. + * Get task information. Get information about tasks currently running in the + * cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the task management API. * * @see Documentation @@ -1392,10 +1402,10 @@ public TasksResponse tasks(TasksRequest request) throws IOException, Elasticsear } /** - * Returns information about tasks currently executing in the cluster. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the task management API. + * Get task information. Get information about tasks currently running in the + * cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the task management API. * * @param fn * a function that initializes a builder to create the @@ -1411,10 +1421,10 @@ public final TasksResponse tasks(FunctionDocumentation @@ -1429,11 +1439,12 @@ public TasksResponse tasks() throws IOException, ElasticsearchException { // ----- Endpoint: cat.templates /** - * Returns information about index templates in a cluster. You can use index - * templates to apply index settings and field mappings to new indices at - * creation. IMPORTANT: cat APIs are only intended for human consumption using - * the command line or Kibana console. They are not intended for use by - * applications. For application consumption, use the get index template API. + * Get index template information. Get information about the index templates in + * a cluster. You can use index templates to apply index settings and field + * mappings to new indices at creation. IMPORTANT: cat APIs are only intended + * for human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the get + * index template API. * * @see Documentation @@ -1448,11 +1459,12 @@ public TemplatesResponse templates(TemplatesRequest request) throws IOException, } /** - * Returns information about index templates in a cluster. You can use index - * templates to apply index settings and field mappings to new indices at - * creation. IMPORTANT: cat APIs are only intended for human consumption using - * the command line or Kibana console. They are not intended for use by - * applications. For application consumption, use the get index template API. + * Get index template information. Get information about the index templates in + * a cluster. You can use index templates to apply index settings and field + * mappings to new indices at creation. IMPORTANT: cat APIs are only intended + * for human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the get + * index template API. * * @param fn * a function that initializes a builder to create the @@ -1468,11 +1480,12 @@ public final TemplatesResponse templates(FunctionDocumentation @@ -1487,11 +1500,11 @@ public TemplatesResponse templates() throws IOException, ElasticsearchException // ----- Endpoint: cat.thread_pool /** - * Returns thread pool statistics for each node in a cluster. Returned - * information includes all built-in thread pools and custom thread pools. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the nodes info API. + * Get thread pool statistics. Get thread pool statistics for each node in a + * cluster. Returned information includes all built-in thread pools and custom + * thread pools. IMPORTANT: cat APIs are only intended for human consumption + * using the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the nodes info API. * * @see Documentation @@ -1506,11 +1519,11 @@ public ThreadPoolResponse threadPool(ThreadPoolRequest request) throws IOExcepti } /** - * Returns thread pool statistics for each node in a cluster. Returned - * information includes all built-in thread pools and custom thread pools. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the nodes info API. + * Get thread pool statistics. Get thread pool statistics for each node in a + * cluster. Returned information includes all built-in thread pools and custom + * thread pools. IMPORTANT: cat APIs are only intended for human consumption + * using the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the nodes info API. * * @param fn * a function that initializes a builder to create the @@ -1526,11 +1539,11 @@ public final ThreadPoolResponse threadPool(FunctionDocumentation @@ -1545,7 +1558,8 @@ public ThreadPoolResponse threadPool() throws IOException, ElasticsearchExceptio // ----- Endpoint: cat.transforms /** - * Get transforms. Returns configuration and usage information about transforms. + * Get transform information. Get configuration and usage information about + * transforms. *

* CAT APIs are only intended for human consumption using the Kibana console or * command line. They are not intended for use by applications. For application @@ -1564,7 +1578,8 @@ public TransformsResponse transforms(TransformsRequest request) throws IOExcepti } /** - * Get transforms. Returns configuration and usage information about transforms. + * Get transform information. Get configuration and usage information about + * transforms. *

* CAT APIs are only intended for human consumption using the Kibana console or * command line. They are not intended for use by applications. For application @@ -1584,7 +1599,8 @@ public final TransformsResponse transforms(Function * CAT APIs are only intended for human consumption using the Kibana console or * command line. They are not intended for use by applications. For application diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataRequest.java index ca611a8dd..7cbd6677f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataRequest.java @@ -57,11 +57,11 @@ // typedef: cat.fielddata.Request /** - * Returns the amount of heap memory currently used by the field data cache on - * every data node in the cluster. IMPORTANT: cat APIs are only intended for - * human consumption using the command line or Kibana console. They are not - * intended for use by applications. For application consumption, use the nodes - * stats API. + * Get field data cache information. Get the amount of heap memory currently + * used by the field data cache on every data node in the cluster. IMPORTANT: + * cat APIs are only intended for human consumption using the command line or + * Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes stats API. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthRequest.java index 14e470a02..a5849749a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthRequest.java @@ -55,18 +55,18 @@ // typedef: cat.health.Request /** - * Returns the health status of a cluster, similar to the cluster health API. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the cluster health API. This API is often used - * to check malfunctioning clusters. To help you track cluster health alongside - * log files and alerting systems, the API returns timestamps in two formats: - * HH:MM:SS, which is human-readable but includes no date - * information; Unix epoch time, which is machine-sortable and - * includes date information. The latter format is useful for cluster recoveries - * that take multiple days. You can use the cat health API to verify cluster - * health across multiple nodes. You also can use the API to track the recovery - * of a large cluster over a longer period of time. + * Get the cluster health status. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the + * cluster health API. This API is often used to check malfunctioning clusters. + * To help you track cluster health alongside log files and alerting systems, + * the API returns timestamps in two formats: HH:MM:SS, which is + * human-readable but includes no date information; + * Unix epoch time, which is machine-sortable and includes date + * information. The latter format is useful for cluster recoveries that take + * multiple days. You can use the cat health API to verify cluster health across + * multiple nodes. You also can use the API to track the recovery of a large + * cluster over a longer period of time. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java index a0a61756f..a9cc80187 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java @@ -54,10 +54,11 @@ // typedef: cat.master.Request /** - * Returns information about the master node, including the ID, bound IP - * address, and name. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the nodes info API. + * Get master node information. Get information about the master node, including + * the ID, bound IP address, and name. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the nodes + * info API. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java index b457e5782..d97911919 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java @@ -54,10 +54,10 @@ // typedef: cat.nodeattrs.Request /** - * Returns information about custom node attributes. IMPORTANT: cat APIs are - * only intended for human consumption using the command line or Kibana console. - * They are not intended for use by applications. For application consumption, - * use the nodes info API. + * Get node attribute information. Get information about custom node attributes. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes info API. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java index eda8fcae2..8fea93dc6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java @@ -55,10 +55,10 @@ // typedef: cat.nodes.Request /** - * Returns information about the nodes in a cluster. IMPORTANT: cat APIs are - * only intended for human consumption using the command line or Kibana console. - * They are not intended for use by applications. For application consumption, - * use the nodes info API. + * Get node information. Get information about the nodes in a cluster. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. For + * application consumption, use the nodes info API. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java index 926e50a56..3f08d5276 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java @@ -54,10 +54,11 @@ // typedef: cat.pending_tasks.Request /** - * Returns cluster-level changes that have not yet been executed. IMPORTANT: cat - * APIs are only intended for human consumption using the command line or Kibana - * console. They are not intended for use by applications. For application - * consumption, use the pending cluster tasks API. + * Get pending task information. Get information about cluster-level changes + * that have not yet taken effect. IMPORTANT: cat APIs are only intended for + * human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the + * pending cluster tasks API. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java index 0385c8a95..1487f4cf1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java @@ -54,10 +54,10 @@ // typedef: cat.plugins.Request /** - * Returns a list of plugins running on each node of a cluster. IMPORTANT: cat - * APIs are only intended for human consumption using the command line or Kibana - * console. They are not intended for use by applications. For application - * consumption, use the nodes info API. + * Get plugin information. Get a list of plugins running on each node of a + * cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the nodes info API. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryRequest.java index db204aefc..37e01d4c0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryRequest.java @@ -58,15 +58,15 @@ // typedef: cat.recovery.Request /** - * Returns information about ongoing and completed shard recoveries. Shard - * recovery is the process of initializing a shard copy, such as restoring a - * primary shard from a snapshot or syncing a replica shard from a primary - * shard. When a shard recovery completes, the recovered shard is available for - * search and indexing. For data streams, the API returns information about the - * stream’s backing indices. IMPORTANT: cat APIs are only intended for human - * consumption using the command line or Kibana console. They are not intended - * for use by applications. For application consumption, use the index recovery - * API. + * Get shard recovery information. Get information about ongoing and completed + * shard recoveries. Shard recovery is the process of initializing a shard copy, + * such as restoring a primary shard from a snapshot or syncing a replica shard + * from a primary shard. When a shard recovery completes, the recovered shard is + * available for search and indexing. For data streams, the API returns + * information about the stream’s backing indices. IMPORTANT: cat APIs are only + * intended for human consumption using the command line or Kibana console. They + * are not intended for use by applications. For application consumption, use + * the index recovery API. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesRequest.java index 28e9bc101..99f6cd8f7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesRequest.java @@ -51,10 +51,11 @@ // typedef: cat.repositories.Request /** - * Returns the snapshot repositories for a cluster. IMPORTANT: cat APIs are only - * intended for human consumption using the command line or Kibana console. They - * are not intended for use by applications. For application consumption, use - * the get snapshot repository API. + * Get snapshot repository information. Get a list of snapshot repositories for + * a cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the get snapshot repository + * API. * * @see API * specification 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 c5591ae86..b5199379e 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 @@ -58,11 +58,11 @@ // typedef: cat.segments.Request /** - * Returns low-level information about the Lucene segments in index shards. For - * data streams, the API returns information about the backing indices. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the index segments API. + * Get segment information. Get low-level information about the Lucene segments + * in index shards. For data streams, the API returns information about the + * backing indices. IMPORTANT: cat APIs are only intended for human consumption + * using the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the index segments API. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsRequest.java index 06a51f901..8ce91892d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsRequest.java @@ -57,10 +57,10 @@ // typedef: cat.shards.Request /** - * Returns information about the shards in a cluster. For data streams, the API - * returns information about the backing indices. IMPORTANT: cat APIs are only - * intended for human consumption using the command line or Kibana console. They - * are not intended for use by applications. + * Get shard information. Get information about the shards in a cluster. For + * data streams, the API returns information about the backing indices. + * IMPORTANT: cat APIs are only intended for human consumption using the command + * line or Kibana console. They are not intended for use by applications. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsRequest.java index a9754e6ff..1e30a07c4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsRequest.java @@ -57,11 +57,12 @@ // typedef: cat.snapshots.Request /** - * Returns information about the snapshots stored in one or more repositories. A - * snapshot is a backup of an index or running Elasticsearch cluster. IMPORTANT: - * cat APIs are only intended for human consumption using the command line or - * Kibana console. They are not intended for use by applications. For - * application consumption, use the get snapshot API. + * Get snapshot information Get information about the snapshots stored in one or + * more repositories. A snapshot is a backup of an index or running + * Elasticsearch cluster. IMPORTANT: cat APIs are only intended for human + * consumption using the command line or Kibana console. They are not intended + * for use by applications. For application consumption, use the get snapshot + * API. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksRequest.java index e55ebc5f5..7abeec6e1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksRequest.java @@ -58,10 +58,10 @@ // typedef: cat.tasks.Request /** - * Returns information about tasks currently executing in the cluster. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the task management API. + * Get task information. Get information about tasks currently running in the + * cluster. IMPORTANT: cat APIs are only intended for human consumption using + * the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the task management API. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java index 77aad9f0e..150e9d865 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java @@ -54,11 +54,12 @@ // typedef: cat.templates.Request /** - * Returns information about index templates in a cluster. You can use index - * templates to apply index settings and field mappings to new indices at - * creation. IMPORTANT: cat APIs are only intended for human consumption using - * the command line or Kibana console. They are not intended for use by - * applications. For application consumption, use the get index template API. + * Get index template information. Get information about the index templates in + * a cluster. You can use index templates to apply index settings and field + * mappings to new indices at creation. IMPORTANT: cat APIs are only intended + * for human consumption using the command line or Kibana console. They are not + * intended for use by applications. For application consumption, use the get + * index template API. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java index f44ee12a7..b9b79ea4f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java @@ -58,11 +58,11 @@ // typedef: cat.thread_pool.Request /** - * Returns thread pool statistics for each node in a cluster. Returned - * information includes all built-in thread pools and custom thread pools. - * IMPORTANT: cat APIs are only intended for human consumption using the command - * line or Kibana console. They are not intended for use by applications. For - * application consumption, use the nodes info API. + * Get thread pool statistics. Get thread pool statistics for each node in a + * cluster. Returned information includes all built-in thread pools and custom + * thread pools. IMPORTANT: cat APIs are only intended for human consumption + * using the command line or Kibana console. They are not intended for use by + * applications. For application consumption, use the nodes info API. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java index 095b25d87..c8a3bd62f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java @@ -59,7 +59,8 @@ // typedef: cat.transforms.Request /** - * Get transforms. Returns configuration and usage information about transforms. + * Get transform information. Get configuration and usage information about + * transforms. *

* CAT APIs are only intended for human consumption using the Kibana console or * command line. They are not intended for use by applications. For application 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 360897e9b..7fe4999b6 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 @@ -65,7 +65,7 @@ // typedef: _global.count.Request /** - * Returns number of documents matching a query. + * Count search results. Get the number of documents matching a query. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/OpenPointInTimeRequest.java index 1701d0acb..33f573830 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 @@ -84,6 +84,9 @@ */ @JsonpDeserializable public class OpenPointInTimeRequest extends RequestBase implements JsonpSerializable { + @Nullable + private final Boolean allowPartialSearchResults; + private final List expandWildcards; @Nullable @@ -106,6 +109,7 @@ public class OpenPointInTimeRequest extends RequestBase implements JsonpSerializ private OpenPointInTimeRequest(Builder builder) { + this.allowPartialSearchResults = builder.allowPartialSearchResults; this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.ignoreUnavailable = builder.ignoreUnavailable; this.index = ApiTypeHelper.unmodifiableRequired(builder.index, this, "index"); @@ -120,6 +124,19 @@ public static OpenPointInTimeRequest of(Functionfalse, creating a point in time request when a shard is + * missing or unavailable will throw an exception. If true, the + * point in time will contain all the shards that are available at the time of + * the request. + *

+ * API name: {@code allow_partial_search_results} + */ + @Nullable + public final Boolean allowPartialSearchResults() { + return this.allowPartialSearchResults; + } + /** * Type of index that wildcard patterns can match. If the request can target * data streams, this argument determines whether wildcard expressions match @@ -224,6 +241,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Boolean allowPartialSearchResults; + @Nullable private List expandWildcards; @@ -243,6 +263,19 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private String routing; + /** + * If false, creating a point in time request when a shard is + * missing or unavailable will throw an exception. If true, the + * point in time will contain all the shards that are available at the time of + * the request. + *

+ * API name: {@code allow_partial_search_results} + */ + public final Builder allowPartialSearchResults(@Nullable Boolean value) { + this.allowPartialSearchResults = value; + return this; + } + /** * Type of index that wildcard patterns can match. If the request can target * data streams, this argument determines whether wildcard expressions match @@ -462,6 +495,9 @@ protected static void setupOpenPointInTimeRequestDeserializer( if (request.routing != null) { params.put("routing", request.routing); } + if (request.allowPartialSearchResults != null) { + params.put("allow_partial_search_results", String.valueOf(request.allowPartialSearchResults)); + } if (request.ignoreUnavailable != null) { params.put("ignore_unavailable", String.valueOf(request.ignoreUnavailable)); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/health_report/FileSettingsIndicator.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/health_report/FileSettingsIndicator.java new file mode 100644 index 000000000..2fbfee90c --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/health_report/FileSettingsIndicator.java @@ -0,0 +1,154 @@ +/* + * 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.health_report; + +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.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _global.health_report.FileSettingsIndicator + +/** + * FILE_SETTINGS + * + * @see API + * specification + */ +@JsonpDeserializable +public class FileSettingsIndicator extends BaseIndicator { + @Nullable + private final FileSettingsIndicatorDetails details; + + // --------------------------------------------------------------------------------------------- + + private FileSettingsIndicator(Builder builder) { + super(builder); + + this.details = builder.details; + + } + + public static FileSettingsIndicator of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code details} + */ + @Nullable + public final FileSettingsIndicatorDetails details() { + return this.details; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + if (this.details != null) { + generator.writeKey("details"); + this.details.serialize(generator, mapper); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FileSettingsIndicator}. + */ + + public static class Builder extends BaseIndicator.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private FileSettingsIndicatorDetails details; + + /** + * API name: {@code details} + */ + public final Builder details(@Nullable FileSettingsIndicatorDetails value) { + this.details = value; + return this; + } + + /** + * API name: {@code details} + */ + public final Builder details( + Function> fn) { + return this.details(fn.apply(new FileSettingsIndicatorDetails.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FileSettingsIndicator}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FileSettingsIndicator build() { + _checkSingleUse(); + + return new FileSettingsIndicator(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FileSettingsIndicator} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, FileSettingsIndicator::setupFileSettingsIndicatorDeserializer); + + protected static void setupFileSettingsIndicatorDeserializer(ObjectDeserializer op) { + BaseIndicator.setupBaseIndicatorDeserializer(op); + op.add(Builder::details, FileSettingsIndicatorDetails._DESERIALIZER, "details"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/health_report/FileSettingsIndicatorDetails.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/health_report/FileSettingsIndicatorDetails.java new file mode 100644 index 000000000..dd7f978ba --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/health_report/FileSettingsIndicatorDetails.java @@ -0,0 +1,182 @@ +/* + * 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.health_report; + +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: _global.health_report.FileSettingsIndicatorDetails + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class FileSettingsIndicatorDetails implements JsonpSerializable { + private final long failureStreak; + + private final String mostRecentFailure; + + // --------------------------------------------------------------------------------------------- + + private FileSettingsIndicatorDetails(Builder builder) { + + this.failureStreak = ApiTypeHelper.requireNonNull(builder.failureStreak, this, "failureStreak"); + this.mostRecentFailure = ApiTypeHelper.requireNonNull(builder.mostRecentFailure, this, "mostRecentFailure"); + + } + + public static FileSettingsIndicatorDetails of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code failure_streak} + */ + public final long failureStreak() { + return this.failureStreak; + } + + /** + * Required - API name: {@code most_recent_failure} + */ + public final String mostRecentFailure() { + return this.mostRecentFailure; + } + + /** + * 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("failure_streak"); + generator.write(this.failureStreak); + + generator.writeKey("most_recent_failure"); + generator.write(this.mostRecentFailure); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link FileSettingsIndicatorDetails}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private Long failureStreak; + + private String mostRecentFailure; + + /** + * Required - API name: {@code failure_streak} + */ + public final Builder failureStreak(long value) { + this.failureStreak = value; + return this; + } + + /** + * Required - API name: {@code most_recent_failure} + */ + public final Builder mostRecentFailure(String value) { + this.mostRecentFailure = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link FileSettingsIndicatorDetails}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public FileSettingsIndicatorDetails build() { + _checkSingleUse(); + + return new FileSettingsIndicatorDetails(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link FileSettingsIndicatorDetails} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, FileSettingsIndicatorDetails::setupFileSettingsIndicatorDetailsDeserializer); + + protected static void setupFileSettingsIndicatorDetailsDeserializer( + ObjectDeserializer op) { + + op.add(Builder::failureStreak, JsonpDeserializer.longDeserializer(), "failure_streak"); + op.add(Builder::mostRecentFailure, JsonpDeserializer.stringDeserializer(), "most_recent_failure"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/health_report/Indicators.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/health_report/Indicators.java index f313d5945..a4f85fb5f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/health_report/Indicators.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/health_report/Indicators.java @@ -82,6 +82,9 @@ public class Indicators implements JsonpSerializable { @Nullable private final ShardsCapacityIndicator shardsCapacity; + @Nullable + private final FileSettingsIndicator fileSettings; + // --------------------------------------------------------------------------------------------- private Indicators(Builder builder) { @@ -94,6 +97,7 @@ private Indicators(Builder builder) { this.ilm = builder.ilm; this.slm = builder.slm; this.shardsCapacity = builder.shardsCapacity; + this.fileSettings = builder.fileSettings; } @@ -165,6 +169,14 @@ public final ShardsCapacityIndicator shardsCapacity() { return this.shardsCapacity; } + /** + * API name: {@code file_settings} + */ + @Nullable + public final FileSettingsIndicator fileSettings() { + return this.fileSettings; + } + /** * Serialize this object to JSON. */ @@ -216,6 +228,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { this.shardsCapacity.serialize(generator, mapper); } + if (this.fileSettings != null) { + generator.writeKey("file_settings"); + this.fileSettings.serialize(generator, mapper); + + } } @@ -255,6 +272,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private ShardsCapacityIndicator shardsCapacity; + @Nullable + private FileSettingsIndicator fileSettings; + /** * API name: {@code master_is_stable} */ @@ -380,6 +400,22 @@ public final Builder shardsCapacity( return this.shardsCapacity(fn.apply(new ShardsCapacityIndicator.Builder()).build()); } + /** + * API name: {@code file_settings} + */ + public final Builder fileSettings(@Nullable FileSettingsIndicator value) { + this.fileSettings = value; + return this; + } + + /** + * API name: {@code file_settings} + */ + public final Builder fileSettings( + Function> fn) { + return this.fileSettings(fn.apply(new FileSettingsIndicator.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -416,6 +452,7 @@ protected static void setupIndicatorsDeserializer(ObjectDeserializer 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/cf7d574e642f871f48b16f316b56acc17acf4752/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/54858439f77f353d64fec90ccdb70bc54b43a7c8/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/enrich/ElasticsearchEnrichAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java index 4eadca956..104c092d7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichAsyncClient.java @@ -103,7 +103,7 @@ public final CompletableFuture deletePolicy( // ----- Endpoint: enrich.execute_policy /** - * Creates the enrich index for an existing enrich policy. + * Run an enrich policy. Create the enrich index for an existing enrich policy. * * @see Documentation @@ -118,7 +118,7 @@ public CompletableFuture executePolicy(ExecutePolicyReque } /** - * Creates the enrich index for an existing enrich policy. + * Run an enrich policy. Create the enrich index for an existing enrich policy. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java index 705285103..7b4b8a1f1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ElasticsearchEnrichClient.java @@ -104,7 +104,7 @@ public final DeletePolicyResponse deletePolicy( // ----- Endpoint: enrich.execute_policy /** - * Creates the enrich index for an existing enrich policy. + * Run an enrich policy. Create the enrich index for an existing enrich policy. * * @see Documentation @@ -120,7 +120,7 @@ public ExecutePolicyResponse executePolicy(ExecutePolicyRequest request) } /** - * Creates the enrich index for an existing enrich policy. + * Run an enrich policy. Create the enrich index for an existing enrich policy. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ExecutePolicyRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ExecutePolicyRequest.java index 1623ad63c..f7610957d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ExecutePolicyRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/enrich/ExecutePolicyRequest.java @@ -56,7 +56,7 @@ // typedef: enrich.execute_policy.Request /** - * Creates the enrich index for an existing enrich policy. + * Run an enrich policy. Create the enrich index for an existing enrich policy. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlAsyncClient.java index a2162780e..a6faa51d8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlAsyncClient.java @@ -69,8 +69,8 @@ public ElasticsearchEqlAsyncClient withTransportOptions(@Nullable TransportOptio // ----- Endpoint: eql.delete /** - * Deletes an async EQL search or a stored synchronous EQL search. The API also - * deletes results for the search. + * Delete an async EQL search. Delete an async EQL search or a stored + * synchronous EQL search. The API also deletes results for the search. * * @see Documentation @@ -85,8 +85,8 @@ public CompletableFuture delete(EqlDeleteRequest request) { } /** - * Deletes an async EQL search or a stored synchronous EQL search. The API also - * deletes results for the search. + * Delete an async EQL search. Delete an async EQL search or a stored + * synchronous EQL search. The API also deletes results for the search. * * @param fn * a function that initializes a builder to create the @@ -104,8 +104,8 @@ public final CompletableFuture delete( // ----- Endpoint: eql.get /** - * Returns the current status and available results for an async EQL search or a - * stored synchronous EQL search. + * Get async EQL search results. Get the current status and available results + * for an async EQL search or a stored synchronous EQL search. * * @see Documentation @@ -122,8 +122,8 @@ public CompletableFuture> get(EqlGetRequest requ } /** - * Returns the current status and available results for an async EQL search or a - * stored synchronous EQL search. + * Get async EQL search results. Get the current status and available results + * for an async EQL search or a stored synchronous EQL search. * * @param fn * a function that initializes a builder to create the @@ -139,8 +139,8 @@ public final CompletableFuture> get( } /** - * Returns the current status and available results for an async EQL search or a - * stored synchronous EQL search. + * Get async EQL search results. Get the current status and available results + * for an async EQL search or a stored synchronous EQL search. * * @see Documentation @@ -157,8 +157,8 @@ public CompletableFuture> get(EqlGetRequest requ } /** - * Returns the current status and available results for an async EQL search or a - * stored synchronous EQL search. + * Get async EQL search results. Get the current status and available results + * for an async EQL search or a stored synchronous EQL search. * * @param fn * a function that initializes a builder to create the @@ -176,8 +176,8 @@ public final CompletableFuture> get( // ----- Endpoint: eql.get_status /** - * Returns the current status for an async EQL search or a stored synchronous - * EQL search without returning results. + * Get the async EQL status. Get the current status for an async EQL search or a + * stored synchronous EQL search without returning results. * * @see Documentation @@ -192,8 +192,8 @@ public CompletableFuture getStatus(GetEqlStatusRequest req } /** - * Returns the current status for an async EQL search or a stored synchronous - * EQL search without returning results. + * Get the async EQL status. Get the current status for an async EQL search or a + * stored synchronous EQL search without returning results. * * @param fn * a function that initializes a builder to create the @@ -211,7 +211,9 @@ public final CompletableFuture getStatus( // ----- Endpoint: eql.search /** - * Returns results matching a query expressed in Event Query Language (EQL) + * Get EQL search results. Returns search results for an Event Query Language + * (EQL) query. EQL assumes each document in a data stream or index corresponds + * to an event. * * @see Documentation @@ -229,7 +231,9 @@ public CompletableFuture> search(EqlSearchReq } /** - * Returns results matching a query expressed in Event Query Language (EQL) + * Get EQL search results. Returns search results for an Event Query Language + * (EQL) query. EQL assumes each document in a data stream or index corresponds + * to an event. * * @param fn * a function that initializes a builder to create the @@ -245,7 +249,9 @@ public final CompletableFuture> search( } /** - * Returns results matching a query expressed in Event Query Language (EQL) + * Get EQL search results. Returns search results for an Event Query Language + * (EQL) query. EQL assumes each document in a data stream or index corresponds + * to an event. * * @see Documentation @@ -262,7 +268,9 @@ public CompletableFuture> search(EqlSearchReq } /** - * Returns results matching a query expressed in Event Query Language (EQL) + * Get EQL search results. Returns search results for an Event Query Language + * (EQL) query. EQL assumes each document in a data stream or index corresponds + * to an event. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlClient.java index a274fd527..4c6285064 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/ElasticsearchEqlClient.java @@ -70,8 +70,8 @@ public ElasticsearchEqlClient withTransportOptions(@Nullable TransportOptions tr // ----- Endpoint: eql.delete /** - * Deletes an async EQL search or a stored synchronous EQL search. The API also - * deletes results for the search. + * Delete an async EQL search. Delete an async EQL search or a stored + * synchronous EQL search. The API also deletes results for the search. * * @see Documentation @@ -86,8 +86,8 @@ public EqlDeleteResponse delete(EqlDeleteRequest request) throws IOException, El } /** - * Deletes an async EQL search or a stored synchronous EQL search. The API also - * deletes results for the search. + * Delete an async EQL search. Delete an async EQL search or a stored + * synchronous EQL search. The API also deletes results for the search. * * @param fn * a function that initializes a builder to create the @@ -105,8 +105,8 @@ public final EqlDeleteResponse delete(FunctionDocumentation @@ -124,8 +124,8 @@ public EqlGetResponse get(EqlGetRequest request, Class } /** - * Returns the current status and available results for an async EQL search or a - * stored synchronous EQL search. + * Get async EQL search results. Get the current status and available results + * for an async EQL search or a stored synchronous EQL search. * * @param fn * a function that initializes a builder to create the @@ -141,8 +141,8 @@ public final EqlGetResponse get(FunctionDocumentation @@ -160,8 +160,8 @@ public EqlGetResponse get(EqlGetRequest request, Type tEventTyp } /** - * Returns the current status and available results for an async EQL search or a - * stored synchronous EQL search. + * Get async EQL search results. Get the current status and available results + * for an async EQL search or a stored synchronous EQL search. * * @param fn * a function that initializes a builder to create the @@ -179,8 +179,8 @@ public final EqlGetResponse get(FunctionDocumentation @@ -195,8 +195,8 @@ public GetEqlStatusResponse getStatus(GetEqlStatusRequest request) throws IOExce } /** - * Returns the current status for an async EQL search or a stored synchronous - * EQL search without returning results. + * Get the async EQL status. Get the current status for an async EQL search or a + * stored synchronous EQL search without returning results. * * @param fn * a function that initializes a builder to create the @@ -215,7 +215,9 @@ public final GetEqlStatusResponse getStatus( // ----- Endpoint: eql.search /** - * Returns results matching a query expressed in Event Query Language (EQL) + * Get EQL search results. Returns search results for an Event Query Language + * (EQL) query. EQL assumes each document in a data stream or index corresponds + * to an event. * * @see Documentation @@ -233,7 +235,9 @@ public EqlSearchResponse search(EqlSearchRequest request, Class } /** - * Returns results matching a query expressed in Event Query Language (EQL) + * Get EQL search results. Returns search results for an Event Query Language + * (EQL) query. EQL assumes each document in a data stream or index corresponds + * to an event. * * @param fn * a function that initializes a builder to create the @@ -250,7 +254,9 @@ public final EqlSearchResponse search( } /** - * Returns results matching a query expressed in Event Query Language (EQL) + * Get EQL search results. Returns search results for an Event Query Language + * (EQL) query. EQL assumes each document in a data stream or index corresponds + * to an event. * * @see Documentation @@ -268,7 +274,9 @@ public EqlSearchResponse search(EqlSearchRequest request, Type } /** - * Returns results matching a query expressed in Event Query Language (EQL) + * Get EQL search results. Returns search results for an Event Query Language + * (EQL) query. EQL assumes each document in a data stream or index corresponds + * to an event. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlDeleteRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlDeleteRequest.java index 79d4e352a..3df6b40df 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlDeleteRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlDeleteRequest.java @@ -56,8 +56,8 @@ // typedef: eql.delete.Request /** - * Deletes an async EQL search or a stored synchronous EQL search. The API also - * deletes results for the search. + * Delete an async EQL search. Delete an async EQL search or a stored + * synchronous EQL search. The API also deletes results for the search. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlGetRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlGetRequest.java index dfb379ee1..7fe2693f8 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlGetRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/EqlGetRequest.java @@ -56,8 +56,8 @@ // typedef: eql.get.Request /** - * Returns the current status and available results for an async EQL search or a - * stored synchronous EQL search. + * Get async EQL search results. Get the current status and available results + * for an async EQL search or a stored synchronous EQL search. * * @see 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 84b491e2b..603e1074b 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 @@ -68,7 +68,9 @@ // typedef: eql.search.Request /** - * Returns results matching a query expressed in Event Query Language (EQL) + * Get EQL search results. Returns search results for an Event Query Language + * (EQL) query. EQL assumes each document in a data stream or index corresponds + * to an event. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/GetEqlStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/GetEqlStatusRequest.java index 2d6aeec92..aa3df1098 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/GetEqlStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/eql/GetEqlStatusRequest.java @@ -56,8 +56,8 @@ // typedef: eql.get_status.Request /** - * Returns the current status for an async EQL search or a stored synchronous - * EQL search without returning results. + * Get the async EQL status. Get the current status for an async EQL search or a + * stored synchronous EQL search without returning results. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlAsyncClient.java index 79fd20c34..2f7144e6f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlAsyncClient.java @@ -70,7 +70,8 @@ public ElasticsearchEsqlAsyncClient withTransportOptions(@Nullable TransportOpti // ----- Endpoint: esql.query /** - * Executes an ES|QL request + * Run an ES|QL query. Get search results for an ES|QL (Elasticsearch query + * language) query. * * @see Documentation @@ -85,7 +86,8 @@ public CompletableFuture query(QueryRequest request) { } /** - * Executes an ES|QL request + * Run an ES|QL query. Get search results for an ES|QL (Elasticsearch query + * language) query. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlClient.java index b77487c97..24b56e29e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlClient.java @@ -71,7 +71,8 @@ public ElasticsearchEsqlClient withTransportOptions(@Nullable TransportOptions t // ----- Endpoint: esql.query /** - * Executes an ES|QL request + * Run an ES|QL query. Get search results for an ES|QL (Elasticsearch query + * language) query. * * @see Documentation @@ -86,7 +87,8 @@ public BinaryResponse query(QueryRequest request) throws IOException, Elasticsea } /** - * Executes an ES|QL request + * Run an ES|QL query. Get search results for an ES|QL (Elasticsearch query + * language) query. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/QueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/QueryRequest.java index 70aa0079b..0d235bbc5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/QueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/QueryRequest.java @@ -66,7 +66,8 @@ // typedef: esql.query.Request /** - * Executes an ES|QL request + * Run an ES|QL query. Get search results for an ES|QL (Elasticsearch query + * language) query. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/ElasticsearchFleetAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/ElasticsearchFleetAsyncClient.java index 3dd41c32c..94e8a968d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/ElasticsearchFleetAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/ElasticsearchFleetAsyncClient.java @@ -70,9 +70,9 @@ public ElasticsearchFleetAsyncClient withTransportOptions(@Nullable TransportOpt // ----- Endpoint: fleet.search /** - * The purpose of the fleet search api is to provide a search api where the - * search will only be executed after provided checkpoint has been processed and - * is visible for searches inside of Elasticsearch. + * Run a Fleet search. The purpose of the Fleet search API is to provide an API + * where the search will be run only after the provided checkpoint has been + * processed and is visible for searches inside of Elasticsearch. * * @see Documentation on elastic.co */ @@ -88,9 +88,9 @@ public CompletableFuture> search(Flee } /** - * The purpose of the fleet search api is to provide a search api where the - * search will only be executed after provided checkpoint has been processed and - * is visible for searches inside of Elasticsearch. + * Run a Fleet search. The purpose of the Fleet search API is to provide an API + * where the search will be run only after the provided checkpoint has been + * processed and is visible for searches inside of Elasticsearch. * * @param fn * a function that initializes a builder to create the @@ -105,9 +105,9 @@ public final CompletableFuture> searc } /** - * The purpose of the fleet search api is to provide a search api where the - * search will only be executed after provided checkpoint has been processed and - * is visible for searches inside of Elasticsearch. + * Run a Fleet search. The purpose of the Fleet search API is to provide an API + * where the search will be run only after the provided checkpoint has been + * processed and is visible for searches inside of Elasticsearch. * * @see Documentation on elastic.co */ @@ -123,9 +123,9 @@ public CompletableFuture> search(Flee } /** - * The purpose of the fleet search api is to provide a search api where the - * search will only be executed after provided checkpoint has been processed and - * is visible for searches inside of Elasticsearch. + * Run a Fleet search. The purpose of the Fleet search API is to provide an API + * where the search will be run only after the provided checkpoint has been + * processed and is visible for searches inside of Elasticsearch. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/ElasticsearchFleetClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/ElasticsearchFleetClient.java index 6cc870710..30503174d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/ElasticsearchFleetClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/fleet/ElasticsearchFleetClient.java @@ -70,9 +70,9 @@ public ElasticsearchFleetClient withTransportOptions(@Nullable TransportOptions // ----- Endpoint: fleet.search /** - * The purpose of the fleet search api is to provide a search api where the - * search will only be executed after provided checkpoint has been processed and - * is visible for searches inside of Elasticsearch. + * Run a Fleet search. The purpose of the Fleet search API is to provide an API + * where the search will be run only after the provided checkpoint has been + * processed and is visible for searches inside of Elasticsearch. * * @see Documentation on elastic.co */ @@ -88,9 +88,9 @@ public FleetSearchResponse search(FleetSearchRequest requ } /** - * The purpose of the fleet search api is to provide a search api where the - * search will only be executed after provided checkpoint has been processed and - * is visible for searches inside of Elasticsearch. + * Run a Fleet search. The purpose of the Fleet search API is to provide an API + * where the search will be run only after the provided checkpoint has been + * processed and is visible for searches inside of Elasticsearch. * * @param fn * a function that initializes a builder to create the @@ -105,9 +105,9 @@ public final FleetSearchResponse search( } /** - * The purpose of the fleet search api is to provide a search api where the - * search will only be executed after provided checkpoint has been processed and - * is visible for searches inside of Elasticsearch. + * Run a Fleet search. The purpose of the Fleet search API is to provide an API + * where the search will be run only after the provided checkpoint has been + * processed and is visible for searches inside of Elasticsearch. * * @see Documentation on elastic.co */ @@ -123,9 +123,9 @@ public FleetSearchResponse search(FleetSearchRequest requ } /** - * The purpose of the fleet search api is to provide a search api where the - * search will only be executed after provided checkpoint has been processed and - * is visible for searches inside of Elasticsearch. + * Run a Fleet search. The purpose of the Fleet search API is to provide an API + * where the search will be run only after the provided checkpoint has been + * processed and is visible for searches inside of Elasticsearch. * * @param fn * a function that initializes a builder to create the 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 7922bedde..1fd937219 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 @@ -84,9 +84,9 @@ // typedef: fleet.search.Request /** - * The purpose of the fleet search api is to provide a search api where the - * search will only be executed after provided checkpoint has been processed and - * is visible for searches inside of Elasticsearch. + * Run a Fleet search. The purpose of the Fleet search API is to provide an API + * where the search will be run only after the provided checkpoint has been + * processed and is visible for searches inside of Elasticsearch. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphAsyncClient.java index 1bf89d303..46ddcc73a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphAsyncClient.java @@ -68,8 +68,14 @@ public ElasticsearchGraphAsyncClient withTransportOptions(@Nullable TransportOpt // ----- Endpoint: graph.explore /** - * Extracts and summarizes information about the documents and terms in an - * Elasticsearch data stream or index. + * Explore graph analytics. Extract and summarize information about the + * documents and terms in an Elasticsearch data stream or index. The easiest way + * to understand the behavior of this API is to use the Graph UI to explore + * connections. An initial request to the _explore API contains a + * seed query that identifies the documents of interest and specifies the fields + * that define the vertices and connections you want to include in the graph. + * Subsequent requests enable you to spider out from one more vertices of + * interest. You can exclude vertices that have already been returned. * * @see Documentation @@ -84,8 +90,14 @@ public CompletableFuture explore(ExploreRequest request) { } /** - * Extracts and summarizes information about the documents and terms in an - * Elasticsearch data stream or index. + * Explore graph analytics. Extract and summarize information about the + * documents and terms in an Elasticsearch data stream or index. The easiest way + * to understand the behavior of this API is to use the Graph UI to explore + * connections. An initial request to the _explore API contains a + * seed query that identifies the documents of interest and specifies the fields + * that define the vertices and connections you want to include in the graph. + * Subsequent requests enable you to spider out from one more vertices of + * interest. You can exclude vertices that have already been returned. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphClient.java index 658be9a19..47056e9bc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphClient.java @@ -68,8 +68,14 @@ public ElasticsearchGraphClient withTransportOptions(@Nullable TransportOptions // ----- Endpoint: graph.explore /** - * Extracts and summarizes information about the documents and terms in an - * Elasticsearch data stream or index. + * Explore graph analytics. Extract and summarize information about the + * documents and terms in an Elasticsearch data stream or index. The easiest way + * to understand the behavior of this API is to use the Graph UI to explore + * connections. An initial request to the _explore API contains a + * seed query that identifies the documents of interest and specifies the fields + * that define the vertices and connections you want to include in the graph. + * Subsequent requests enable you to spider out from one more vertices of + * interest. You can exclude vertices that have already been returned. * * @see Documentation @@ -84,8 +90,14 @@ public ExploreResponse explore(ExploreRequest request) throws IOException, Elast } /** - * Extracts and summarizes information about the documents and terms in an - * Elasticsearch data stream or index. + * Explore graph analytics. Extract and summarize information about the + * documents and terms in an Elasticsearch data stream or index. The easiest way + * to understand the behavior of this API is to use the Graph UI to explore + * connections. An initial request to the _explore API contains a + * seed query that identifies the documents of interest and specifies the fields + * that define the vertices and connections you want to include in the graph. + * Subsequent requests enable you to spider out from one more vertices of + * interest. You can exclude vertices that have already been returned. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ExploreRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ExploreRequest.java index 601f88927..70a34690e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ExploreRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ExploreRequest.java @@ -61,8 +61,14 @@ // typedef: graph.explore.Request /** - * Extracts and summarizes information about the documents and terms in an - * Elasticsearch data stream or index. + * Explore graph analytics. Extract and summarize information about the + * documents and terms in an Elasticsearch data stream or index. The easiest way + * to understand the behavior of this API is to use the Graph UI to explore + * connections. An initial request to the _explore API contains a + * seed query that identifies the documents of interest and specifies the fields + * that define the vertices and connections you want to include in the graph. + * Subsequent requests enable you to spider out from one more vertices of + * interest. You can exclude vertices that have already been returned. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java index 6017306b2..b651cf821 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java @@ -735,7 +735,7 @@ public final CompletableFuture existsAlias( // ----- Endpoint: indices.exists_index_template /** - * Returns information about whether a particular index template exists. + * Check index templates. Check whether index templates exist. * * @see Documentation @@ -750,7 +750,7 @@ public CompletableFuture existsIndexTemplate(ExistsIndexTemplat } /** - * Returns information about whether a particular index template exists. + * Check index templates. Check whether index templates exist. * * @param fn * a function that initializes a builder to create the @@ -1916,8 +1916,9 @@ public final CompletableFuture resolveCluster( // ----- Endpoint: indices.resolve_index /** - * Resolves the specified name(s) and/or index patterns for indices, aliases, - * and data streams. Multiple patterns and remote clusters are supported. + * Resolve indices. Resolve the names and/or index patterns for indices, + * aliases, and data streams. Multiple patterns and remote clusters are + * supported. * * @see Documentation @@ -1932,8 +1933,9 @@ public CompletableFuture resolveIndex(ResolveIndexRequest } /** - * Resolves the specified name(s) and/or index patterns for indices, aliases, - * and data streams. Multiple patterns and remote clusters are supported. + * Resolve indices. Resolve the names and/or index patterns for indices, + * aliases, and data streams. Multiple patterns and remote clusters are + * supported. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java index 60e3b5bd8..c4887ea43 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java @@ -746,7 +746,7 @@ public final BooleanResponse existsAlias(FunctionDocumentation @@ -762,7 +762,7 @@ public BooleanResponse existsIndexTemplate(ExistsIndexTemplateRequest request) } /** - * Returns information about whether a particular index template exists. + * Check index templates. Check whether index templates exist. * * @param fn * a function that initializes a builder to create the @@ -1962,8 +1962,9 @@ public final ResolveClusterResponse resolveCluster( // ----- Endpoint: indices.resolve_index /** - * Resolves the specified name(s) and/or index patterns for indices, aliases, - * and data streams. Multiple patterns and remote clusters are supported. + * Resolve indices. Resolve the names and/or index patterns for indices, + * aliases, and data streams. Multiple patterns and remote clusters are + * supported. * * @see Documentation @@ -1978,8 +1979,9 @@ public ResolveIndexResponse resolveIndex(ResolveIndexRequest request) throws IOE } /** - * Resolves the specified name(s) and/or index patterns for indices, aliases, - * and data streams. Multiple patterns and remote clusters are supported. + * Resolve indices. Resolve the names and/or index patterns for indices, + * aliases, and data streams. Multiple patterns and remote clusters are + * supported. * * @param fn * a function that initializes a builder to create the 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 83f03e238..afa873138 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 @@ -22,6 +22,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.ExpandWildcard; 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; @@ -78,6 +79,9 @@ public class ExistsAliasRequest extends RequestBase { private final List index; + @Nullable + private final Time masterTimeout; + private final List name; // --------------------------------------------------------------------------------------------- @@ -88,6 +92,7 @@ private ExistsAliasRequest(Builder builder) { this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.ignoreUnavailable = builder.ignoreUnavailable; this.index = ApiTypeHelper.unmodifiable(builder.index); + this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.unmodifiableRequired(builder.name, this, "name"); } @@ -145,6 +150,17 @@ public final List index() { return this.index; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Required - Comma-separated list of aliases to check. Supports wildcards * (*). @@ -176,6 +192,9 @@ public static class Builder extends RequestBase.AbstractBuilder @Nullable private List index; + @Nullable + private Time masterTimeout; + private List name; /** @@ -264,6 +283,27 @@ public final Builder index(String value, String... values) { return this; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Required - Comma-separated list of aliases to check. Supports wildcards * (*). @@ -378,6 +418,9 @@ public ExistsAliasRequest build() { // Request parameters request -> { Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } if (ApiTypeHelper.isDefined(request.expandWildcards)) { params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsIndexTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsIndexTemplateRequest.java index f204a6986..41bc9454b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsIndexTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ExistsIndexTemplateRequest.java @@ -58,7 +58,7 @@ // typedef: indices.exists_index_template.Request /** - * Returns information about whether a particular index template exists. + * Check index templates. Check whether index templates exist. * * @see API 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 d0337c73d..4e1d9c815 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 @@ -22,6 +22,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.ExpandWildcard; 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; @@ -77,6 +78,9 @@ public class GetAliasRequest extends RequestBase { private final List index; + @Nullable + private final Time masterTimeout; + private final List name; // --------------------------------------------------------------------------------------------- @@ -87,6 +91,7 @@ private GetAliasRequest(Builder builder) { this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.ignoreUnavailable = builder.ignoreUnavailable; this.index = ApiTypeHelper.unmodifiable(builder.index); + this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.unmodifiable(builder.name); } @@ -144,6 +149,17 @@ public final List index() { return this.index; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + @Nullable + public final Time masterTimeout() { + return this.masterTimeout; + } + /** * Comma-separated list of aliases to retrieve. Supports wildcards * (*). To retrieve all aliases, omit this parameter or use @@ -174,6 +190,9 @@ public static class Builder extends RequestBase.AbstractBuilder impleme @Nullable private List index; + @Nullable + private Time masterTimeout; + @Nullable private List name; @@ -263,6 +282,27 @@ public final Builder index(String value, String... values) { return this; } + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(@Nullable Time value) { + this.masterTimeout = value; + return this; + } + + /** + * Period to wait for a connection to the master node. If no response is + * received before the timeout expires, the request fails and returns an error. + *

+ * API name: {@code master_timeout} + */ + public final Builder masterTimeout(Function> fn) { + return this.masterTimeout(fn.apply(new Time.Builder()).build()); + } + /** * Comma-separated list of aliases to retrieve. Supports wildcards * (*). To retrieve all aliases, omit this parameter or use @@ -398,6 +438,9 @@ public GetAliasRequest build() { // Request parameters request -> { Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout._toJsonString()); + } if (ApiTypeHelper.isDefined(request.expandWildcards)) { params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MappingLimitSettingsTotalFields.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MappingLimitSettingsTotalFields.java index ace492270..3dfe8f1a4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MappingLimitSettingsTotalFields.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/MappingLimitSettingsTotalFields.java @@ -30,7 +30,7 @@ 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; @@ -61,7 +61,7 @@ @JsonpDeserializable public class MappingLimitSettingsTotalFields implements JsonpSerializable { @Nullable - private final Long limit; + private final String limit; @Nullable private final Boolean ignoreDynamicBeyondLimit; @@ -90,7 +90,7 @@ public static MappingLimitSettingsTotalFields of( * API name: {@code limit} */ @Nullable - public final Long limit() { + public final String limit() { return this.limit; } @@ -149,7 +149,7 @@ public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { @Nullable - private Long limit; + private String limit; @Nullable private Boolean ignoreDynamicBeyondLimit; @@ -163,7 +163,7 @@ public static class Builder extends WithJsonObjectBuilderBase *

* API name: {@code limit} */ - public final Builder limit(@Nullable Long value) { + public final Builder limit(@Nullable String value) { this.limit = value; return this; } @@ -213,7 +213,7 @@ public MappingLimitSettingsTotalFields build() { protected static void setupMappingLimitSettingsTotalFieldsDeserializer( ObjectDeserializer op) { - op.add(Builder::limit, JsonpDeserializer.longDeserializer(), "limit"); + op.add(Builder::limit, JsonpDeserializer.stringDeserializer(), "limit"); op.add(Builder::ignoreDynamicBeyondLimit, JsonpDeserializer.booleanDeserializer(), "ignore_dynamic_beyond_limit"); 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 1e6af297b..ec21ee58a 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 @@ -59,8 +59,9 @@ // typedef: indices.resolve_index.Request /** - * Resolves the specified name(s) and/or index patterns for indices, aliases, - * and data streams. Multiple patterns and remote clusters are supported. + * Resolve indices. Resolve the names and/or index patterns for indices, + * aliases, and data streams. Multiple patterns and remote clusters are + * supported. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/DeleteGeoipDatabaseRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/DeleteGeoipDatabaseRequest.java index b89273361..331f47acb 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/DeleteGeoipDatabaseRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/DeleteGeoipDatabaseRequest.java @@ -58,7 +58,8 @@ // typedef: ingest.delete_geoip_database.Request /** - * Deletes a geoip database configuration. + * Delete GeoIP database configurations. Delete one or more IP geolocation + * database configurations. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/DeletePipelineRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/DeletePipelineRequest.java index 651038e09..27cffbb33 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/DeletePipelineRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/DeletePipelineRequest.java @@ -56,7 +56,7 @@ // typedef: ingest.delete_pipeline.Request /** - * Deletes one or more existing ingest pipeline. + * Delete pipelines. Delete one or more ingest pipelines. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestAsyncClient.java index 71c5ab695..f412dfe03 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestAsyncClient.java @@ -68,7 +68,8 @@ public ElasticsearchIngestAsyncClient withTransportOptions(@Nullable TransportOp // ----- Endpoint: ingest.delete_geoip_database /** - * Deletes a geoip database configuration. + * Delete GeoIP database configurations. Delete one or more IP geolocation + * database configurations. * * @see Documentation @@ -83,7 +84,8 @@ public CompletableFuture deleteGeoipDatabase(Delete } /** - * Deletes a geoip database configuration. + * Delete GeoIP database configurations. Delete one or more IP geolocation + * database configurations. * * @param fn * a function that initializes a builder to create the @@ -101,7 +103,7 @@ public final CompletableFuture deleteGeoipDatabase( // ----- Endpoint: ingest.delete_pipeline /** - * Deletes one or more existing ingest pipeline. + * Delete pipelines. Delete one or more ingest pipelines. * * @see Documentation @@ -116,7 +118,7 @@ public CompletableFuture deletePipeline(DeletePipelineRe } /** - * Deletes one or more existing ingest pipeline. + * Delete pipelines. Delete one or more ingest pipelines. * * @param fn * a function that initializes a builder to create the @@ -134,7 +136,8 @@ public final CompletableFuture deletePipeline( // ----- Endpoint: ingest.geo_ip_stats /** - * Gets download statistics for GeoIP2 databases used with the geoip processor. + * Get GeoIP statistics. Get download statistics for GeoIP2 databases that are + * used with the GeoIP processor. * * @see Documentation @@ -148,7 +151,8 @@ public CompletableFuture geoIpStats() { // ----- Endpoint: ingest.get_geoip_database /** - * Returns information about one or more geoip database configurations. + * Get GeoIP database configurations. Get information about one or more IP + * geolocation database configurations. * * @see Documentation @@ -163,7 +167,8 @@ public CompletableFuture getGeoipDatabase(GetGeoipData } /** - * Returns information about one or more geoip database configurations. + * Get GeoIP database configurations. Get information about one or more IP + * geolocation database configurations. * * @param fn * a function that initializes a builder to create the @@ -179,7 +184,8 @@ public final CompletableFuture getGeoipDatabase( } /** - * Returns information about one or more geoip database configurations. + * Get GeoIP database configurations. Get information about one or more IP + * geolocation database configurations. * * @see Documentation @@ -194,8 +200,8 @@ public CompletableFuture getGeoipDatabase() { // ----- Endpoint: ingest.get_pipeline /** - * Returns information about one or more ingest pipelines. This API returns a - * local reference of the pipeline. + * Get pipelines. Get information about one or more ingest pipelines. This API + * returns a local reference of the pipeline. * * @see Documentation @@ -210,8 +216,8 @@ public CompletableFuture getPipeline(GetPipelineRequest req } /** - * Returns information about one or more ingest pipelines. This API returns a - * local reference of the pipeline. + * Get pipelines. Get information about one or more ingest pipelines. This API + * returns a local reference of the pipeline. * * @param fn * a function that initializes a builder to create the @@ -227,8 +233,8 @@ public final CompletableFuture getPipeline( } /** - * Returns information about one or more ingest pipelines. This API returns a - * local reference of the pipeline. + * Get pipelines. Get information about one or more ingest pipelines. This API + * returns a local reference of the pipeline. * * @see Documentation @@ -243,10 +249,11 @@ public CompletableFuture getPipeline() { // ----- Endpoint: ingest.processor_grok /** - * Extracts structured fields out of a single text field within a document. You - * choose which field to extract matched fields from, as well as the grok - * pattern you expect will match. A grok pattern is like a regular expression - * that supports aliased expressions that can be reused. + * Run a grok processor. Extract structured fields out of a single text field + * within a document. You must choose which field to extract matched fields + * from, as well as the grok pattern you expect will match. A grok pattern is + * like a regular expression that supports aliased expressions that can be + * reused. * * @see Documentation @@ -260,7 +267,8 @@ public CompletableFuture processorGrok() { // ----- Endpoint: ingest.put_geoip_database /** - * Returns information about one or more geoip database configurations. + * Create or update GeoIP database configurations. Create or update IP + * geolocation database configurations. * * @see Documentation @@ -275,7 +283,8 @@ public CompletableFuture putGeoipDatabase(PutGeoipData } /** - * Returns information about one or more geoip database configurations. + * Create or update GeoIP database configurations. Create or update IP + * geolocation database configurations. * * @param fn * a function that initializes a builder to create the @@ -293,8 +302,8 @@ public final CompletableFuture putGeoipDatabase( // ----- Endpoint: ingest.put_pipeline /** - * Creates or updates an ingest pipeline. Changes made using this API take - * effect immediately. + * Create or update a pipeline. Changes made using this API take effect + * immediately. * * @see Documentation @@ -309,8 +318,8 @@ public CompletableFuture putPipeline(PutPipelineRequest req } /** - * Creates or updates an ingest pipeline. Changes made using this API take - * effect immediately. + * Create or update a pipeline. Changes made using this API take effect + * immediately. * * @param fn * a function that initializes a builder to create the @@ -328,7 +337,10 @@ public final CompletableFuture putPipeline( // ----- Endpoint: ingest.simulate /** - * Executes an ingest pipeline against a set of provided documents. + * Simulate a pipeline. Run an ingest pipeline against a set of provided + * documents. You can either specify an existing pipeline to use with the + * provided documents or supply a pipeline definition in the body of the + * request. * * @see Documentation @@ -343,7 +355,10 @@ public CompletableFuture simulate(SimulateRequest request) { } /** - * Executes an ingest pipeline against a set of provided documents. + * Simulate a pipeline. Run an ingest pipeline against a set of provided + * documents. You can either specify an existing pipeline to use with the + * provided documents or supply a pipeline definition in the body of the + * request. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestClient.java index 442a89ea9..4f3f2c160 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ElasticsearchIngestClient.java @@ -68,7 +68,8 @@ public ElasticsearchIngestClient withTransportOptions(@Nullable TransportOptions // ----- Endpoint: ingest.delete_geoip_database /** - * Deletes a geoip database configuration. + * Delete GeoIP database configurations. Delete one or more IP geolocation + * database configurations. * * @see Documentation @@ -84,7 +85,8 @@ public DeleteGeoipDatabaseResponse deleteGeoipDatabase(DeleteGeoipDatabaseReques } /** - * Deletes a geoip database configuration. + * Delete GeoIP database configurations. Delete one or more IP geolocation + * database configurations. * * @param fn * a function that initializes a builder to create the @@ -103,7 +105,7 @@ public final DeleteGeoipDatabaseResponse deleteGeoipDatabase( // ----- Endpoint: ingest.delete_pipeline /** - * Deletes one or more existing ingest pipeline. + * Delete pipelines. Delete one or more ingest pipelines. * * @see Documentation @@ -119,7 +121,7 @@ public DeletePipelineResponse deletePipeline(DeletePipelineRequest request) } /** - * Deletes one or more existing ingest pipeline. + * Delete pipelines. Delete one or more ingest pipelines. * * @param fn * a function that initializes a builder to create the @@ -138,7 +140,8 @@ public final DeletePipelineResponse deletePipeline( // ----- Endpoint: ingest.geo_ip_stats /** - * Gets download statistics for GeoIP2 databases used with the geoip processor. + * Get GeoIP statistics. Get download statistics for GeoIP2 databases that are + * used with the GeoIP processor. * * @see Documentation @@ -152,7 +155,8 @@ public GeoIpStatsResponse geoIpStats() throws IOException, ElasticsearchExceptio // ----- Endpoint: ingest.get_geoip_database /** - * Returns information about one or more geoip database configurations. + * Get GeoIP database configurations. Get information about one or more IP + * geolocation database configurations. * * @see Documentation @@ -168,7 +172,8 @@ public GetGeoipDatabaseResponse getGeoipDatabase(GetGeoipDatabaseRequest request } /** - * Returns information about one or more geoip database configurations. + * Get GeoIP database configurations. Get information about one or more IP + * geolocation database configurations. * * @param fn * a function that initializes a builder to create the @@ -185,7 +190,8 @@ public final GetGeoipDatabaseResponse getGeoipDatabase( } /** - * Returns information about one or more geoip database configurations. + * Get GeoIP database configurations. Get information about one or more IP + * geolocation database configurations. * * @see Documentation @@ -200,8 +206,8 @@ public GetGeoipDatabaseResponse getGeoipDatabase() throws IOException, Elasticse // ----- Endpoint: ingest.get_pipeline /** - * Returns information about one or more ingest pipelines. This API returns a - * local reference of the pipeline. + * Get pipelines. Get information about one or more ingest pipelines. This API + * returns a local reference of the pipeline. * * @see Documentation @@ -216,8 +222,8 @@ public GetPipelineResponse getPipeline(GetPipelineRequest request) throws IOExce } /** - * Returns information about one or more ingest pipelines. This API returns a - * local reference of the pipeline. + * Get pipelines. Get information about one or more ingest pipelines. This API + * returns a local reference of the pipeline. * * @param fn * a function that initializes a builder to create the @@ -234,8 +240,8 @@ public final GetPipelineResponse getPipeline( } /** - * Returns information about one or more ingest pipelines. This API returns a - * local reference of the pipeline. + * Get pipelines. Get information about one or more ingest pipelines. This API + * returns a local reference of the pipeline. * * @see Documentation @@ -250,10 +256,11 @@ public GetPipelineResponse getPipeline() throws IOException, ElasticsearchExcept // ----- Endpoint: ingest.processor_grok /** - * Extracts structured fields out of a single text field within a document. You - * choose which field to extract matched fields from, as well as the grok - * pattern you expect will match. A grok pattern is like a regular expression - * that supports aliased expressions that can be reused. + * Run a grok processor. Extract structured fields out of a single text field + * within a document. You must choose which field to extract matched fields + * from, as well as the grok pattern you expect will match. A grok pattern is + * like a regular expression that supports aliased expressions that can be + * reused. * * @see Documentation @@ -267,7 +274,8 @@ public ProcessorGrokResponse processorGrok() throws IOException, ElasticsearchEx // ----- Endpoint: ingest.put_geoip_database /** - * Returns information about one or more geoip database configurations. + * Create or update GeoIP database configurations. Create or update IP + * geolocation database configurations. * * @see Documentation @@ -283,7 +291,8 @@ public PutGeoipDatabaseResponse putGeoipDatabase(PutGeoipDatabaseRequest request } /** - * Returns information about one or more geoip database configurations. + * Create or update GeoIP database configurations. Create or update IP + * geolocation database configurations. * * @param fn * a function that initializes a builder to create the @@ -302,8 +311,8 @@ public final PutGeoipDatabaseResponse putGeoipDatabase( // ----- Endpoint: ingest.put_pipeline /** - * Creates or updates an ingest pipeline. Changes made using this API take - * effect immediately. + * Create or update a pipeline. Changes made using this API take effect + * immediately. * * @see Documentation @@ -318,8 +327,8 @@ public PutPipelineResponse putPipeline(PutPipelineRequest request) throws IOExce } /** - * Creates or updates an ingest pipeline. Changes made using this API take - * effect immediately. + * Create or update a pipeline. Changes made using this API take effect + * immediately. * * @param fn * a function that initializes a builder to create the @@ -338,7 +347,10 @@ public final PutPipelineResponse putPipeline( // ----- Endpoint: ingest.simulate /** - * Executes an ingest pipeline against a set of provided documents. + * Simulate a pipeline. Run an ingest pipeline against a set of provided + * documents. You can either specify an existing pipeline to use with the + * provided documents or supply a pipeline definition in the body of the + * request. * * @see Documentation @@ -353,7 +365,10 @@ public SimulateResponse simulate(SimulateRequest request) throws IOException, El } /** - * Executes an ingest pipeline against a set of provided documents. + * Simulate a pipeline. Run an ingest pipeline against a set of provided + * documents. You can either specify an existing pipeline to use with the + * provided documents or supply a pipeline definition in the body of the + * request. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoIpStatsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoIpStatsRequest.java index 7c7ae6425..b7048547f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoIpStatsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GeoIpStatsRequest.java @@ -50,7 +50,8 @@ // typedef: ingest.geo_ip_stats.Request /** - * Gets download statistics for GeoIP2 databases used with the geoip processor. + * Get GeoIP statistics. Get download statistics for GeoIP2 databases that are + * used with the GeoIP processor. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GetGeoipDatabaseRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GetGeoipDatabaseRequest.java index d25608a2e..cfc6b0418 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GetGeoipDatabaseRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GetGeoipDatabaseRequest.java @@ -58,7 +58,8 @@ // typedef: ingest.get_geoip_database.Request /** - * Returns information about one or more geoip database configurations. + * Get GeoIP database configurations. Get information about one or more IP + * geolocation database configurations. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GetPipelineRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GetPipelineRequest.java index 244fdd148..534729398 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GetPipelineRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/GetPipelineRequest.java @@ -56,8 +56,8 @@ // typedef: ingest.get_pipeline.Request /** - * Returns information about one or more ingest pipelines. This API returns a - * local reference of the pipeline. + * Get pipelines. Get information about one or more ingest pipelines. This API + * returns a local reference of the pipeline. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorGrokRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorGrokRequest.java index 49a6a6246..2398ff96e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorGrokRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/ProcessorGrokRequest.java @@ -50,10 +50,11 @@ // typedef: ingest.processor_grok.Request /** - * Extracts structured fields out of a single text field within a document. You - * choose which field to extract matched fields from, as well as the grok - * pattern you expect will match. A grok pattern is like a regular expression - * that supports aliased expressions that can be reused. + * Run a grok processor. Extract structured fields out of a single text field + * within a document. You must choose which field to extract matched fields + * from, as well as the grok pattern you expect will match. A grok pattern is + * like a regular expression that supports aliased expressions that can be + * reused. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/PutGeoipDatabaseRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/PutGeoipDatabaseRequest.java index 3ba5584b5..30855196d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/PutGeoipDatabaseRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/PutGeoipDatabaseRequest.java @@ -58,7 +58,8 @@ // typedef: ingest.put_geoip_database.Request /** - * Returns information about one or more geoip database configurations. + * Create or update GeoIP database configurations. Create or update IP + * geolocation database configurations. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/PutPipelineRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/PutPipelineRequest.java index fc71a6ce2..439bd5f2e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/PutPipelineRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/PutPipelineRequest.java @@ -62,8 +62,8 @@ // typedef: ingest.put_pipeline.Request /** - * Creates or updates an ingest pipeline. Changes made using this API take - * effect immediately. + * Create or update a pipeline. Changes made using this API take effect + * immediately. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateRequest.java index e38ed19e9..4c703f530 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/SimulateRequest.java @@ -60,7 +60,10 @@ // typedef: ingest.simulate.Request /** - * Executes an ingest pipeline against a set of provided documents. + * Simulate a pipeline. Run an ingest pipeline against a set of provided + * documents. You can either specify an existing pipeline to use with the + * provided documents or supply a pipeline definition in the body of the + * request. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/deprecations/Deprecation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/deprecations/Deprecation.java index 5e7cb2144..7a4caa705 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/deprecations/Deprecation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/migration/deprecations/Deprecation.java @@ -19,6 +19,7 @@ package co.elastic.clients.elasticsearch.migration.deprecations; +import co.elastic.clients.json.JsonData; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -30,7 +31,9 @@ import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; import java.lang.String; +import java.util.Map; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -60,6 +63,7 @@ */ @JsonpDeserializable public class Deprecation implements JsonpSerializable { + @Nullable private final String details; private final DeprecationLevel level; @@ -68,14 +72,21 @@ public class Deprecation implements JsonpSerializable { private final String url; + private final boolean resolveDuringRollingUpgrade; + + private final Map meta; + // --------------------------------------------------------------------------------------------- private Deprecation(Builder builder) { - this.details = ApiTypeHelper.requireNonNull(builder.details, this, "details"); + this.details = builder.details; this.level = ApiTypeHelper.requireNonNull(builder.level, this, "level"); this.message = ApiTypeHelper.requireNonNull(builder.message, this, "message"); this.url = ApiTypeHelper.requireNonNull(builder.url, this, "url"); + this.resolveDuringRollingUpgrade = ApiTypeHelper.requireNonNull(builder.resolveDuringRollingUpgrade, this, + "resolveDuringRollingUpgrade"); + this.meta = ApiTypeHelper.unmodifiable(builder.meta); } @@ -84,8 +95,9 @@ public static Deprecation of(Function> fn) { } /** - * Required - API name: {@code details} + * API name: {@code details} */ + @Nullable public final String details() { return this.details; } @@ -113,6 +125,20 @@ public final String url() { return this.url; } + /** + * Required - API name: {@code resolve_during_rolling_upgrade} + */ + public final boolean resolveDuringRollingUpgrade() { + return this.resolveDuringRollingUpgrade; + } + + /** + * API name: {@code _meta} + */ + public final Map meta() { + return this.meta; + } + /** * Serialize this object to JSON. */ @@ -124,9 +150,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("details"); - generator.write(this.details); + if (this.details != null) { + generator.writeKey("details"); + generator.write(this.details); + } generator.writeKey("level"); this.level.serialize(generator, mapper); generator.writeKey("message"); @@ -135,6 +163,21 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("url"); generator.write(this.url); + generator.writeKey("resolve_during_rolling_upgrade"); + generator.write(this.resolveDuringRollingUpgrade); + + if (ApiTypeHelper.isDefined(this.meta)) { + generator.writeKey("_meta"); + generator.writeStartObject(); + for (Map.Entry item0 : this.meta.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } + } @Override @@ -149,6 +192,7 @@ public String toString() { */ public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable private String details; private DeprecationLevel level; @@ -157,10 +201,15 @@ public static class Builder extends WithJsonObjectBuilderBase implement private String url; + private Boolean resolveDuringRollingUpgrade; + + @Nullable + private Map meta; + /** - * Required - API name: {@code details} + * API name: {@code details} */ - public final Builder details(String value) { + public final Builder details(@Nullable String value) { this.details = value; return this; } @@ -191,6 +240,34 @@ public final Builder url(String value) { return this; } + /** + * Required - API name: {@code resolve_during_rolling_upgrade} + */ + public final Builder resolveDuringRollingUpgrade(boolean value) { + this.resolveDuringRollingUpgrade = value; + return this; + } + + /** + * API name: {@code _meta} + *

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

+ * Adds an entry to meta. + */ + public final Builder meta(String key, JsonData value) { + this.meta = _mapPut(this.meta, key, value); + return this; + } + @Override protected Builder self() { return this; @@ -223,6 +300,9 @@ protected static void setupDeprecationDeserializer(ObjectDeserializerAPI * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/DeleteRulesetRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/DeleteRulesetRequest.java index ecba8d4e0..e94b5fc9f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/DeleteRulesetRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/DeleteRulesetRequest.java @@ -56,7 +56,7 @@ // typedef: query_rules.delete_ruleset.Request /** - * Deletes a query ruleset. + * Delete a query ruleset. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesAsyncClient.java index 7c322da2b..8035356b4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesAsyncClient.java @@ -70,7 +70,7 @@ public ElasticsearchQueryRulesAsyncClient withTransportOptions(@Nullable Transpo // ----- Endpoint: query_rules.delete_rule /** - * Deletes a query rule within a query ruleset. + * Delete a query rule. Delete a query rule within a query ruleset. * * @see Documentation @@ -85,7 +85,7 @@ public CompletableFuture deleteRule(DeleteRuleRequest reques } /** - * Deletes a query rule within a query ruleset. + * Delete a query rule. Delete a query rule within a query ruleset. * * @param fn * a function that initializes a builder to create the @@ -103,7 +103,7 @@ public final CompletableFuture deleteRule( // ----- Endpoint: query_rules.delete_ruleset /** - * Deletes a query ruleset. + * Delete a query ruleset. * * @see Documentation @@ -118,7 +118,7 @@ public CompletableFuture deleteRuleset(DeleteRulesetReque } /** - * Deletes a query ruleset. + * Delete a query ruleset. * * @param fn * a function that initializes a builder to create the @@ -136,7 +136,7 @@ public final CompletableFuture deleteRuleset( // ----- Endpoint: query_rules.get_rule /** - * Returns the details about a query rule within a query ruleset + * Get a query rule. Get details about a query rule within a query ruleset. * * @see Documentation @@ -151,7 +151,7 @@ public CompletableFuture getRule(GetRuleRequest request) { } /** - * Returns the details about a query rule within a query ruleset + * Get a query rule. Get details about a query rule within a query ruleset. * * @param fn * a function that initializes a builder to create the @@ -169,7 +169,7 @@ public final CompletableFuture getRule( // ----- Endpoint: query_rules.get_ruleset /** - * Returns the details about a query ruleset + * Get a query ruleset. Get details about a query ruleset. * * @see Documentation @@ -184,7 +184,7 @@ public CompletableFuture getRuleset(GetRulesetRequest reques } /** - * Returns the details about a query ruleset + * Get a query ruleset. Get details about a query ruleset. * * @param fn * a function that initializes a builder to create the @@ -202,7 +202,7 @@ public final CompletableFuture getRuleset( // ----- Endpoint: query_rules.list_rulesets /** - * Returns summarized information about existing query rulesets. + * Get all query rulesets. Get summarized information about the query rulesets. * * @see Documentation @@ -217,7 +217,7 @@ public CompletableFuture listRulesets(ListRulesetsRequest } /** - * Returns summarized information about existing query rulesets. + * Get all query rulesets. Get summarized information about the query rulesets. * * @param fn * a function that initializes a builder to create the @@ -233,7 +233,7 @@ public final CompletableFuture listRulesets( } /** - * Returns summarized information about existing query rulesets. + * Get all query rulesets. Get summarized information about the query rulesets. * * @see Documentation @@ -248,7 +248,8 @@ public CompletableFuture listRulesets() { // ----- Endpoint: query_rules.put_rule /** - * Creates or updates a query rule within a query ruleset. + * Create or update a query rule. Create or update a query rule within a query + * ruleset. * * @see Documentation @@ -263,7 +264,8 @@ public CompletableFuture putRule(PutRuleRequest request) { } /** - * Creates or updates a query rule within a query ruleset. + * Create or update a query rule. Create or update a query rule within a query + * ruleset. * * @param fn * a function that initializes a builder to create the @@ -281,7 +283,7 @@ public final CompletableFuture putRule( // ----- Endpoint: query_rules.put_ruleset /** - * Creates or updates a query ruleset. + * Create or update a query ruleset. * * @see Documentation @@ -296,7 +298,7 @@ public CompletableFuture putRuleset(PutRulesetRequest reques } /** - * Creates or updates a query ruleset. + * Create or update a query ruleset. * * @param fn * a function that initializes a builder to create the @@ -314,7 +316,8 @@ public final CompletableFuture putRuleset( // ----- Endpoint: query_rules.test /** - * Creates or updates a query ruleset. + * Test a query ruleset. Evaluate match criteria against a query ruleset to + * identify the rules that would match that criteria. * * @see Documentation @@ -329,7 +332,8 @@ public CompletableFuture test(TestRequest request) { } /** - * Creates or updates a query ruleset. + * Test a query ruleset. Evaluate match criteria against a query ruleset to + * identify the rules that would match that criteria. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesClient.java index 53367ecde..701bf9515 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ElasticsearchQueryRulesClient.java @@ -69,7 +69,7 @@ public ElasticsearchQueryRulesClient withTransportOptions(@Nullable TransportOpt // ----- Endpoint: query_rules.delete_rule /** - * Deletes a query rule within a query ruleset. + * Delete a query rule. Delete a query rule within a query ruleset. * * @see Documentation @@ -84,7 +84,7 @@ public DeleteRuleResponse deleteRule(DeleteRuleRequest request) throws IOExcepti } /** - * Deletes a query rule within a query ruleset. + * Delete a query rule. Delete a query rule within a query ruleset. * * @param fn * a function that initializes a builder to create the @@ -102,7 +102,7 @@ public final DeleteRuleResponse deleteRule(FunctionDocumentation @@ -118,7 +118,7 @@ public DeleteRulesetResponse deleteRuleset(DeleteRulesetRequest request) } /** - * Deletes a query ruleset. + * Delete a query ruleset. * * @param fn * a function that initializes a builder to create the @@ -137,7 +137,7 @@ public final DeleteRulesetResponse deleteRuleset( // ----- Endpoint: query_rules.get_rule /** - * Returns the details about a query rule within a query ruleset + * Get a query rule. Get details about a query rule within a query ruleset. * * @see Documentation @@ -152,7 +152,7 @@ public GetRuleResponse getRule(GetRuleRequest request) throws IOException, Elast } /** - * Returns the details about a query rule within a query ruleset + * Get a query rule. Get details about a query rule within a query ruleset. * * @param fn * a function that initializes a builder to create the @@ -170,7 +170,7 @@ public final GetRuleResponse getRule(FunctionDocumentation @@ -185,7 +185,7 @@ public GetRulesetResponse getRuleset(GetRulesetRequest request) throws IOExcepti } /** - * Returns the details about a query ruleset + * Get a query ruleset. Get details about a query ruleset. * * @param fn * a function that initializes a builder to create the @@ -203,7 +203,7 @@ public final GetRulesetResponse getRuleset(FunctionDocumentation @@ -218,7 +218,7 @@ public ListRulesetsResponse listRulesets(ListRulesetsRequest request) throws IOE } /** - * Returns summarized information about existing query rulesets. + * Get all query rulesets. Get summarized information about the query rulesets. * * @param fn * a function that initializes a builder to create the @@ -235,7 +235,7 @@ public final ListRulesetsResponse listRulesets( } /** - * Returns summarized information about existing query rulesets. + * Get all query rulesets. Get summarized information about the query rulesets. * * @see Documentation @@ -250,7 +250,8 @@ public ListRulesetsResponse listRulesets() throws IOException, ElasticsearchExce // ----- Endpoint: query_rules.put_rule /** - * Creates or updates a query rule within a query ruleset. + * Create or update a query rule. Create or update a query rule within a query + * ruleset. * * @see Documentation @@ -265,7 +266,8 @@ public PutRuleResponse putRule(PutRuleRequest request) throws IOException, Elast } /** - * Creates or updates a query rule within a query ruleset. + * Create or update a query rule. Create or update a query rule within a query + * ruleset. * * @param fn * a function that initializes a builder to create the @@ -283,7 +285,7 @@ public final PutRuleResponse putRule(FunctionDocumentation @@ -298,7 +300,7 @@ public PutRulesetResponse putRuleset(PutRulesetRequest request) throws IOExcepti } /** - * Creates or updates a query ruleset. + * Create or update a query ruleset. * * @param fn * a function that initializes a builder to create the @@ -316,7 +318,8 @@ public final PutRulesetResponse putRuleset(FunctionDocumentation @@ -331,7 +334,8 @@ public TestResponse test(TestRequest request) throws IOException, ElasticsearchE } /** - * Creates or updates a query ruleset. + * Test a query ruleset. Evaluate match criteria against a query ruleset to + * identify the rules that would match that criteria. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/GetRuleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/GetRuleRequest.java index d3b8825c5..b136cca50 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/GetRuleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/GetRuleRequest.java @@ -56,7 +56,7 @@ // typedef: query_rules.get_rule.Request /** - * Returns the details about a query rule within a query ruleset + * Get a query rule. Get details about a query rule within a query ruleset. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/GetRulesetRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/GetRulesetRequest.java index 9081dca34..08cb75e6b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/GetRulesetRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/GetRulesetRequest.java @@ -56,7 +56,7 @@ // typedef: query_rules.get_ruleset.Request /** - * Returns the details about a query ruleset + * Get a query ruleset. Get details about a query ruleset. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ListRulesetsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ListRulesetsRequest.java index 825b2276b..ca631743b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ListRulesetsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/ListRulesetsRequest.java @@ -55,7 +55,7 @@ // typedef: query_rules.list_rulesets.Request /** - * Returns summarized information about existing query rulesets. + * Get all query rulesets. Get summarized information about the query rulesets. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/PutRuleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/PutRuleRequest.java index 25271bb07..4add60608 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/PutRuleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/PutRuleRequest.java @@ -60,7 +60,8 @@ // typedef: query_rules.put_rule.Request /** - * Creates or updates a query rule within a query ruleset. + * Create or update a query rule. Create or update a query rule within a query + * ruleset. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/PutRulesetRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/PutRulesetRequest.java index ce0826fed..081c61197 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/PutRulesetRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/PutRulesetRequest.java @@ -59,7 +59,7 @@ // typedef: query_rules.put_ruleset.Request /** - * Creates or updates a query ruleset. + * Create or update a query ruleset. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/TestRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/TestRequest.java index 9c7777941..aa53b4113 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/TestRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/TestRequest.java @@ -59,7 +59,8 @@ // typedef: query_rules.test.Request /** - * Creates or updates a query ruleset. + * Test a query ruleset. Evaluate match criteria against a query ruleset to + * identify the rules that would match that criteria. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/list_rulesets/QueryRulesetListItem.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/list_rulesets/QueryRulesetListItem.java index 8910039e3..12a44fa53 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/list_rulesets/QueryRulesetListItem.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/query_rules/list_rulesets/QueryRulesetListItem.java @@ -68,6 +68,8 @@ public class QueryRulesetListItem implements JsonpSerializable { private final Map ruleCriteriaTypesCounts; + private final Map ruleTypeCounts; + // --------------------------------------------------------------------------------------------- private QueryRulesetListItem(Builder builder) { @@ -76,6 +78,7 @@ private QueryRulesetListItem(Builder builder) { this.ruleTotalCount = ApiTypeHelper.requireNonNull(builder.ruleTotalCount, this, "ruleTotalCount"); this.ruleCriteriaTypesCounts = ApiTypeHelper.unmodifiableRequired(builder.ruleCriteriaTypesCounts, this, "ruleCriteriaTypesCounts"); + this.ruleTypeCounts = ApiTypeHelper.unmodifiableRequired(builder.ruleTypeCounts, this, "ruleTypeCounts"); } @@ -102,7 +105,8 @@ public final int ruleTotalCount() { } /** - * Required - A map of criteria type to the number of rules of that type + * Required - A map of criteria type (e.g. exact) to the number of rules of that + * type *

* API name: {@code rule_criteria_types_counts} */ @@ -110,6 +114,16 @@ public final Map ruleCriteriaTypesCounts() { return this.ruleCriteriaTypesCounts; } + /** + * Required - A map of rule type (e.g. pinned) to the number of rules of that + * type + *

+ * API name: {@code rule_type_counts} + */ + public final Map ruleTypeCounts() { + return this.ruleTypeCounts; + } + /** * Serialize this object to JSON. */ @@ -138,6 +152,17 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } + if (ApiTypeHelper.isDefined(this.ruleTypeCounts)) { + generator.writeKey("rule_type_counts"); + generator.writeStartObject(); + for (Map.Entry item0 : this.ruleTypeCounts.entrySet()) { + generator.writeKey(item0.getKey()); + generator.write(item0.getValue()); + + } + generator.writeEnd(); + + } } @@ -161,6 +186,8 @@ public static class Builder extends WithJsonObjectBuilderBase private Map ruleCriteriaTypesCounts; + private Map ruleTypeCounts; + /** * Required - Ruleset unique identifier *

@@ -182,7 +209,8 @@ public final Builder ruleTotalCount(int value) { } /** - * Required - A map of criteria type to the number of rules of that type + * Required - A map of criteria type (e.g. exact) to the number of rules of that + * type *

* API name: {@code rule_criteria_types_counts} *

@@ -194,7 +222,8 @@ public final Builder ruleCriteriaTypesCounts(Map map) { } /** - * Required - A map of criteria type to the number of rules of that type + * Required - A map of criteria type (e.g. exact) to the number of rules of that + * type *

* API name: {@code rule_criteria_types_counts} *

@@ -205,6 +234,32 @@ public final Builder ruleCriteriaTypesCounts(String key, Integer value) { return this; } + /** + * Required - A map of rule type (e.g. pinned) to the number of rules of that + * type + *

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

+ * Adds all entries of map to ruleTypeCounts. + */ + public final Builder ruleTypeCounts(Map map) { + this.ruleTypeCounts = _mapPutAll(this.ruleTypeCounts, map); + return this; + } + + /** + * Required - A map of rule type (e.g. pinned) to the number of rules of that + * type + *

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

+ * Adds an entry to ruleTypeCounts. + */ + public final Builder ruleTypeCounts(String key, Integer value) { + this.ruleTypeCounts = _mapPut(this.ruleTypeCounts, key, value); + return this; + } + @Override protected Builder self() { return this; @@ -238,6 +293,8 @@ protected static void setupQueryRulesetListItemDeserializer(ObjectDeserializer metadata; private final Map roleDescriptors; private final List> limitedBy; + @Nullable + private final Access access; + + @Nullable + private final String profileUid; + private final List sort; // --------------------------------------------------------------------------------------------- private ApiKey(Builder builder) { - this.creation = builder.creation; - this.expiration = builder.expiration; this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); - this.invalidated = builder.invalidated; this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); - this.realm = builder.realm; + this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); + this.creation = ApiTypeHelper.requireNonNull(builder.creation, this, "creation"); + this.expiration = builder.expiration; + this.invalidated = ApiTypeHelper.requireNonNull(builder.invalidated, this, "invalidated"); + this.invalidation = builder.invalidation; + this.username = ApiTypeHelper.requireNonNull(builder.username, this, "username"); + this.realm = ApiTypeHelper.requireNonNull(builder.realm, this, "realm"); this.realmType = builder.realmType; - this.username = builder.username; - this.profileUid = builder.profileUid; - this.metadata = ApiTypeHelper.unmodifiable(builder.metadata); + this.metadata = ApiTypeHelper.unmodifiableRequired(builder.metadata, this, "metadata"); this.roleDescriptors = ApiTypeHelper.unmodifiable(builder.roleDescriptors); this.limitedBy = ApiTypeHelper.unmodifiable(builder.limitedBy); + this.access = builder.access; + this.profileUid = builder.profileUid; this.sort = ApiTypeHelper.unmodifiable(builder.sort); } @@ -124,12 +131,39 @@ public static ApiKey of(Function> fn) { } /** - * Creation time for the API key in milliseconds. + * Required - Id for the API key + *

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

+ * API name: {@code name} + */ + public final String name() { + return this.name; + } + + /** + * Required - The type of the API key (e.g. rest or + * cross_cluster). + *

+ * API name: {@code type} + */ + public final ApiKeyType type() { + return this.type; + } + + /** + * Required - Creation time for the API key in milliseconds. *

* API name: {@code creation} */ - @Nullable - public final Long creation() { + public final long creation() { return this.creation; } @@ -144,40 +178,40 @@ public final Long expiration() { } /** - * Required - Id for the API key + * Required - Invalidation status for the API key. If the key has been + * invalidated, it has a value of true. Otherwise, it is + * false. *

- * API name: {@code id} + * API name: {@code invalidated} */ - public final String id() { - return this.id; + public final boolean invalidated() { + return this.invalidated; } /** - * Invalidation status for the API key. If the key has been invalidated, it has - * a value of true. Otherwise, it is false. + * If the key has been invalidated, invalidation time in milliseconds. *

- * API name: {@code invalidated} + * API name: {@code invalidation} */ @Nullable - public final Boolean invalidated() { - return this.invalidated; + public final Long invalidation() { + return this.invalidation; } /** - * Required - Name of the API key. + * Required - Principal for which this API key was created *

- * API name: {@code name} + * API name: {@code username} */ - public final String name() { - return this.name; + public final String username() { + return this.username; } /** - * Realm name of the principal for which this API key was created. + * Required - Realm name of the principal for which this API key was created. *

* API name: {@code realm} */ - @Nullable public final String realm() { return this.realm; } @@ -193,28 +227,7 @@ public final String realmType() { } /** - * Principal for which this API key was created - *

- * API name: {@code username} - */ - @Nullable - public final String username() { - return this.username; - } - - /** - * The profile uid for the API key owner principal, if requested and if it - * exists - *

- * API name: {@code profile_uid} - */ - @Nullable - public final String profileUid() { - return this.profileUid; - } - - /** - * Metadata of the API key + * Required - Metadata of the API key *

* API name: {@code metadata} */ @@ -246,6 +259,33 @@ public final List> limitedBy() { } /** + * The access granted to cross-cluster API keys. The access is composed of + * permissions for cross cluster search and cross cluster replication. At least + * one of them must be specified. When specified, the new access assignment + * fully replaces the previously assigned access. + *

+ * API name: {@code access} + */ + @Nullable + public final Access access() { + return this.access; + } + + /** + * The profile uid for the API key owner principal, if requested and if it + * exists + *

+ * API name: {@code profile_uid} + */ + @Nullable + public final String profileUid() { + return this.profileUid; + } + + /** + * Sorting values when using the sort parameter with the + * security.query_api_keys API. + *

* API name: {@code _sort} */ public final List sort() { @@ -263,46 +303,40 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - if (this.creation != null) { - generator.writeKey("creation"); - generator.write(this.creation); + generator.writeKey("id"); + generator.write(this.id); + + generator.writeKey("name"); + generator.write(this.name); + + generator.writeKey("type"); + this.type.serialize(generator, mapper); + generator.writeKey("creation"); + generator.write(this.creation); - } if (this.expiration != null) { generator.writeKey("expiration"); generator.write(this.expiration); } - generator.writeKey("id"); - generator.write(this.id); + generator.writeKey("invalidated"); + generator.write(this.invalidated); - if (this.invalidated != null) { - generator.writeKey("invalidated"); - generator.write(this.invalidated); + if (this.invalidation != null) { + generator.writeKey("invalidation"); + generator.write(this.invalidation); } - generator.writeKey("name"); - generator.write(this.name); + generator.writeKey("username"); + generator.write(this.username); - if (this.realm != null) { - generator.writeKey("realm"); - generator.write(this.realm); + generator.writeKey("realm"); + generator.write(this.realm); - } if (this.realmType != null) { generator.writeKey("realm_type"); generator.write(this.realmType); - } - if (this.username != null) { - generator.writeKey("username"); - generator.write(this.username); - - } - if (this.profileUid != null) { - generator.writeKey("profile_uid"); - generator.write(this.profileUid); - } if (ApiTypeHelper.isDefined(this.metadata)) { generator.writeKey("metadata"); @@ -343,6 +377,16 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (this.access != null) { + generator.writeKey("access"); + this.access.serialize(generator, mapper); + + } + if (this.profileUid != null) { + generator.writeKey("profile_uid"); + generator.write(this.profileUid); + } if (ApiTypeHelper.isDefined(this.sort)) { generator.writeKey("_sort"); @@ -369,137 +413,151 @@ public String toString() { */ public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { - @Nullable + private String id; + + private String name; + + private ApiKeyType type; + private Long creation; @Nullable private Long expiration; - private String id; + private Boolean invalidated; @Nullable - private Boolean invalidated; + private Long invalidation; - private String name; + private String username; - @Nullable private String realm; @Nullable private String realmType; - @Nullable - private String username; + private Map metadata; @Nullable - private String profileUid; + private Map roleDescriptors; @Nullable - private Map metadata; + private List> limitedBy; @Nullable - private Map roleDescriptors; + private Access access; @Nullable - private List> limitedBy; + private String profileUid; @Nullable private List sort; /** - * Creation time for the API key in milliseconds. + * Required - Id for the API key *

- * API name: {@code creation} + * API name: {@code id} */ - public final Builder creation(@Nullable Long value) { - this.creation = value; + public final Builder id(String value) { + this.id = value; return this; } /** - * Expiration time for the API key in milliseconds. + * Required - Name of the API key. *

- * API name: {@code expiration} + * API name: {@code name} */ - public final Builder expiration(@Nullable Long value) { - this.expiration = value; + public final Builder name(String value) { + this.name = value; return this; } /** - * Required - Id for the API key + * Required - The type of the API key (e.g. rest or + * cross_cluster). *

- * API name: {@code id} + * API name: {@code type} */ - public final Builder id(String value) { - this.id = value; + public final Builder type(ApiKeyType value) { + this.type = value; return this; } /** - * Invalidation status for the API key. If the key has been invalidated, it has - * a value of true. Otherwise, it is false. + * Required - Creation time for the API key in milliseconds. *

- * API name: {@code invalidated} + * API name: {@code creation} */ - public final Builder invalidated(@Nullable Boolean value) { - this.invalidated = value; + public final Builder creation(long value) { + this.creation = value; return this; } /** - * Required - Name of the API key. + * Expiration time for the API key in milliseconds. *

- * API name: {@code name} + * API name: {@code expiration} */ - public final Builder name(String value) { - this.name = value; + public final Builder expiration(@Nullable Long value) { + this.expiration = value; return this; } /** - * Realm name of the principal for which this API key was created. + * Required - Invalidation status for the API key. If the key has been + * invalidated, it has a value of true. Otherwise, it is + * false. *

- * API name: {@code realm} + * API name: {@code invalidated} */ - public final Builder realm(@Nullable String value) { - this.realm = value; + public final Builder invalidated(boolean value) { + this.invalidated = value; return this; } /** - * Realm type of the principal for which this API key was created + * If the key has been invalidated, invalidation time in milliseconds. *

- * API name: {@code realm_type} + * API name: {@code invalidation} */ - public final Builder realmType(@Nullable String value) { - this.realmType = value; + public final Builder invalidation(@Nullable Long value) { + this.invalidation = value; return this; } /** - * Principal for which this API key was created + * Required - Principal for which this API key was created *

* API name: {@code username} */ - public final Builder username(@Nullable String value) { + public final Builder username(String value) { this.username = value; return this; } /** - * The profile uid for the API key owner principal, if requested and if it - * exists + * Required - Realm name of the principal for which this API key was created. *

- * API name: {@code profile_uid} + * API name: {@code realm} */ - public final Builder profileUid(@Nullable String value) { - this.profileUid = value; + public final Builder realm(String value) { + this.realm = value; + return this; + } + + /** + * Realm type of the principal for which this API key was created + *

+ * API name: {@code realm_type} + */ + public final Builder realmType(@Nullable String value) { + this.realmType = value; return this; } /** - * Metadata of the API key + * Required - Metadata of the API key *

* API name: {@code metadata} *

@@ -511,7 +569,7 @@ public final Builder metadata(Map map) { } /** - * Metadata of the API key + * Required - Metadata of the API key *

* API name: {@code metadata} *

@@ -595,6 +653,45 @@ public final Builder limitedBy(Map value, Map + * API name: {@code access} + */ + public final Builder access(@Nullable Access value) { + this.access = value; + return this; + } + + /** + * The access granted to cross-cluster API keys. The access is composed of + * permissions for cross cluster search and cross cluster replication. At least + * one of them must be specified. When specified, the new access assignment + * fully replaces the previously assigned access. + *

+ * API name: {@code access} + */ + public final Builder access(Function> fn) { + return this.access(fn.apply(new Access.Builder()).build()); + } + + /** + * The profile uid for the API key owner principal, if requested and if it + * exists + *

+ * API name: {@code profile_uid} + */ + public final Builder profileUid(@Nullable String value) { + this.profileUid = value; + return this; + } + + /** + * Sorting values when using the sort parameter with the + * security.query_api_keys API. + *

* API name: {@code _sort} *

* Adds all elements of list to sort. @@ -605,6 +702,9 @@ public final Builder sort(List list) { } /** + * Sorting values when using the sort parameter with the + * security.query_api_keys API. + *

* API name: {@code _sort} *

* Adds one or more values to sort. @@ -615,6 +715,9 @@ public final Builder sort(FieldValue value, FieldValue... values) { } /** + * Sorting values when using the sort parameter with the + * security.query_api_keys API. + *

* API name: {@code _sort} *

* Adds all passed values to sort. @@ -630,6 +733,9 @@ public final Builder sort(String value, String... values) { } /** + * Sorting values when using the sort parameter with the + * security.query_api_keys API. + *

* API name: {@code _sort} *

* Adds all passed values to sort. @@ -645,6 +751,9 @@ public final Builder sort(long value, long... values) { } /** + * Sorting values when using the sort parameter with the + * security.query_api_keys API. + *

* API name: {@code _sort} *

* Adds all passed values to sort. @@ -660,6 +769,9 @@ public final Builder sort(double value, double... values) { } /** + * Sorting values when using the sort parameter with the + * security.query_api_keys API. + *

* API name: {@code _sort} *

* Adds all passed values to sort. @@ -675,6 +787,9 @@ public final Builder sort(boolean value, boolean... values) { } /** + * Sorting values when using the sort parameter with the + * security.query_api_keys API. + *

* API name: {@code _sort} *

* Adds a value to sort using a builder lambda. @@ -711,20 +826,23 @@ public ApiKey build() { protected static void setupApiKeyDeserializer(ObjectDeserializer op) { + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::type, ApiKeyType._DESERIALIZER, "type"); op.add(Builder::creation, JsonpDeserializer.longDeserializer(), "creation"); op.add(Builder::expiration, JsonpDeserializer.longDeserializer(), "expiration"); - op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); op.add(Builder::invalidated, JsonpDeserializer.booleanDeserializer(), "invalidated"); - op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + op.add(Builder::invalidation, JsonpDeserializer.longDeserializer(), "invalidation"); + op.add(Builder::username, JsonpDeserializer.stringDeserializer(), "username"); op.add(Builder::realm, JsonpDeserializer.stringDeserializer(), "realm"); op.add(Builder::realmType, JsonpDeserializer.stringDeserializer(), "realm_type"); - op.add(Builder::username, JsonpDeserializer.stringDeserializer(), "username"); - op.add(Builder::profileUid, JsonpDeserializer.stringDeserializer(), "profile_uid"); op.add(Builder::metadata, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "metadata"); op.add(Builder::roleDescriptors, JsonpDeserializer.stringMapDeserializer(RoleDescriptor._DESERIALIZER), "role_descriptors"); op.add(Builder::limitedBy, JsonpDeserializer.arrayDeserializer( JsonpDeserializer.stringMapDeserializer(RoleDescriptor._DESERIALIZER)), "limited_by"); + op.add(Builder::access, Access._DESERIALIZER, "access"); + op.add(Builder::profileUid, JsonpDeserializer.stringDeserializer(), "profile_uid"); op.add(Builder::sort, JsonpDeserializer.arrayDeserializer(FieldValue._DESERIALIZER), "_sort"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ApiKeyType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ApiKeyType.java new file mode 100644 index 000000000..ab3080ea8 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ApiKeyType.java @@ -0,0 +1,66 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.security; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum ApiKeyType implements JsonEnum { + Rest("rest"), + + CrossCluster("cross_cluster"), + + ; + + private final String jsonValue; + + ApiKeyType(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + ApiKeyType.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateResponse.java index fb08644ee..57b26a47c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/AuthenticateResponse.java @@ -19,6 +19,7 @@ package co.elastic.clients.elasticsearch.security; +import co.elastic.clients.elasticsearch.security.authenticate.AuthenticateApiKey; import co.elastic.clients.elasticsearch.security.authenticate.ServiceToken; import co.elastic.clients.json.JsonData; import co.elastic.clients.json.JsonpDeserializable; @@ -65,7 +66,7 @@ @JsonpDeserializable public class AuthenticateResponse implements JsonpSerializable { @Nullable - private final ApiKey apiKey; + private final AuthenticateApiKey apiKey; private final RealmInfo authenticationRealm; @@ -117,7 +118,7 @@ public static AuthenticateResponse of(Function implements ObjectBuilder { @Nullable - private ApiKey apiKey; + private AuthenticateApiKey apiKey; private RealmInfo authenticationRealm; @@ -307,7 +308,7 @@ public static class Builder extends WithJsonObjectBuilderBase /** * API name: {@code api_key} */ - public final Builder apiKey(@Nullable ApiKey value) { + public final Builder apiKey(@Nullable AuthenticateApiKey value) { this.apiKey = value; return this; } @@ -315,8 +316,8 @@ public final Builder apiKey(@Nullable ApiKey value) { /** * API name: {@code api_key} */ - public final Builder apiKey(Function> fn) { - return this.apiKey(fn.apply(new ApiKey.Builder()).build()); + public final Builder apiKey(Function> fn) { + return this.apiKey(fn.apply(new AuthenticateApiKey.Builder()).build()); } /** @@ -472,7 +473,7 @@ public AuthenticateResponse build() { protected static void setupAuthenticateResponseDeserializer(ObjectDeserializer op) { - op.add(Builder::apiKey, ApiKey._DESERIALIZER, "api_key"); + op.add(Builder::apiKey, AuthenticateApiKey._DESERIALIZER, "api_key"); op.add(Builder::authenticationRealm, RealmInfo._DESERIALIZER, "authentication_realm"); op.add(Builder::email, JsonpDeserializer.stringDeserializer(), "email"); op.add(Builder::fullName, JsonpDeserializer.stringDeserializer(), "full_name"); 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 new file mode 100644 index 000000000..bb1987e9a --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/authenticate/AuthenticateApiKey.java @@ -0,0 +1,186 @@ +/* + * 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.authenticate; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: security.authenticate.AuthenticateApiKey + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class AuthenticateApiKey implements JsonpSerializable { + private final String id; + + @Nullable + private final String name; + + // --------------------------------------------------------------------------------------------- + + private AuthenticateApiKey(Builder builder) { + + this.id = ApiTypeHelper.requireNonNull(builder.id, this, "id"); + this.name = builder.name; + + } + + public static AuthenticateApiKey of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code id} + */ + public final String id() { + return this.id; + } + + /** + * API name: {@code name} + */ + @Nullable + public final String name() { + return this.name; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeKey("id"); + generator.write(this.id); + + if (this.name != null) { + generator.writeKey("name"); + generator.write(this.name); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link AuthenticateApiKey}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private String id; + + @Nullable + private String name; + + /** + * Required - API name: {@code id} + */ + public final Builder id(String value) { + this.id = value; + return this; + } + + /** + * API name: {@code name} + */ + public final Builder name(@Nullable String value) { + this.name = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link AuthenticateApiKey}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public AuthenticateApiKey build() { + _checkSingleUse(); + + return new AuthenticateApiKey(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link AuthenticateApiKey} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, AuthenticateApiKey::setupAuthenticateApiKeyDeserializer); + + protected static void setupAuthenticateApiKeyDeserializer(ObjectDeserializer op) { + + op.add(Builder::id, JsonpDeserializer.stringDeserializer(), "id"); + op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java index b2de6cd73..efe617454 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ClearCursorRequest.java @@ -56,7 +56,7 @@ // typedef: sql.clear_cursor.Request /** - * Clears the SQL cursor + * Clear an SQL search cursor. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java index 2563c40b6..d6a2b9bc6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/DeleteAsyncRequest.java @@ -56,8 +56,8 @@ // typedef: sql.delete_async.Request /** - * Deletes an async SQL search or a stored synchronous SQL search. If the search - * is still running, the API cancels it. + * Delete an async SQL search. Delete an async SQL search or a stored + * synchronous SQL search. If the search is still running, the API cancels it. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ElasticsearchSqlAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ElasticsearchSqlAsyncClient.java index fed7550c2..2e3731257 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ElasticsearchSqlAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ElasticsearchSqlAsyncClient.java @@ -67,7 +67,7 @@ public ElasticsearchSqlAsyncClient withTransportOptions(@Nullable TransportOptio // ----- Endpoint: sql.clear_cursor /** - * Clears the SQL cursor + * Clear an SQL search cursor. * * @see Documentation @@ -82,7 +82,7 @@ public CompletableFuture clearCursor(ClearCursorRequest req } /** - * Clears the SQL cursor + * Clear an SQL search cursor. * * @param fn * a function that initializes a builder to create the @@ -100,8 +100,8 @@ public final CompletableFuture clearCursor( // ----- Endpoint: sql.delete_async /** - * Deletes an async SQL search or a stored synchronous SQL search. If the search - * is still running, the API cancels it. + * Delete an async SQL search. Delete an async SQL search or a stored + * synchronous SQL search. If the search is still running, the API cancels it. * * @see Documentation @@ -116,8 +116,8 @@ public CompletableFuture deleteAsync(DeleteAsyncRequest req } /** - * Deletes an async SQL search or a stored synchronous SQL search. If the search - * is still running, the API cancels it. + * Delete an async SQL search. Delete an async SQL search or a stored + * synchronous SQL search. If the search is still running, the API cancels it. * * @param fn * a function that initializes a builder to create the @@ -135,8 +135,8 @@ public final CompletableFuture deleteAsync( // ----- Endpoint: sql.get_async /** - * Returns the current status and available results for an async SQL search or - * stored synchronous SQL search + * Get async SQL search results. Get the current status and available results + * for an async SQL search or stored synchronous SQL search. * * @see Documentation @@ -151,8 +151,8 @@ public CompletableFuture getAsync(GetAsyncRequest request) { } /** - * Returns the current status and available results for an async SQL search or - * stored synchronous SQL search + * Get async SQL search results. Get the current status and available results + * for an async SQL search or stored synchronous SQL search. * * @param fn * a function that initializes a builder to create the @@ -170,8 +170,8 @@ public final CompletableFuture getAsync( // ----- Endpoint: sql.get_async_status /** - * Returns the current status of an async SQL search or a stored synchronous SQL - * search + * Get the async SQL search status. Get the current status of an async SQL + * search or a stored synchronous SQL search. * * @see Documentation @@ -186,8 +186,8 @@ public CompletableFuture getAsyncStatus(GetAsyncStatusRe } /** - * Returns the current status of an async SQL search or a stored synchronous SQL - * search + * Get the async SQL search status. Get the current status of an async SQL + * search or a stored synchronous SQL search. * * @param fn * a function that initializes a builder to create the @@ -205,7 +205,7 @@ public final CompletableFuture getAsyncStatus( // ----- Endpoint: sql.query /** - * Executes a SQL request + * Get SQL search results. Run an SQL request. * * @see Documentation @@ -220,7 +220,7 @@ public CompletableFuture query(QueryRequest request) { } /** - * Executes a SQL request + * Get SQL search results. Run an SQL request. * * @param fn * a function that initializes a builder to create the @@ -236,7 +236,7 @@ public final CompletableFuture query( } /** - * Executes a SQL request + * Get SQL search results. Run an SQL request. * * @see Documentation @@ -251,7 +251,8 @@ public CompletableFuture query() { // ----- Endpoint: sql.translate /** - * Translates SQL into Elasticsearch queries + * Translate SQL into Elasticsearch queries. Translate an SQL search into a + * search API request containing Query DSL. * * @see Documentation @@ -266,7 +267,8 @@ public CompletableFuture translate(TranslateRequest request) } /** - * Translates SQL into Elasticsearch queries + * Translate SQL into Elasticsearch queries. Translate an SQL search into a + * search API request containing Query DSL. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ElasticsearchSqlClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ElasticsearchSqlClient.java index cc52ab771..1e06fde80 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ElasticsearchSqlClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/ElasticsearchSqlClient.java @@ -68,7 +68,7 @@ public ElasticsearchSqlClient withTransportOptions(@Nullable TransportOptions tr // ----- Endpoint: sql.clear_cursor /** - * Clears the SQL cursor + * Clear an SQL search cursor. * * @see Documentation @@ -83,7 +83,7 @@ public ClearCursorResponse clearCursor(ClearCursorRequest request) throws IOExce } /** - * Clears the SQL cursor + * Clear an SQL search cursor. * * @param fn * a function that initializes a builder to create the @@ -102,8 +102,8 @@ public final ClearCursorResponse clearCursor( // ----- Endpoint: sql.delete_async /** - * Deletes an async SQL search or a stored synchronous SQL search. If the search - * is still running, the API cancels it. + * Delete an async SQL search. Delete an async SQL search or a stored + * synchronous SQL search. If the search is still running, the API cancels it. * * @see Documentation @@ -118,8 +118,8 @@ public DeleteAsyncResponse deleteAsync(DeleteAsyncRequest request) throws IOExce } /** - * Deletes an async SQL search or a stored synchronous SQL search. If the search - * is still running, the API cancels it. + * Delete an async SQL search. Delete an async SQL search or a stored + * synchronous SQL search. If the search is still running, the API cancels it. * * @param fn * a function that initializes a builder to create the @@ -138,8 +138,8 @@ public final DeleteAsyncResponse deleteAsync( // ----- Endpoint: sql.get_async /** - * Returns the current status and available results for an async SQL search or - * stored synchronous SQL search + * Get async SQL search results. Get the current status and available results + * for an async SQL search or stored synchronous SQL search. * * @see Documentation @@ -154,8 +154,8 @@ public GetAsyncResponse getAsync(GetAsyncRequest request) throws IOException, El } /** - * Returns the current status and available results for an async SQL search or - * stored synchronous SQL search + * Get async SQL search results. Get the current status and available results + * for an async SQL search or stored synchronous SQL search. * * @param fn * a function that initializes a builder to create the @@ -173,8 +173,8 @@ public final GetAsyncResponse getAsync(FunctionDocumentation @@ -190,8 +190,8 @@ public GetAsyncStatusResponse getAsyncStatus(GetAsyncStatusRequest request) } /** - * Returns the current status of an async SQL search or a stored synchronous SQL - * search + * Get the async SQL search status. Get the current status of an async SQL + * search or a stored synchronous SQL search. * * @param fn * a function that initializes a builder to create the @@ -210,7 +210,7 @@ public final GetAsyncStatusResponse getAsyncStatus( // ----- Endpoint: sql.query /** - * Executes a SQL request + * Get SQL search results. Run an SQL request. * * @see Documentation @@ -225,7 +225,7 @@ public QueryResponse query(QueryRequest request) throws IOException, Elasticsear } /** - * Executes a SQL request + * Get SQL search results. Run an SQL request. * * @param fn * a function that initializes a builder to create the @@ -241,7 +241,7 @@ public final QueryResponse query(FunctionDocumentation @@ -256,7 +256,8 @@ public QueryResponse query() throws IOException, ElasticsearchException { // ----- Endpoint: sql.translate /** - * Translates SQL into Elasticsearch queries + * Translate SQL into Elasticsearch queries. Translate an SQL search into a + * search API request containing Query DSL. * * @see Documentation @@ -271,7 +272,8 @@ public TranslateResponse translate(TranslateRequest request) throws IOException, } /** - * Translates SQL into Elasticsearch queries + * Translate SQL into Elasticsearch queries. Translate an SQL search into a + * search API request containing Query DSL. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java index 7f5ed8074..54454ca9f 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncRequest.java @@ -56,8 +56,8 @@ // typedef: sql.get_async.Request /** - * Returns the current status and available results for an async SQL search or - * stored synchronous SQL search + * Get async SQL search results. Get the current status and available results + * for an async SQL search or stored synchronous SQL search. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java index f8a91c105..51e97100d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/GetAsyncStatusRequest.java @@ -56,8 +56,8 @@ // typedef: sql.get_async_status.Request /** - * Returns the current status of an async SQL search or a stored synchronous SQL - * search + * Get the async SQL search status. Get the current status of an async SQL + * search or a stored synchronous SQL search. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java index 05929b3ac..4d763e6bc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/QueryRequest.java @@ -65,7 +65,7 @@ // typedef: sql.query.Request /** - * Executes a SQL request + * Get SQL search results. Run an SQL request. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java index f43365497..d74e46440 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateRequest.java @@ -58,7 +58,8 @@ // typedef: sql.translate.Request /** - * Translates SQL into Elasticsearch queries + * Translate SQL into Elasticsearch queries. Translate an SQL search into a + * search API request containing Query DSL. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRequest.java index 8573eb849..7645d8847 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRequest.java @@ -56,7 +56,7 @@ // typedef: synonyms.delete_synonym.Request /** - * Deletes a synonym set + * Delete a synonym set. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRuleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRuleRequest.java index 1ed23fb74..398e44abd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRuleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/DeleteSynonymRuleRequest.java @@ -56,7 +56,7 @@ // typedef: synonyms.delete_synonym_rule.Request /** - * Deletes a synonym rule in a synonym set + * Delete a synonym rule. Delete a synonym rule from a synonym set. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsAsyncClient.java index 16932ca3b..9ec40e361 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsAsyncClient.java @@ -70,7 +70,7 @@ public ElasticsearchSynonymsAsyncClient withTransportOptions(@Nullable Transport // ----- Endpoint: synonyms.delete_synonym /** - * Deletes a synonym set + * Delete a synonym set. * * @see Documentation @@ -85,7 +85,7 @@ public CompletableFuture deleteSynonym(DeleteSynonymReque } /** - * Deletes a synonym set + * Delete a synonym set. * * @param fn * a function that initializes a builder to create the @@ -103,7 +103,7 @@ public final CompletableFuture deleteSynonym( // ----- Endpoint: synonyms.delete_synonym_rule /** - * Deletes a synonym rule in a synonym set + * Delete a synonym rule. Delete a synonym rule from a synonym set. * * @see Documentation @@ -118,7 +118,7 @@ public CompletableFuture deleteSynonymRule(DeleteSyno } /** - * Deletes a synonym rule in a synonym set + * Delete a synonym rule. Delete a synonym rule from a synonym set. * * @param fn * a function that initializes a builder to create the @@ -136,7 +136,7 @@ public final CompletableFuture deleteSynonymRule( // ----- Endpoint: synonyms.get_synonym /** - * Retrieves a synonym set + * Get a synonym set. * * @see Documentation @@ -151,7 +151,7 @@ public CompletableFuture getSynonym(GetSynonymRequest reques } /** - * Retrieves a synonym set + * Get a synonym set. * * @param fn * a function that initializes a builder to create the @@ -169,7 +169,7 @@ public final CompletableFuture getSynonym( // ----- Endpoint: synonyms.get_synonym_rule /** - * Retrieves a synonym rule from a synonym set + * Get a synonym rule. Get a synonym rule from a synonym set. * * @see Documentation @@ -184,7 +184,7 @@ public CompletableFuture getSynonymRule(GetSynonymRuleRe } /** - * Retrieves a synonym rule from a synonym set + * Get a synonym rule. Get a synonym rule from a synonym set. * * @param fn * a function that initializes a builder to create the @@ -202,7 +202,7 @@ public final CompletableFuture getSynonymRule( // ----- Endpoint: synonyms.get_synonyms_sets /** - * Retrieves a summary of all defined synonym sets + * Get all synonym sets. Get a summary of all defined synonym sets. * * @see Documentation @@ -217,7 +217,7 @@ public CompletableFuture getSynonymsSets(GetSynonymsSet } /** - * Retrieves a summary of all defined synonym sets + * Get all synonym sets. Get a summary of all defined synonym sets. * * @param fn * a function that initializes a builder to create the @@ -233,7 +233,7 @@ public final CompletableFuture getSynonymsSets( } /** - * Retrieves a summary of all defined synonym sets + * Get all synonym sets. Get a summary of all defined synonym sets. * * @see Documentation @@ -248,7 +248,9 @@ public CompletableFuture getSynonymsSets() { // ----- Endpoint: synonyms.put_synonym /** - * Creates or updates a synonym set. + * Create or update a synonym set. Synonyms sets are limited to a maximum of + * 10,000 synonym rules per set. If you need to manage more synonym rules, you + * can create multiple synonym sets. * * @see Documentation @@ -263,7 +265,9 @@ public CompletableFuture putSynonym(PutSynonymRequest reques } /** - * Creates or updates a synonym set. + * Create or update a synonym set. Synonyms sets are limited to a maximum of + * 10,000 synonym rules per set. If you need to manage more synonym rules, you + * can create multiple synonym sets. * * @param fn * a function that initializes a builder to create the @@ -281,7 +285,8 @@ public final CompletableFuture putSynonym( // ----- Endpoint: synonyms.put_synonym_rule /** - * Creates or updates a synonym rule in a synonym set + * Create or update a synonym rule. Create or update a synonym rule in a synonym + * set. * * @see Documentation @@ -296,7 +301,8 @@ public CompletableFuture putSynonymRule(PutSynonymRuleRe } /** - * Creates or updates a synonym rule in a synonym set + * Create or update a synonym rule. Create or update a synonym rule in a synonym + * set. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsClient.java index d685bda79..693d8e6ef 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/ElasticsearchSynonymsClient.java @@ -68,7 +68,7 @@ public ElasticsearchSynonymsClient withTransportOptions(@Nullable TransportOptio // ----- Endpoint: synonyms.delete_synonym /** - * Deletes a synonym set + * Delete a synonym set. * * @see Documentation @@ -84,7 +84,7 @@ public DeleteSynonymResponse deleteSynonym(DeleteSynonymRequest request) } /** - * Deletes a synonym set + * Delete a synonym set. * * @param fn * a function that initializes a builder to create the @@ -103,7 +103,7 @@ public final DeleteSynonymResponse deleteSynonym( // ----- Endpoint: synonyms.delete_synonym_rule /** - * Deletes a synonym rule in a synonym set + * Delete a synonym rule. Delete a synonym rule from a synonym set. * * @see Documentation @@ -119,7 +119,7 @@ public DeleteSynonymRuleResponse deleteSynonymRule(DeleteSynonymRuleRequest requ } /** - * Deletes a synonym rule in a synonym set + * Delete a synonym rule. Delete a synonym rule from a synonym set. * * @param fn * a function that initializes a builder to create the @@ -138,7 +138,7 @@ public final DeleteSynonymRuleResponse deleteSynonymRule( // ----- Endpoint: synonyms.get_synonym /** - * Retrieves a synonym set + * Get a synonym set. * * @see Documentation @@ -153,7 +153,7 @@ public GetSynonymResponse getSynonym(GetSynonymRequest request) throws IOExcepti } /** - * Retrieves a synonym set + * Get a synonym set. * * @param fn * a function that initializes a builder to create the @@ -171,7 +171,7 @@ public final GetSynonymResponse getSynonym(FunctionDocumentation @@ -187,7 +187,7 @@ public GetSynonymRuleResponse getSynonymRule(GetSynonymRuleRequest request) } /** - * Retrieves a synonym rule from a synonym set + * Get a synonym rule. Get a synonym rule from a synonym set. * * @param fn * a function that initializes a builder to create the @@ -206,7 +206,7 @@ public final GetSynonymRuleResponse getSynonymRule( // ----- Endpoint: synonyms.get_synonyms_sets /** - * Retrieves a summary of all defined synonym sets + * Get all synonym sets. Get a summary of all defined synonym sets. * * @see Documentation @@ -222,7 +222,7 @@ public GetSynonymsSetsResponse getSynonymsSets(GetSynonymsSetsRequest request) } /** - * Retrieves a summary of all defined synonym sets + * Get all synonym sets. Get a summary of all defined synonym sets. * * @param fn * a function that initializes a builder to create the @@ -239,7 +239,7 @@ public final GetSynonymsSetsResponse getSynonymsSets( } /** - * Retrieves a summary of all defined synonym sets + * Get all synonym sets. Get a summary of all defined synonym sets. * * @see Documentation @@ -254,7 +254,9 @@ public GetSynonymsSetsResponse getSynonymsSets() throws IOException, Elasticsear // ----- Endpoint: synonyms.put_synonym /** - * Creates or updates a synonym set. + * Create or update a synonym set. Synonyms sets are limited to a maximum of + * 10,000 synonym rules per set. If you need to manage more synonym rules, you + * can create multiple synonym sets. * * @see Documentation @@ -269,7 +271,9 @@ public PutSynonymResponse putSynonym(PutSynonymRequest request) throws IOExcepti } /** - * Creates or updates a synonym set. + * Create or update a synonym set. Synonyms sets are limited to a maximum of + * 10,000 synonym rules per set. If you need to manage more synonym rules, you + * can create multiple synonym sets. * * @param fn * a function that initializes a builder to create the @@ -287,7 +291,8 @@ public final PutSynonymResponse putSynonym(FunctionDocumentation @@ -303,7 +308,8 @@ public PutSynonymRuleResponse putSynonymRule(PutSynonymRuleRequest request) } /** - * Creates or updates a synonym rule in a synonym set + * Create or update a synonym rule. Create or update a synonym rule in a synonym + * set. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRequest.java index 19b1c69cc..bf6fda654 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRequest.java @@ -56,7 +56,7 @@ // typedef: synonyms.get_synonym.Request /** - * Retrieves a synonym set + * Get a synonym set. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRuleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRuleRequest.java index 4e7a72b62..90d0f74cc 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRuleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymRuleRequest.java @@ -56,7 +56,7 @@ // typedef: synonyms.get_synonym_rule.Request /** - * Retrieves a synonym rule from a synonym set + * Get a synonym rule. Get a synonym rule from a synonym set. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymsSetsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymsSetsRequest.java index cf6db2290..230e03b96 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymsSetsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/GetSynonymsSetsRequest.java @@ -55,7 +55,7 @@ // typedef: synonyms.get_synonyms_sets.Request /** - * Retrieves a summary of all defined synonym sets + * Get all synonym sets. Get a summary of all defined synonym sets. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRequest.java index 2e528f779..d8f5c7245 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRequest.java @@ -59,7 +59,9 @@ // typedef: synonyms.put_synonym.Request /** - * Creates or updates a synonym set. + * Create or update a synonym set. Synonyms sets are limited to a maximum of + * 10,000 synonym rules per set. If you need to manage more synonym rules, you + * can create multiple synonym sets. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRuleRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRuleRequest.java index 89802a028..03756a7d7 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRuleRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/synonyms/PutSynonymRuleRequest.java @@ -58,7 +58,8 @@ // typedef: synonyms.put_synonym_rule.Request /** - * Creates or updates a synonym rule in a synonym set + * Create or update a synonym rule. Create or update a synonym rule in a synonym + * set. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/Schedule.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/Schedule.java index ed6ec0005..115bdfb4b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/Schedule.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/Schedule.java @@ -76,6 +76,8 @@ public class Schedule implements TaggedUnion, TriggerVari */ public enum Kind implements JsonEnum { + Timezone("timezone"), + Cron("cron"), Daily("daily"), @@ -143,6 +145,23 @@ public static Schedule of(Function> fn) { return fn.apply(new Builder()).build(); } + /** + * Is this variant instance of kind {@code timezone}? + */ + public boolean isTimezone() { + return _kind == Kind.Timezone; + } + + /** + * Get the {@code timezone} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code timezone} kind. + */ + public String timezone() { + return TaggedUnionUtils.get(this, Kind.Timezone); + } + /** * Is this variant instance of kind {@code cron}? */ @@ -273,6 +292,10 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { ((JsonpSerializable) _value).serialize(generator, mapper); } else { switch (_kind) { + case Timezone : + generator.write(((String) this._value)); + + break; case Cron : generator.write(((String) this._value)); @@ -324,6 +347,12 @@ public static class Builder extends WithJsonObjectBuilderBase implement protected Builder self() { return this; } + public ObjectBuilder timezone(String v) { + this._kind = Kind.Timezone; + this._value = v; + return this; + } + public ObjectBuilder cron(String v) { this._kind = Kind.Cron; this._value = v; @@ -387,6 +416,7 @@ public Schedule build() { protected static void setupScheduleDeserializer(ObjectDeserializer op) { + op.add(Builder::timezone, JsonpDeserializer.stringDeserializer(), "timezone"); op.add(Builder::cron, JsonpDeserializer.stringDeserializer(), "cron"); op.add(Builder::daily, DailySchedule._DESERIALIZER, "daily"); op.add(Builder::hourly, HourlySchedule._DESERIALIZER, "hourly"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/ScheduleBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/ScheduleBuilders.java index 6f70cced3..f69090877 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/ScheduleBuilders.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/watcher/ScheduleBuilders.java @@ -41,9 +41,9 @@ /** * Builders for {@link Schedule} variants. *

- * Variants cron, monthly, weekly, - * yearly are not available here as they don't have a dedicated - * class. Use {@link Schedule}'s builder for these. + * Variants timezone, cron, monthly, + * weekly, yearly are not available here as they don't + * have a dedicated class. Use {@link Schedule}'s builder for these. * */ public class ScheduleBuilders {