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 0bc8c9ca1..261a1b048 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 5efa64e2d..d337d1aab 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 e69c4bc97..f6d697999 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; @@ -190,9 +187,6 @@ public class SubmitRequest extends RequestBase implements JsonpSerializable { @Nullable private final Query postFilter; - @Nullable - private final Long preFilterShardSize; - @Nullable private final String preference; @@ -217,9 +211,6 @@ public class SubmitRequest extends RequestBase implements JsonpSerializable { private final Map scriptFields; - @Nullable - private final Time scroll; - private final List searchAfter; @Nullable @@ -287,7 +278,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; @@ -296,7 +286,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; @@ -306,7 +295,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; @@ -554,17 +542,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. @@ -646,18 +623,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) @@ -744,14 +709,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} */ @@ -1239,9 +1196,6 @@ public static class Builder extends RequestBase.AbstractBuilder impleme @Nullable private List> indicesBoost; - @Nullable - private Time keepAlive; - @Nullable private Boolean keepOnCompletion; @@ -1266,9 +1220,6 @@ public static class Builder extends RequestBase.AbstractBuilder impleme @Nullable private Query postFilter; - @Nullable - private Long preFilterShardSize; - @Nullable private String preference; @@ -1296,9 +1247,6 @@ public static class Builder extends RequestBase.AbstractBuilder impleme @Nullable private Map scriptFields; - @Nullable - private Time scroll; - @Nullable private List searchAfter; @@ -1733,27 +1681,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. @@ -1878,18 +1805,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) @@ -2062,21 +1977,6 @@ public final Builder scriptFields(String key, Function> fn) { - return this.scroll(fn.apply(new Time.Builder()).build()); - } - /** * API name: {@code search_after} *

@@ -2544,9 +2444,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 b30c95524..be88f78f9 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/8.18/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 58bf8d431..d5deb97c4 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/8.18/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/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/doc-files/api-spec.html b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html index 29393578e..7b5433098 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html @@ -20,7 +20,7 @@ '_global.clear_scroll.Response': '_global/clear_scroll/ClearScrollResponse.ts#L22-L36', '_global.close_point_in_time.Request': '_global/close_point_in_time/ClosePointInTimeRequest.ts#L23-L43', '_global.close_point_in_time.Response': '_global/close_point_in_time/ClosePointInTimeResponse.ts#L22-L36', -'_global.count.Request': '_global/count/CountRequest.ts#L26-L121', +'_global.count.Request': '_global/count/CountRequest.ts#L26-L123', '_global.count.Response': '_global/count/CountResponse.ts#L23-L25', '_global.create.Request': '_global/create/CreateRequest.ts#L32-L96', '_global.create.Response': '_global/create/CreateResponse.ts#L22-L24', @@ -991,24 +991,24 @@ 'async_search.delete.Response': 'async_search/delete/AsyncSearchDeleteResponse.ts#L22-L24', 'async_search.get.Request': 'async_search/get/AsyncSearchGetRequest.ts#L24-L57', 'async_search.get.Response': 'async_search/get/AsyncSearchGetResponse.ts#L22-L24', -'async_search.status.Request': 'async_search/status/AsyncSearchStatusRequest.ts#L23-L39', +'async_search.status.Request': 'async_search/status/AsyncSearchStatusRequest.ts#L24-L48', 'async_search.status.Response': 'async_search/status/AsyncSearchStatusResponse.ts#L39-L41', 'async_search.status.StatusResponseBase': 'async_search/status/AsyncSearchStatusResponse.ts#L24-L38', -'async_search.submit.Request': 'async_search/submit/AsyncSearchSubmitRequest.ts#L55-L290', +'async_search.submit.Request': 'async_search/submit/AsyncSearchSubmitRequest.ts#L55-L280', 'async_search.submit.Response': 'async_search/submit/AsyncSearchSubmitResponse.ts#L22-L24', 'autoscaling._types.AutoscalingPolicy': 'autoscaling/_types/AutoscalingPolicy.ts#L23-L30', -'autoscaling.delete_autoscaling_policy.Request': 'autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyRequest.ts#L23-L36', +'autoscaling.delete_autoscaling_policy.Request': 'autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyRequest.ts#L24-L48', 'autoscaling.delete_autoscaling_policy.Response': 'autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyResponse.ts#L22-L24', 'autoscaling.get_autoscaling_capacity.AutoscalingCapacity': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L38-L41', 'autoscaling.get_autoscaling_capacity.AutoscalingDecider': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L52-L56', 'autoscaling.get_autoscaling_capacity.AutoscalingDeciders': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L31-L36', 'autoscaling.get_autoscaling_capacity.AutoscalingNode': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L48-L50', 'autoscaling.get_autoscaling_capacity.AutoscalingResources': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L43-L46', -'autoscaling.get_autoscaling_capacity.Request': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityRequest.ts#L22-L42', +'autoscaling.get_autoscaling_capacity.Request': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityRequest.ts#L23-L51', 'autoscaling.get_autoscaling_capacity.Response': 'autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L25-L29', -'autoscaling.get_autoscaling_policy.Request': 'autoscaling/get_autoscaling_policy/GetAutoscalingPolicyRequest.ts#L23-L36', +'autoscaling.get_autoscaling_policy.Request': 'autoscaling/get_autoscaling_policy/GetAutoscalingPolicyRequest.ts#L24-L44', 'autoscaling.get_autoscaling_policy.Response': 'autoscaling/get_autoscaling_policy/GetAutoscalingPolicyResponse.ts#L22-L24', -'autoscaling.put_autoscaling_policy.Request': 'autoscaling/put_autoscaling_policy/PutAutoscalingPolicyRequest.ts#L24-L39', +'autoscaling.put_autoscaling_policy.Request': 'autoscaling/put_autoscaling_policy/PutAutoscalingPolicyRequest.ts#L25-L51', 'autoscaling.put_autoscaling_policy.Response': 'autoscaling/put_autoscaling_policy/PutAutoscalingPolicyResponse.ts#L22-L24', 'cat._types.CatAnomalyDetectorColumn': 'cat/_types/CatBase.ts#L32-L401', 'cat._types.CatDatafeedColumn': 'cat/_types/CatBase.ts#L405-L471', @@ -1318,7 +1318,7 @@ 'enrich.delete_policy.Response': 'enrich/delete_policy/DeleteEnrichPolicyResponse.ts#L22-L24', 'enrich.execute_policy.EnrichPolicyPhase': 'enrich/execute_policy/types.ts#L24-L29', 'enrich.execute_policy.ExecuteEnrichPolicyStatus': 'enrich/execute_policy/types.ts#L20-L22', -'enrich.execute_policy.Request': 'enrich/execute_policy/ExecuteEnrichPolicyRequest.ts#L23-L44', +'enrich.execute_policy.Request': 'enrich/execute_policy/ExecuteEnrichPolicyRequest.ts#L23-L45', 'enrich.execute_policy.Response': 'enrich/execute_policy/ExecuteEnrichPolicyResponse.ts#L23-L28', 'enrich.get_policy.Request': 'enrich/get_policy/GetEnrichPolicyRequest.ts#L23-L38', 'enrich.get_policy.Response': 'enrich/get_policy/GetEnrichPolicyResponse.ts#L22-L24', @@ -1343,8 +1343,8 @@ 'eql.search.Response': 'eql/search/EqlSearchResponse.ts#L22-L24', 'eql.search.ResultPosition': 'eql/search/types.ts#L20-L32', 'esql._types.TableValuesContainer': 'esql/_types/TableValuesContainer.ts#L22-L28', -'esql.query.EsqlFormat': 'esql/query/QueryRequest.ts#L91-L100', -'esql.query.Request': 'esql/query/QueryRequest.ts#L26-L89', +'esql.query.EsqlFormat': 'esql/query/QueryRequest.ts#L93-L102', +'esql.query.Request': 'esql/query/QueryRequest.ts#L26-L91', 'esql.query.Response': 'esql/query/QueryResponse.ts#L22-L25', 'features._types.Feature': 'features/_types/Feature.ts#L20-L23', 'features.get_features.Request': 'features/get_features/GetFeaturesRequest.ts#L22-L26', @@ -1360,7 +1360,7 @@ 'graph._types.Vertex': 'graph/_types/Vertex.ts#L23-L28', 'graph._types.VertexDefinition': 'graph/_types/Vertex.ts#L30-L59', 'graph._types.VertexInclude': 'graph/_types/Vertex.ts#L61-L64', -'graph.explore.Request': 'graph/explore/GraphExploreRequest.ts#L28-L72', +'graph.explore.Request': 'graph/explore/GraphExploreRequest.ts#L28-L78', 'graph.explore.Response': 'graph/explore/GraphExploreResponse.ts#L25-L33', 'ilm._types.Actions': 'ilm/_types/Phase.ts#L42-L96', 'ilm._types.AllocateAction': 'ilm/_types/Phase.ts#L136-L142', @@ -1530,7 +1530,7 @@ 'indices.downsample.Response': 'indices/downsample/Response.ts#L22-L25', 'indices.exists.Request': 'indices/exists/IndicesExistsRequest.ts#L23-L73', 'indices.exists_alias.Request': 'indices/exists_alias/IndicesExistsAliasRequest.ts#L23-L69', -'indices.exists_index_template.Request': 'indices/exists_index_template/IndicesExistsIndexTemplateRequest.ts#L24-L41', +'indices.exists_index_template.Request': 'indices/exists_index_template/IndicesExistsIndexTemplateRequest.ts#L24-L43', 'indices.exists_template.Request': 'indices/exists_template/IndicesExistsTemplateRequest.ts#L24-L39', 'indices.explain_data_lifecycle.DataStreamLifecycleExplain': 'indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L31-L41', 'indices.explain_data_lifecycle.Request': 'indices/explain_data_lifecycle/IndicesExplainDataLifecycleRequest.ts#L24-L39', @@ -1616,7 +1616,7 @@ 'indices.resolve_cluster.Request': 'indices/resolve_cluster/ResolveClusterRequest.ts#L23-L62', 'indices.resolve_cluster.ResolveClusterInfo': 'indices/resolve_cluster/ResolveClusterResponse.ts#L29-L55', 'indices.resolve_cluster.Response': 'indices/resolve_cluster/ResolveClusterResponse.ts#L24-L27', -'indices.resolve_index.Request': 'indices/resolve_index/ResolveIndexRequest.ts#L23-L60', +'indices.resolve_index.Request': 'indices/resolve_index/ResolveIndexRequest.ts#L23-L61', 'indices.resolve_index.ResolveIndexAliasItem': 'indices/resolve_index/ResolveIndexResponse.ts#L37-L40', 'indices.resolve_index.ResolveIndexDataStreamsItem': 'indices/resolve_index/ResolveIndexResponse.ts#L42-L46', 'indices.resolve_index.ResolveIndexItem': 'indices/resolve_index/ResolveIndexResponse.ts#L30-L35', @@ -1755,32 +1755,32 @@ 'ingest._types.UrlDecodeProcessor': 'ingest/_types/Processors.ts#L1561-L1577', 'ingest._types.UserAgentProcessor': 'ingest/_types/Processors.ts#L514-L545', 'ingest._types.UserAgentProperty': 'ingest/_types/Processors.ts#L547-L553', -'ingest.delete_geoip_database.Request': 'ingest/delete_geoip_database/DeleteGeoipDatabaseRequest.ts#L24-L48', +'ingest.delete_geoip_database.Request': 'ingest/delete_geoip_database/DeleteGeoipDatabaseRequest.ts#L24-L49', 'ingest.delete_geoip_database.Response': 'ingest/delete_geoip_database/DeleteGeoipDatabaseResponse.ts#L22-L24', -'ingest.delete_pipeline.Request': 'ingest/delete_pipeline/DeletePipelineRequest.ts#L24-L52', +'ingest.delete_pipeline.Request': 'ingest/delete_pipeline/DeletePipelineRequest.ts#L24-L54', 'ingest.delete_pipeline.Response': 'ingest/delete_pipeline/DeletePipelineResponse.ts#L22-L24', 'ingest.geo_ip_stats.GeoIpDownloadStatistics': 'ingest/geo_ip_stats/types.ts#L24-L37', 'ingest.geo_ip_stats.GeoIpNodeDatabaseName': 'ingest/geo_ip_stats/types.ts#L47-L50', 'ingest.geo_ip_stats.GeoIpNodeDatabases': 'ingest/geo_ip_stats/types.ts#L39-L45', -'ingest.geo_ip_stats.Request': 'ingest/geo_ip_stats/IngestGeoIpStatsRequest.ts#L22-L29', +'ingest.geo_ip_stats.Request': 'ingest/geo_ip_stats/IngestGeoIpStatsRequest.ts#L22-L31', 'ingest.geo_ip_stats.Response': 'ingest/geo_ip_stats/IngestGeoIpStatsResponse.ts#L24-L31', 'ingest.get_geoip_database.DatabaseConfigurationMetadata': 'ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L29-L34', -'ingest.get_geoip_database.Request': 'ingest/get_geoip_database/GetGeoipDatabaseRequest.ts#L24-L46', +'ingest.get_geoip_database.Request': 'ingest/get_geoip_database/GetGeoipDatabaseRequest.ts#L24-L47', 'ingest.get_geoip_database.Response': 'ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L25-L27', -'ingest.get_pipeline.Request': 'ingest/get_pipeline/GetPipelineRequest.ts#L24-L50', +'ingest.get_pipeline.Request': 'ingest/get_pipeline/GetPipelineRequest.ts#L24-L52', 'ingest.get_pipeline.Response': 'ingest/get_pipeline/GetPipelineResponse.ts#L23-L26', -'ingest.processor_grok.Request': 'ingest/processor_grok/GrokProcessorPatternsRequest.ts#L22-L31', +'ingest.processor_grok.Request': 'ingest/processor_grok/GrokProcessorPatternsRequest.ts#L22-L33', 'ingest.processor_grok.Response': 'ingest/processor_grok/GrokProcessorPatternsResponse.ts#L22-L24', -'ingest.put_geoip_database.Request': 'ingest/put_geoip_database/PutGeoipDatabaseRequest.ts#L25-L57', +'ingest.put_geoip_database.Request': 'ingest/put_geoip_database/PutGeoipDatabaseRequest.ts#L25-L58', 'ingest.put_geoip_database.Response': 'ingest/put_geoip_database/PutGeoipDatabaseResponse.ts#L22-L24', -'ingest.put_pipeline.Request': 'ingest/put_pipeline/PutPipelineRequest.ts#L25-L83', +'ingest.put_pipeline.Request': 'ingest/put_pipeline/PutPipelineRequest.ts#L25-L84', 'ingest.put_pipeline.Response': 'ingest/put_pipeline/PutPipelineResponse.ts#L22-L24', 'ingest.simulate.Document': 'ingest/simulate/types.ts#L62-L76', 'ingest.simulate.DocumentSimulation': 'ingest/simulate/types.ts#L78-L108', 'ingest.simulate.Ingest': 'ingest/simulate/types.ts#L29-L37', 'ingest.simulate.PipelineSimulation': 'ingest/simulate/types.ts#L52-L60', 'ingest.simulate.Redact': 'ingest/simulate/types.ts#L39-L44', -'ingest.simulate.Request': 'ingest/simulate/SimulatePipelineRequest.ts#L25-L57', +'ingest.simulate.Request': 'ingest/simulate/SimulatePipelineRequest.ts#L25-L59', 'ingest.simulate.Response': 'ingest/simulate/SimulatePipelineResponse.ts#L22-L24', 'ingest.simulate.SimulateDocumentResult': 'ingest/simulate/types.ts#L46-L50', 'license._types.License': 'license/_types/License.ts#L42-L53', @@ -1809,8 +1809,8 @@ 'logstash.get_pipeline.Request': 'logstash/get_pipeline/LogstashGetPipelineRequest.ts#L23-L37', 'logstash.get_pipeline.Response': 'logstash/get_pipeline/LogstashGetPipelineResponse.ts#L24-L27', 'logstash.put_pipeline.Request': 'logstash/put_pipeline/LogstashPutPipelineRequest.ts#L24-L39', -'migration.deprecations.Deprecation': 'migration/deprecations/types.ts#L29-L35', -'migration.deprecations.DeprecationLevel': 'migration/deprecations/types.ts#L20-L27', +'migration.deprecations.Deprecation': 'migration/deprecations/types.ts#L32-L40', +'migration.deprecations.DeprecationLevel': 'migration/deprecations/types.ts#L23-L30', 'migration.deprecations.Request': 'migration/deprecations/DeprecationInfoRequest.ts#L23-L32', 'migration.deprecations.Response': 'migration/deprecations/DeprecationInfoResponse.ts#L23-L31', 'migration.get_feature_upgrade_status.MigrationFeature': 'migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L37-L42', @@ -2303,23 +2303,23 @@ 'query_rules._types.QueryRuleCriteriaType': 'query_rules/_types/QueryRuleset.ts#L55-L68', 'query_rules._types.QueryRuleType': 'query_rules/_types/QueryRuleset.ts#L44-L47', 'query_rules._types.QueryRuleset': 'query_rules/_types/QueryRuleset.ts#L25-L34', -'query_rules.delete_rule.Request': 'query_rules/delete_rule/QueryRuleDeleteRequest.ts#L22-L40', +'query_rules.delete_rule.Request': 'query_rules/delete_rule/QueryRuleDeleteRequest.ts#L22-L41', 'query_rules.delete_rule.Response': 'query_rules/delete_rule/QueryRuleDeleteResponse.ts#L22-L24', 'query_rules.delete_ruleset.Request': 'query_rules/delete_ruleset/QueryRulesetDeleteRequest.ts#L22-L35', 'query_rules.delete_ruleset.Response': 'query_rules/delete_ruleset/QueryRulesetDeleteResponse.ts#L22-L24', -'query_rules.get_rule.Request': 'query_rules/get_rule/QueryRuleGetRequest.ts#L22-L40', +'query_rules.get_rule.Request': 'query_rules/get_rule/QueryRuleGetRequest.ts#L22-L42', 'query_rules.get_rule.Response': 'query_rules/get_rule/QueryRuleGetResponse.ts#L22-L24', -'query_rules.get_ruleset.Request': 'query_rules/get_ruleset/QueryRulesetGetRequest.ts#L22-L35', +'query_rules.get_ruleset.Request': 'query_rules/get_ruleset/QueryRulesetGetRequest.ts#L22-L36', 'query_rules.get_ruleset.Response': 'query_rules/get_ruleset/QueryRulesetGetResponse.ts#L22-L24', 'query_rules.list_rulesets.QueryRulesetListItem': 'query_rules/list_rulesets/types.ts#L23-L42', -'query_rules.list_rulesets.Request': 'query_rules/list_rulesets/QueryRulesetListRequest.ts#L22-L39', +'query_rules.list_rulesets.Request': 'query_rules/list_rulesets/QueryRulesetListRequest.ts#L22-L40', 'query_rules.list_rulesets.Response': 'query_rules/list_rulesets/QueryRulesetListResponse.ts#L23-L28', -'query_rules.put_rule.Request': 'query_rules/put_rule/QueryRulePutRequest.ts#L28-L56', +'query_rules.put_rule.Request': 'query_rules/put_rule/QueryRulePutRequest.ts#L28-L57', 'query_rules.put_rule.Response': 'query_rules/put_rule/QueryRulePutResponse.ts#L22-L26', -'query_rules.put_ruleset.Request': 'query_rules/put_ruleset/QueryRulesetPutRequest.ts#L23-L43', +'query_rules.put_ruleset.Request': 'query_rules/put_ruleset/QueryRulesetPutRequest.ts#L23-L44', 'query_rules.put_ruleset.Response': 'query_rules/put_ruleset/QueryRulesetPutResponse.ts#L22-L26', 'query_rules.test.QueryRulesetMatchedRule': 'query_rules/test/QueryRulesetTestResponse.ts#L30-L39', -'query_rules.test.Request': 'query_rules/test/QueryRulesetTestRequest.ts#L24-L44', +'query_rules.test.Request': 'query_rules/test/QueryRulesetTestRequest.ts#L24-L45', 'query_rules.test.Response': 'query_rules/test/QueryRulesetTestResponse.ts#L23-L28', 'rollup._types.DateHistogramGrouping': 'rollup/_types/Groupings.ts#L42-L73', 'rollup._types.FieldMetric': 'rollup/_types/Metric.ts#L30-L35', @@ -2389,7 +2389,8 @@ 'searchable_snapshots.stats.Request': 'searchable_snapshots/stats/SearchableSnapshotsStatsRequest.ts#L24-L35', 'searchable_snapshots.stats.Response': 'searchable_snapshots/stats/SearchableSnapshotsStatsResponse.ts#L22-L27', 'security._types.Access': 'security/_types/Access.ts#L22-L31', -'security._types.ApiKey': 'security/_types/ApiKey.ts#L26-L88', +'security._types.ApiKey': 'security/_types/ApiKey.ts#L27-L113', +'security._types.ApiKeyType': 'security/_types/ApiKey.ts#L115-L118', 'security._types.ApplicationGlobalUserPrivileges': 'security/_types/Privileges.ts#L410-L412', 'security._types.ApplicationPrivileges': 'security/_types/Privileges.ts#L27-L40', 'security._types.BulkError': 'security/_types/Bulk.ts#L24-L33', @@ -2429,8 +2430,9 @@ 'security._types.UserProfileWithMetadata': 'security/_types/UserProfile.ts#L49-L52', 'security.activate_user_profile.Request': 'security/activate_user_profile/Request.ts#L23-L39', 'security.activate_user_profile.Response': 'security/activate_user_profile/Response.ts#L22-L24', +'security.authenticate.AuthenticateApiKey': 'security/authenticate/SecurityAuthenticateResponse.ts#L44-L47', 'security.authenticate.Request': 'security/authenticate/SecurityAuthenticateRequest.ts#L22-L33', -'security.authenticate.Response': 'security/authenticate/SecurityAuthenticateResponse.ts#L25-L43', +'security.authenticate.Response': 'security/authenticate/SecurityAuthenticateResponse.ts#L24-L42', 'security.authenticate.Token': 'security/authenticate/types.ts#L22-L29', 'security.bulk_delete_role.Request': 'security/bulk_delete_role/SecurityBulkDeleteRoleRequest.ts#L23-L43', 'security.bulk_delete_role.Response': 'security/bulk_delete_role/SecurityBulkDeleteRoleResponse.ts#L22-L37', @@ -2666,18 +2668,18 @@ 'snapshot.verify_repository.Request': 'snapshot/verify_repository/SnapshotVerifyRepositoryRequest.ts#L24-L38', 'snapshot.verify_repository.Response': 'snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L23-L25', 'sql.Column': 'sql/types.ts#L23-L26', -'sql.clear_cursor.Request': 'sql/clear_cursor/ClearSqlCursorRequest.ts#L22-L34', +'sql.clear_cursor.Request': 'sql/clear_cursor/ClearSqlCursorRequest.ts#L22-L35', 'sql.clear_cursor.Response': 'sql/clear_cursor/ClearSqlCursorResponse.ts#L20-L22', -'sql.delete_async.Request': 'sql/delete_async/SqlDeleteAsyncRequest.ts#L23-L35', +'sql.delete_async.Request': 'sql/delete_async/SqlDeleteAsyncRequest.ts#L23-L38', 'sql.delete_async.Response': 'sql/delete_async/SqlDeleteAsyncResponse.ts#L22-L24', -'sql.get_async.Request': 'sql/get_async/SqlGetAsyncRequest.ts#L24-L58', +'sql.get_async.Request': 'sql/get_async/SqlGetAsyncRequest.ts#L24-L60', 'sql.get_async.Response': 'sql/get_async/SqlGetAsyncResponse.ts#L23-L60', -'sql.get_async_status.Request': 'sql/get_async_status/SqlGetAsyncStatusRequest.ts#L23-L35', +'sql.get_async_status.Request': 'sql/get_async_status/SqlGetAsyncStatusRequest.ts#L23-L37', 'sql.get_async_status.Response': 'sql/get_async_status/SqlGetAsyncStatusResponse.ts#L23-L55', -'sql.query.Request': 'sql/query/QuerySqlRequest.ts#L28-L122', +'sql.query.Request': 'sql/query/QuerySqlRequest.ts#L28-L124', 'sql.query.Response': 'sql/query/QuerySqlResponse.ts#L23-L60', -'sql.query.SqlFormat': 'sql/query/QuerySqlRequest.ts#L124-L132', -'sql.translate.Request': 'sql/translate/TranslateSqlRequest.ts#L25-L54', +'sql.query.SqlFormat': 'sql/query/QuerySqlRequest.ts#L126-L134', +'sql.translate.Request': 'sql/translate/TranslateSqlRequest.ts#L25-L56', 'sql.translate.Response': 'sql/translate/TranslateSqlResponse.ts#L27-L37', 'ssl.certificates.CertificateInformation': 'ssl/certificates/types.ts#L22-L31', 'ssl.certificates.Request': 'ssl/certificates/GetCertificatesRequest.ts#L22-L45', @@ -2687,18 +2689,18 @@ 'synonyms._types.SynonymsUpdateResult': 'synonyms/_types/SynonymsUpdateResult.ts#L23-L34', 'synonyms.delete_synonym.Request': 'synonyms/delete_synonym/SynonymsDeleteRequest.ts#L22-L35', 'synonyms.delete_synonym.Response': 'synonyms/delete_synonym/SynonymsDeleteResponse.ts#L22-L24', -'synonyms.delete_synonym_rule.Request': 'synonyms/delete_synonym_rule/SynonymRuleDeleteRequest.ts#L22-L40', +'synonyms.delete_synonym_rule.Request': 'synonyms/delete_synonym_rule/SynonymRuleDeleteRequest.ts#L22-L41', 'synonyms.delete_synonym_rule.Response': 'synonyms/delete_synonym_rule/SynonymRuleDeleteResponse.ts#L22-L24', 'synonyms.get_synonym.Request': 'synonyms/get_synonym/SynonymsGetRequest.ts#L23-L48', 'synonyms.get_synonym.Response': 'synonyms/get_synonym/SynonymsGetResponse.ts#L23-L28', -'synonyms.get_synonym_rule.Request': 'synonyms/get_synonym_rule/SynonymRuleGetRequest.ts#L22-L40', +'synonyms.get_synonym_rule.Request': 'synonyms/get_synonym_rule/SynonymRuleGetRequest.ts#L22-L41', 'synonyms.get_synonym_rule.Response': 'synonyms/get_synonym_rule/SynonymRuleGetResponse.ts#L22-L24', -'synonyms.get_synonyms_sets.Request': 'synonyms/get_synonyms_sets/SynonymsSetsGetRequest.ts#L22-L41', +'synonyms.get_synonyms_sets.Request': 'synonyms/get_synonyms_sets/SynonymsSetsGetRequest.ts#L22-L42', 'synonyms.get_synonyms_sets.Response': 'synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L23-L28', 'synonyms.get_synonyms_sets.SynonymsSetItem': 'synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L30-L39', -'synonyms.put_synonym.Request': 'synonyms/put_synonym/SynonymsPutRequest.ts#L23-L42', +'synonyms.put_synonym.Request': 'synonyms/put_synonym/SynonymsPutRequest.ts#L23-L44', 'synonyms.put_synonym.Response': 'synonyms/put_synonym/SynonymsPutResponse.ts#L23-L28', -'synonyms.put_synonym_rule.Request': 'synonyms/put_synonym_rule/SynonymRulePutRequest.ts#L23-L47', +'synonyms.put_synonym_rule.Request': 'synonyms/put_synonym_rule/SynonymRulePutRequest.ts#L23-L48', 'synonyms.put_synonym_rule.Response': 'synonyms/put_synonym_rule/SynonymRulePutResponse.ts#L22-L24', 'tasks._types.GroupBy': 'tasks/_types/GroupBy.ts#L20-L27', 'tasks._types.NodeTasks': 'tasks/_types/TaskListResponseBase.ts#L49-L57', @@ -2790,7 +2792,7 @@ 'watcher._types.ExecutionState': 'watcher/_types/Action.ts#L114-L118', 'watcher._types.ExecutionStatus': 'watcher/_types/Execution.ts#L38-L47', 'watcher._types.ExecutionThreadPool': 'watcher/_types/Execution.ts#L94-L97', -'watcher._types.HourAndMinute': 'watcher/_types/Schedule.ts#L105-L108', +'watcher._types.HourAndMinute': 'watcher/_types/Schedule.ts#L106-L109', 'watcher._types.HourlySchedule': 'watcher/_types/Schedule.ts#L47-L49', 'watcher._types.HttpEmailAttachment': 'watcher/_types/Actions.ts#L218-L222', 'watcher._types.HttpInput': 'watcher/_types/Input.ts#L44-L48', @@ -2821,9 +2823,9 @@ 'watcher._types.QueryWatch': 'watcher/_types/Watch.ts#L58-L64', 'watcher._types.ReportingEmailAttachment': 'watcher/_types/Actions.ts#L224-L232', 'watcher._types.ResponseContentType': 'watcher/_types/Input.ts#L106-L110', -'watcher._types.ScheduleContainer': 'watcher/_types/Schedule.ts#L80-L91', -'watcher._types.ScheduleTimeOfDay': 'watcher/_types/Schedule.ts#L98-L103', -'watcher._types.ScheduleTriggerEvent': 'watcher/_types/Schedule.ts#L93-L96', +'watcher._types.ScheduleContainer': 'watcher/_types/Schedule.ts#L80-L92', +'watcher._types.ScheduleTimeOfDay': 'watcher/_types/Schedule.ts#L99-L104', +'watcher._types.ScheduleTriggerEvent': 'watcher/_types/Schedule.ts#L94-L97', 'watcher._types.ScriptCondition': 'watcher/_types/Conditions.ts#L79-L87', 'watcher._types.SearchInput': 'watcher/_types/Input.ts#L112-L116', 'watcher._types.SearchInputRequestBody': 'watcher/_types/Input.ts#L147-L149', @@ -2837,9 +2839,9 @@ 'watcher._types.SlackMessage': 'watcher/_types/Actions.ts#L130-L137', 'watcher._types.SlackResult': 'watcher/_types/Actions.ts#L96-L99', 'watcher._types.ThrottleState': 'watcher/_types/Action.ts#L120-L123', -'watcher._types.TimeOfMonth': 'watcher/_types/Schedule.ts#L110-L113', -'watcher._types.TimeOfWeek': 'watcher/_types/Schedule.ts#L115-L118', -'watcher._types.TimeOfYear': 'watcher/_types/Schedule.ts#L120-L124', +'watcher._types.TimeOfMonth': 'watcher/_types/Schedule.ts#L111-L114', +'watcher._types.TimeOfWeek': 'watcher/_types/Schedule.ts#L116-L119', +'watcher._types.TimeOfYear': 'watcher/_types/Schedule.ts#L121-L125', 'watcher._types.TriggerContainer': 'watcher/_types/Trigger.ts#L23-L28', 'watcher._types.TriggerEventContainer': 'watcher/_types/Trigger.ts#L32-L37', 'watcher._types.TriggerEventResult': 'watcher/_types/Trigger.ts#L39-L43', @@ -2954,10 +2956,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/b7c7c41eabca623640a4fc51492d1cd7063ca8b7/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/154941cbcea1671934b06daeef6764320bb0ebe7/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 1de73434b..fea361a79 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 cf0c2fac9..d828a7da6 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/esql/ElasticsearchEsqlAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/esql/ElasticsearchEsqlAsyncClient.java index 47bfccd7a..9a11dbf26 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 49d53ebe4..764e0a340 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/graph/ElasticsearchGraphAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/graph/ElasticsearchGraphAsyncClient.java index 6dbd77f27..287bb6572 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 behaviour 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 behaviour 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 ce8f4118f..6d21ad664 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 behaviour 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 behaviour 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..595948012 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 behaviour 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 777503f49..c8ae7de26 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 09f68d90a..fcd43602d 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/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/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 1277f47d2..b40fc81b6 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 ebb9b9631..75fa037b9 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/security/ApiKey.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ApiKey.java index 60ef53c24..ea72fd852 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ApiKey.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/security/ApiKey.java @@ -66,55 +66,62 @@ */ @JsonpDeserializable public class ApiKey implements JsonpSerializable { - @Nullable - private final Long creation; + private final String id; + + private final String name; + + private final ApiKeyType type; + + private final long creation; @Nullable private final Long expiration; - private final String id; + private final boolean invalidated; @Nullable - private final Boolean invalidated; + private final Long invalidation; - private final String name; + private final String username; - @Nullable private final String realm; @Nullable private final String realmType; - @Nullable - private final String username; - - @Nullable - private final String profileUid; - private final Map 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..e9969c78d 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 + * 10000 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 + * 10000 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..91d230ebd 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 + * 10000 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 + * 10000 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..f0c16e174 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 + * 10000 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 {