diff --git a/.ci/make.sh b/.ci/make.sh index 7663b514f..7bdc17c5e 100755 --- a/.ci/make.sh +++ b/.ci/make.sh @@ -196,8 +196,8 @@ if [[ "$CMD" == "release" ]]; then echo "Dry run: building and publishing to the local repository" gradle_task="publishForReleaseManager" else - echo "Releasing to Maven snapshot repo" - gradle_task="publishToSonatype closeAndReleaseStagingRepositories" + echo "Releasing to Maven repo" + gradle_task="publishForMavenCentral" fi docker run --rm --env VERSION=$VERSION -u "$(id -u)" \ $git_mount $src_mount $output_mount \ @@ -206,7 +206,7 @@ if [[ "$CMD" == "release" ]]; then $gradle_task mkdir -p signed-artifacts/$VERSION - cp java-client/build/libs/java-client-${VERSION}-javadoc.jar signed-artifacts/$VERSION/elasticsearch-java-${VERSION}-javadoc.jar + cp .ci/output/repository/co/elastic/clients/elasticsearch-java/$VERSION/elasticsearch-java-${VERSION}-javadoc.jar signed-artifacts/$VERSION/elasticsearch-java-${VERSION}-javadoc.jar fi if [[ "$CMD" == "bump" ]]; then diff --git a/build.gradle.kts b/build.gradle.kts index bc25c8637..8c17c11fd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -85,6 +85,40 @@ tasks.register(name = "resolveDependencies") { } } +// gradle tasks --all to check tasks in subprojects +tasks.register(name = "publishForMavenCentral") { + group = "Publishing" + description = "Publishes artifacts to Maven Central" + dependsOn( + ":java-client:publishAllPublicationsToBuildRepository", + ":java-client:generateLicenseReport", + ":java-client:publishToSonatype", + "closeAndReleaseStagingRepositories", + ) + doLast { + val version = this.project.version.toString() + println("Releasing version $version") + + val releaseDir = File(rootProject.layout.buildDirectory.get().asFile, "release") + releaseDir.mkdirs() + + File(rootProject.layout.buildDirectory.get().asFile, "repository/co/elastic/clients").listFiles()?.forEach { artifact -> + println("Releasing artifact " + artifact.name) + + val versionDir = File(artifact, version) + + versionDir.listFiles()?.forEach { file -> + if (file.name.endsWith(".jar") || file.name.endsWith(".pom")) { + var name = file.name + + file.copyTo(File(releaseDir, name), overwrite = true) + } + } + } + } +} + +// TODO delete tasks.register(name = "publishForReleaseManager") { group = "Publishing" description = "Publishes artifacts in a format suitable for the Elastic release manager" diff --git a/config/version.txt b/config/version.txt index 03ea4a83b..18f125092 100644 --- a/config/version.txt +++ b/config/version.txt @@ -1 +1 @@ -9.1.4 +9.1.5 diff --git a/java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java b/java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java index 638a5e01a..ce21cae18 100644 --- a/java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java +++ b/java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java @@ -21,5 +21,5 @@ // Package private class VersionInfo { - static final String VERSION = "9.1.4"; + static final String VERSION = "9.1.5"; } 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 9071ceffe..bbddcaa73 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 @@ -137,6 +137,7 @@ import co.elastic.clients.elasticsearch.snapshot.ElasticsearchSnapshotAsyncClient; import co.elastic.clients.elasticsearch.sql.ElasticsearchSqlAsyncClient; import co.elastic.clients.elasticsearch.ssl.ElasticsearchSslAsyncClient; +import co.elastic.clients.elasticsearch.streams.ElasticsearchStreamsAsyncClient; import co.elastic.clients.elasticsearch.synonyms.ElasticsearchSynonymsAsyncClient; import co.elastic.clients.elasticsearch.tasks.ElasticsearchTasksAsyncClient; import co.elastic.clients.elasticsearch.text_structure.ElasticsearchTextStructureAsyncClient; @@ -346,6 +347,10 @@ public ElasticsearchSslAsyncClient ssl() { return new ElasticsearchSslAsyncClient(this.transport, this.transportOptions); } + public ElasticsearchStreamsAsyncClient streams() { + return new ElasticsearchStreamsAsyncClient(this.transport, this.transportOptions); + } + public ElasticsearchSynonymsAsyncClient synonyms() { return new ElasticsearchSynonymsAsyncClient(this.transport, this.transportOptions); } 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 0075ce896..6cad8a2fb 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 @@ -138,6 +138,7 @@ import co.elastic.clients.elasticsearch.snapshot.ElasticsearchSnapshotClient; import co.elastic.clients.elasticsearch.sql.ElasticsearchSqlClient; import co.elastic.clients.elasticsearch.ssl.ElasticsearchSslClient; +import co.elastic.clients.elasticsearch.streams.ElasticsearchStreamsClient; import co.elastic.clients.elasticsearch.synonyms.ElasticsearchSynonymsClient; import co.elastic.clients.elasticsearch.tasks.ElasticsearchTasksClient; import co.elastic.clients.elasticsearch.text_structure.ElasticsearchTextStructureClient; @@ -346,6 +347,10 @@ public ElasticsearchSslClient ssl() { return new ElasticsearchSslClient(this.transport, this.transportOptions); } + public ElasticsearchStreamsClient streams() { + return new ElasticsearchStreamsClient(this.transport, this.transportOptions); + } + public ElasticsearchSynonymsClient synonyms() { return new ElasticsearchSynonymsClient(this.transport, this.transportOptions); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/CartesianPoint.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/CartesianPoint.java new file mode 100644 index 000000000..740b72635 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/CartesianPoint.java @@ -0,0 +1,176 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Double; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.CartesianPoint + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CartesianPoint implements JsonpSerializable { + private final double x; + + private final double y; + + // --------------------------------------------------------------------------------------------- + + private CartesianPoint(Builder builder) { + + this.x = ApiTypeHelper.requireNonNull(builder.x, this, "x", 0); + this.y = ApiTypeHelper.requireNonNull(builder.y, this, "y", 0); + + } + + public static CartesianPoint of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code x} + */ + public final double x() { + return this.x; + } + + /** + * Required - API name: {@code y} + */ + public final double y() { + return this.y; + } + + /** + * 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("x"); + generator.write(this.x); + + generator.writeKey("y"); + generator.write(this.y); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CartesianPoint}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Double x; + + private Double y; + + /** + * Required - API name: {@code x} + */ + public final Builder x(double value) { + this.x = value; + return this; + } + + /** + * Required - API name: {@code y} + */ + public final Builder y(double value) { + this.y = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CartesianPoint}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CartesianPoint build() { + _checkSingleUse(); + + return new CartesianPoint(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CartesianPoint} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + CartesianPoint::setupCartesianPointDeserializer); + + protected static void setupCartesianPointDeserializer(ObjectDeserializer op) { + + op.add(Builder::x, JsonpDeserializer.doubleDeserializer(), "x"); + op.add(Builder::y, JsonpDeserializer.doubleDeserializer(), "y"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SortOptions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SortOptions.java index aad9a074e..85832385b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SortOptions.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/SortOptions.java @@ -302,48 +302,57 @@ public SortOptions build() { return new SortOptions(this); } + @Override + public Builder withJson(JsonParser parser, JsonpMapper mapper) { + deserializeBuilder(this, parser.next(), parser, mapper); + return this; + } } public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer.lazy(() -> JsonpDeserializer .of(EnumSet.of(JsonParser.Event.START_OBJECT, JsonParser.Event.VALUE_STRING), (parser, mapper, event) -> { SortOptions.Builder b = new SortOptions.Builder(); - - if (event == JsonParser.Event.VALUE_STRING) { - switch (parser.getString()) { - case "_score" : - b.score(s -> s); - break; - case "_doc" : - b.doc(d -> d); - break; - default : - b.field(f -> f.field(parser.getString())); - } - return b.build(); - } - - JsonpUtils.expectEvent(parser, JsonParser.Event.START_OBJECT, event); - JsonpUtils.expectNextEvent(parser, JsonParser.Event.KEY_NAME); - switch (parser.getString()) { - case "_score" : - b.score(ScoreSort._DESERIALIZER.deserialize(parser, mapper)); - break; - case "_doc" : - b.doc(ScoreSort._DESERIALIZER.deserialize(parser, mapper)); - break; - case "_geo_distance" : - b.geoDistance(GeoDistanceSort._DESERIALIZER.deserialize(parser, mapper)); - break; - case "_script" : - b.script(ScriptSort._DESERIALIZER.deserialize(parser, mapper)); - break; - default : - // Consumes END_OBJECT - return b.field(FieldSort._DESERIALIZER.deserialize(parser, mapper, JsonParser.Event.KEY_NAME)) - .build(); - } - - JsonpUtils.expectNextEvent(parser, JsonParser.Event.END_OBJECT); + deserializeBuilder(b, event, parser, mapper); return b.build(); })); + + private static void deserializeBuilder(SortOptions.Builder b, JsonParser.Event event, JsonParser parser, + JsonpMapper mapper) { + if (event == JsonParser.Event.VALUE_STRING) { + switch (parser.getString()) { + case "_score" : + b.score(s -> s); + break; + case "_doc" : + b.doc(d -> d); + break; + default : + b.field(f -> f.field(parser.getString())); + } + return; + } + + JsonpUtils.expectEvent(parser, JsonParser.Event.START_OBJECT, event); + JsonpUtils.expectNextEvent(parser, JsonParser.Event.KEY_NAME); + switch (parser.getString()) { + case "_score" : + b.score(ScoreSort._DESERIALIZER.deserialize(parser, mapper)); + break; + case "_doc" : + b.doc(ScoreSort._DESERIALIZER.deserialize(parser, mapper)); + break; + case "_geo_distance" : + b.geoDistance(GeoDistanceSort._DESERIALIZER.deserialize(parser, mapper)); + break; + case "_script" : + b.script(ScriptSort._DESERIALIZER.deserialize(parser, mapper)); + break; + default : + // Consumes END_OBJECT + b.field(FieldSort._DESERIALIZER.deserialize(parser, mapper, JsonParser.Event.KEY_NAME)); + return; + } + + JsonpUtils.expectNextEvent(parser, JsonParser.Event.END_OBJECT); + } } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/TextEmbedding.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/TextEmbedding.java index 35a269181..12d10d182 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/TextEmbedding.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/TextEmbedding.java @@ -59,6 +59,7 @@ */ @JsonpDeserializable public class TextEmbedding implements QueryVectorBuilderVariant, JsonpSerializable { + @Nullable private final String modelId; private final String modelText; @@ -67,7 +68,7 @@ public class TextEmbedding implements QueryVectorBuilderVariant, JsonpSerializab private TextEmbedding(Builder builder) { - this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId"); + this.modelId = builder.modelId; this.modelText = ApiTypeHelper.requireNonNull(builder.modelText, this, "modelText"); } @@ -85,8 +86,12 @@ public QueryVectorBuilder.Kind _queryVectorBuilderKind() { } /** - * Required - API name: {@code model_id} + * Model ID is required for all dense_vector fields but may be inferred for + * semantic_text fields + *

+ * API name: {@code model_id} */ + @Nullable public final String modelId() { return this.modelId; } @@ -109,9 +114,11 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { - generator.writeKey("model_id"); - generator.write(this.modelId); + if (this.modelId != null) { + generator.writeKey("model_id"); + generator.write(this.modelId); + } generator.writeKey("model_text"); generator.write(this.modelText); @@ -129,14 +136,18 @@ public String toString() { */ public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable private String modelId; private String modelText; /** - * Required - API name: {@code model_id} + * Model ID is required for all dense_vector fields but may be inferred for + * semantic_text fields + *

+ * API name: {@code model_id} */ - public final Builder modelId(String value) { + public final Builder modelId(@Nullable String value) { this.modelId = value; return this; } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WriteResponseBase.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WriteResponseBase.java index cbba7d4a1..1b99164d2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WriteResponseBase.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/WriteResponseBase.java @@ -19,6 +19,7 @@ package co.elastic.clients.elasticsearch._types; +import co.elastic.clients.elasticsearch.core.bulk.FailureStoreStatus; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -77,6 +78,9 @@ public abstract class WriteResponseBase implements JsonpSerializable { private final long version; + @Nullable + private final FailureStoreStatus failureStore; + @Nullable private final Boolean forcedRefresh; @@ -91,6 +95,7 @@ protected WriteResponseBase(AbstractBuilder builder) { this.seqNo = builder.seqNo; this.shards = ApiTypeHelper.requireNonNull(builder.shards, this, "shards"); this.version = ApiTypeHelper.requireNonNull(builder.version, this, "version", 0); + this.failureStore = builder.failureStore; this.forcedRefresh = builder.forcedRefresh; } @@ -164,6 +169,16 @@ public final long version() { return this.version; } + /** + * The role of the failure store in this document response + *

+ * API name: {@code failure_store} + */ + @Nullable + public final FailureStoreStatus failureStore() { + return this.failureStore; + } + /** * API name: {@code forced_refresh} */ @@ -207,6 +222,10 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("_version"); generator.write(this.version); + if (this.failureStore != null) { + generator.writeKey("failure_store"); + this.failureStore.serialize(generator, mapper); + } if (this.forcedRefresh != null) { generator.writeKey("forced_refresh"); generator.write(this.forcedRefresh); @@ -239,6 +258,9 @@ public abstract static class AbstractBuilder + * API name: {@code failure_store} + */ + public final BuilderT failureStore(@Nullable FailureStoreStatus value) { + this.failureStore = value; + return self(); + } + /** * API name: {@code forced_refresh} */ @@ -348,6 +380,7 @@ protected static > void setupWriteRes op.add(AbstractBuilder::seqNo, JsonpDeserializer.longDeserializer(), "_seq_no"); op.add(AbstractBuilder::shards, ShardStatistics._DESERIALIZER, "_shards"); op.add(AbstractBuilder::version, JsonpDeserializer.longDeserializer(), "_version"); + op.add(AbstractBuilder::failureStore, FailureStoreStatus._DESERIALIZER, "failure_store"); op.add(AbstractBuilder::forcedRefresh, JsonpDeserializer.booleanDeserializer(), "forced_refresh"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AbstractChangePoint.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AbstractChangePoint.java new file mode 100644 index 000000000..0912af32d --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AbstractChangePoint.java @@ -0,0 +1,149 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +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.Double; +import java.lang.Integer; +import java.util.Objects; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.AbstractChangePoint + +/** + * + * @see API + * specification + */ + +public abstract class AbstractChangePoint implements JsonpSerializable { + private final double pValue; + + private final int changePoint; + + // --------------------------------------------------------------------------------------------- + + protected AbstractChangePoint(AbstractBuilder builder) { + + this.pValue = ApiTypeHelper.requireNonNull(builder.pValue, this, "pValue", 0); + this.changePoint = ApiTypeHelper.requireNonNull(builder.changePoint, this, "changePoint", 0); + + } + + /** + * Required - API name: {@code p_value} + */ + public final double pValue() { + return this.pValue; + } + + /** + * Required - API name: {@code change_point} + */ + public final int changePoint() { + return this.changePoint; + } + + /** + * 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("p_value"); + generator.write(this.pValue); + + generator.writeKey("change_point"); + generator.write(this.changePoint); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + public abstract static class AbstractBuilder> + extends + WithJsonObjectBuilderBase { + private Double pValue; + + private Integer changePoint; + + /** + * Required - API name: {@code p_value} + */ + public final BuilderT pValue(double value) { + this.pValue = value; + return self(); + } + + /** + * Required - API name: {@code change_point} + */ + public final BuilderT changePoint(int value) { + this.changePoint = value; + return self(); + } + + protected abstract BuilderT self(); + + } + + // --------------------------------------------------------------------------------------------- + protected static > void setupAbstractChangePointDeserializer( + ObjectDeserializer op) { + + op.add(AbstractBuilder::pValue, JsonpDeserializer.doubleDeserializer(), "p_value"); + op.add(AbstractBuilder::changePoint, JsonpDeserializer.integerDeserializer(), "change_point"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregate.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregate.java index 22ad48e02..7a927dbcf 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregate.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregate.java @@ -88,6 +88,12 @@ public enum Kind implements JsonEnum { Cardinality("cardinality"), + CartesianBounds("cartesian_bounds"), + + CartesianCentroid("cartesian_centroid"), + + ChangePoint("change_point"), + Children("children"), Composite("composite"), @@ -381,6 +387,59 @@ public CardinalityAggregate cardinality() { return TaggedUnionUtils.get(this, Kind.Cardinality); } + /** + * Is this variant instance of kind {@code cartesian_bounds}? + */ + public boolean isCartesianBounds() { + return _kind == Kind.CartesianBounds; + } + + /** + * Get the {@code cartesian_bounds} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code cartesian_bounds} + * kind. + */ + public CartesianBoundsAggregate cartesianBounds() { + return TaggedUnionUtils.get(this, Kind.CartesianBounds); + } + + /** + * Is this variant instance of kind {@code cartesian_centroid}? + */ + public boolean isCartesianCentroid() { + return _kind == Kind.CartesianCentroid; + } + + /** + * Get the {@code cartesian_centroid} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code cartesian_centroid} + * kind. + */ + public CartesianCentroidAggregate cartesianCentroid() { + return TaggedUnionUtils.get(this, Kind.CartesianCentroid); + } + + /** + * Is this variant instance of kind {@code change_point}? + */ + public boolean isChangePoint() { + return _kind == Kind.ChangePoint; + } + + /** + * Get the {@code change_point} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code change_point} kind. + */ + public ChangePointAggregate changePoint() { + return TaggedUnionUtils.get(this, Kind.ChangePoint); + } + /** * Is this variant instance of kind {@code children}? */ @@ -1592,6 +1651,39 @@ public ObjectBuilder cardinality( return this.cardinality(fn.apply(new CardinalityAggregate.Builder()).build()); } + public ObjectBuilder cartesianBounds(CartesianBoundsAggregate v) { + this._kind = Kind.CartesianBounds; + this._value = v; + return this; + } + + public ObjectBuilder cartesianBounds( + Function> fn) { + return this.cartesianBounds(fn.apply(new CartesianBoundsAggregate.Builder()).build()); + } + + public ObjectBuilder cartesianCentroid(CartesianCentroidAggregate v) { + this._kind = Kind.CartesianCentroid; + this._value = v; + return this; + } + + public ObjectBuilder cartesianCentroid( + Function> fn) { + return this.cartesianCentroid(fn.apply(new CartesianCentroidAggregate.Builder()).build()); + } + + public ObjectBuilder changePoint(ChangePointAggregate v) { + this._kind = Kind.ChangePoint; + this._value = v; + return this; + } + + public ObjectBuilder changePoint( + Function> fn) { + return this.changePoint(fn.apply(new ChangePointAggregate.Builder()).build()); + } + public ObjectBuilder children(ChildrenAggregate v) { this._kind = Kind.Children; this._value = v; @@ -2318,6 +2410,9 @@ public Aggregate build() { deserializers.put("boxplot", BoxPlotAggregate._DESERIALIZER); deserializers.put("bucket_metric_value", BucketMetricValueAggregate._DESERIALIZER); deserializers.put("cardinality", CardinalityAggregate._DESERIALIZER); + deserializers.put("cartesian_bounds", CartesianBoundsAggregate._DESERIALIZER); + deserializers.put("cartesian_centroid", CartesianCentroidAggregate._DESERIALIZER); + deserializers.put("change_point", ChangePointAggregate._DESERIALIZER); deserializers.put("children", ChildrenAggregate._DESERIALIZER); deserializers.put("composite", CompositeAggregate._DESERIALIZER); deserializers.put("simple_long_value", CumulativeCardinalityAggregate._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregateBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregateBuilders.java index 97f5bea73..56937b121 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregateBuilders.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregateBuilders.java @@ -155,6 +155,63 @@ public static Aggregate cardinality( return builder.build(); } + /** + * Creates a builder for the {@link CartesianBoundsAggregate cartesian_bounds} + * {@code Aggregate} variant. + */ + public static CartesianBoundsAggregate.Builder cartesianBounds() { + return new CartesianBoundsAggregate.Builder(); + } + + /** + * Creates a Aggregate of the {@link CartesianBoundsAggregate cartesian_bounds} + * {@code Aggregate} variant. + */ + public static Aggregate cartesianBounds( + Function> fn) { + Aggregate.Builder builder = new Aggregate.Builder(); + builder.cartesianBounds(fn.apply(new CartesianBoundsAggregate.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link CartesianCentroidAggregate + * cartesian_centroid} {@code Aggregate} variant. + */ + public static CartesianCentroidAggregate.Builder cartesianCentroid() { + return new CartesianCentroidAggregate.Builder(); + } + + /** + * Creates a Aggregate of the {@link CartesianCentroidAggregate + * cartesian_centroid} {@code Aggregate} variant. + */ + public static Aggregate cartesianCentroid( + Function> fn) { + Aggregate.Builder builder = new Aggregate.Builder(); + builder.cartesianCentroid(fn.apply(new CartesianCentroidAggregate.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link ChangePointAggregate change_point} + * {@code Aggregate} variant. + */ + public static ChangePointAggregate.Builder changePoint() { + return new ChangePointAggregate.Builder(); + } + + /** + * Creates a Aggregate of the {@link ChangePointAggregate change_point} + * {@code Aggregate} variant. + */ + public static Aggregate changePoint( + Function> fn) { + Aggregate.Builder builder = new Aggregate.Builder(); + builder.changePoint(fn.apply(new ChangePointAggregate.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link ChildrenAggregate children} * {@code Aggregate} variant. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregation.java index cfdb98e3c..9c37fca60 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Aggregation.java @@ -99,8 +99,14 @@ public enum Kind implements JsonEnum { Cardinality("cardinality"), + CartesianBounds("cartesian_bounds"), + + CartesianCentroid("cartesian_centroid"), + CategorizeText("categorize_text"), + ChangePoint("change_point"), + Children("children"), Composite("composite"), @@ -121,7 +127,7 @@ public enum Kind implements JsonEnum { ExtendedStatsBucket("extended_stats_bucket"), - FrequentItemSets("frequent_item_sets"), + FrequentItemSets("frequent_item_sets", "frequent_items"), Filter("filter"), @@ -237,15 +243,21 @@ public enum Kind implements JsonEnum { ; private final String jsonValue; + private final String[] aliases; - Kind(String jsonValue) { + Kind(String jsonValue, String... aliases) { this.jsonValue = jsonValue; + this.aliases = aliases; } public String jsonValue() { return this.jsonValue; } + public String[] aliases() { + return this.aliases; + } + } private final Kind _kind; @@ -499,6 +511,42 @@ public CardinalityAggregation cardinality() { return TaggedUnionUtils.get(this, Kind.Cardinality); } + /** + * Is this variant instance of kind {@code cartesian_bounds}? + */ + public boolean isCartesianBounds() { + return _kind == Kind.CartesianBounds; + } + + /** + * Get the {@code cartesian_bounds} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code cartesian_bounds} + * kind. + */ + public CartesianBoundsAggregation cartesianBounds() { + return TaggedUnionUtils.get(this, Kind.CartesianBounds); + } + + /** + * Is this variant instance of kind {@code cartesian_centroid}? + */ + public boolean isCartesianCentroid() { + return _kind == Kind.CartesianCentroid; + } + + /** + * Get the {@code cartesian_centroid} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code cartesian_centroid} + * kind. + */ + public CartesianCentroidAggregation cartesianCentroid() { + return TaggedUnionUtils.get(this, Kind.CartesianCentroid); + } + /** * Is this variant instance of kind {@code categorize_text}? */ @@ -517,6 +565,23 @@ public CategorizeTextAggregation categorizeText() { return TaggedUnionUtils.get(this, Kind.CategorizeText); } + /** + * Is this variant instance of kind {@code change_point}? + */ + public boolean isChangePoint() { + return _kind == Kind.ChangePoint; + } + + /** + * Get the {@code change_point} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code change_point} kind. + */ + public ChangePointAggregation changePoint() { + return TaggedUnionUtils.get(this, Kind.ChangePoint); + } + /** * Is this variant instance of kind {@code children}? */ @@ -1907,6 +1972,28 @@ public ContainerBuilder cardinality( return this.cardinality(fn.apply(new CardinalityAggregation.Builder()).build()); } + public ContainerBuilder cartesianBounds(CartesianBoundsAggregation v) { + this._kind = Kind.CartesianBounds; + this._value = v; + return new ContainerBuilder(); + } + + public ContainerBuilder cartesianBounds( + Function> fn) { + return this.cartesianBounds(fn.apply(new CartesianBoundsAggregation.Builder()).build()); + } + + public ContainerBuilder cartesianCentroid(CartesianCentroidAggregation v) { + this._kind = Kind.CartesianCentroid; + this._value = v; + return new ContainerBuilder(); + } + + public ContainerBuilder cartesianCentroid( + Function> fn) { + return this.cartesianCentroid(fn.apply(new CartesianCentroidAggregation.Builder()).build()); + } + public ContainerBuilder categorizeText(CategorizeTextAggregation v) { this._kind = Kind.CategorizeText; this._value = v; @@ -1918,6 +2005,17 @@ public ContainerBuilder categorizeText( return this.categorizeText(fn.apply(new CategorizeTextAggregation.Builder()).build()); } + public ContainerBuilder changePoint(ChangePointAggregation v) { + this._kind = Kind.ChangePoint; + this._value = v; + return new ContainerBuilder(); + } + + public ContainerBuilder changePoint( + Function> fn) { + return this.changePoint(fn.apply(new ChangePointAggregation.Builder()).build()); + } + public ContainerBuilder children(ChildrenAggregation v) { this._kind = Kind.Children; this._value = v; @@ -2726,7 +2824,10 @@ protected static void setupAggregationDeserializer(ObjectDeserializer o op.add(Builder::bucketCountKsTest, BucketKsAggregation._DESERIALIZER, "bucket_count_ks_test"); op.add(Builder::bucketCorrelation, BucketCorrelationAggregation._DESERIALIZER, "bucket_correlation"); op.add(Builder::cardinality, CardinalityAggregation._DESERIALIZER, "cardinality"); + op.add(Builder::cartesianBounds, CartesianBoundsAggregation._DESERIALIZER, "cartesian_bounds"); + op.add(Builder::cartesianCentroid, CartesianCentroidAggregation._DESERIALIZER, "cartesian_centroid"); op.add(Builder::categorizeText, CategorizeTextAggregation._DESERIALIZER, "categorize_text"); + op.add(Builder::changePoint, ChangePointAggregation._DESERIALIZER, "change_point"); op.add(Builder::children, ChildrenAggregation._DESERIALIZER, "children"); op.add(Builder::composite, CompositeAggregation._DESERIALIZER, "composite"); op.add(Builder::cumulativeCardinality, CumulativeCardinalityAggregation._DESERIALIZER, @@ -2738,7 +2839,8 @@ protected static void setupAggregationDeserializer(ObjectDeserializer o op.add(Builder::diversifiedSampler, DiversifiedSamplerAggregation._DESERIALIZER, "diversified_sampler"); op.add(Builder::extendedStats, ExtendedStatsAggregation._DESERIALIZER, "extended_stats"); op.add(Builder::extendedStatsBucket, ExtendedStatsBucketAggregation._DESERIALIZER, "extended_stats_bucket"); - op.add(Builder::frequentItemSets, FrequentItemSetsAggregation._DESERIALIZER, "frequent_item_sets"); + op.add(Builder::frequentItemSets, FrequentItemSetsAggregation._DESERIALIZER, "frequent_item_sets", + "frequent_items"); op.add(Builder::filter, Query._DESERIALIZER, "filter"); op.add(Builder::filters, FiltersAggregation._DESERIALIZER, "filters"); op.add(Builder::geoBounds, GeoBoundsAggregation._DESERIALIZER, "geo_bounds"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationBuilders.java index 73b70e311..6f097b8c4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationBuilders.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/AggregationBuilders.java @@ -252,6 +252,44 @@ public static Aggregation cardinality( return builder.build(); } + /** + * Creates a builder for the {@link CartesianBoundsAggregation cartesian_bounds} + * {@code Aggregation} variant. + */ + public static CartesianBoundsAggregation.Builder cartesianBounds() { + return new CartesianBoundsAggregation.Builder(); + } + + /** + * Creates a Aggregation of the {@link CartesianBoundsAggregation + * cartesian_bounds} {@code Aggregation} variant. + */ + public static Aggregation cartesianBounds( + Function> fn) { + Aggregation.Builder builder = new Aggregation.Builder(); + builder.cartesianBounds(fn.apply(new CartesianBoundsAggregation.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link CartesianCentroidAggregation + * cartesian_centroid} {@code Aggregation} variant. + */ + public static CartesianCentroidAggregation.Builder cartesianCentroid() { + return new CartesianCentroidAggregation.Builder(); + } + + /** + * Creates a Aggregation of the {@link CartesianCentroidAggregation + * cartesian_centroid} {@code Aggregation} variant. + */ + public static Aggregation cartesianCentroid( + Function> fn) { + Aggregation.Builder builder = new Aggregation.Builder(); + builder.cartesianCentroid(fn.apply(new CartesianCentroidAggregation.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link CategorizeTextAggregation categorize_text} * {@code Aggregation} variant. @@ -271,6 +309,25 @@ public static Aggregation categorizeText( return builder.build(); } + /** + * Creates a builder for the {@link ChangePointAggregation change_point} + * {@code Aggregation} variant. + */ + public static ChangePointAggregation.Builder changePoint() { + return new ChangePointAggregation.Builder(); + } + + /** + * Creates a Aggregation of the {@link ChangePointAggregation change_point} + * {@code Aggregation} variant. + */ + public static Aggregation changePoint( + Function> fn) { + Aggregation.Builder builder = new Aggregation.Builder(); + builder.changePoint(fn.apply(new ChangePointAggregation.Builder()).build()); + return builder.build(); + } + /** * Creates a builder for the {@link ChildrenAggregation children} * {@code Aggregation} variant. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CartesianBoundsAggregate.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CartesianBoundsAggregate.java new file mode 100644 index 000000000..6b9874049 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CartesianBoundsAggregate.java @@ -0,0 +1,163 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.elasticsearch._types.TopLeftBottomRightGeoBounds; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.CartesianBoundsAggregate + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CartesianBoundsAggregate extends AggregateBase implements AggregateVariant { + @Nullable + private final TopLeftBottomRightGeoBounds bounds; + + // --------------------------------------------------------------------------------------------- + + private CartesianBoundsAggregate(Builder builder) { + super(builder); + + this.bounds = builder.bounds; + + } + + public static CartesianBoundsAggregate of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Aggregate variant kind. + */ + @Override + public Aggregate.Kind _aggregateKind() { + return Aggregate.Kind.CartesianBounds; + } + + /** + * API name: {@code bounds} + */ + @Nullable + public final TopLeftBottomRightGeoBounds bounds() { + return this.bounds; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + if (this.bounds != null) { + generator.writeKey("bounds"); + this.bounds.serialize(generator, mapper); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CartesianBoundsAggregate}. + */ + + public static class Builder extends AggregateBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private TopLeftBottomRightGeoBounds bounds; + + /** + * API name: {@code bounds} + */ + public final Builder bounds(@Nullable TopLeftBottomRightGeoBounds value) { + this.bounds = value; + return this; + } + + /** + * API name: {@code bounds} + */ + public final Builder bounds( + Function> fn) { + return this.bounds(fn.apply(new TopLeftBottomRightGeoBounds.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CartesianBoundsAggregate}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CartesianBoundsAggregate build() { + _checkSingleUse(); + + return new CartesianBoundsAggregate(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CartesianBoundsAggregate} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, CartesianBoundsAggregate::setupCartesianBoundsAggregateDeserializer); + + protected static void setupCartesianBoundsAggregateDeserializer( + ObjectDeserializer op) { + AggregateBase.setupAggregateBaseDeserializer(op); + op.add(Builder::bounds, TopLeftBottomRightGeoBounds._DESERIALIZER, "bounds"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CartesianBoundsAggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CartesianBoundsAggregation.java new file mode 100644 index 000000000..c65f96a27 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CartesianBoundsAggregation.java @@ -0,0 +1,116 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.CartesianBoundsAggregation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CartesianBoundsAggregation extends MetricAggregationBase implements AggregationVariant { + // --------------------------------------------------------------------------------------------- + + private CartesianBoundsAggregation(Builder builder) { + super(builder); + + } + + public static CartesianBoundsAggregation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Aggregation variant kind. + */ + @Override + public Aggregation.Kind _aggregationKind() { + return Aggregation.Kind.CartesianBounds; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CartesianBoundsAggregation}. + */ + + public static class Builder extends MetricAggregationBase.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CartesianBoundsAggregation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CartesianBoundsAggregation build() { + _checkSingleUse(); + + return new CartesianBoundsAggregation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CartesianBoundsAggregation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, CartesianBoundsAggregation::setupCartesianBoundsAggregationDeserializer); + + protected static void setupCartesianBoundsAggregationDeserializer( + ObjectDeserializer op) { + MetricAggregationBase.setupMetricAggregationBaseDeserializer(op); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CartesianCentroidAggregate.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CartesianCentroidAggregate.java new file mode 100644 index 000000000..a0a8390bb --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CartesianCentroidAggregate.java @@ -0,0 +1,188 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.elasticsearch._types.CartesianPoint; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.Long; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.CartesianCentroidAggregate + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CartesianCentroidAggregate extends AggregateBase implements AggregateVariant { + private final long count; + + @Nullable + private final CartesianPoint location; + + // --------------------------------------------------------------------------------------------- + + private CartesianCentroidAggregate(Builder builder) { + super(builder); + + this.count = ApiTypeHelper.requireNonNull(builder.count, this, "count", 0); + this.location = builder.location; + + } + + public static CartesianCentroidAggregate of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Aggregate variant kind. + */ + @Override + public Aggregate.Kind _aggregateKind() { + return Aggregate.Kind.CartesianCentroid; + } + + /** + * Required - API name: {@code count} + */ + public final long count() { + return this.count; + } + + /** + * API name: {@code location} + */ + @Nullable + public final CartesianPoint location() { + return this.location; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + generator.writeKey("count"); + generator.write(this.count); + + if (this.location != null) { + generator.writeKey("location"); + this.location.serialize(generator, mapper); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CartesianCentroidAggregate}. + */ + + public static class Builder extends AggregateBase.AbstractBuilder + implements + ObjectBuilder { + private Long count; + + @Nullable + private CartesianPoint location; + + /** + * Required - API name: {@code count} + */ + public final Builder count(long value) { + this.count = value; + return this; + } + + /** + * API name: {@code location} + */ + public final Builder location(@Nullable CartesianPoint value) { + this.location = value; + return this; + } + + /** + * API name: {@code location} + */ + public final Builder location(Function> fn) { + return this.location(fn.apply(new CartesianPoint.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CartesianCentroidAggregate}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CartesianCentroidAggregate build() { + _checkSingleUse(); + + return new CartesianCentroidAggregate(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CartesianCentroidAggregate} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, CartesianCentroidAggregate::setupCartesianCentroidAggregateDeserializer); + + protected static void setupCartesianCentroidAggregateDeserializer( + ObjectDeserializer op) { + AggregateBase.setupAggregateBaseDeserializer(op); + op.add(Builder::count, JsonpDeserializer.longDeserializer(), "count"); + op.add(Builder::location, CartesianPoint._DESERIALIZER, "location"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CartesianCentroidAggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CartesianCentroidAggregation.java new file mode 100644 index 000000000..7ab3ab1c3 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/CartesianCentroidAggregation.java @@ -0,0 +1,116 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.CartesianCentroidAggregation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class CartesianCentroidAggregation extends MetricAggregationBase implements AggregationVariant { + // --------------------------------------------------------------------------------------------- + + private CartesianCentroidAggregation(Builder builder) { + super(builder); + + } + + public static CartesianCentroidAggregation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Aggregation variant kind. + */ + @Override + public Aggregation.Kind _aggregationKind() { + return Aggregation.Kind.CartesianCentroid; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link CartesianCentroidAggregation}. + */ + + public static class Builder extends MetricAggregationBase.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link CartesianCentroidAggregation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public CartesianCentroidAggregation build() { + _checkSingleUse(); + + return new CartesianCentroidAggregation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link CartesianCentroidAggregation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, CartesianCentroidAggregation::setupCartesianCentroidAggregationDeserializer); + + protected static void setupCartesianCentroidAggregationDeserializer( + ObjectDeserializer op) { + MetricAggregationBase.setupMetricAggregationBaseDeserializer(op); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangePointAggregate.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangePointAggregate.java new file mode 100644 index 000000000..8737b74e3 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangePointAggregate.java @@ -0,0 +1,200 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.ChangePointAggregate + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ChangePointAggregate extends AggregateBase implements AggregateVariant { + private final ChangeType type; + + @Nullable + private final ChangePointBucket bucket; + + // --------------------------------------------------------------------------------------------- + + private ChangePointAggregate(Builder builder) { + super(builder); + + this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type"); + this.bucket = builder.bucket; + + } + + public static ChangePointAggregate of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Aggregate variant kind. + */ + @Override + public Aggregate.Kind _aggregateKind() { + return Aggregate.Kind.ChangePoint; + } + + /** + * Required - API name: {@code type} + */ + public final ChangeType type() { + return this.type; + } + + /** + * API name: {@code bucket} + */ + @Nullable + public final ChangePointBucket bucket() { + return this.bucket; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + generator.writeKey("type"); + this.type.serialize(generator, mapper); + + if (this.bucket != null) { + generator.writeKey("bucket"); + this.bucket.serialize(generator, mapper); + + } + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ChangePointAggregate}. + */ + + public static class Builder extends AggregateBase.AbstractBuilder + implements + ObjectBuilder { + private ChangeType type; + + @Nullable + private ChangePointBucket bucket; + + /** + * Required - API name: {@code type} + */ + public final Builder type(ChangeType value) { + this.type = value; + return this; + } + + /** + * Required - API name: {@code type} + */ + public final Builder type(Function> fn) { + return this.type(fn.apply(new ChangeType.Builder()).build()); + } + + /** + * Required - API name: {@code type} + */ + public final Builder type(ChangeTypeVariant value) { + this.type = value._toChangeType(); + return this; + } + + /** + * API name: {@code bucket} + */ + public final Builder bucket(@Nullable ChangePointBucket value) { + this.bucket = value; + return this; + } + + /** + * API name: {@code bucket} + */ + public final Builder bucket(Function> fn) { + return this.bucket(fn.apply(new ChangePointBucket.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ChangePointAggregate}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ChangePointAggregate build() { + _checkSingleUse(); + + return new ChangePointAggregate(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ChangePointAggregate} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ChangePointAggregate::setupChangePointAggregateDeserializer); + + protected static void setupChangePointAggregateDeserializer(ObjectDeserializer op) { + AggregateBase.setupAggregateBaseDeserializer(op); + op.add(Builder::type, ChangeType._DESERIALIZER, "type"); + op.add(Builder::bucket, ChangePointBucket._DESERIALIZER, "bucket"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangePointAggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangePointAggregation.java new file mode 100644 index 000000000..10da79592 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangePointAggregation.java @@ -0,0 +1,116 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.ChangePointAggregation + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ChangePointAggregation extends PipelineAggregationBase implements AggregationVariant { + // --------------------------------------------------------------------------------------------- + + private ChangePointAggregation(Builder builder) { + super(builder); + + } + + public static ChangePointAggregation of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Aggregation variant kind. + */ + @Override + public Aggregation.Kind _aggregationKind() { + return Aggregation.Kind.ChangePoint; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ChangePointAggregation}. + */ + + public static class Builder extends PipelineAggregationBase.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ChangePointAggregation}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ChangePointAggregation build() { + _checkSingleUse(); + + return new ChangePointAggregation(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ChangePointAggregation} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ChangePointAggregation::setupChangePointAggregationDeserializer); + + protected static void setupChangePointAggregationDeserializer( + ObjectDeserializer op) { + PipelineAggregationBase.setupPipelineAggregationBaseDeserializer(op); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangePointBucket.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangePointBucket.java new file mode 100644 index 000000000..af7b53e5f --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangePointBucket.java @@ -0,0 +1,181 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.elasticsearch._types.FieldValue; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.ChangePointBucket + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ChangePointBucket extends MultiBucketBase { + private final FieldValue key; + + // --------------------------------------------------------------------------------------------- + + private ChangePointBucket(Builder builder) { + super(builder); + + this.key = ApiTypeHelper.requireNonNull(builder.key, this, "key"); + + } + + public static ChangePointBucket of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code key} + */ + public final FieldValue key() { + return this.key; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + generator.writeKey("key"); + this.key.serialize(generator, mapper); + + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link ChangePointBucket}. + */ + + public static class Builder extends MultiBucketBase.AbstractBuilder + implements + ObjectBuilder { + private FieldValue key; + + /** + * Required - API name: {@code key} + */ + public final Builder key(FieldValue value) { + this.key = value; + return this; + } + + /** + * Required - API name: {@code key} + */ + public final Builder key(Function> fn) { + return this.key(fn.apply(new FieldValue.Builder()).build()); + } + + /** + * Required - API name: {@code key} + */ + public final Builder key(String value) { + this.key = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code key} + */ + public final Builder key(long value) { + this.key = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code key} + */ + public final Builder key(double value) { + this.key = FieldValue.of(value); + return this; + } + + /** + * Required - API name: {@code key} + */ + public final Builder key(boolean value) { + this.key = FieldValue.of(value); + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link ChangePointBucket}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public ChangePointBucket build() { + _checkSingleUse(); + + return new ChangePointBucket(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link ChangePointBucket} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, ChangePointBucket::setupChangePointBucketDeserializer); + + protected static void setupChangePointBucketDeserializer(ObjectDeserializer op) { + MultiBucketBase.setupMultiBucketBaseDeserializer(op); + op.add(Builder::key, FieldValue._DESERIALIZER, "key"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangeType.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangeType.java new file mode 100644 index 000000000..d7a4b2f65 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangeType.java @@ -0,0 +1,407 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.TaggedUnion; +import co.elastic.clients.util.TaggedUnionUtils; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Object; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.ChangeType + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class ChangeType implements TaggedUnion, JsonpSerializable { + + /** + * {@link ChangeType} variant kinds. + * + * @see API + * specification + */ + + public enum Kind implements JsonEnum { + Dip("dip"), + + DistributionChange("distribution_change"), + + Indeterminable("indeterminable"), + + NonStationary("non_stationary"), + + Spike("spike"), + + Stationary("stationary"), + + StepChange("step_change"), + + TrendChange("trend_change"), + + ; + + private final String jsonValue; + + Kind(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + } + + private final Kind _kind; + private final Object _value; + + @Override + public final Kind _kind() { + return _kind; + } + + @Override + public final Object _get() { + return _value; + } + + public ChangeType(ChangeTypeVariant value) { + + this._kind = ApiTypeHelper.requireNonNull(value._changeTypeKind(), this, ""); + this._value = ApiTypeHelper.requireNonNull(value, this, ""); + + } + + private ChangeType(Builder builder) { + + this._kind = ApiTypeHelper.requireNonNull(builder._kind, builder, ""); + this._value = ApiTypeHelper.requireNonNull(builder._value, builder, ""); + + } + + public static ChangeType of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Is this variant instance of kind {@code dip}? + */ + public boolean isDip() { + return _kind == Kind.Dip; + } + + /** + * Get the {@code dip} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code dip} kind. + */ + public Dip dip() { + return TaggedUnionUtils.get(this, Kind.Dip); + } + + /** + * Is this variant instance of kind {@code distribution_change}? + */ + public boolean isDistributionChange() { + return _kind == Kind.DistributionChange; + } + + /** + * Get the {@code distribution_change} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code distribution_change} + * kind. + */ + public DistributionChange distributionChange() { + return TaggedUnionUtils.get(this, Kind.DistributionChange); + } + + /** + * Is this variant instance of kind {@code indeterminable}? + */ + public boolean isIndeterminable() { + return _kind == Kind.Indeterminable; + } + + /** + * Get the {@code indeterminable} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code indeterminable} kind. + */ + public Indeterminable indeterminable() { + return TaggedUnionUtils.get(this, Kind.Indeterminable); + } + + /** + * Is this variant instance of kind {@code non_stationary}? + */ + public boolean isNonStationary() { + return _kind == Kind.NonStationary; + } + + /** + * Get the {@code non_stationary} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code non_stationary} kind. + */ + public NonStationary nonStationary() { + return TaggedUnionUtils.get(this, Kind.NonStationary); + } + + /** + * Is this variant instance of kind {@code spike}? + */ + public boolean isSpike() { + return _kind == Kind.Spike; + } + + /** + * Get the {@code spike} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code spike} kind. + */ + public Spike spike() { + return TaggedUnionUtils.get(this, Kind.Spike); + } + + /** + * Is this variant instance of kind {@code stationary}? + */ + public boolean isStationary() { + return _kind == Kind.Stationary; + } + + /** + * Get the {@code stationary} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code stationary} kind. + */ + public Stationary stationary() { + return TaggedUnionUtils.get(this, Kind.Stationary); + } + + /** + * Is this variant instance of kind {@code step_change}? + */ + public boolean isStepChange() { + return _kind == Kind.StepChange; + } + + /** + * Get the {@code step_change} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code step_change} kind. + */ + public StepChange stepChange() { + return TaggedUnionUtils.get(this, Kind.StepChange); + } + + /** + * Is this variant instance of kind {@code trend_change}? + */ + public boolean isTrendChange() { + return _kind == Kind.TrendChange; + } + + /** + * Get the {@code trend_change} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code trend_change} kind. + */ + public TrendChange trendChange() { + return TaggedUnionUtils.get(this, Kind.TrendChange); + } + + @Override + @SuppressWarnings("unchecked") + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + + generator.writeStartObject(); + + generator.writeKey(_kind.jsonValue()); + if (_value instanceof JsonpSerializable) { + ((JsonpSerializable) _value).serialize(generator, mapper); + } + + generator.writeEnd(); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Kind _kind; + private Object _value; + + @Override + protected Builder self() { + return this; + } + public ObjectBuilder dip(Dip v) { + this._kind = Kind.Dip; + this._value = v; + return this; + } + + public ObjectBuilder dip(Function> fn) { + return this.dip(fn.apply(new Dip.Builder()).build()); + } + + public ObjectBuilder distributionChange(DistributionChange v) { + this._kind = Kind.DistributionChange; + this._value = v; + return this; + } + + public ObjectBuilder distributionChange( + Function> fn) { + return this.distributionChange(fn.apply(new DistributionChange.Builder()).build()); + } + + public ObjectBuilder indeterminable(Indeterminable v) { + this._kind = Kind.Indeterminable; + this._value = v; + return this; + } + + public ObjectBuilder indeterminable( + Function> fn) { + return this.indeterminable(fn.apply(new Indeterminable.Builder()).build()); + } + + public ObjectBuilder nonStationary(NonStationary v) { + this._kind = Kind.NonStationary; + this._value = v; + return this; + } + + public ObjectBuilder nonStationary( + Function> fn) { + return this.nonStationary(fn.apply(new NonStationary.Builder()).build()); + } + + public ObjectBuilder spike(Spike v) { + this._kind = Kind.Spike; + this._value = v; + return this; + } + + public ObjectBuilder spike(Function> fn) { + return this.spike(fn.apply(new Spike.Builder()).build()); + } + + public ObjectBuilder stationary(Stationary v) { + this._kind = Kind.Stationary; + this._value = v; + return this; + } + + public ObjectBuilder stationary(Function> fn) { + return this.stationary(fn.apply(new Stationary.Builder()).build()); + } + + public ObjectBuilder stepChange(StepChange v) { + this._kind = Kind.StepChange; + this._value = v; + return this; + } + + public ObjectBuilder stepChange(Function> fn) { + return this.stepChange(fn.apply(new StepChange.Builder()).build()); + } + + public ObjectBuilder trendChange(TrendChange v) { + this._kind = Kind.TrendChange; + this._value = v; + return this; + } + + public ObjectBuilder trendChange(Function> fn) { + return this.trendChange(fn.apply(new TrendChange.Builder()).build()); + } + + public ChangeType build() { + _checkSingleUse(); + return new ChangeType(this); + } + + } + + protected static void setupChangeTypeDeserializer(ObjectDeserializer op) { + + op.add(Builder::dip, Dip._DESERIALIZER, "dip"); + op.add(Builder::distributionChange, DistributionChange._DESERIALIZER, "distribution_change"); + op.add(Builder::indeterminable, Indeterminable._DESERIALIZER, "indeterminable"); + op.add(Builder::nonStationary, NonStationary._DESERIALIZER, "non_stationary"); + op.add(Builder::spike, Spike._DESERIALIZER, "spike"); + op.add(Builder::stationary, Stationary._DESERIALIZER, "stationary"); + op.add(Builder::stepChange, StepChange._DESERIALIZER, "step_change"); + op.add(Builder::trendChange, TrendChange._DESERIALIZER, "trend_change"); + + } + + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + ChangeType::setupChangeTypeDeserializer, Builder::build); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangeTypeBuilders.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangeTypeBuilders.java new file mode 100644 index 000000000..71d828f6a --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangeTypeBuilders.java @@ -0,0 +1,188 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.util.ObjectBuilder; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Builders for {@link ChangeType} variants. + */ +public class ChangeTypeBuilders { + private ChangeTypeBuilders() { + } + + /** + * Creates a builder for the {@link Dip dip} {@code ChangeType} variant. + */ + public static Dip.Builder dip() { + return new Dip.Builder(); + } + + /** + * Creates a ChangeType of the {@link Dip dip} {@code ChangeType} variant. + */ + public static ChangeType dip(Function> fn) { + ChangeType.Builder builder = new ChangeType.Builder(); + builder.dip(fn.apply(new Dip.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link DistributionChange distribution_change} + * {@code ChangeType} variant. + */ + public static DistributionChange.Builder distributionChange() { + return new DistributionChange.Builder(); + } + + /** + * Creates a ChangeType of the {@link DistributionChange distribution_change} + * {@code ChangeType} variant. + */ + public static ChangeType distributionChange( + Function> fn) { + ChangeType.Builder builder = new ChangeType.Builder(); + builder.distributionChange(fn.apply(new DistributionChange.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link Indeterminable indeterminable} + * {@code ChangeType} variant. + */ + public static Indeterminable.Builder indeterminable() { + return new Indeterminable.Builder(); + } + + /** + * Creates a ChangeType of the {@link Indeterminable indeterminable} + * {@code ChangeType} variant. + */ + public static ChangeType indeterminable(Function> fn) { + ChangeType.Builder builder = new ChangeType.Builder(); + builder.indeterminable(fn.apply(new Indeterminable.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link NonStationary non_stationary} + * {@code ChangeType} variant. + */ + public static NonStationary.Builder nonStationary() { + return new NonStationary.Builder(); + } + + /** + * Creates a ChangeType of the {@link NonStationary non_stationary} + * {@code ChangeType} variant. + */ + public static ChangeType nonStationary(Function> fn) { + ChangeType.Builder builder = new ChangeType.Builder(); + builder.nonStationary(fn.apply(new NonStationary.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link Spike spike} {@code ChangeType} variant. + */ + public static Spike.Builder spike() { + return new Spike.Builder(); + } + + /** + * Creates a ChangeType of the {@link Spike spike} {@code ChangeType} variant. + */ + public static ChangeType spike(Function> fn) { + ChangeType.Builder builder = new ChangeType.Builder(); + builder.spike(fn.apply(new Spike.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link Stationary stationary} {@code ChangeType} + * variant. + */ + public static Stationary.Builder stationary() { + return new Stationary.Builder(); + } + + /** + * Creates a ChangeType of the {@link Stationary stationary} {@code ChangeType} + * variant. + */ + public static ChangeType stationary(Function> fn) { + ChangeType.Builder builder = new ChangeType.Builder(); + builder.stationary(fn.apply(new Stationary.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link StepChange step_change} {@code ChangeType} + * variant. + */ + public static StepChange.Builder stepChange() { + return new StepChange.Builder(); + } + + /** + * Creates a ChangeType of the {@link StepChange step_change} {@code ChangeType} + * variant. + */ + public static ChangeType stepChange(Function> fn) { + ChangeType.Builder builder = new ChangeType.Builder(); + builder.stepChange(fn.apply(new StepChange.Builder()).build()); + return builder.build(); + } + + /** + * Creates a builder for the {@link TrendChange trend_change} {@code ChangeType} + * variant. + */ + public static TrendChange.Builder trendChange() { + return new TrendChange.Builder(); + } + + /** + * Creates a ChangeType of the {@link TrendChange trend_change} + * {@code ChangeType} variant. + */ + public static ChangeType trendChange(Function> fn) { + ChangeType.Builder builder = new ChangeType.Builder(); + builder.trendChange(fn.apply(new TrendChange.Builder()).build()); + return builder.build(); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangeTypeVariant.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangeTypeVariant.java new file mode 100644 index 000000000..d31813787 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/ChangeTypeVariant.java @@ -0,0 +1,48 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * Base interface for {@link ChangeType} variants. + */ +public interface ChangeTypeVariant { + + ChangeType.Kind _changeTypeKind(); + + default ChangeType _toChangeType() { + return new ChangeType(this); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Dip.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Dip.java new file mode 100644 index 000000000..483a46260 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Dip.java @@ -0,0 +1,112 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.Dip + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class Dip extends AbstractChangePoint implements ChangeTypeVariant { + // --------------------------------------------------------------------------------------------- + + private Dip(Builder builder) { + super(builder); + + } + + public static Dip of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * ChangeType variant kind. + */ + @Override + public ChangeType.Kind _changeTypeKind() { + return ChangeType.Kind.Dip; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Dip}. + */ + + public static class Builder extends AbstractChangePoint.AbstractBuilder implements ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link Dip}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public Dip build() { + _checkSingleUse(); + + return new Dip(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Dip} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + Dip::setupDipDeserializer); + + protected static void setupDipDeserializer(ObjectDeserializer op) { + AbstractChangePoint.setupAbstractChangePointDeserializer(op); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/DistributionChange.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/DistributionChange.java new file mode 100644 index 000000000..5611e24f3 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/DistributionChange.java @@ -0,0 +1,115 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.DistributionChange + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class DistributionChange extends AbstractChangePoint implements ChangeTypeVariant { + // --------------------------------------------------------------------------------------------- + + private DistributionChange(Builder builder) { + super(builder); + + } + + public static DistributionChange of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * ChangeType variant kind. + */ + @Override + public ChangeType.Kind _changeTypeKind() { + return ChangeType.Kind.DistributionChange; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link DistributionChange}. + */ + + public static class Builder extends AbstractChangePoint.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link DistributionChange}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public DistributionChange build() { + _checkSingleUse(); + + return new DistributionChange(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link DistributionChange} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, DistributionChange::setupDistributionChangeDeserializer); + + protected static void setupDistributionChangeDeserializer(ObjectDeserializer op) { + AbstractChangePoint.setupAbstractChangePointDeserializer(op); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Indeterminable.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Indeterminable.java new file mode 100644 index 000000000..eeb97f249 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Indeterminable.java @@ -0,0 +1,162 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.Indeterminable + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class Indeterminable implements ChangeTypeVariant, JsonpSerializable { + private final String reason; + + // --------------------------------------------------------------------------------------------- + + private Indeterminable(Builder builder) { + + this.reason = ApiTypeHelper.requireNonNull(builder.reason, this, "reason"); + + } + + public static Indeterminable of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * ChangeType variant kind. + */ + @Override + public ChangeType.Kind _changeTypeKind() { + return ChangeType.Kind.Indeterminable; + } + + /** + * Required - API name: {@code reason} + */ + public final String reason() { + return this.reason; + } + + /** + * 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("reason"); + generator.write(this.reason); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Indeterminable}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private String reason; + + /** + * Required - API name: {@code reason} + */ + public final Builder reason(String value) { + this.reason = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link Indeterminable}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public Indeterminable build() { + _checkSingleUse(); + + return new Indeterminable(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Indeterminable} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + Indeterminable::setupIndeterminableDeserializer); + + protected static void setupIndeterminableDeserializer(ObjectDeserializer op) { + + op.add(Builder::reason, JsonpDeserializer.stringDeserializer(), "reason"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/NonStationary.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/NonStationary.java new file mode 100644 index 000000000..32d39dc2a --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/NonStationary.java @@ -0,0 +1,211 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +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.Double; +import java.lang.String; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.NonStationary + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class NonStationary implements ChangeTypeVariant, JsonpSerializable { + private final double pValue; + + private final double rValue; + + private final String trend; + + // --------------------------------------------------------------------------------------------- + + private NonStationary(Builder builder) { + + this.pValue = ApiTypeHelper.requireNonNull(builder.pValue, this, "pValue", 0); + this.rValue = ApiTypeHelper.requireNonNull(builder.rValue, this, "rValue", 0); + this.trend = ApiTypeHelper.requireNonNull(builder.trend, this, "trend"); + + } + + public static NonStationary of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * ChangeType variant kind. + */ + @Override + public ChangeType.Kind _changeTypeKind() { + return ChangeType.Kind.NonStationary; + } + + /** + * Required - API name: {@code p_value} + */ + public final double pValue() { + return this.pValue; + } + + /** + * Required - API name: {@code r_value} + */ + public final double rValue() { + return this.rValue; + } + + /** + * Required - API name: {@code trend} + */ + public final String trend() { + return this.trend; + } + + /** + * 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("p_value"); + generator.write(this.pValue); + + generator.writeKey("r_value"); + generator.write(this.rValue); + + generator.writeKey("trend"); + generator.write(this.trend); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link NonStationary}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Double pValue; + + private Double rValue; + + private String trend; + + /** + * Required - API name: {@code p_value} + */ + public final Builder pValue(double value) { + this.pValue = value; + return this; + } + + /** + * Required - API name: {@code r_value} + */ + public final Builder rValue(double value) { + this.rValue = value; + return this; + } + + /** + * Required - API name: {@code trend} + */ + public final Builder trend(String value) { + this.trend = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link NonStationary}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public NonStationary build() { + _checkSingleUse(); + + return new NonStationary(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link NonStationary} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + NonStationary::setupNonStationaryDeserializer); + + protected static void setupNonStationaryDeserializer(ObjectDeserializer op) { + + op.add(Builder::pValue, JsonpDeserializer.doubleDeserializer(), "p_value"); + op.add(Builder::rValue, JsonpDeserializer.doubleDeserializer(), "r_value"); + op.add(Builder::trend, JsonpDeserializer.stringDeserializer(), "trend"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/PValueHeuristic.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/PValueHeuristic.java new file mode 100644 index 000000000..0affca20d --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/PValueHeuristic.java @@ -0,0 +1,197 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.lang.Long; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.PValueHeuristic + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class PValueHeuristic implements JsonpSerializable { + @Nullable + private final Boolean backgroundIsSuperset; + + @Nullable + private final Long normalizeAbove; + + // --------------------------------------------------------------------------------------------- + + private PValueHeuristic(Builder builder) { + + this.backgroundIsSuperset = builder.backgroundIsSuperset; + this.normalizeAbove = builder.normalizeAbove; + + } + + public static PValueHeuristic of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * API name: {@code background_is_superset} + */ + @Nullable + public final Boolean backgroundIsSuperset() { + return this.backgroundIsSuperset; + } + + /** + * Should the results be normalized when above the given value. Allows for + * consistent significance results at various scales. Note: 0 is a + * special value which means no normalization + *

+ * API name: {@code normalize_above} + */ + @Nullable + public final Long normalizeAbove() { + return this.normalizeAbove; + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + serializeInternal(generator, mapper); + generator.writeEnd(); + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + if (this.backgroundIsSuperset != null) { + generator.writeKey("background_is_superset"); + generator.write(this.backgroundIsSuperset); + + } + if (this.normalizeAbove != null) { + generator.writeKey("normalize_above"); + generator.write(this.normalizeAbove); + + } + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link PValueHeuristic}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + @Nullable + private Boolean backgroundIsSuperset; + + @Nullable + private Long normalizeAbove; + + /** + * API name: {@code background_is_superset} + */ + public final Builder backgroundIsSuperset(@Nullable Boolean value) { + this.backgroundIsSuperset = value; + return this; + } + + /** + * Should the results be normalized when above the given value. Allows for + * consistent significance results at various scales. Note: 0 is a + * special value which means no normalization + *

+ * API name: {@code normalize_above} + */ + public final Builder normalizeAbove(@Nullable Long value) { + this.normalizeAbove = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link PValueHeuristic}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public PValueHeuristic build() { + _checkSingleUse(); + + return new PValueHeuristic(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link PValueHeuristic} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + PValueHeuristic::setupPValueHeuristicDeserializer); + + protected static void setupPValueHeuristicDeserializer(ObjectDeserializer op) { + + op.add(Builder::backgroundIsSuperset, JsonpDeserializer.booleanDeserializer(), "background_is_superset"); + op.add(Builder::normalizeAbove, JsonpDeserializer.longDeserializer(), "normalize_above"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTermsAggregation.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTermsAggregation.java index 2463940c4..c11d811d0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTermsAggregation.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/SignificantTermsAggregation.java @@ -102,6 +102,9 @@ public class SignificantTermsAggregation extends BucketAggregationBase @Nullable private final ScriptedHeuristic scriptHeuristic; + @Nullable + private final PValueHeuristic pValue; + @Nullable private final Long shardMinDocCount; @@ -127,6 +130,7 @@ private SignificantTermsAggregation(Builder builder) { this.mutualInformation = builder.mutualInformation; this.percentage = builder.percentage; this.scriptHeuristic = builder.scriptHeuristic; + this.pValue = builder.pValue; this.shardMinDocCount = builder.shardMinDocCount; this.shardSize = builder.shardSize; this.size = builder.size; @@ -272,6 +276,24 @@ public final ScriptedHeuristic scriptHeuristic() { return this.scriptHeuristic; } + /** + * Significant terms heuristic that calculates the p-value between the term + * existing in foreground and background sets. + *

+ * The p-value is the probability of obtaining test results at least as extreme + * as the results actually observed, under the assumption that the null + * hypothesis is correct. The p-value is calculated assuming that the foreground + * set and the background set are independent https://en.wikipedia.org/wiki/Bernoulli_trial, + * with the null hypothesis that the probabilities are the same. + *

+ * API name: {@code p_value} + */ + @Nullable + public final PValueHeuristic pValue() { + return this.pValue; + } + /** * Regulates the certainty a shard has if the term should actually be added to * the candidate list or not with respect to the min_doc_count. @@ -376,6 +398,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("script_heuristic"); this.scriptHeuristic.serialize(generator, mapper); + } + if (this.pValue != null) { + generator.writeKey("p_value"); + this.pValue.serialize(generator, mapper); + } if (this.shardMinDocCount != null) { generator.writeKey("shard_min_doc_count"); @@ -445,6 +472,9 @@ public static class Builder extends BucketAggregationBase.AbstractBuilder + * The p-value is the probability of obtaining test results at least as extreme + * as the results actually observed, under the assumption that the null + * hypothesis is correct. The p-value is calculated assuming that the foreground + * set and the background set are independent https://en.wikipedia.org/wiki/Bernoulli_trial, + * with the null hypothesis that the probabilities are the same. + *

+ * API name: {@code p_value} + */ + public final Builder pValue(@Nullable PValueHeuristic value) { + this.pValue = value; + return this; + } + + /** + * Significant terms heuristic that calculates the p-value between the term + * existing in foreground and background sets. + *

+ * The p-value is the probability of obtaining test results at least as extreme + * as the results actually observed, under the assumption that the null + * hypothesis is correct. The p-value is calculated assuming that the foreground + * set and the background set are independent https://en.wikipedia.org/wiki/Bernoulli_trial, + * with the null hypothesis that the probabilities are the same. + *

+ * API name: {@code p_value} + */ + public final Builder pValue(Function> fn) { + return this.pValue(fn.apply(new PValueHeuristic.Builder()).build()); + } + /** * Regulates the certainty a shard has if the term should actually be added to * the candidate list or not with respect to the min_doc_count. @@ -757,6 +822,7 @@ protected static void setupSignificantTermsAggregationDeserializer( op.add(Builder::mutualInformation, MutualInformationHeuristic._DESERIALIZER, "mutual_information"); op.add(Builder::percentage, PercentageScoreHeuristic._DESERIALIZER, "percentage"); op.add(Builder::scriptHeuristic, ScriptedHeuristic._DESERIALIZER, "script_heuristic"); + op.add(Builder::pValue, PValueHeuristic._DESERIALIZER, "p_value"); op.add(Builder::shardMinDocCount, JsonpDeserializer.longDeserializer(), "shard_min_doc_count"); op.add(Builder::shardSize, JsonpDeserializer.integerDeserializer(), "shard_size"); op.add(Builder::size, JsonpDeserializer.integerDeserializer(), "size"); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Spike.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Spike.java new file mode 100644 index 000000000..3722c7c20 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Spike.java @@ -0,0 +1,112 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.Spike + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class Spike extends AbstractChangePoint implements ChangeTypeVariant { + // --------------------------------------------------------------------------------------------- + + private Spike(Builder builder) { + super(builder); + + } + + public static Spike of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * ChangeType variant kind. + */ + @Override + public ChangeType.Kind _changeTypeKind() { + return ChangeType.Kind.Spike; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link Spike}. + */ + + public static class Builder extends AbstractChangePoint.AbstractBuilder implements ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link Spike}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public Spike build() { + _checkSingleUse(); + + return new Spike(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link Spike} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + Spike::setupSpikeDeserializer); + + protected static void setupSpikeDeserializer(ObjectDeserializer op) { + AbstractChangePoint.setupAbstractChangePointDeserializer(op); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Stationary.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Stationary.java new file mode 100644 index 000000000..b0b30fac7 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/Stationary.java @@ -0,0 +1,84 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +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.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; + +//---------------------------------------------------------------- +// 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 class Stationary implements ChangeTypeVariant, JsonpSerializable { + + /** + * ChangeType variant kind. + */ + @Override + public ChangeType.Kind _changeTypeKind() { + return ChangeType.Kind.Stationary; + } + + public static final class Builder implements ObjectBuilder { + @Override + public Stationary build() { + return Stationary._INSTANCE; + } + } + + /** + * Serialize this object to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + generator.writeStartObject(); + generator.writeEnd(); + } + + /** + * Singleton instance for empty class {@link Stationary}. + */ + public static final Stationary _INSTANCE = new Stationary(); + + public static final JsonpDeserializer _DESERIALIZER = JsonpDeserializer + .emptyObject(Stationary._INSTANCE); + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StepChange.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StepChange.java new file mode 100644 index 000000000..d17659f63 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/StepChange.java @@ -0,0 +1,115 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.StepChange + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class StepChange extends AbstractChangePoint implements ChangeTypeVariant { + // --------------------------------------------------------------------------------------------- + + private StepChange(Builder builder) { + super(builder); + + } + + public static StepChange of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * ChangeType variant kind. + */ + @Override + public ChangeType.Kind _changeTypeKind() { + return ChangeType.Kind.StepChange; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link StepChange}. + */ + + public static class Builder extends AbstractChangePoint.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link StepChange}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public StepChange build() { + _checkSingleUse(); + + return new StepChange(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link StepChange} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + StepChange::setupStepChangeDeserializer); + + protected static void setupStepChangeDeserializer(ObjectDeserializer op) { + AbstractChangePoint.setupAbstractChangePointDeserializer(op); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TrendChange.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TrendChange.java new file mode 100644 index 000000000..3e3fd5a7b --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/TrendChange.java @@ -0,0 +1,210 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch._types.aggregations; + +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.Double; +import java.lang.Integer; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: _types.aggregations.TrendChange + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class TrendChange implements ChangeTypeVariant, JsonpSerializable { + private final double pValue; + + private final double rValue; + + private final int changePoint; + + // --------------------------------------------------------------------------------------------- + + private TrendChange(Builder builder) { + + this.pValue = ApiTypeHelper.requireNonNull(builder.pValue, this, "pValue", 0); + this.rValue = ApiTypeHelper.requireNonNull(builder.rValue, this, "rValue", 0); + this.changePoint = ApiTypeHelper.requireNonNull(builder.changePoint, this, "changePoint", 0); + + } + + public static TrendChange of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * ChangeType variant kind. + */ + @Override + public ChangeType.Kind _changeTypeKind() { + return ChangeType.Kind.TrendChange; + } + + /** + * Required - API name: {@code p_value} + */ + public final double pValue() { + return this.pValue; + } + + /** + * Required - API name: {@code r_value} + */ + public final double rValue() { + return this.rValue; + } + + /** + * Required - API name: {@code change_point} + */ + public final int changePoint() { + return this.changePoint; + } + + /** + * 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("p_value"); + generator.write(this.pValue); + + generator.writeKey("r_value"); + generator.write(this.rValue); + + generator.writeKey("change_point"); + generator.write(this.changePoint); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link TrendChange}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Double pValue; + + private Double rValue; + + private Integer changePoint; + + /** + * Required - API name: {@code p_value} + */ + public final Builder pValue(double value) { + this.pValue = value; + return this; + } + + /** + * Required - API name: {@code r_value} + */ + public final Builder rValue(double value) { + this.rValue = value; + return this; + } + + /** + * Required - API name: {@code change_point} + */ + public final Builder changePoint(int value) { + this.changePoint = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link TrendChange}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public TrendChange build() { + _checkSingleUse(); + + return new TrendChange(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link TrendChange} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + TrendChange::setupTrendChangeDeserializer); + + protected static void setupTrendChangeDeserializer(ObjectDeserializer op) { + + op.add(Builder::pValue, JsonpDeserializer.doubleDeserializer(), "p_value"); + op.add(Builder::rValue, JsonpDeserializer.doubleDeserializer(), "r_value"); + op.add(Builder::changePoint, JsonpDeserializer.integerDeserializer(), "change_point"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SemanticTextProperty.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SemanticTextProperty.java index 65614e8e0..95d84344b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SemanticTextProperty.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/SemanticTextProperty.java @@ -72,6 +72,8 @@ public class SemanticTextProperty implements PropertyVariant, JsonpSerializable @Nullable private final ChunkingSettings chunkingSettings; + private final Map fields; + // --------------------------------------------------------------------------------------------- private SemanticTextProperty(Builder builder) { @@ -80,6 +82,7 @@ private SemanticTextProperty(Builder builder) { this.inferenceId = builder.inferenceId; this.searchInferenceId = builder.searchInferenceId; this.chunkingSettings = builder.chunkingSettings; + this.fields = ApiTypeHelper.unmodifiable(builder.fields); } @@ -141,6 +144,18 @@ public final ChunkingSettings chunkingSettings() { return this.chunkingSettings; } + /** + * Multi-fields allow the same string value to be indexed in multiple ways for + * different purposes, such as one field for search and a multi-field for + * sorting and aggregations, or the same string value analyzed by different + * analyzers. + *

+ * API name: {@code fields} + */ + public final Map fields() { + return this.fields; + } + /** * Serialize this object to JSON. */ @@ -180,6 +195,17 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { this.chunkingSettings.serialize(generator, mapper); } + if (ApiTypeHelper.isDefined(this.fields)) { + generator.writeKey("fields"); + generator.writeStartObject(); + for (Map.Entry item0 : this.fields.entrySet()) { + generator.writeKey(item0.getKey()); + item0.getValue().serialize(generator, mapper); + + } + generator.writeEnd(); + + } } @@ -209,6 +235,9 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private ChunkingSettings chunkingSettings; + @Nullable + private Map fields; + /** * API name: {@code meta} *

@@ -280,6 +309,50 @@ public final Builder chunkingSettings(Function + * API name: {@code fields} + *

+ * Adds all entries of map to fields. + */ + public final Builder fields(Map map) { + this.fields = _mapPutAll(this.fields, map); + return this; + } + + /** + * Multi-fields allow the same string value to be indexed in multiple ways for + * different purposes, such as one field for search and a multi-field for + * sorting and aggregations, or the same string value analyzed by different + * analyzers. + *

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

+ * Adds an entry to fields. + */ + public final Builder fields(String key, Property value) { + this.fields = _mapPut(this.fields, key, value); + return this; + } + + /** + * Multi-fields allow the same string value to be indexed in multiple ways for + * different purposes, such as one field for search and a multi-field for + * sorting and aggregations, or the same string value analyzed by different + * analyzers. + *

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

+ * Adds an entry to fields using a builder lambda. + */ + public final Builder fields(String key, Function> fn) { + return fields(key, fn.apply(new Property.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -312,6 +385,7 @@ protected static void setupSemanticTextPropertyDeserializer(ObjectDeserializer expandWildcards; private final List h; @@ -84,15 +89,20 @@ public class AliasesRequest extends CatRequestBase { private final List s; + @Nullable + private final TimeUnit time; + // --------------------------------------------------------------------------------------------- private AliasesRequest(Builder builder) { + this.bytes = builder.bytes; this.expandWildcards = ApiTypeHelper.unmodifiable(builder.expandWildcards); this.h = ApiTypeHelper.unmodifiable(builder.h); this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.unmodifiable(builder.name); this.s = ApiTypeHelper.unmodifiable(builder.s); + this.time = builder.time; } @@ -100,6 +110,24 @@ public static AliasesRequest of(Function> return fn.apply(new Builder()).build(); } + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + /** * The type of index that wildcard patterns can match. If the request can target * data streams, this argument determines whether wildcard expressions match @@ -157,6 +185,22 @@ public final List s() { return this.s; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + @Nullable + public final TimeUnit time() { + return this.time; + } + // --------------------------------------------------------------------------------------------- /** @@ -166,6 +210,9 @@ public final List s() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Bytes bytes; + @Nullable private List expandWildcards; @@ -181,6 +228,27 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private List s; + @Nullable + private TimeUnit time; + + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + /** * The type of index that wildcard patterns can match. If the request can target * data streams, this argument determines whether wildcard expressions match @@ -332,6 +400,22 @@ public final Builder s(String value, String... values) { return this; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + public final Builder time(@Nullable TimeUnit value) { + this.time = value; + return this; + } + @Override protected Builder self() { return this; @@ -423,9 +507,15 @@ public AliasesRequest build() { params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.time != null) { + params.put("time", request.time.jsonValue()); + } return params; }, SimpleEndpoint.emptyMap(), false, AliasesResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java index 79605fbde..4d41e1ff0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/AllocationRequest.java @@ -22,6 +22,7 @@ import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.elasticsearch._types.TimeUnit; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -88,6 +89,9 @@ public class AllocationRequest extends CatRequestBase { private final List s; + @Nullable + private final TimeUnit time; + // --------------------------------------------------------------------------------------------- private AllocationRequest(Builder builder) { @@ -98,6 +102,7 @@ private AllocationRequest(Builder builder) { this.masterTimeout = builder.masterTimeout; this.nodeId = ApiTypeHelper.unmodifiable(builder.nodeId); this.s = ApiTypeHelper.unmodifiable(builder.s); + this.time = builder.time; } @@ -106,7 +111,15 @@ public static AllocationRequest of(Function1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -170,6 +183,22 @@ public final List s() { return this.s; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + @Nullable + public final TimeUnit time() { + return this.time; + } + // --------------------------------------------------------------------------------------------- /** @@ -197,8 +226,19 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private List s; + @Nullable + private TimeUnit time; + /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -334,6 +374,22 @@ public final Builder s(String value, String... values) { return this; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + public final Builder time(@Nullable TimeUnit value) { + this.time = value; + return this; + } + @Override protected Builder self() { return this; @@ -428,6 +484,9 @@ public AllocationRequest build() { if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.time != null) { + params.put("time", request.time.jsonValue()); + } if (request.local != null) { params.put("local", String.valueOf(request.local)); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatHealthColumn.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatHealthColumn.java new file mode 100644 index 000000000..29d467eee --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatHealthColumn.java @@ -0,0 +1,143 @@ +/* + * 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.cat; + +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 CatHealthColumn implements JsonEnum { + /** + * The number of seconds since 1970-01-01 00:00:00. + */ + Epoch("epoch", "t", "time"), + + /** + * The time in HH:MM:SS format. + */ + Timestamp("timestamp", "ts", "hms", "hhmmss"), + + /** + * The cluster name. + */ + Cluster("cluster", "cl"), + + /** + * The health status. + */ + Status("status", "st"), + + /** + * The total number of nodes that can store data. + */ + NodeTotal("node.total", "nt", "nodeTotal"), + + /** + * The number of nodes that can store data. + */ + NodeData("node.data", "nd", "nodeData"), + + /** + * The total number of shards. + */ + Shards("shards", "t", "sh", "shards.total", "shardsTotal"), + + /** + * The number of primary shards. + */ + Pri("pri", "p", "shards.primary", "shardsPrimary"), + + /** + * The number of relocating nodes. + */ + Relo("relo", "r", "shards.relocating", "shardsRelocating"), + + /** + * The number of initializing nodes. + */ + Init("init", "i", "shards.initializing", "shardsInitializing"), + + /** + * The number of unassigned shards. + */ + Unassign("unassign", "u", "shards.unassigned", "shardsUnassigned"), + + /** + * The number of unassigned primary shards. + */ + UnassignPri("unassign.pri", "up", "shards.unassigned.primary", "shardsUnassignedPrimary"), + + /** + * The number of pending tasks. + */ + PendingTasks("pending_tasks", "pt", "pendingTasks"), + + /** + * The wait time of the longest pending task. + */ + MaxTaskWaitTime("max_task_wait_time", "mtwt", "maxTaskWaitTime"), + + /** + * The percentage of active shards. + */ + ActiveShardsPercent("active_shards_percent", "asp", "activeShardsPercent"), + + ; + + private final String jsonValue; + private final String[] aliases; + + CatHealthColumn(String jsonValue, String... aliases) { + this.jsonValue = jsonValue; + this.aliases = aliases; + } + + public String jsonValue() { + return this.jsonValue; + } + + public String[] aliases() { + return this.aliases; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + CatHealthColumn.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatIndicesColumn.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatIndicesColumn.java new file mode 100644 index 000000000..6bfca63e8 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatIndicesColumn.java @@ -0,0 +1,809 @@ +/* + * 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.cat; + +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 CatIndicesColumn implements JsonEnum { + /** + * The current health status. + */ + Health("health", "h"), + + /** + * The open/close status. + */ + Status("status", "s"), + + /** + * The index name. + */ + Index("index", "i", "idx"), + + /** + * The index UUID. + */ + Uuid("uuid", "id", "uuid"), + + /** + * The number of primary shards. + */ + Pri("pri", "p", "shards.primary", "shardsPrimary"), + + /** + * The number of replica shards. + */ + Rep("rep", "r", "shards.replica", "shardsReplica"), + + /** + * The number of available documents. + */ + DocsCount("docs.count", "dc", "docsCount"), + + /** + * The number of deleted documents. + */ + DocsDeleted("docs.deleted", "dd", "docsDeleted"), + + /** + * The index creation date (millisecond value). + */ + CreationDate("creation.date", "cd"), + + /** + * The index creation date (as string). + */ + CreationDateString("creation.date.string", "cds"), + + /** + * The store size of primaries and replicas. + */ + StoreSize("store.size", "ss", "storeSize"), + + /** + * The store size of primaries. + */ + PriStoreSize("pri.store.size"), + + /** + * The total size of the dataset. + */ + DatasetSize("dataset.size"), + + /** + * The size of completion for primaries and replicas. + */ + CompletionSize("completion.size", "cs", "completionSize"), + + /** + * The size of completion for primaries. + */ + PriCompletionSize("pri.completion.size"), + + /** + * The used fielddata cache for primaries and replicas. + */ + FielddataMemorySize("fielddata.memory_size", "fm", "fielddataMemory"), + + /** + * The used fielddata cache for primaries. + */ + PriFielddataMemorySize("pri.fielddata.memory_size"), + + /** + * The number of fielddata evictions for primaries and replicas. + */ + FielddataEvictions("fielddata.evictions", "fe", "fielddataEvictions"), + + /** + * The number of fielddata evictions for primaries. + */ + PriFielddataEvictions("pri.fielddata.evictions"), + + /** + * The used query cache for primaries and replicas. + */ + QueryCacheMemorySize("query_cache.memory_size", "qcm", "queryCacheMemory"), + + /** + * The used query cache for primaries. + */ + PriQueryCacheMemorySize("pri.query_cache.memory_size"), + + /** + * The number of query cache evictions for primaries and replicas. + */ + QueryCacheEvictions("query_cache.evictions", "qce", "queryCacheEvictions"), + + /** + * The number of query cache evictions for primaries. + */ + PriQueryCacheEvictions("pri.query_cache.evictions"), + + /** + * The used request cache for primaries and replicas. + */ + RequestCacheMemorySize("request_cache.memory_size", "rcm", "requestCacheMemory"), + + /** + * The used request cache for primaries. + */ + PriRequestCacheMemorySize("pri.request_cache.memory_size"), + + /** + * The number of request cache evictions for primaries and replicas. + */ + RequestCacheEvictions("request_cache.evictions", "rce", "requestCacheEvictions"), + + /** + * The number of request cache evictions for primaries. + */ + PriRequestCacheEvictions("pri.request_cache.evictions"), + + /** + * The request cache hit count for primaries and replicas. + */ + RequestCacheHitCount("request_cache.hit_count", "rchc", "requestCacheHitCount"), + + /** + * The request cache hit count for primaries. + */ + PriRequestCacheHitCount("pri.request_cache.hit_count"), + + /** + * The request cache miss count for primaries and replicas. + */ + RequestCacheMissCount("request_cache.miss_count", "rcmc", "requestCacheMissCount"), + + /** + * The request cache miss count for primaries. + */ + PriRequestCacheMissCount("pri.request_cache.miss_count"), + + /** + * The number of flushes for primaries and replicas. + */ + FlushTotal("flush.total", "ft", "flushTotal"), + + /** + * The number of flushes for primaries. + */ + PriFlushTotal("pri.flush.total"), + + /** + * The time spent in flush for primaries and replicas. + */ + FlushTotalTime("flush.total_time", "ftt", "flushTotalTime"), + + /** + * The time spent in flush for primaries. + */ + PriFlushTotalTime("pri.flush.total_time"), + + /** + * The number of current get operations for primaries and replicas. + */ + GetCurrent("get.current", "gc", "getCurrent"), + + /** + * The number of current get operations for primaries. + */ + PriGetCurrent("pri.get.current"), + + /** + * The time spent in get for primaries and replicas. + */ + GetTime("get.time", "gti", "getTime"), + + /** + * The time spent in get for primaries. + */ + PriGetTime("pri.get.time"), + + /** + * The number of get operations for primaries and replicas. + */ + GetTotal("get.total", "gto", "getTotal"), + + /** + * The number of get operations for primaries. + */ + PriGetTotal("pri.get.total"), + + /** + * The time spent in successful gets for primaries and replicas. + */ + GetExistsTime("get.exists_time", "geti", "getExistsTime"), + + /** + * The time spent in successful gets for primaries. + */ + PriGetExistsTime("pri.get.exists_time"), + + /** + * The number of successful gets for primaries and replicas. + */ + GetExistsTotal("get.exists_total", "geto", "getExistsTotal"), + + /** + * The number of successful gets for primaries. + */ + PriGetExistsTotal("pri.get.exists_total"), + + /** + * The time spent in failed gets for primaries and replicas. + */ + GetMissingTime("get.missing_time", "gmti", "getMissingTime"), + + /** + * The time spent in failed gets for primaries. + */ + PriGetMissingTime("pri.get.missing_time"), + + /** + * The number of failed gets for primaries and replicas. + */ + GetMissingTotal("get.missing_total", "gmto", "getMissingTotal"), + + /** + * The number of failed gets for primaries. + */ + PriGetMissingTotal("pri.get.missing_total"), + + /** + * The number of current deletions for primaries and replicas. + */ + IndexingDeleteCurrent("indexing.delete_current", "idc", "indexingDeleteCurrent"), + + /** + * The number of current deletions for primaries. + */ + PriIndexingDeleteCurrent("pri.indexing.delete_current"), + + /** + * The time spent in deletions for primaries and replicas. + */ + IndexingDeleteTime("indexing.delete_time", "idti", "indexingDeleteTime"), + + /** + * The time spent in deletions for primaries. + */ + PriIndexingDeleteTime("pri.indexing.delete_time"), + + /** + * The number of delete operations for primaries and replicas. + */ + IndexingDeleteTotal("indexing.delete_total", "idto", "indexingDeleteTotal"), + + /** + * The number of delete operations for primaries. + */ + PriIndexingDeleteTotal("pri.indexing.delete_total"), + + /** + * The number of current indexing operations for primaries and replicas. + */ + IndexingIndexCurrent("indexing.index_current", "iic", "indexingIndexCurrent"), + + /** + * The number of current indexing operations for primaries. + */ + PriIndexingIndexCurrent("pri.indexing.index_current"), + + /** + * The time spent in indexing for primaries and replicas. + */ + IndexingIndexTime("indexing.index_time", "iiti", "indexingIndexTime"), + + /** + * The time spent in indexing for primaries. + */ + PriIndexingIndexTime("pri.indexing.index_time"), + + /** + * The number of indexing operations for primaries and replicas. + */ + IndexingIndexTotal("indexing.index_total", "iito", "indexingIndexTotal"), + + /** + * The number of indexing operations for primaries. + */ + PriIndexingIndexTotal("pri.indexing.index_total"), + + /** + * The number of failed indexing operations for primaries and replicas. + */ + IndexingIndexFailed("indexing.index_failed", "iif", "indexingIndexFailed"), + + /** + * The number of failed indexing operations for primaries. + */ + PriIndexingIndexFailed("pri.indexing.index_failed"), + + /** + * The number of failed indexing operations due to version conflict for + * primaries and replicas. + */ + IndexingIndexFailedDueToVersionConflict("indexing.index_failed_due_to_version_conflict", "iifvc", + "indexingIndexFailedDueToVersionConflict"), + + /** + * The number of failed indexing operations due to version conflict for + * primaries. + */ + PriIndexingIndexFailedDueToVersionConflict("pri.indexing.index_failed_due_to_version_conflict"), + + /** + * The number of current merges for primaries and replicas. + */ + MergesCurrent("merges.current", "mc", "mergesCurrent"), + + /** + * The number of current merges for primaries. + */ + PriMergesCurrent("pri.merges.current"), + + /** + * The number of current merging documents for primaries and replicas. + */ + MergesCurrentDocs("merges.current_docs", "mcd", "mergesCurrentDocs"), + + /** + * The number of current merging documents for primaries. + */ + PriMergesCurrentDocs("pri.merges.current_docs"), + + /** + * The size of current merges for primaries and replicas. + */ + MergesCurrentSize("merges.current_size", "mcs", "mergesCurrentSize"), + + /** + * The size of current merges for primaries. + */ + PriMergesCurrentSize("pri.merges.current_size"), + + /** + * The number of completed merge operations for primaries and replicas. + */ + MergesTotal("merges.total", "mt", "mergesTotal"), + + /** + * The number of completed merge operations for primaries. + */ + PriMergesTotal("pri.merges.total"), + + /** + * The number of merged documents for primaries and replicas. + */ + MergesTotalDocs("merges.total_docs", "mtd", "mergesTotalDocs"), + + /** + * The number of merged documents for primaries. + */ + PriMergesTotalDocs("pri.merges.total_docs"), + + /** + * The merged size for primaries and replicas. + */ + MergesTotalSize("merges.total_size", "mts", "mergesTotalSize"), + + /** + * The merged size for primaries. + */ + PriMergesTotalSize("pri.merges.total_size"), + + /** + * The time spent in merges for primaries and replicas. + */ + MergesTotalTime("merges.total_time", "mtt", "mergesTotalTime"), + + /** + * The time spent in merges for primaries. + */ + PriMergesTotalTime("pri.merges.total_time"), + + /** + * The total refreshes for primaries and replicas. + */ + RefreshTotal("refresh.total", "rto", "refreshTotal"), + + /** + * The total refreshes for primaries. + */ + PriRefreshTotal("pri.refresh.total"), + + /** + * The time spent in refreshes for primaries and replicas. + */ + RefreshTime("refresh.time", "rti", "refreshTime"), + + /** + * The time spent in refreshes for primaries. + */ + PriRefreshTime("pri.refresh.time"), + + /** + * The total external refreshes for primaries and replicas. + */ + RefreshExternalTotal("refresh.external_total", "rto", "refreshTotal"), + + /** + * The total external refreshes for primaries. + */ + PriRefreshExternalTotal("pri.refresh.external_total"), + + /** + * The time spent in external refreshes for primaries and replicas. + */ + RefreshExternalTime("refresh.external_time", "rti", "refreshTime"), + + /** + * The time spent in external refreshes for primaries. + */ + PriRefreshExternalTime("pri.refresh.external_time"), + + /** + * The number of pending refresh listeners for primaries and replicas. + */ + RefreshListeners("refresh.listeners", "rli", "refreshListeners"), + + /** + * The number of pending refresh listeners for primaries. + */ + PriRefreshListeners("pri.refresh.listeners"), + + /** + * The current fetch phase operations for primaries and replicas. + */ + SearchFetchCurrent("search.fetch_current", "sfc", "searchFetchCurrent"), + + /** + * The current fetch phase operations for primaries. + */ + PriSearchFetchCurrent("pri.search.fetch_current"), + + /** + * The time spent in fetch phase for primaries and replicas. + */ + SearchFetchTime("search.fetch_time", "sfti", "searchFetchTime"), + + /** + * The time spent in fetch phase for primaries. + */ + PriSearchFetchTime("pri.search.fetch_time"), + + /** + * The total fetch operations for primaries and replicas. + */ + SearchFetchTotal("search.fetch_total", "sfto", "searchFetchTotal"), + + /** + * The total fetch operations for primaries. + */ + PriSearchFetchTotal("pri.search.fetch_total"), + + /** + * The open search contexts for primaries and replicas. + */ + SearchOpenContexts("search.open_contexts", "so", "searchOpenContexts"), + + /** + * The open search contexts for primaries. + */ + PriSearchOpenContexts("pri.search.open_contexts"), + + /** + * The current query phase operations for primaries and replicas. + */ + SearchQueryCurrent("search.query_current", "sqc", "searchQueryCurrent"), + + /** + * The current query phase operations for primaries. + */ + PriSearchQueryCurrent("pri.search.query_current"), + + /** + * The time spent in query phase for primaries and replicas. + */ + SearchQueryTime("search.query_time", "sqti", "searchQueryTime"), + + /** + * The time spent in query phase for primaries. + */ + PriSearchQueryTime("pri.search.query_time"), + + /** + * The total query phase operations for primaries and replicas. + */ + SearchQueryTotal("search.query_total", "sqto", "searchQueryTotal"), + + /** + * The total query phase operations for primaries. + */ + PriSearchQueryTotal("pri.search.query_total"), + + /** + * The open scroll contexts for primaries and replicas. + */ + SearchScrollCurrent("search.scroll_current", "scc", "searchScrollCurrent"), + + /** + * The open scroll contexts for primaries. + */ + PriSearchScrollCurrent("pri.search.scroll_current"), + + /** + * The time scroll contexts held open for primaries and replicas. + */ + SearchScrollTime("search.scroll_time", "scti", "searchScrollTime"), + + /** + * The time scroll contexts held open for primaries. + */ + PriSearchScrollTime("pri.search.scroll_time"), + + /** + * The completed scroll contexts for primaries and replicas. + */ + SearchScrollTotal("search.scroll_total", "scto", "searchScrollTotal"), + + /** + * The completed scroll contexts for primaries. + */ + PriSearchScrollTotal("pri.search.scroll_total"), + + /** + * The number of segments for primaries and replicas. + */ + SegmentsCount("segments.count", "sc", "segmentsCount"), + + /** + * The number of segments for primaries. + */ + PriSegmentsCount("pri.segments.count"), + + /** + * The memory used by segments for primaries and replicas. + */ + SegmentsMemory("segments.memory", "sm", "segmentsMemory"), + + /** + * The memory used by segments for primaries. + */ + PriSegmentsMemory("pri.segments.memory"), + + /** + * The memory used by index writer for primaries and replicas. + */ + SegmentsIndexWriterMemory("segments.index_writer_memory", "siwm", "segmentsIndexWriterMemory"), + + /** + * The memory used by index writer for primaries. + */ + PriSegmentsIndexWriterMemory("pri.segments.index_writer_memory"), + + /** + * The memory used by version map for primaries and replicas. + */ + SegmentsVersionMapMemory("segments.version_map_memory", "svmm", "segmentsVersionMapMemory"), + + /** + * The memory used by version map for primaries. + */ + PriSegmentsVersionMapMemory("pri.segments.version_map_memory"), + + /** + * The memory used by fixed bit sets for nested object field types and type + * filters for types referred in _parent fields. Applicable for primaries and + * replicas. + */ + SegmentsFixedBitsetMemory("segments.fixed_bitset_memory", "sfbm", "fixedBitsetMemory"), + + /** + * The memory used by fixed bit sets for nested object field types and type + * filters for types referred in _parent fields. Applicable for primaries. + */ + PriSegmentsFixedBitsetMemory("pri.segments.fixed_bitset_memory"), + + /** + * The current warmer operations for primaries and replicas. + */ + WarmerCurrent("warmer.current", "wc", "warmerCurrent"), + + /** + * The current warmer operations for primaries. + */ + PriWarmerCurrent("pri.warmer.current"), + + /** + * The total warmer operations for primaries and replicas. + */ + WarmerTotal("warmer.total", "wto", "warmerTotal"), + + /** + * The total warmer operations for primaries. + */ + PriWarmerTotal("pri.warmer.total"), + + /** + * The time spent in warmers for primaries and replicas. + */ + WarmerTotalTime("warmer.total_time", "wtt", "warmerTotalTime"), + + /** + * The time spent in warmers for primaries. + */ + PriWarmerTotalTime("pri.warmer.total_time"), + + /** + * The current suggest operations for primaries and replicas. + */ + SuggestCurrent("suggest.current", "suc", "suggestCurrent"), + + /** + * The current suggest operations for primaries. + */ + PriSuggestCurrent("pri.suggest.current"), + + /** + * The time spent in suggest for primaries and replicas. + */ + SuggestTime("suggest.time", "suti", "suggestTime"), + + /** + * The time spent in suggest for primaries. + */ + PriSuggestTime("pri.suggest.time"), + + /** + * The number of suggest operations for primaries and replicas. + */ + SuggestTotal("suggest.total", "suto", "suggestTotal"), + + /** + * The number of suggest operations for primaries. + */ + PriSuggestTotal("pri.suggest.total"), + + /** + * The total used memory for primaries and replicas. + */ + MemoryTotal("memory.total", "tm", "memoryTotal"), + + /** + * The total used memory for primaries. + */ + PriMemoryTotal("pri.memory.total"), + + /** + * The number of bulk shard operations for primaries and replicas. + */ + BulkTotalOperations("bulk.total_operations", "bto", "bulkTotalOperation"), + + /** + * The number of bulk shard operations for primaries. + */ + PriBulkTotalOperations("pri.bulk.total_operations"), + + /** + * The time spent in shard bulk for primaries and replicas. + */ + BulkTotalTime("bulk.total_time", "btti", "bulkTotalTime"), + + /** + * The time spent in shard bulk for primaries. + */ + PriBulkTotalTime("pri.bulk.total_time"), + + /** + * The total size in bytes of shard bulk for primaries and replicas. + */ + BulkTotalSizeInBytes("bulk.total_size_in_bytes", "btsi", "bulkTotalSizeInBytes"), + + /** + * The total size in bytes of shard bulk for primaries. + */ + PriBulkTotalSizeInBytes("pri.bulk.total_size_in_bytes"), + + /** + * The average time spent in shard bulk for primaries and replicas. + */ + BulkAvgTime("bulk.avg_time", "bati", "bulkAvgTime"), + + /** + * The average time spent in shard bulk for primaries. + */ + PriBulkAvgTime("pri.bulk.avg_time"), + + /** + * The average size in bytes of shard bulk for primaries and replicas. + */ + BulkAvgSizeInBytes("bulk.avg_size_in_bytes", "basi", "bulkAvgSizeInBytes"), + + /** + * The average size in bytes of shard bulk for primaries. + */ + PriBulkAvgSizeInBytes("pri.bulk.avg_size_in_bytes"), + + /** + * The total count of indexed dense vectors for primaries and replicas. + */ + DenseVectorValueCount("dense_vector.value_count", "dvc", "denseVectorCount"), + + /** + * The total count of indexed dense vectors for primaries. + */ + PriDenseVectorValueCount("pri.dense_vector.value_count"), + + /** + * The total count of indexed sparse vectors for primaries and replicas. + */ + SparseVectorValueCount("sparse_vector.value_count", "svc", "sparseVectorCount"), + + /** + * The total count of indexed sparse vectors for primaries. + */ + PriSparseVectorValueCount("pri.sparse_vector.value_count"), + + ; + + private final String jsonValue; + private final String[] aliases; + + CatIndicesColumn(String jsonValue, String... aliases) { + this.jsonValue = jsonValue; + this.aliases = aliases; + } + + public String jsonValue() { + return this.jsonValue; + } + + public String[] aliases() { + return this.aliases; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + CatIndicesColumn.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatMasterColumn.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatMasterColumn.java new file mode 100644 index 000000000..b84f85bc0 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatMasterColumn.java @@ -0,0 +1,88 @@ +/* + * 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.cat; + +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 CatMasterColumn implements JsonEnum { + /** + * The node ID. + */ + Id("id"), + + /** + * The host name of the node. + */ + Host("host", "h"), + + /** + * The IP address of the node. + */ + Ip("ip"), + + /** + * The node name. + */ + Node("node", "n"), + + ; + + private final String jsonValue; + private final String[] aliases; + + CatMasterColumn(String jsonValue, String... aliases) { + this.jsonValue = jsonValue; + this.aliases = aliases; + } + + public String jsonValue() { + return this.jsonValue; + } + + public String[] aliases() { + return this.aliases; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + CatMasterColumn.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatNodeattrsColumn.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatNodeattrsColumn.java new file mode 100644 index 000000000..820b3a278 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatNodeattrsColumn.java @@ -0,0 +1,108 @@ +/* + * 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.cat; + +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 CatNodeattrsColumn implements JsonEnum { + /** + * The node name. + */ + Node("node"), + + /** + * The unique node ID. + */ + Id("id", "id", "nodeId"), + + /** + * The process ID. + */ + Pid("pid", "p"), + + /** + * The host name. + */ + Host("host", "h"), + + /** + * The IP address. + */ + Ip("ip", "i"), + + /** + * The bound transport port. + */ + Port("port", "po"), + + /** + * The attribute description. + */ + Attr("attr", "attr.name"), + + /** + * The attribute value. + */ + Value("value", "attr.value"), + + ; + + private final String jsonValue; + private final String[] aliases; + + CatNodeattrsColumn(String jsonValue, String... aliases) { + this.jsonValue = jsonValue; + this.aliases = aliases; + } + + public String jsonValue() { + return this.jsonValue; + } + + public String[] aliases() { + return this.aliases; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + CatNodeattrsColumn.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatPendingTasksColumn.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatPendingTasksColumn.java new file mode 100644 index 000000000..24cacccbf --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatPendingTasksColumn.java @@ -0,0 +1,89 @@ +/* + * 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.cat; + +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 CatPendingTasksColumn implements JsonEnum { + /** + * The task insertion order. + */ + InsertOrder("insertOrder", "o"), + + /** + * How long the task has been in the queue. + */ + TimeInQueue("timeInQueue", "t"), + + /** + * The task priority. + */ + Priority("priority", "p"), + + /** + * The task source. + */ + Source("source", "s"), + + ; + + private final String jsonValue; + private final String[] aliases; + + CatPendingTasksColumn(String jsonValue, String... aliases) { + this.jsonValue = jsonValue; + this.aliases = aliases; + } + + public String jsonValue() { + return this.jsonValue; + } + + public String[] aliases() { + return this.aliases; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + CatPendingTasksColumn.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatPluginsColumn.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatPluginsColumn.java new file mode 100644 index 000000000..e7ed40f76 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatPluginsColumn.java @@ -0,0 +1,93 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.cat; + +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 CatPluginsColumn implements JsonEnum { + /** + * The unique node ID. + */ + Id("id"), + + /** + * The node name. + */ + Name("name", "n"), + + /** + * The component. + */ + Component("component", "c"), + + /** + * The component version. + */ + Version("version", "v"), + + /** + * The plugin details. + */ + Description("description", "d"), + + ; + + private final String jsonValue; + private final String[] aliases; + + CatPluginsColumn(String jsonValue, String... aliases) { + this.jsonValue = jsonValue; + this.aliases = aliases; + } + + public String jsonValue() { + return this.jsonValue; + } + + public String[] aliases() { + return this.aliases; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + CatPluginsColumn.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatRecoveryColumn.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatRecoveryColumn.java index b018efeb3..d0341c62e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatRecoveryColumn.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatRecoveryColumn.java @@ -46,77 +46,92 @@ @JsonpDeserializable public enum CatRecoveryColumn implements JsonEnum { /** - * The name of the index. + * The index name. */ Index("index", "i", "idx"), /** - * The name of the shard. + * The shard name. */ Shard("shard", "s", "sh"), /** - * The recovery time elasped. + * The recovery start time. */ - Time("time", "t", "ti", "primaryOrReplica"), + StartTime("start_time", "start"), + + /** + * The recovery start time in epoch milliseconds. + */ + StartTimeMillis("start_time_millis", "start_millis"), + + /** + * The recovery stop time. + */ + StopTime("stop_time", "stop"), + + /** + * The recovery stop time in epoch milliseconds. + */ + StopTimeMillis("stop_time_millis", "stop_millis"), + + /** + * The recovery time. + */ + Time("time", "t", "ti"), /** - * The type of recovery, from a peer or a snapshot. + * The recovery type. */ - Type("type"), + Type("type", "ty"), /** - * The stage of the recovery. Returned values are: INIT, - * INDEX: recovery of lucene files, either reusing local ones are - * copying new ones, VERIFY_INDEX: potentially running check index, - * TRANSLOG: starting up the engine, replaying the translog, - * FINALIZE: performing final task after all translog ops have been - * done, DONE + * The recovery stage. */ Stage("stage", "st"), /** - * The host address the index is moving from. + * The source host. */ SourceHost("source_host", "shost"), /** - * The node name the index is moving from. + * The source node name. */ SourceNode("source_node", "snode"), /** - * The host address the index is moving to. + * The target host. */ TargetHost("target_host", "thost"), /** - * The node name the index is moving to. + * The target node name. */ TargetNode("target_node", "tnode"), /** - * The name of the repository being used. if not relevant 'n/a'. + * The repository. */ - Repository("repository", "tnode"), + Repository("repository", "rep"), /** - * The name of the snapshot being used. if not relevant 'n/a'. + * The snapshot. */ Snapshot("snapshot", "snap"), /** - * The total number of files to recover. + * The number of files to recover. */ Files("files", "f"), /** - * The number of files currently recovered. + * The files recovered. */ FilesRecovered("files_recovered", "fr"), /** - * The percentage of files currently recovered. + * The percent of files recovered. */ FilesPercent("files_percent", "fp"), @@ -126,17 +141,17 @@ public enum CatRecoveryColumn implements JsonEnum { FilesTotal("files_total", "tf"), /** - * The total number of bytes to recover. + * The number of bytes to recover. */ Bytes("bytes", "b"), /** - * Total number of bytes currently recovered. + * The bytes recovered. */ BytesRecovered("bytes_recovered", "br"), /** - * The percentage of bytes currently recovered. + * The percent of bytes recovered. */ BytesPercent("bytes_percent", "bp"), @@ -146,40 +161,20 @@ public enum CatRecoveryColumn implements JsonEnum { BytesTotal("bytes_total", "tb"), /** - * The total number of translog ops to recover. + * The number of translog ops to recover. */ TranslogOps("translog_ops", "to"), /** - * The total number of translog ops currently recovered. + * The translog ops recovered. */ TranslogOpsRecovered("translog_ops_recovered", "tor"), /** - * The percentage of translog ops currently recovered. + * The percent of translog ops recovered. */ TranslogOpsPercent("translog_ops_percent", "top"), - /** - * The start time of the recovery operation. - */ - StartTime("start_time", "start"), - - /** - * The start time of the recovery operation in eopch milliseconds. - */ - StartTimeMillis("start_time_millis", "start_millis"), - - /** - * The end time of the recovery operation. If ongoing '1970-01-01T00:00:00.000Z' - */ - StopTime("stop_time", "stop"), - - /** - * The end time of the recovery operation in eopch milliseconds. If ongoing '0' - */ - StopTimeMillis("stop_time_millis", "stop_millis"), - ; private final String jsonValue; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatTasksColumn.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatTasksColumn.java new file mode 100644 index 000000000..dd299fc75 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatTasksColumn.java @@ -0,0 +1,143 @@ +/* + * 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.cat; + +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 CatTasksColumn implements JsonEnum { + /** + * The ID of the task with the node. + */ + Id("id"), + + /** + * The task action. + */ + Action("action", "ac"), + + /** + * The unique task ID. + */ + TaskId("task_id", "ti"), + + /** + * The parent task ID. + */ + ParentTaskId("parent_task_id", "pti"), + + /** + * The task type. + */ + Type("type", "ty"), + + /** + * The start time in milliseconds. + */ + StartTime("start_time", "start"), + + /** + * The start time in HH:MM:SS. + */ + Timestamp("timestamp", "ts", "hms", "hhmmss"), + + /** + * The running time in nanoseconds. + */ + RunningTimeNs("running_time_ns", "time"), + + /** + * The running time. + */ + RunningTime("running_time", "time"), + + /** + * The unique node ID. + */ + NodeId("node_id", "ni"), + + /** + * The IP address. + */ + Ip("ip", "i"), + + /** + * The bound transport port. + */ + Port("port", "po"), + + /** + * The node name. + */ + Node("node", "n"), + + /** + * The Elasticsearch version. + */ + Version("version", "v"), + + /** + * The X-Opaque-ID header. + */ + XOpaqueId("x_opaque_id", "x"), + + ; + + private final String jsonValue; + private final String[] aliases; + + CatTasksColumn(String jsonValue, String... aliases) { + this.jsonValue = jsonValue; + this.aliases = aliases; + } + + public String jsonValue() { + return this.jsonValue; + } + + public String[] aliases() { + return this.aliases; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + CatTasksColumn.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatTemplatesColumn.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatTemplatesColumn.java new file mode 100644 index 000000000..b52f8ea57 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatTemplatesColumn.java @@ -0,0 +1,93 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.elasticsearch.cat; + +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 CatTemplatesColumn implements JsonEnum { + /** + * The template name. + */ + Name("name", "n"), + + /** + * The template index patterns. + */ + IndexPatterns("index_patterns", "t"), + + /** + * The template application order or priority number. + */ + Order("order", "o", "p"), + + /** + * The version. + */ + Version("version", "v"), + + /** + * The component templates comprising the index template. + */ + ComposedOf("composed_of", "c"), + + ; + + private final String jsonValue; + private final String[] aliases; + + CatTemplatesColumn(String jsonValue, String... aliases) { + this.jsonValue = jsonValue; + this.aliases = aliases; + } + + public String jsonValue() { + return this.jsonValue; + } + + public String[] aliases() { + return this.aliases; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + CatTemplatesColumn.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java index 6b300674c..fb0722f19 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ComponentTemplatesRequest.java @@ -19,8 +19,10 @@ package co.elastic.clients.elasticsearch.cat; +import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.elasticsearch._types.TimeUnit; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -74,6 +76,9 @@ */ public class ComponentTemplatesRequest extends CatRequestBase { + @Nullable + private final Bytes bytes; + private final List h; @Nullable @@ -87,15 +92,20 @@ public class ComponentTemplatesRequest extends CatRequestBase { private final List s; + @Nullable + private final TimeUnit time; + // --------------------------------------------------------------------------------------------- private ComponentTemplatesRequest(Builder builder) { + this.bytes = builder.bytes; this.h = ApiTypeHelper.unmodifiable(builder.h); this.local = builder.local; this.masterTimeout = builder.masterTimeout; this.name = builder.name; this.s = ApiTypeHelper.unmodifiable(builder.s); + this.time = builder.time; } @@ -103,6 +113,24 @@ public static ComponentTemplatesRequest of(Function1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + /** * A comma-separated list of columns names to display. It supports simple * wildcards. @@ -159,6 +187,22 @@ public final List s() { return this.s; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + @Nullable + public final TimeUnit time() { + return this.time; + } + // --------------------------------------------------------------------------------------------- /** @@ -168,6 +212,9 @@ public final List s() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Bytes bytes; + @Nullable private List h; @@ -183,6 +230,27 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private List s; + @Nullable + private TimeUnit time; + + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + /** * A comma-separated list of columns names to display. It supports simple * wildcards. @@ -295,6 +363,22 @@ public final Builder s(String value, String... values) { return this; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + public final Builder time(@Nullable TimeUnit value) { + this.time = value; + return this; + } + @Override protected Builder self() { return this; @@ -382,9 +466,15 @@ public ComponentTemplatesRequest build() { if (ApiTypeHelper.isDefined(request.s)) { params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.time != null) { + params.put("time", request.time.jsonValue()); + } if (request.local != null) { params.put("local", String.valueOf(request.local)); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java index 9f0bc7281..7a7e0b5c6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CountRequest.java @@ -19,7 +19,9 @@ package co.elastic.clients.elasticsearch.cat; +import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.TimeUnit; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -72,19 +74,27 @@ */ public class CountRequest extends CatRequestBase { + @Nullable + private final Bytes bytes; + private final List h; private final List index; private final List s; + @Nullable + private final TimeUnit time; + // --------------------------------------------------------------------------------------------- private CountRequest(Builder builder) { + this.bytes = builder.bytes; this.h = ApiTypeHelper.unmodifiable(builder.h); this.index = ApiTypeHelper.unmodifiable(builder.index); this.s = ApiTypeHelper.unmodifiable(builder.s); + this.time = builder.time; } @@ -92,6 +102,24 @@ public static CountRequest of(Function> fn) return fn.apply(new Builder()).build(); } + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + /** * A comma-separated list of columns names to display. It supports simple * wildcards. @@ -125,6 +153,22 @@ public final List s() { return this.s; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + @Nullable + public final TimeUnit time() { + return this.time; + } + // --------------------------------------------------------------------------------------------- /** @@ -132,6 +176,9 @@ public final List s() { */ public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Bytes bytes; + @Nullable private List h; @@ -141,6 +188,27 @@ public static class Builder extends CatRequestBase.AbstractBuilder impl @Nullable private List s; + @Nullable + private TimeUnit time; + + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + /** * A comma-separated list of columns names to display. It supports simple * wildcards. @@ -239,6 +307,22 @@ public final Builder s(String value, String... values) { return this; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + public final Builder time(@Nullable TimeUnit value) { + this.time = value; + return this; + } + @Override protected Builder self() { return this; @@ -323,9 +407,15 @@ public CountRequest build() { if (ApiTypeHelper.isDefined(request.s)) { params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.time != null) { + params.put("time", request.time.jsonValue()); + } return params; }, SimpleEndpoint.emptyMap(), false, CountResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataRequest.java index 34f34dae6..9814a3e15 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/FielddataRequest.java @@ -21,6 +21,7 @@ import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.TimeUnit; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -81,6 +82,9 @@ public class FielddataRequest extends CatRequestBase { private final List s; + @Nullable + private final TimeUnit time; + // --------------------------------------------------------------------------------------------- private FielddataRequest(Builder builder) { @@ -89,6 +93,7 @@ private FielddataRequest(Builder builder) { this.fields = ApiTypeHelper.unmodifiable(builder.fields); this.h = ApiTypeHelper.unmodifiable(builder.h); this.s = ApiTypeHelper.unmodifiable(builder.s); + this.time = builder.time; } @@ -97,7 +102,15 @@ public static FielddataRequest of(Function1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -137,6 +150,22 @@ public final List s() { return this.s; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + @Nullable + public final TimeUnit time() { + return this.time; + } + // --------------------------------------------------------------------------------------------- /** @@ -158,8 +187,19 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private List s; + @Nullable + private TimeUnit time; + /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -262,6 +302,22 @@ public final Builder s(String value, String... values) { return this; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + public final Builder time(@Nullable TimeUnit value) { + this.time = value; + return this; + } + @Override protected Builder self() { return this; @@ -353,6 +409,9 @@ public FielddataRequest build() { if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.time != null) { + params.put("time", request.time.jsonValue()); + } return params; }, SimpleEndpoint.emptyMap(), false, FielddataResponse._DESERIALIZER); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthRequest.java index b7042f4c9..f2292ebf0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/HealthRequest.java @@ -19,6 +19,7 @@ package co.elastic.clients.elasticsearch.cat; +import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.TimeUnit; import co.elastic.clients.json.JsonpDeserializable; @@ -32,6 +33,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -78,6 +80,9 @@ */ public class HealthRequest extends CatRequestBase { + @Nullable + private final Bytes bytes; + private final List h; private final List s; @@ -92,6 +97,7 @@ public class HealthRequest extends CatRequestBase { private HealthRequest(Builder builder) { + this.bytes = builder.bytes; this.h = ApiTypeHelper.unmodifiable(builder.h); this.s = ApiTypeHelper.unmodifiable(builder.s); this.time = builder.time; @@ -104,7 +110,26 @@ public static HealthRequest of(Function> f } /** - * List of columns to appear in the response. Supports simple wildcards. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} */ @@ -124,7 +149,13 @@ public final List s() { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -152,6 +183,9 @@ public final Boolean ts() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Bytes bytes; + @Nullable private List h; @@ -165,7 +199,26 @@ public static class Builder extends CatRequestBase.AbstractBuilder private Boolean ts; /** - * List of columns to appear in the response. Supports simple wildcards. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -177,7 +230,8 @@ public final Builder h(List list) { } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -188,6 +242,20 @@ public final Builder h(String value, String... values) { return this; } + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. + *

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

+ * Adds one or more enum values to h. + */ + public final Builder h(CatHealthColumn value, CatHealthColumn... values) { + this.h = _listAdd(this.h, value.jsonValue(), + Arrays.stream(values).map(CatHealthColumn::jsonValue).toArray(String[]::new)); + return this; + } + /** * List of columns that determine how the table should be sorted. Sorting * defaults to ascending and can be changed by setting :asc or @@ -217,7 +285,13 @@ public final Builder s(String value, String... values) { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -286,6 +360,9 @@ public HealthRequest build() { if (ApiTypeHelper.isDefined(request.s)) { params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java index 87367fe16..b7742565c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/IndicesRequest.java @@ -36,6 +36,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -139,7 +140,15 @@ public static IndicesRequest of(Function> } /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -158,7 +167,8 @@ public final List expandWildcards() { } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} */ @@ -231,7 +241,13 @@ public final List s() { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -280,7 +296,15 @@ public static class Builder extends CatRequestBase.AbstractBuilder private TimeUnit time; /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -314,7 +338,8 @@ public final Builder expandWildcards(ExpandWildcard value, ExpandWildcard... val } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -326,7 +351,8 @@ public final Builder h(List list) { } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -337,6 +363,20 @@ public final Builder h(String value, String... values) { return this; } + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. + *

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

+ * Adds one or more enum values to h. + */ + public final Builder h(CatIndicesColumn value, CatIndicesColumn... values) { + this.h = _listAdd(this.h, value.jsonValue(), + Arrays.stream(values).map(CatIndicesColumn::jsonValue).toArray(String[]::new)); + return this; + } + /** * The health status used to limit returned indices. By default, the response * includes indices of any health status. @@ -445,7 +485,13 @@ public final Builder s(String value, String... values) { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -545,12 +591,12 @@ public IndicesRequest build() { params.put("expand_wildcards", request.expandWildcards.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); } - if (request.bytes != null) { - params.put("bytes", request.bytes.jsonValue()); - } if (request.pri != null) { params.put("pri", String.valueOf(request.pri)); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java index 14a715d63..544ad6f2e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MasterRequest.java @@ -19,8 +19,10 @@ package co.elastic.clients.elasticsearch.cat; +import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.elasticsearch._types.TimeUnit; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -32,6 +34,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -73,6 +76,9 @@ */ public class MasterRequest extends CatRequestBase { + @Nullable + private final Bytes bytes; + private final List h; @Nullable @@ -83,14 +89,19 @@ public class MasterRequest extends CatRequestBase { private final List s; + @Nullable + private final TimeUnit time; + // --------------------------------------------------------------------------------------------- private MasterRequest(Builder builder) { + this.bytes = builder.bytes; this.h = ApiTypeHelper.unmodifiable(builder.h); this.local = builder.local; this.masterTimeout = builder.masterTimeout; this.s = ApiTypeHelper.unmodifiable(builder.s); + this.time = builder.time; } @@ -99,7 +110,26 @@ public static MasterRequest of(Function> f } /** - * List of columns to appear in the response. Supports simple wildcards. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} */ @@ -142,6 +172,22 @@ public final List s() { return this.s; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + @Nullable + public final TimeUnit time() { + return this.time; + } + // --------------------------------------------------------------------------------------------- /** @@ -151,6 +197,9 @@ public final List s() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Bytes bytes; + @Nullable private List h; @@ -163,8 +212,30 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private List s; + @Nullable + private TimeUnit time; + + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -176,7 +247,8 @@ public final Builder h(List list) { } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -187,6 +259,20 @@ public final Builder h(String value, String... values) { return this; } + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. + *

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

+ * Adds one or more enum values to h. + */ + public final Builder h(CatMasterColumn value, CatMasterColumn... values) { + this.h = _listAdd(this.h, value.jsonValue(), + Arrays.stream(values).map(CatMasterColumn::jsonValue).toArray(String[]::new)); + return this; + } + /** * If true, the request computes the list of selected nodes from * the local cluster state. If false the list of selected nodes are @@ -248,6 +334,22 @@ public final Builder s(String value, String... values) { return this; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + public final Builder time(@Nullable TimeUnit value) { + this.time = value; + return this; + } + @Override protected Builder self() { return this; @@ -301,9 +403,15 @@ public MasterRequest build() { if (ApiTypeHelper.isDefined(request.s)) { params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.time != null) { + params.put("time", request.time.jsonValue()); + } if (request.local != null) { params.put("local", String.valueOf(request.local)); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java index 53fb07c37..9a295b45a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDataFrameAnalyticsRequest.java @@ -119,7 +119,15 @@ public final Boolean allowNoMatch() { } /** - * The unit in which to display byte values + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -158,7 +166,13 @@ public final List s() { } /** - * Unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -206,7 +220,15 @@ public final Builder allowNoMatch(@Nullable Boolean value) { } /** - * The unit in which to display byte values + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -276,7 +298,13 @@ public final Builder s(CatDfaColumn value, CatDfaColumn... values) { } /** - * Unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java index 09181a883..5dbe1ac31 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlDatafeedsRequest.java @@ -19,6 +19,7 @@ package co.elastic.clients.elasticsearch.cat; +import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.TimeUnit; import co.elastic.clients.json.JsonpDeserializable; @@ -78,6 +79,9 @@ public class MlDatafeedsRequest extends CatRequestBase { @Nullable private final Boolean allowNoMatch; + @Nullable + private final Bytes bytes; + @Nullable private final String datafeedId; @@ -93,6 +97,7 @@ public class MlDatafeedsRequest extends CatRequestBase { private MlDatafeedsRequest(Builder builder) { this.allowNoMatch = builder.allowNoMatch; + this.bytes = builder.bytes; this.datafeedId = builder.datafeedId; this.h = ApiTypeHelper.unmodifiable(builder.h); this.s = ApiTypeHelper.unmodifiable(builder.s); @@ -125,6 +130,24 @@ public final Boolean allowNoMatch() { return this.allowNoMatch; } + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + /** * A numerical character string that uniquely identifies the datafeed. *

@@ -155,7 +178,13 @@ public final List s() { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -176,6 +205,9 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private Boolean allowNoMatch; + @Nullable + private Bytes bytes; + @Nullable private String datafeedId; @@ -209,6 +241,24 @@ public final Builder allowNoMatch(@Nullable Boolean value) { return this; } + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + /** * A numerical character string that uniquely identifies the datafeed. *

@@ -270,7 +320,13 @@ public final Builder s(CatDatafeedColumn value, CatDatafeedColumn... values) { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -365,6 +421,9 @@ public MlDatafeedsRequest build() { if (ApiTypeHelper.isDefined(request.s)) { params.put("s", request.s.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java index e390cf4e6..7865c1bdd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlJobsRequest.java @@ -131,7 +131,15 @@ public final Boolean allowNoMatch() { } /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -170,7 +178,13 @@ public final List s() { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -228,7 +242,15 @@ public final Builder allowNoMatch(@Nullable Boolean value) { } /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -298,7 +320,13 @@ public final Builder s(CatAnomalyDetectorColumn value, CatAnomalyDetectorColumn. } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java index e2863bcd3..af26828aa 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/MlTrainedModelsRequest.java @@ -131,7 +131,15 @@ public final Boolean allowNoMatch() { } /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -189,7 +197,13 @@ public final Integer size() { } /** - * Unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -248,7 +262,15 @@ public final Builder allowNoMatch(@Nullable Boolean value) { } /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -336,7 +358,13 @@ public final Builder size(@Nullable Integer value) { } /** - * Unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java index d5fa9d8fa..1b42cfba0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodeattrsRequest.java @@ -19,8 +19,10 @@ package co.elastic.clients.elasticsearch.cat; +import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.elasticsearch._types.TimeUnit; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -32,6 +34,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -71,6 +74,9 @@ */ public class NodeattrsRequest extends CatRequestBase { + @Nullable + private final Bytes bytes; + private final List h; @Nullable @@ -81,14 +87,19 @@ public class NodeattrsRequest extends CatRequestBase { private final List s; + @Nullable + private final TimeUnit time; + // --------------------------------------------------------------------------------------------- private NodeattrsRequest(Builder builder) { + this.bytes = builder.bytes; this.h = ApiTypeHelper.unmodifiable(builder.h); this.local = builder.local; this.masterTimeout = builder.masterTimeout; this.s = ApiTypeHelper.unmodifiable(builder.s); + this.time = builder.time; } @@ -97,7 +108,26 @@ public static NodeattrsRequest of(Function1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} */ @@ -140,6 +170,22 @@ public final List s() { return this.s; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + @Nullable + public final TimeUnit time() { + return this.time; + } + // --------------------------------------------------------------------------------------------- /** @@ -149,6 +195,9 @@ public final List s() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Bytes bytes; + @Nullable private List h; @@ -161,8 +210,30 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private List s; + @Nullable + private TimeUnit time; + + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -174,7 +245,8 @@ public final Builder h(List list) { } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -185,6 +257,20 @@ public final Builder h(String value, String... values) { return this; } + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. + *

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

+ * Adds one or more enum values to h. + */ + public final Builder h(CatNodeattrsColumn value, CatNodeattrsColumn... values) { + this.h = _listAdd(this.h, value.jsonValue(), + Arrays.stream(values).map(CatNodeattrsColumn::jsonValue).toArray(String[]::new)); + return this; + } + /** * If true, the request computes the list of selected nodes from * the local cluster state. If false the list of selected nodes are @@ -246,6 +332,22 @@ public final Builder s(String value, String... values) { return this; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + public final Builder time(@Nullable TimeUnit value) { + this.time = value; + return this; + } + @Override protected Builder self() { return this; @@ -299,9 +401,15 @@ public NodeattrsRequest build() { if (ApiTypeHelper.isDefined(request.s)) { params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.time != null) { + params.put("time", request.time.jsonValue()); + } if (request.local != null) { params.put("local", String.valueOf(request.local)); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java index f3cb44839..a13245941 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java @@ -112,7 +112,15 @@ public static NodesRequest of(Function> fn) } /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -175,7 +183,13 @@ public final List s() { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -213,7 +227,15 @@ public static class Builder extends CatRequestBase.AbstractBuilder impl private TimeUnit time; /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -332,7 +354,13 @@ public final Builder s(String value, String... values) { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java index 6cd75447c..5b8dc58d0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PendingTasksRequest.java @@ -19,6 +19,7 @@ package co.elastic.clients.elasticsearch.cat; +import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.elasticsearch._types.TimeUnit; @@ -33,6 +34,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -72,6 +74,9 @@ */ public class PendingTasksRequest extends CatRequestBase { + @Nullable + private final Bytes bytes; + private final List h; @Nullable @@ -89,6 +94,7 @@ public class PendingTasksRequest extends CatRequestBase { private PendingTasksRequest(Builder builder) { + this.bytes = builder.bytes; this.h = ApiTypeHelper.unmodifiable(builder.h); this.local = builder.local; this.masterTimeout = builder.masterTimeout; @@ -102,7 +108,26 @@ public static PendingTasksRequest of(Function1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} */ @@ -146,7 +171,13 @@ public final List s() { } /** - * Unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -164,6 +195,9 @@ public final TimeUnit time() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Bytes bytes; + @Nullable private List h; @@ -180,7 +214,26 @@ public static class Builder extends CatRequestBase.AbstractBuilder private TimeUnit time; /** - * List of columns to appear in the response. Supports simple wildcards. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -192,7 +245,8 @@ public final Builder h(List list) { } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -203,6 +257,20 @@ public final Builder h(String value, String... values) { return this; } + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. + *

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

+ * Adds one or more enum values to h. + */ + public final Builder h(CatPendingTasksColumn value, CatPendingTasksColumn... values) { + this.h = _listAdd(this.h, value.jsonValue(), + Arrays.stream(values).map(CatPendingTasksColumn::jsonValue).toArray(String[]::new)); + return this; + } + /** * If true, the request computes the list of selected nodes from * the local cluster state. If false the list of selected nodes are @@ -265,7 +333,13 @@ public final Builder s(String value, String... values) { } /** - * Unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -327,6 +401,9 @@ public PendingTasksRequest build() { if (ApiTypeHelper.isDefined(request.s)) { params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java index cb878eadb..a682e65d5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/PluginsRequest.java @@ -19,8 +19,10 @@ package co.elastic.clients.elasticsearch.cat; +import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.elasticsearch._types.TimeUnit; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -32,6 +34,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -71,6 +74,9 @@ */ public class PluginsRequest extends CatRequestBase { + @Nullable + private final Bytes bytes; + private final List h; @Nullable @@ -84,15 +90,20 @@ public class PluginsRequest extends CatRequestBase { private final List s; + @Nullable + private final TimeUnit time; + // --------------------------------------------------------------------------------------------- private PluginsRequest(Builder builder) { + this.bytes = builder.bytes; this.h = ApiTypeHelper.unmodifiable(builder.h); this.includeBootstrap = builder.includeBootstrap; this.local = builder.local; this.masterTimeout = builder.masterTimeout; this.s = ApiTypeHelper.unmodifiable(builder.s); + this.time = builder.time; } @@ -101,7 +112,26 @@ public static PluginsRequest of(Function> } /** - * List of columns to appear in the response. Supports simple wildcards. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} */ @@ -154,6 +184,22 @@ public final List s() { return this.s; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + @Nullable + public final TimeUnit time() { + return this.time; + } + // --------------------------------------------------------------------------------------------- /** @@ -163,6 +209,9 @@ public final List s() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Bytes bytes; + @Nullable private List h; @@ -178,8 +227,30 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private List s; + @Nullable + private TimeUnit time; + + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -191,7 +262,8 @@ public final Builder h(List list) { } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -202,6 +274,20 @@ public final Builder h(String value, String... values) { return this; } + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. + *

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

+ * Adds one or more enum values to h. + */ + public final Builder h(CatPluginsColumn value, CatPluginsColumn... values) { + this.h = _listAdd(this.h, value.jsonValue(), + Arrays.stream(values).map(CatPluginsColumn::jsonValue).toArray(String[]::new)); + return this; + } + /** * Include bootstrap plugins in the response *

@@ -273,6 +359,22 @@ public final Builder s(String value, String... values) { return this; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + public final Builder time(@Nullable TimeUnit value) { + this.time = value; + return this; + } + @Override protected Builder self() { return this; @@ -326,12 +428,18 @@ public PluginsRequest build() { if (ApiTypeHelper.isDefined(request.s)) { params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } if (request.includeBootstrap != null) { params.put("include_bootstrap", String.valueOf(request.includeBootstrap)); } + if (request.time != null) { + params.put("time", request.time.jsonValue()); + } if (request.local != null) { params.put("local", String.valueOf(request.local)); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryRequest.java index b77a625e6..ae1837350 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RecoveryRequest.java @@ -123,7 +123,15 @@ public final Boolean activeOnly() { } /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -176,7 +184,13 @@ public final List s() { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -226,7 +240,15 @@ public final Builder activeOnly(@Nullable Boolean value) { } /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -343,7 +365,13 @@ public final Builder s(String value, String... values) { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesRequest.java index 4783f34aa..8eb3feba4 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/RepositoriesRequest.java @@ -19,8 +19,10 @@ package co.elastic.clients.elasticsearch.cat; +import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.elasticsearch._types.TimeUnit; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -71,6 +73,9 @@ */ public class RepositoriesRequest extends CatRequestBase { + @Nullable + private final Bytes bytes; + private final List h; @Nullable @@ -81,14 +86,19 @@ public class RepositoriesRequest extends CatRequestBase { private final List s; + @Nullable + private final TimeUnit time; + // --------------------------------------------------------------------------------------------- private RepositoriesRequest(Builder builder) { + this.bytes = builder.bytes; this.h = ApiTypeHelper.unmodifiable(builder.h); this.local = builder.local; this.masterTimeout = builder.masterTimeout; this.s = ApiTypeHelper.unmodifiable(builder.s); + this.time = builder.time; } @@ -96,6 +106,24 @@ public static RepositoriesRequest of(Function1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + /** * List of columns to appear in the response. Supports simple wildcards. *

@@ -140,6 +168,22 @@ public final List s() { return this.s; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + @Nullable + public final TimeUnit time() { + return this.time; + } + // --------------------------------------------------------------------------------------------- /** @@ -149,6 +193,9 @@ public final List s() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Bytes bytes; + @Nullable private List h; @@ -161,6 +208,27 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private List s; + @Nullable + private TimeUnit time; + + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + /** * List of columns to appear in the response. Supports simple wildcards. *

@@ -246,6 +314,22 @@ public final Builder s(String value, String... values) { return this; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + public final Builder time(@Nullable TimeUnit value) { + this.time = value; + return this; + } + @Override protected Builder self() { return this; @@ -299,9 +383,15 @@ public RepositoriesRequest build() { if (ApiTypeHelper.isDefined(request.s)) { params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.time != null) { + params.put("time", request.time.jsonValue()); + } if (request.local != null) { params.put("local", String.valueOf(request.local)); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java index 3203e0617..635883146 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SegmentsRequest.java @@ -22,6 +22,7 @@ import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.elasticsearch._types.TimeUnit; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -88,6 +89,9 @@ public class SegmentsRequest extends CatRequestBase { private final List s; + @Nullable + private final TimeUnit time; + // --------------------------------------------------------------------------------------------- private SegmentsRequest(Builder builder) { @@ -98,6 +102,7 @@ private SegmentsRequest(Builder builder) { this.local = builder.local; this.masterTimeout = builder.masterTimeout; this.s = ApiTypeHelper.unmodifiable(builder.s); + this.time = builder.time; } @@ -106,7 +111,15 @@ public static SegmentsRequest of(Function1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -171,6 +184,22 @@ public final List s() { return this.s; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + @Nullable + public final TimeUnit time() { + return this.time; + } + // --------------------------------------------------------------------------------------------- /** @@ -198,8 +227,19 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private List s; + @Nullable + private TimeUnit time; + /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -337,6 +377,22 @@ public final Builder s(String value, String... values) { return this; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + public final Builder time(@Nullable TimeUnit value) { + this.time = value; + return this; + } + @Override protected Builder self() { return this; @@ -430,6 +486,9 @@ public SegmentsRequest build() { if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.time != null) { + params.put("time", request.time.jsonValue()); + } if (request.local != null) { params.put("local", String.valueOf(request.local)); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsRequest.java index b0341dd20..b171781e5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ShardsRequest.java @@ -105,7 +105,15 @@ public static ShardsRequest of(Function> f } /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -156,7 +164,13 @@ public final List s() { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -193,7 +207,15 @@ public static class Builder extends CatRequestBase.AbstractBuilder private TimeUnit time; /** - * The unit used to display byte values. + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. *

* API name: {@code bytes} */ @@ -315,7 +337,13 @@ public final Builder s(String value, String... values) { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsRequest.java index 00ba4df7b..6522fe229 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/SnapshotsRequest.java @@ -19,6 +19,7 @@ package co.elastic.clients.elasticsearch.cat; +import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.elasticsearch._types.TimeUnit; @@ -73,6 +74,9 @@ */ public class SnapshotsRequest extends CatRequestBase { + @Nullable + private final Bytes bytes; + private final List h; @Nullable @@ -92,6 +96,7 @@ public class SnapshotsRequest extends CatRequestBase { private SnapshotsRequest(Builder builder) { + this.bytes = builder.bytes; this.h = ApiTypeHelper.unmodifiable(builder.h); this.ignoreUnavailable = builder.ignoreUnavailable; this.masterTimeout = builder.masterTimeout; @@ -105,6 +110,24 @@ public static SnapshotsRequest of(Function1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + /** * A comma-separated list of columns names to display. It supports simple * wildcards. @@ -159,7 +182,13 @@ public final List s() { } /** - * Unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -177,6 +206,9 @@ public final TimeUnit time() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Bytes bytes; + @Nullable private List h; @@ -195,6 +227,24 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private TimeUnit time; + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + /** * A comma-separated list of columns names to display. It supports simple * wildcards. @@ -322,7 +372,13 @@ public final Builder s(String value, String... values) { } /** - * Unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -422,6 +478,9 @@ public SnapshotsRequest build() { if (request.ignoreUnavailable != null) { params.put("ignore_unavailable", String.valueOf(request.ignoreUnavailable)); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksRequest.java index f598e0d57..2c1d3ca1d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TasksRequest.java @@ -19,6 +19,7 @@ package co.elastic.clients.elasticsearch.cat; +import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.elasticsearch._types.TimeUnit; @@ -33,6 +34,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -74,6 +76,9 @@ public class TasksRequest extends CatRequestBase { private final List actions; + @Nullable + private final Bytes bytes; + @Nullable private final Boolean detailed; @@ -100,6 +105,7 @@ public class TasksRequest extends CatRequestBase { private TasksRequest(Builder builder) { this.actions = ApiTypeHelper.unmodifiable(builder.actions); + this.bytes = builder.bytes; this.detailed = builder.detailed; this.h = ApiTypeHelper.unmodifiable(builder.h); this.nodes = ApiTypeHelper.unmodifiable(builder.nodes); @@ -124,6 +130,24 @@ public final List actions() { return this.actions; } + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + /** * If true, the response includes detailed information about shard * recoveries. @@ -136,7 +160,8 @@ public final Boolean detailed() { } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} */ @@ -175,7 +200,13 @@ public final List s() { } /** - * Unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -215,6 +246,9 @@ public static class Builder extends CatRequestBase.AbstractBuilder impl @Nullable private List actions; + @Nullable + private Bytes bytes; + @Nullable private Boolean detailed; @@ -263,6 +297,24 @@ public final Builder actions(String value, String... values) { return this; } + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + /** * If true, the response includes detailed information about shard * recoveries. @@ -275,7 +327,8 @@ public final Builder detailed(@Nullable Boolean value) { } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -287,7 +340,8 @@ public final Builder h(List list) { } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -298,6 +352,20 @@ public final Builder h(String value, String... values) { return this; } + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. + *

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

+ * Adds one or more enum values to h. + */ + public final Builder h(CatTasksColumn value, CatTasksColumn... values) { + this.h = _listAdd(this.h, value.jsonValue(), + Arrays.stream(values).map(CatTasksColumn::jsonValue).toArray(String[]::new)); + return this; + } + /** * Unique node identifiers, which are used to limit the response. *

@@ -361,7 +429,13 @@ public final Builder s(String value, String... values) { } /** - * Unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -460,6 +534,9 @@ public TasksRequest build() { if (request.detailed != null) { params.put("detailed", String.valueOf(request.detailed)); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java index 3cccb019b..92e035ada 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TemplatesRequest.java @@ -19,8 +19,10 @@ package co.elastic.clients.elasticsearch.cat; +import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.elasticsearch._types.TimeUnit; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -32,6 +34,7 @@ import jakarta.json.stream.JsonGenerator; import java.lang.Boolean; import java.lang.String; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -71,6 +74,9 @@ */ public class TemplatesRequest extends CatRequestBase { + @Nullable + private final Bytes bytes; + private final List h; @Nullable @@ -84,15 +90,20 @@ public class TemplatesRequest extends CatRequestBase { private final List s; + @Nullable + private final TimeUnit time; + // --------------------------------------------------------------------------------------------- private TemplatesRequest(Builder builder) { + this.bytes = builder.bytes; this.h = ApiTypeHelper.unmodifiable(builder.h); this.local = builder.local; this.masterTimeout = builder.masterTimeout; this.name = builder.name; this.s = ApiTypeHelper.unmodifiable(builder.s); + this.time = builder.time; } @@ -101,7 +112,26 @@ public static TemplatesRequest of(Function1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} */ @@ -155,6 +185,22 @@ public final List s() { return this.s; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + @Nullable + public final TimeUnit time() { + return this.time; + } + // --------------------------------------------------------------------------------------------- /** @@ -164,6 +210,9 @@ public final List s() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Bytes bytes; + @Nullable private List h; @@ -179,8 +228,30 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private List s; + @Nullable + private TimeUnit time; + + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -192,7 +263,8 @@ public final Builder h(List list) { } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -203,6 +275,20 @@ public final Builder h(String value, String... values) { return this; } + /** + * A comma-separated list of columns names to display. It supports simple + * wildcards. + *

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

+ * Adds one or more enum values to h. + */ + public final Builder h(CatTemplatesColumn value, CatTemplatesColumn... values) { + this.h = _listAdd(this.h, value.jsonValue(), + Arrays.stream(values).map(CatTemplatesColumn::jsonValue).toArray(String[]::new)); + return this; + } + /** * If true, the request computes the list of selected nodes from * the local cluster state. If false the list of selected nodes are @@ -275,6 +361,22 @@ public final Builder s(String value, String... values) { return this; } + /** + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. + *

+ * API name: {@code time} + */ + public final Builder time(@Nullable TimeUnit value) { + this.time = value; + return this; + } + @Override protected Builder self() { return this; @@ -362,9 +464,15 @@ public TemplatesRequest build() { if (ApiTypeHelper.isDefined(request.s)) { params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.time != null) { + params.put("time", request.time.jsonValue()); + } if (request.local != null) { params.put("local", String.valueOf(request.local)); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java index 57a84032c..1724b187e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/ThreadPoolRequest.java @@ -19,6 +19,7 @@ package co.elastic.clients.elasticsearch.cat; +import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.elasticsearch._types.TimeUnit; @@ -73,6 +74,9 @@ */ public class ThreadPoolRequest extends CatRequestBase { + @Nullable + private final Bytes bytes; + private final List h; @Nullable @@ -92,6 +96,7 @@ public class ThreadPoolRequest extends CatRequestBase { private ThreadPoolRequest(Builder builder) { + this.bytes = builder.bytes; this.h = ApiTypeHelper.unmodifiable(builder.h); this.local = builder.local; this.masterTimeout = builder.masterTimeout; @@ -105,6 +110,24 @@ public static ThreadPoolRequest of(Function1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + /** * List of columns to appear in the response. Supports simple wildcards. *

@@ -160,7 +183,13 @@ public final List threadPoolPatterns() { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -178,6 +207,9 @@ public final TimeUnit time() { public static class Builder extends CatRequestBase.AbstractBuilder implements ObjectBuilder { + @Nullable + private Bytes bytes; + @Nullable private List h; @@ -196,6 +228,24 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private TimeUnit time; + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + /** * List of columns to appear in the response. Supports simple wildcards. *

@@ -321,7 +371,13 @@ public final Builder threadPoolPatterns(String value, String... values) { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -419,6 +475,9 @@ public ThreadPoolRequest build() { if (ApiTypeHelper.isDefined(request.s)) { params.put("s", request.s.stream().map(v -> v).collect(Collectors.joining(","))); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v).collect(Collectors.joining(","))); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java index 20909e0e3..26dcbadf6 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/TransformsRequest.java @@ -19,6 +19,7 @@ package co.elastic.clients.elasticsearch.cat; +import co.elastic.clients.elasticsearch._types.Bytes; import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.TimeUnit; import co.elastic.clients.json.JsonpDeserializable; @@ -75,6 +76,9 @@ public class TransformsRequest extends CatRequestBase { @Nullable private final Boolean allowNoMatch; + @Nullable + private final Bytes bytes; + @Nullable private final Integer from; @@ -96,6 +100,7 @@ public class TransformsRequest extends CatRequestBase { private TransformsRequest(Builder builder) { this.allowNoMatch = builder.allowNoMatch; + this.bytes = builder.bytes; this.from = builder.from; this.h = ApiTypeHelper.unmodifiable(builder.h); this.s = ApiTypeHelper.unmodifiable(builder.s); @@ -125,6 +130,24 @@ public final Boolean allowNoMatch() { return this.allowNoMatch; } + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + @Nullable + public final Bytes bytes() { + return this.bytes; + } + /** * Skips the specified number of transforms. *

@@ -165,7 +188,13 @@ public final Integer size() { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -197,6 +226,9 @@ public static class Builder extends CatRequestBase.AbstractBuilder @Nullable private Boolean allowNoMatch; + @Nullable + private Bytes bytes; + @Nullable private Integer from; @@ -231,6 +263,24 @@ public final Builder allowNoMatch(@Nullable Boolean value) { return this; } + /** + * Sets the units for columns that contain a byte-size value. Note that + * byte-size value units work in terms of powers of 1024. For instance + * 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size + * values are rendered with a suffix such as kb, mb, + * or gb, chosen such that the numeric value of the column is as + * small as possible whilst still being at least 1.0. If given, + * byte-size values are rendered as an integer with no suffix, representing the + * value of the column in the chosen unit. Values that are not an exact multiple + * of the chosen unit are rounded down. + *

+ * API name: {@code bytes} + */ + public final Builder bytes(@Nullable Bytes value) { + this.bytes = value; + return this; + } + /** * Skips the specified number of transforms. *

@@ -302,7 +352,13 @@ public final Builder size(@Nullable Integer value) { } /** - * The unit used to display time values. + * Sets the units for columns that contain a time duration. If omitted, time + * duration values are rendered with a suffix such as ms, + * s, m or h, chosen such that the + * numeric value of the column is as small as possible whilst still being at + * least 1.0. If given, time duration values are rendered as an + * integer with no suffix. Values that are not an exact multiple of the chosen + * unit are rounded down. *

* API name: {@code time} */ @@ -409,6 +465,9 @@ public TransformsRequest build() { if (request.size != null) { params.put("size", String.valueOf(request.size)); } + if (request.bytes != null) { + params.put("bytes", request.bytes.jsonValue()); + } if (ApiTypeHelper.isDefined(request.h)) { params.put("h", request.h.stream().map(v -> v.jsonValue()).collect(Collectors.joining(","))); } 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 f66da669a..2fdd5f94b 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 @@ -258,27 +258,28 @@ '_global.update_by_query_rethrottle.Response': '_global/update_by_query_rethrottle/UpdateByQueryRethrottleResponse.ts#L23-L25', '_global.update_by_query_rethrottle.UpdateByQueryRethrottleNode': '_global/update_by_query_rethrottle/UpdateByQueryRethrottleNode.ts#L25-L27', '_spec_utils.BaseNode': '_spec_utils/BaseNode.ts#L25-L32', -'_types.AcknowledgedResponseBase': '_types/Base.ts#L69-L72', +'_types.AcknowledgedResponseBase': '_types/Base.ts#L74-L77', '_types.BulkIndexByScrollFailure': '_types/Errors.ts#L64-L69', '_types.BulkStats': '_types/Stats.ts#L71-L81', '_types.Bytes': '_types/common.ts#L166-L178', +'_types.CartesianPoint': '_types/Geo.ts#L125-L128', '_types.ClusterDetails': '_types/Stats.ts#L45-L52', '_types.ClusterInfoTarget': '_types/common.ts#L380-L386', '_types.ClusterSearchStatus': '_types/Stats.ts#L37-L43', '_types.ClusterStatistics': '_types/Stats.ts#L27-L35', '_types.CompletionStats': '_types/Stats.ts#L83-L93', '_types.Conflicts': '_types/common.ts#L180-L189', -'_types.CoordsGeoBounds': '_types/Geo.ts#L154-L159', +'_types.CoordsGeoBounds': '_types/Geo.ts#L153-L158', '_types.DFIIndependenceMeasure': '_types/Similarity.ts#L20-L24', '_types.DFRAfterEffect': '_types/Similarity.ts#L26-L30', '_types.DFRBasicModel': '_types/Similarity.ts#L32-L40', '_types.DistanceUnit': '_types/Geo.ts#L30-L40', '_types.DocStats': '_types/Stats.ts#L100-L121', -'_types.ElasticsearchVersionInfo': '_types/Base.ts#L76-L118', -'_types.ElasticsearchVersionMinInfo': '_types/Base.ts#L120-L128', +'_types.ElasticsearchVersionInfo': '_types/Base.ts#L81-L123', +'_types.ElasticsearchVersionMinInfo': '_types/Base.ts#L125-L133', '_types.EmptyObject': '_types/common.ts#L157-L158', '_types.ErrorCause': '_types/Errors.ts#L25-L50', -'_types.ErrorResponseBase': '_types/Base.ts#L130-L139', +'_types.ErrorResponseBase': '_types/Base.ts#L135-L144', '_types.ExpandWildcard': '_types/common.ts#L198-L212', '_types.FieldMemoryUsage': '_types/Stats.ts#L143-L146', '_types.FieldSizeUsage': '_types/Stats.ts#L95-L98', @@ -286,13 +287,13 @@ '_types.FieldSortNumericType': '_types/sort.ts#L36-L41', '_types.FielddataStats': '_types/Stats.ts#L123-L129', '_types.FlushStats': '_types/Stats.ts#L148-L153', -'_types.GeoBounds': '_types/Geo.ts#L135-L148', +'_types.GeoBounds': '_types/Geo.ts#L134-L147', '_types.GeoDistanceSort': '_types/sort.ts#L58-L70', '_types.GeoDistanceType': '_types/Geo.ts#L42-L51', -'_types.GeoHashLocation': '_types/Geo.ts#L131-L133', +'_types.GeoHashLocation': '_types/Geo.ts#L130-L132', '_types.GeoHashPrecision': '_types/Geo.ts#L86-L90', '_types.GeoLine': '_types/Geo.ts#L56-L62', -'_types.GeoLocation': '_types/Geo.ts#L104-L118', +'_types.GeoLocation': '_types/Geo.ts#L98-L112', '_types.GeoShapeRelation': '_types/Geo.ts#L64-L82', '_types.GetStats': '_types/Stats.ts#L155-L166', '_types.GlobalOrdinalFieldStats': '_types/Stats.ts#L137-L141', @@ -302,13 +303,13 @@ '_types.IBLambda': '_types/Similarity.ts#L47-L50', '_types.IndexingStats': '_types/Stats.ts#L168-L186', '_types.IndicesOptions': '_types/common.ts#L334-L361', -'_types.IndicesResponseBase': '_types/Base.ts#L141-L143', +'_types.IndicesResponseBase': '_types/Base.ts#L146-L148', '_types.InlineGet': '_types/common.ts#L319-L332', '_types.InnerRetriever': '_types/Retriever.ts#L85-L89', '_types.KnnQuery': '_types/Knn.ts#L64-L87', '_types.KnnRetriever': '_types/Retriever.ts#L115-L133', '_types.KnnSearch': '_types/Knn.ts#L35-L62', -'_types.LatLonGeoLocation': '_types/Geo.ts#L120-L129', +'_types.LatLonGeoLocation': '_types/Geo.ts#L114-L123', '_types.Level': '_types/common.ts#L248-L252', '_types.LifecycleOperationMode': '_types/Lifecycle.ts#L20-L24', '_types.LinearRetriever': '_types/Retriever.ts#L68-L75', @@ -331,7 +332,7 @@ '_types.Refresh': '_types/common.ts#L265-L272', '_types.RefreshStats': '_types/Stats.ts#L262-L269', '_types.RelocationFailureInfo': '_types/Node.ts#L67-L69', -'_types.RequestBase': '_types/Base.ts#L34-L34', +'_types.RequestBase': '_types/Base.ts#L35-L35', '_types.RequestCacheStats': '_types/Stats.ts#L271-L277', '_types.RescoreVector': '_types/Knn.ts#L30-L33', '_types.RescorerRetriever': '_types/Retriever.ts#L62-L66', @@ -356,7 +357,7 @@ '_types.SegmentsStats': '_types/Stats.ts#L301-L396', '_types.ShardFailure': '_types/Errors.ts#L52-L62', '_types.ShardStatistics': '_types/Stats.ts#L54-L69', -'_types.ShardsOperationResponseBase': '_types/Base.ts#L145-L148', +'_types.ShardsOperationResponseBase': '_types/Base.ts#L150-L153', '_types.SlicedScroll': '_types/SlicedScroll.ts#L23-L27', '_types.Slices': '_types/common.ts#L363-L368', '_types.SlicesCalculation': '_types/common.ts#L370-L378', @@ -369,13 +370,13 @@ '_types.StoredScript': '_types/Scripting.ts#L51-L63', '_types.SuggestMode': '_types/common.ts#L281-L294', '_types.TaskFailure': '_types/Errors.ts#L71-L76', -'_types.TextEmbedding': '_types/Knn.ts#L94-L97', +'_types.TextEmbedding': '_types/Knn.ts#L94-L103', '_types.TextSimilarityReranker': '_types/Retriever.ts#L146-L157', '_types.ThreadType': '_types/common.ts#L296-L302', -'_types.TimeUnit': '_types/Time.ts#L69-L77', +'_types.TimeUnit': '_types/Time.ts#L70-L78', '_types.TokenPruningConfig': '_types/TokenPruningConfig.ts#L22-L35', -'_types.TopLeftBottomRightGeoBounds': '_types/Geo.ts#L161-L164', -'_types.TopRightBottomLeftGeoBounds': '_types/Geo.ts#L166-L169', +'_types.TopLeftBottomRightGeoBounds': '_types/Geo.ts#L160-L163', +'_types.TopRightBottomLeftGeoBounds': '_types/Geo.ts#L165-L168', '_types.TransformContainer': '_types/Transform.ts#L28-L35', '_types.TranslogStats': '_types/Stats.ts#L427-L435', '_types.VersionType': '_types/common.ts#L100-L119', @@ -383,23 +384,24 @@ '_types.WaitForActiveShards': '_types/common.ts#L139-L140', '_types.WaitForEvents': '_types/common.ts#L310-L317', '_types.WarmerStats': '_types/Stats.ts#L437-L442', -'_types.WktGeoBounds': '_types/Geo.ts#L150-L152', -'_types.WriteResponseBase': '_types/Base.ts#L36-L67', -'_types.aggregations.AdjacencyMatrixAggregate': '_types/aggregations/Aggregate.ts#L649-L654', +'_types.WktGeoBounds': '_types/Geo.ts#L149-L151', +'_types.WriteResponseBase': '_types/Base.ts#L37-L72', +'_types.aggregations.AbstractChangePoint': '_types/aggregations/Aggregate.ts#L412-L415', +'_types.aggregations.AdjacencyMatrixAggregate': '_types/aggregations/Aggregate.ts#L720-L725', '_types.aggregations.AdjacencyMatrixAggregation': '_types/aggregations/bucket.ts#L60-L70', -'_types.aggregations.AdjacencyMatrixBucket': '_types/aggregations/Aggregate.ts#L656-L658', -'_types.aggregations.Aggregate': '_types/aggregations/Aggregate.ts#L38-L125', -'_types.aggregations.AggregateBase': '_types/aggregations/Aggregate.ts#L136-L138', +'_types.aggregations.AdjacencyMatrixBucket': '_types/aggregations/Aggregate.ts#L727-L729', +'_types.aggregations.Aggregate': '_types/aggregations/Aggregate.ts#L40-L130', +'_types.aggregations.AggregateBase': '_types/aggregations/Aggregate.ts#L141-L143', '_types.aggregations.Aggregation': '_types/aggregations/Aggregation.ts#L20-L20', -'_types.aggregations.AggregationContainer': '_types/aggregations/AggregationContainer.ts#L107-L533', +'_types.aggregations.AggregationContainer': '_types/aggregations/AggregationContainer.ts#L110-L556', '_types.aggregations.AggregationRange': '_types/aggregations/bucket.ts#L691-L704', -'_types.aggregations.ArrayPercentilesItem': '_types/aggregations/Aggregate.ts#L162-L166', -'_types.aggregations.AutoDateHistogramAggregate': '_types/aggregations/Aggregate.ts#L393-L400', +'_types.aggregations.ArrayPercentilesItem': '_types/aggregations/Aggregate.ts#L167-L171', +'_types.aggregations.AutoDateHistogramAggregate': '_types/aggregations/Aggregate.ts#L464-L471', '_types.aggregations.AutoDateHistogramAggregation': '_types/aggregations/bucket.ts#L72-L110', '_types.aggregations.AverageAggregation': '_types/aggregations/metric.ts#L55-L55', '_types.aggregations.AverageBucketAggregation': '_types/aggregations/pipeline.ts#L78-L81', -'_types.aggregations.AvgAggregate': '_types/aggregations/Aggregate.ts#L218-L222', -'_types.aggregations.BoxPlotAggregate': '_types/aggregations/Aggregate.ts#L808-L827', +'_types.aggregations.AvgAggregate': '_types/aggregations/Aggregate.ts#L223-L227', +'_types.aggregations.BoxPlotAggregate': '_types/aggregations/Aggregate.ts#L879-L898', '_types.aggregations.BoxplotAggregation': '_types/aggregations/metric.ts#L57-L68', '_types.aggregations.BucketAggregationBase': '_types/aggregations/bucket.ts#L53-L58', '_types.aggregations.BucketCorrelationAggregation': '_types/aggregations/pipeline.ts#L139-L146', @@ -407,240 +409,257 @@ '_types.aggregations.BucketCorrelationFunctionCountCorrelation': '_types/aggregations/pipeline.ts#L155-L158', '_types.aggregations.BucketCorrelationFunctionCountCorrelationIndicator': '_types/aggregations/pipeline.ts#L160-L178', '_types.aggregations.BucketKsAggregation': '_types/aggregations/pipeline.ts#L103-L137', -'_types.aggregations.BucketMetricValueAggregate': '_types/aggregations/Aggregate.ts#L250-L253', +'_types.aggregations.BucketMetricValueAggregate': '_types/aggregations/Aggregate.ts#L255-L258', '_types.aggregations.BucketPathAggregation': '_types/aggregations/pipeline.ts#L31-L37', '_types.aggregations.BucketScriptAggregation': '_types/aggregations/pipeline.ts#L83-L91', '_types.aggregations.BucketSelectorAggregation': '_types/aggregations/pipeline.ts#L93-L101', '_types.aggregations.BucketSortAggregation': '_types/aggregations/pipeline.ts#L180-L204', -'_types.aggregations.Buckets': '_types/aggregations/Aggregate.ts#L346-L355', +'_types.aggregations.Buckets': '_types/aggregations/Aggregate.ts#L362-L371', '_types.aggregations.BucketsPath': '_types/aggregations/pipeline.ts#L53-L59', '_types.aggregations.CalendarInterval': '_types/aggregations/bucket.ts#L262-L279', -'_types.aggregations.CardinalityAggregate': '_types/aggregations/Aggregate.ts#L140-L143', +'_types.aggregations.CardinalityAggregate': '_types/aggregations/Aggregate.ts#L145-L148', '_types.aggregations.CardinalityAggregation': '_types/aggregations/metric.ts#L93-L105', '_types.aggregations.CardinalityExecutionMode': '_types/aggregations/metric.ts#L70-L91', -'_types.aggregations.CategorizeTextAggregation': '_types/aggregations/bucket.ts#L1117-L1183', -'_types.aggregations.CategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1185-L1188', +'_types.aggregations.CartesianBoundsAggregate': '_types/aggregations/Aggregate.ts#L330-L333', +'_types.aggregations.CartesianBoundsAggregation': '_types/aggregations/metric.ts#L114-L114', +'_types.aggregations.CartesianCentroidAggregate': '_types/aggregations/Aggregate.ts#L335-L339', +'_types.aggregations.CartesianCentroidAggregation': '_types/aggregations/metric.ts#L116-L116', +'_types.aggregations.CategorizeTextAggregation': '_types/aggregations/bucket.ts#L1143-L1209', +'_types.aggregations.CategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1211-L1214', +'_types.aggregations.ChangePointAggregate': '_types/aggregations/Aggregate.ts#L388-L392', +'_types.aggregations.ChangePointAggregation': '_types/aggregations/pipeline.ts#L206-L206', +'_types.aggregations.ChangePointBucket': '_types/aggregations/Aggregate.ts#L394-L396', +'_types.aggregations.ChangeType': '_types/aggregations/Aggregate.ts#L398-L410', '_types.aggregations.ChiSquareHeuristic': '_types/aggregations/bucket.ts#L782-L791', -'_types.aggregations.ChildrenAggregate': '_types/aggregations/Aggregate.ts#L890-L894', +'_types.aggregations.ChildrenAggregate': '_types/aggregations/Aggregate.ts#L961-L965', '_types.aggregations.ChildrenAggregation': '_types/aggregations/bucket.ts#L121-L126', -'_types.aggregations.CompositeAggregate': '_types/aggregations/Aggregate.ts#L700-L705', +'_types.aggregations.CompositeAggregate': '_types/aggregations/Aggregate.ts#L771-L776', '_types.aggregations.CompositeAggregation': '_types/aggregations/bucket.ts#L130-L149', '_types.aggregations.CompositeAggregationBase': '_types/aggregations/bucket.ts#L170-L179', '_types.aggregations.CompositeAggregationSource': '_types/aggregations/bucket.ts#L151-L168', -'_types.aggregations.CompositeBucket': '_types/aggregations/Aggregate.ts#L707-L709', +'_types.aggregations.CompositeBucket': '_types/aggregations/Aggregate.ts#L778-L780', '_types.aggregations.CompositeDateHistogramAggregation': '_types/aggregations/bucket.ts#L187-L195', '_types.aggregations.CompositeGeoTileGridAggregation': '_types/aggregations/bucket.ts#L197-L200', '_types.aggregations.CompositeHistogramAggregation': '_types/aggregations/bucket.ts#L183-L185', '_types.aggregations.CompositeTermsAggregation': '_types/aggregations/bucket.ts#L181-L181', -'_types.aggregations.CumulativeCardinalityAggregate': '_types/aggregations/Aggregate.ts#L858-L866', -'_types.aggregations.CumulativeCardinalityAggregation': '_types/aggregations/pipeline.ts#L206-L209', -'_types.aggregations.CumulativeSumAggregation': '_types/aggregations/pipeline.ts#L211-L214', -'_types.aggregations.CustomCategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1190-L1194', -'_types.aggregations.DateHistogramAggregate': '_types/aggregations/Aggregate.ts#L383-L386', +'_types.aggregations.CumulativeCardinalityAggregate': '_types/aggregations/Aggregate.ts#L929-L937', +'_types.aggregations.CumulativeCardinalityAggregation': '_types/aggregations/pipeline.ts#L208-L211', +'_types.aggregations.CumulativeSumAggregation': '_types/aggregations/pipeline.ts#L213-L216', +'_types.aggregations.CustomCategorizeTextAnalyzer': '_types/aggregations/bucket.ts#L1216-L1220', +'_types.aggregations.DateHistogramAggregate': '_types/aggregations/Aggregate.ts#L454-L457', '_types.aggregations.DateHistogramAggregation': '_types/aggregations/bucket.ts#L202-L260', -'_types.aggregations.DateHistogramBucket': '_types/aggregations/Aggregate.ts#L388-L391', -'_types.aggregations.DateRangeAggregate': '_types/aggregations/Aggregate.ts#L609-L615', +'_types.aggregations.DateHistogramBucket': '_types/aggregations/Aggregate.ts#L459-L462', +'_types.aggregations.DateRangeAggregate': '_types/aggregations/Aggregate.ts#L680-L686', '_types.aggregations.DateRangeAggregation': '_types/aggregations/bucket.ts#L281-L307', '_types.aggregations.DateRangeExpression': '_types/aggregations/bucket.ts#L318-L331', -'_types.aggregations.DerivativeAggregate': '_types/aggregations/Aggregate.ts#L241-L248', -'_types.aggregations.DerivativeAggregation': '_types/aggregations/pipeline.ts#L216-L216', +'_types.aggregations.DerivativeAggregate': '_types/aggregations/Aggregate.ts#L246-L253', +'_types.aggregations.DerivativeAggregation': '_types/aggregations/pipeline.ts#L218-L218', +'_types.aggregations.Dip': '_types/aggregations/Aggregate.ts#L417-L417', +'_types.aggregations.DistributionChange': '_types/aggregations/Aggregate.ts#L419-L419', '_types.aggregations.DiversifiedSamplerAggregation': '_types/aggregations/bucket.ts#L333-L357', -'_types.aggregations.DoubleTermsAggregate': '_types/aggregations/Aggregate.ts#L451-L456', -'_types.aggregations.DoubleTermsBucket': '_types/aggregations/Aggregate.ts#L458-L461', -'_types.aggregations.EwmaModelSettings': '_types/aggregations/pipeline.ts#L293-L295', -'_types.aggregations.EwmaMovingAverageAggregation': '_types/aggregations/pipeline.ts#L278-L281', +'_types.aggregations.DoubleTermsAggregate': '_types/aggregations/Aggregate.ts#L522-L527', +'_types.aggregations.DoubleTermsBucket': '_types/aggregations/Aggregate.ts#L529-L532', +'_types.aggregations.EwmaModelSettings': '_types/aggregations/pipeline.ts#L295-L297', +'_types.aggregations.EwmaMovingAverageAggregation': '_types/aggregations/pipeline.ts#L280-L283', '_types.aggregations.ExtendedBounds': '_types/aggregations/bucket.ts#L508-L517', -'_types.aggregations.ExtendedStatsAggregate': '_types/aggregations/Aggregate.ts#L299-L320', +'_types.aggregations.ExtendedStatsAggregate': '_types/aggregations/Aggregate.ts#L304-L325', '_types.aggregations.ExtendedStatsAggregation': '_types/aggregations/metric.ts#L107-L112', -'_types.aggregations.ExtendedStatsBucketAggregate': '_types/aggregations/Aggregate.ts#L322-L323', -'_types.aggregations.ExtendedStatsBucketAggregation': '_types/aggregations/pipeline.ts#L218-L223', +'_types.aggregations.ExtendedStatsBucketAggregate': '_types/aggregations/Aggregate.ts#L327-L328', +'_types.aggregations.ExtendedStatsBucketAggregation': '_types/aggregations/pipeline.ts#L220-L225', '_types.aggregations.FieldDateMath': '_types/aggregations/bucket.ts#L309-L316', -'_types.aggregations.FilterAggregate': '_types/aggregations/Aggregate.ts#L552-L556', -'_types.aggregations.FiltersAggregate': '_types/aggregations/Aggregate.ts#L639-L643', +'_types.aggregations.FilterAggregate': '_types/aggregations/Aggregate.ts#L623-L627', +'_types.aggregations.FiltersAggregate': '_types/aggregations/Aggregate.ts#L710-L714', '_types.aggregations.FiltersAggregation': '_types/aggregations/bucket.ts#L374-L394', -'_types.aggregations.FiltersBucket': '_types/aggregations/Aggregate.ts#L645-L647', +'_types.aggregations.FiltersBucket': '_types/aggregations/Aggregate.ts#L716-L718', '_types.aggregations.FormatMetricAggregationBase': '_types/aggregations/metric.ts#L47-L49', '_types.aggregations.FormattableMetricAggregation': '_types/aggregations/metric.ts#L51-L53', -'_types.aggregations.FrequentItemSetsAggregate': '_types/aggregations/Aggregate.ts#L724-L725', -'_types.aggregations.FrequentItemSetsAggregation': '_types/aggregations/bucket.ts#L1241-L1268', -'_types.aggregations.FrequentItemSetsBucket': '_types/aggregations/Aggregate.ts#L727-L730', -'_types.aggregations.FrequentItemSetsField': '_types/aggregations/bucket.ts#L1227-L1239', +'_types.aggregations.FrequentItemSetsAggregate': '_types/aggregations/Aggregate.ts#L795-L796', +'_types.aggregations.FrequentItemSetsAggregation': '_types/aggregations/bucket.ts#L1267-L1294', +'_types.aggregations.FrequentItemSetsBucket': '_types/aggregations/Aggregate.ts#L798-L801', +'_types.aggregations.FrequentItemSetsField': '_types/aggregations/bucket.ts#L1253-L1265', '_types.aggregations.GapPolicy': '_types/aggregations/pipeline.ts#L61-L76', -'_types.aggregations.GeoBoundsAggregate': '_types/aggregations/Aggregate.ts#L327-L333', -'_types.aggregations.GeoBoundsAggregation': '_types/aggregations/metric.ts#L114-L123', -'_types.aggregations.GeoCentroidAggregate': '_types/aggregations/Aggregate.ts#L335-L342', -'_types.aggregations.GeoCentroidAggregation': '_types/aggregations/metric.ts#L125-L128', -'_types.aggregations.GeoDistanceAggregate': '_types/aggregations/Aggregate.ts#L617-L622', +'_types.aggregations.GeoBoundsAggregate': '_types/aggregations/Aggregate.ts#L343-L349', +'_types.aggregations.GeoBoundsAggregation': '_types/aggregations/metric.ts#L118-L127', +'_types.aggregations.GeoCentroidAggregate': '_types/aggregations/Aggregate.ts#L351-L358', +'_types.aggregations.GeoCentroidAggregation': '_types/aggregations/metric.ts#L129-L132', +'_types.aggregations.GeoDistanceAggregate': '_types/aggregations/Aggregate.ts#L688-L693', '_types.aggregations.GeoDistanceAggregation': '_types/aggregations/bucket.ts#L396-L419', -'_types.aggregations.GeoHashGridAggregate': '_types/aggregations/Aggregate.ts#L566-L568', +'_types.aggregations.GeoHashGridAggregate': '_types/aggregations/Aggregate.ts#L637-L639', '_types.aggregations.GeoHashGridAggregation': '_types/aggregations/bucket.ts#L421-L449', -'_types.aggregations.GeoHashGridBucket': '_types/aggregations/Aggregate.ts#L570-L572', -'_types.aggregations.GeoHexGridAggregate': '_types/aggregations/Aggregate.ts#L585-L586', -'_types.aggregations.GeoHexGridBucket': '_types/aggregations/Aggregate.ts#L588-L590', -'_types.aggregations.GeoLineAggregate': '_types/aggregations/Aggregate.ts#L904-L914', -'_types.aggregations.GeoLineAggregation': '_types/aggregations/metric.ts#L130-L155', -'_types.aggregations.GeoLinePoint': '_types/aggregations/metric.ts#L164-L169', -'_types.aggregations.GeoLineSort': '_types/aggregations/metric.ts#L157-L162', -'_types.aggregations.GeoTileGridAggregate': '_types/aggregations/Aggregate.ts#L574-L579', +'_types.aggregations.GeoHashGridBucket': '_types/aggregations/Aggregate.ts#L641-L643', +'_types.aggregations.GeoHexGridAggregate': '_types/aggregations/Aggregate.ts#L656-L657', +'_types.aggregations.GeoHexGridBucket': '_types/aggregations/Aggregate.ts#L659-L661', +'_types.aggregations.GeoLineAggregate': '_types/aggregations/Aggregate.ts#L975-L985', +'_types.aggregations.GeoLineAggregation': '_types/aggregations/metric.ts#L134-L159', +'_types.aggregations.GeoLinePoint': '_types/aggregations/metric.ts#L168-L173', +'_types.aggregations.GeoLineSort': '_types/aggregations/metric.ts#L161-L166', +'_types.aggregations.GeoTileGridAggregate': '_types/aggregations/Aggregate.ts#L645-L650', '_types.aggregations.GeoTileGridAggregation': '_types/aggregations/bucket.ts#L451-L477', -'_types.aggregations.GeoTileGridBucket': '_types/aggregations/Aggregate.ts#L581-L583', +'_types.aggregations.GeoTileGridBucket': '_types/aggregations/Aggregate.ts#L652-L654', '_types.aggregations.GeohexGridAggregation': '_types/aggregations/bucket.ts#L479-L504', -'_types.aggregations.GlobalAggregate': '_types/aggregations/Aggregate.ts#L546-L550', +'_types.aggregations.GlobalAggregate': '_types/aggregations/Aggregate.ts#L617-L621', '_types.aggregations.GlobalAggregation': '_types/aggregations/bucket.ts#L506-L506', '_types.aggregations.GoogleNormalizedDistanceHeuristic': '_types/aggregations/bucket.ts#L793-L798', -'_types.aggregations.HdrMethod': '_types/aggregations/metric.ts#L237-L242', -'_types.aggregations.HdrPercentileRanksAggregate': '_types/aggregations/Aggregate.ts#L171-L172', -'_types.aggregations.HdrPercentilesAggregate': '_types/aggregations/Aggregate.ts#L168-L169', -'_types.aggregations.HistogramAggregate': '_types/aggregations/Aggregate.ts#L372-L376', +'_types.aggregations.HdrMethod': '_types/aggregations/metric.ts#L241-L246', +'_types.aggregations.HdrPercentileRanksAggregate': '_types/aggregations/Aggregate.ts#L176-L177', +'_types.aggregations.HdrPercentilesAggregate': '_types/aggregations/Aggregate.ts#L173-L174', +'_types.aggregations.HistogramAggregate': '_types/aggregations/Aggregate.ts#L443-L447', '_types.aggregations.HistogramAggregation': '_types/aggregations/bucket.ts#L519-L565', -'_types.aggregations.HistogramBucket': '_types/aggregations/Aggregate.ts#L378-L381', -'_types.aggregations.HoltLinearModelSettings': '_types/aggregations/pipeline.ts#L297-L300', -'_types.aggregations.HoltMovingAverageAggregation': '_types/aggregations/pipeline.ts#L283-L286', -'_types.aggregations.HoltWintersModelSettings': '_types/aggregations/pipeline.ts#L301-L308', -'_types.aggregations.HoltWintersMovingAverageAggregation': '_types/aggregations/pipeline.ts#L288-L291', -'_types.aggregations.HoltWintersType': '_types/aggregations/pipeline.ts#L309-L312', -'_types.aggregations.InferenceAggregate': '_types/aggregations/Aggregate.ts#L757-L772', -'_types.aggregations.InferenceAggregation': '_types/aggregations/pipeline.ts#L225-L234', -'_types.aggregations.InferenceClassImportance': '_types/aggregations/Aggregate.ts#L786-L789', -'_types.aggregations.InferenceConfigContainer': '_types/aggregations/pipeline.ts#L236-L242', -'_types.aggregations.InferenceFeatureImportance': '_types/aggregations/Aggregate.ts#L780-L784', -'_types.aggregations.InferenceTopClassEntry': '_types/aggregations/Aggregate.ts#L774-L778', -'_types.aggregations.IpPrefixAggregate': '_types/aggregations/Aggregate.ts#L711-L715', -'_types.aggregations.IpPrefixAggregation': '_types/aggregations/bucket.ts#L1196-L1225', -'_types.aggregations.IpPrefixBucket': '_types/aggregations/Aggregate.ts#L717-L722', -'_types.aggregations.IpRangeAggregate': '_types/aggregations/Aggregate.ts#L624-L629', +'_types.aggregations.HistogramBucket': '_types/aggregations/Aggregate.ts#L449-L452', +'_types.aggregations.HoltLinearModelSettings': '_types/aggregations/pipeline.ts#L299-L302', +'_types.aggregations.HoltMovingAverageAggregation': '_types/aggregations/pipeline.ts#L285-L288', +'_types.aggregations.HoltWintersModelSettings': '_types/aggregations/pipeline.ts#L303-L310', +'_types.aggregations.HoltWintersMovingAverageAggregation': '_types/aggregations/pipeline.ts#L290-L293', +'_types.aggregations.HoltWintersType': '_types/aggregations/pipeline.ts#L311-L314', +'_types.aggregations.Indeterminable': '_types/aggregations/Aggregate.ts#L425-L427', +'_types.aggregations.InferenceAggregate': '_types/aggregations/Aggregate.ts#L828-L843', +'_types.aggregations.InferenceAggregation': '_types/aggregations/pipeline.ts#L227-L236', +'_types.aggregations.InferenceClassImportance': '_types/aggregations/Aggregate.ts#L857-L860', +'_types.aggregations.InferenceConfigContainer': '_types/aggregations/pipeline.ts#L238-L244', +'_types.aggregations.InferenceFeatureImportance': '_types/aggregations/Aggregate.ts#L851-L855', +'_types.aggregations.InferenceTopClassEntry': '_types/aggregations/Aggregate.ts#L845-L849', +'_types.aggregations.IpPrefixAggregate': '_types/aggregations/Aggregate.ts#L782-L786', +'_types.aggregations.IpPrefixAggregation': '_types/aggregations/bucket.ts#L1222-L1251', +'_types.aggregations.IpPrefixBucket': '_types/aggregations/Aggregate.ts#L788-L793', +'_types.aggregations.IpRangeAggregate': '_types/aggregations/Aggregate.ts#L695-L700', '_types.aggregations.IpRangeAggregation': '_types/aggregations/bucket.ts#L567-L576', '_types.aggregations.IpRangeAggregationRange': '_types/aggregations/bucket.ts#L578-L591', -'_types.aggregations.IpRangeBucket': '_types/aggregations/Aggregate.ts#L631-L635', -'_types.aggregations.LinearMovingAverageAggregation': '_types/aggregations/pipeline.ts#L268-L271', -'_types.aggregations.LongRareTermsAggregate': '_types/aggregations/Aggregate.ts#L471-L476', -'_types.aggregations.LongRareTermsBucket': '_types/aggregations/Aggregate.ts#L478-L481', -'_types.aggregations.LongTermsAggregate': '_types/aggregations/Aggregate.ts#L439-L444', -'_types.aggregations.LongTermsBucket': '_types/aggregations/Aggregate.ts#L446-L449', +'_types.aggregations.IpRangeBucket': '_types/aggregations/Aggregate.ts#L702-L706', +'_types.aggregations.LinearMovingAverageAggregation': '_types/aggregations/pipeline.ts#L270-L273', +'_types.aggregations.LongRareTermsAggregate': '_types/aggregations/Aggregate.ts#L542-L547', +'_types.aggregations.LongRareTermsBucket': '_types/aggregations/Aggregate.ts#L549-L552', +'_types.aggregations.LongTermsAggregate': '_types/aggregations/Aggregate.ts#L510-L515', +'_types.aggregations.LongTermsBucket': '_types/aggregations/Aggregate.ts#L517-L520', '_types.aggregations.MatrixAggregation': '_types/aggregations/matrix.ts#L26-L36', -'_types.aggregations.MatrixStatsAggregate': '_types/aggregations/Aggregate.ts#L868-L875', +'_types.aggregations.MatrixStatsAggregate': '_types/aggregations/Aggregate.ts#L939-L946', '_types.aggregations.MatrixStatsAggregation': '_types/aggregations/matrix.ts#L38-L44', -'_types.aggregations.MatrixStatsFields': '_types/aggregations/Aggregate.ts#L877-L886', -'_types.aggregations.MaxAggregate': '_types/aggregations/Aggregate.ts#L205-L209', -'_types.aggregations.MaxAggregation': '_types/aggregations/metric.ts#L171-L171', -'_types.aggregations.MaxBucketAggregation': '_types/aggregations/pipeline.ts#L244-L247', -'_types.aggregations.MedianAbsoluteDeviationAggregate': '_types/aggregations/Aggregate.ts#L196-L197', -'_types.aggregations.MedianAbsoluteDeviationAggregation': '_types/aggregations/metric.ts#L173-L188', +'_types.aggregations.MatrixStatsFields': '_types/aggregations/Aggregate.ts#L948-L957', +'_types.aggregations.MaxAggregate': '_types/aggregations/Aggregate.ts#L210-L214', +'_types.aggregations.MaxAggregation': '_types/aggregations/metric.ts#L175-L175', +'_types.aggregations.MaxBucketAggregation': '_types/aggregations/pipeline.ts#L246-L249', +'_types.aggregations.MedianAbsoluteDeviationAggregate': '_types/aggregations/Aggregate.ts#L201-L202', +'_types.aggregations.MedianAbsoluteDeviationAggregation': '_types/aggregations/metric.ts#L177-L192', '_types.aggregations.MetricAggregationBase': '_types/aggregations/metric.ts#L34-L45', -'_types.aggregations.MinAggregate': '_types/aggregations/Aggregate.ts#L199-L203', -'_types.aggregations.MinAggregation': '_types/aggregations/metric.ts#L190-L190', -'_types.aggregations.MinBucketAggregation': '_types/aggregations/pipeline.ts#L249-L252', +'_types.aggregations.MinAggregate': '_types/aggregations/Aggregate.ts#L204-L208', +'_types.aggregations.MinAggregation': '_types/aggregations/metric.ts#L194-L194', +'_types.aggregations.MinBucketAggregation': '_types/aggregations/pipeline.ts#L251-L254', '_types.aggregations.MinimumInterval': '_types/aggregations/bucket.ts#L112-L119', -'_types.aggregations.MissingAggregate': '_types/aggregations/Aggregate.ts#L528-L532', +'_types.aggregations.MissingAggregate': '_types/aggregations/Aggregate.ts#L599-L603', '_types.aggregations.MissingAggregation': '_types/aggregations/bucket.ts#L593-L599', -'_types.aggregations.MissingOrder': '_types/aggregations/AggregationContainer.ts#L536-L540', -'_types.aggregations.MovingAverageAggregation': '_types/aggregations/pipeline.ts#L254-L260', -'_types.aggregations.MovingAverageAggregationBase': '_types/aggregations/pipeline.ts#L262-L266', -'_types.aggregations.MovingFunctionAggregation': '_types/aggregations/pipeline.ts#L314-L332', -'_types.aggregations.MovingPercentilesAggregation': '_types/aggregations/pipeline.ts#L334-L349', -'_types.aggregations.MultiBucketAggregateBase': '_types/aggregations/Aggregate.ts#L357-L359', -'_types.aggregations.MultiBucketBase': '_types/aggregations/Aggregate.ts#L361-L370', +'_types.aggregations.MissingOrder': '_types/aggregations/AggregationContainer.ts#L559-L563', +'_types.aggregations.MovingAverageAggregation': '_types/aggregations/pipeline.ts#L256-L262', +'_types.aggregations.MovingAverageAggregationBase': '_types/aggregations/pipeline.ts#L264-L268', +'_types.aggregations.MovingFunctionAggregation': '_types/aggregations/pipeline.ts#L316-L334', +'_types.aggregations.MovingPercentilesAggregation': '_types/aggregations/pipeline.ts#L336-L351', +'_types.aggregations.MultiBucketAggregateBase': '_types/aggregations/Aggregate.ts#L373-L375', +'_types.aggregations.MultiBucketBase': '_types/aggregations/Aggregate.ts#L377-L386', '_types.aggregations.MultiTermLookup': '_types/aggregations/bucket.ts#L643-L653', -'_types.aggregations.MultiTermsAggregate': '_types/aggregations/Aggregate.ts#L501-L506', +'_types.aggregations.MultiTermsAggregate': '_types/aggregations/Aggregate.ts#L572-L577', '_types.aggregations.MultiTermsAggregation': '_types/aggregations/bucket.ts#L601-L641', -'_types.aggregations.MultiTermsBucket': '_types/aggregations/Aggregate.ts#L508-L512', +'_types.aggregations.MultiTermsBucket': '_types/aggregations/Aggregate.ts#L579-L583', '_types.aggregations.MutualInformationHeuristic': '_types/aggregations/bucket.ts#L800-L809', -'_types.aggregations.NestedAggregate': '_types/aggregations/Aggregate.ts#L534-L538', +'_types.aggregations.NestedAggregate': '_types/aggregations/Aggregate.ts#L605-L609', '_types.aggregations.NestedAggregation': '_types/aggregations/bucket.ts#L655-L660', -'_types.aggregations.NormalizeAggregation': '_types/aggregations/pipeline.ts#L351-L359', -'_types.aggregations.NormalizeMethod': '_types/aggregations/pipeline.ts#L361-L387', -'_types.aggregations.ParentAggregate': '_types/aggregations/Aggregate.ts#L896-L900', +'_types.aggregations.NonStationary': '_types/aggregations/Aggregate.ts#L429-L433', +'_types.aggregations.NormalizeAggregation': '_types/aggregations/pipeline.ts#L353-L361', +'_types.aggregations.NormalizeMethod': '_types/aggregations/pipeline.ts#L363-L389', +'_types.aggregations.PValueHeuristic': '_types/aggregations/bucket.ts#L817-L831', +'_types.aggregations.ParentAggregate': '_types/aggregations/Aggregate.ts#L967-L971', '_types.aggregations.ParentAggregation': '_types/aggregations/bucket.ts#L662-L667', '_types.aggregations.PercentageScoreHeuristic': '_types/aggregations/bucket.ts#L811-L811', -'_types.aggregations.PercentileRanksAggregation': '_types/aggregations/metric.ts#L192-L214', -'_types.aggregations.Percentiles': '_types/aggregations/Aggregate.ts#L152-L153', -'_types.aggregations.PercentilesAggregateBase': '_types/aggregations/Aggregate.ts#L148-L150', -'_types.aggregations.PercentilesAggregation': '_types/aggregations/metric.ts#L216-L235', -'_types.aggregations.PercentilesBucketAggregate': '_types/aggregations/Aggregate.ts#L180-L181', -'_types.aggregations.PercentilesBucketAggregation': '_types/aggregations/pipeline.ts#L389-L397', +'_types.aggregations.PercentileRanksAggregation': '_types/aggregations/metric.ts#L196-L218', +'_types.aggregations.Percentiles': '_types/aggregations/Aggregate.ts#L157-L158', +'_types.aggregations.PercentilesAggregateBase': '_types/aggregations/Aggregate.ts#L153-L155', +'_types.aggregations.PercentilesAggregation': '_types/aggregations/metric.ts#L220-L239', +'_types.aggregations.PercentilesBucketAggregate': '_types/aggregations/Aggregate.ts#L185-L186', +'_types.aggregations.PercentilesBucketAggregation': '_types/aggregations/pipeline.ts#L391-L399', '_types.aggregations.PipelineAggregationBase': '_types/aggregations/pipeline.ts#L39-L51', '_types.aggregations.RandomSamplerAggregation': '_types/aggregations/bucket.ts#L749-L769', -'_types.aggregations.RangeAggregate': '_types/aggregations/Aggregate.ts#L594-L598', +'_types.aggregations.RangeAggregate': '_types/aggregations/Aggregate.ts#L665-L669', '_types.aggregations.RangeAggregation': '_types/aggregations/bucket.ts#L669-L689', -'_types.aggregations.RangeBucket': '_types/aggregations/Aggregate.ts#L600-L607', +'_types.aggregations.RangeBucket': '_types/aggregations/Aggregate.ts#L671-L678', '_types.aggregations.RareTermsAggregation': '_types/aggregations/bucket.ts#L706-L739', -'_types.aggregations.RateAggregate': '_types/aggregations/Aggregate.ts#L849-L856', -'_types.aggregations.RateAggregation': '_types/aggregations/metric.ts#L262-L273', -'_types.aggregations.RateMode': '_types/aggregations/metric.ts#L275-L284', -'_types.aggregations.ReverseNestedAggregate': '_types/aggregations/Aggregate.ts#L540-L544', +'_types.aggregations.RateAggregate': '_types/aggregations/Aggregate.ts#L920-L927', +'_types.aggregations.RateAggregation': '_types/aggregations/metric.ts#L266-L277', +'_types.aggregations.RateMode': '_types/aggregations/metric.ts#L279-L288', +'_types.aggregations.ReverseNestedAggregate': '_types/aggregations/Aggregate.ts#L611-L615', '_types.aggregations.ReverseNestedAggregation': '_types/aggregations/bucket.ts#L741-L747', -'_types.aggregations.SamplerAggregate': '_types/aggregations/Aggregate.ts#L558-L559', +'_types.aggregations.SamplerAggregate': '_types/aggregations/Aggregate.ts#L629-L630', '_types.aggregations.SamplerAggregation': '_types/aggregations/bucket.ts#L771-L780', '_types.aggregations.SamplerAggregationExecutionHint': '_types/aggregations/bucket.ts#L359-L372', '_types.aggregations.ScriptedHeuristic': '_types/aggregations/bucket.ts#L813-L815', -'_types.aggregations.ScriptedMetricAggregate': '_types/aggregations/Aggregate.ts#L741-L747', -'_types.aggregations.ScriptedMetricAggregation': '_types/aggregations/metric.ts#L286-L312', -'_types.aggregations.SerialDifferencingAggregation': '_types/aggregations/pipeline.ts#L399-L408', -'_types.aggregations.SignificantLongTermsAggregate': '_types/aggregations/Aggregate.ts#L670-L672', -'_types.aggregations.SignificantLongTermsBucket': '_types/aggregations/Aggregate.ts#L679-L682', -'_types.aggregations.SignificantStringTermsAggregate': '_types/aggregations/Aggregate.ts#L684-L686', -'_types.aggregations.SignificantStringTermsBucket': '_types/aggregations/Aggregate.ts#L688-L690', -'_types.aggregations.SignificantTermsAggregateBase': '_types/aggregations/Aggregate.ts#L660-L668', -'_types.aggregations.SignificantTermsAggregation': '_types/aggregations/bucket.ts#L817-L884', -'_types.aggregations.SignificantTermsBucketBase': '_types/aggregations/Aggregate.ts#L674-L677', -'_types.aggregations.SignificantTextAggregation': '_types/aggregations/bucket.ts#L886-L961', -'_types.aggregations.SimpleMovingAverageAggregation': '_types/aggregations/pipeline.ts#L273-L276', -'_types.aggregations.SimpleValueAggregate': '_types/aggregations/Aggregate.ts#L238-L239', -'_types.aggregations.SingleBucketAggregateBase': '_types/aggregations/Aggregate.ts#L516-L526', -'_types.aggregations.SingleMetricAggregateBase': '_types/aggregations/Aggregate.ts#L185-L194', -'_types.aggregations.StandardDeviationBounds': '_types/aggregations/Aggregate.ts#L281-L288', -'_types.aggregations.StandardDeviationBoundsAsString': '_types/aggregations/Aggregate.ts#L290-L297', -'_types.aggregations.StatsAggregate': '_types/aggregations/Aggregate.ts#L257-L273', -'_types.aggregations.StatsAggregation': '_types/aggregations/metric.ts#L314-L314', -'_types.aggregations.StatsBucketAggregate': '_types/aggregations/Aggregate.ts#L275-L279', -'_types.aggregations.StatsBucketAggregation': '_types/aggregations/pipeline.ts#L410-L410', -'_types.aggregations.StringRareTermsAggregate': '_types/aggregations/Aggregate.ts#L483-L487', -'_types.aggregations.StringRareTermsBucket': '_types/aggregations/Aggregate.ts#L489-L491', -'_types.aggregations.StringStatsAggregate': '_types/aggregations/Aggregate.ts#L795-L806', -'_types.aggregations.StringStatsAggregation': '_types/aggregations/metric.ts#L316-L322', -'_types.aggregations.StringTermsAggregate': '_types/aggregations/Aggregate.ts#L424-L429', -'_types.aggregations.StringTermsBucket': '_types/aggregations/Aggregate.ts#L435-L437', -'_types.aggregations.SumAggregate': '_types/aggregations/Aggregate.ts#L211-L216', -'_types.aggregations.SumAggregation': '_types/aggregations/metric.ts#L324-L324', -'_types.aggregations.SumBucketAggregation': '_types/aggregations/pipeline.ts#L412-L415', -'_types.aggregations.TDigest': '_types/aggregations/metric.ts#L244-L255', -'_types.aggregations.TDigestExecutionHint': '_types/aggregations/metric.ts#L257-L260', -'_types.aggregations.TDigestPercentileRanksAggregate': '_types/aggregations/Aggregate.ts#L177-L178', -'_types.aggregations.TDigestPercentilesAggregate': '_types/aggregations/Aggregate.ts#L174-L175', -'_types.aggregations.TTestAggregate': '_types/aggregations/Aggregate.ts#L840-L847', -'_types.aggregations.TTestAggregation': '_types/aggregations/metric.ts#L326-L340', -'_types.aggregations.TTestType': '_types/aggregations/metric.ts#L354-L367', -'_types.aggregations.TermsAggregateBase': '_types/aggregations/Aggregate.ts#L417-L422', -'_types.aggregations.TermsAggregation': '_types/aggregations/bucket.ts#L963-L1031', -'_types.aggregations.TermsAggregationCollectMode': '_types/aggregations/bucket.ts#L1056-L1065', -'_types.aggregations.TermsAggregationExecutionHint': '_types/aggregations/bucket.ts#L1067-L1072', -'_types.aggregations.TermsBucketBase': '_types/aggregations/Aggregate.ts#L431-L433', -'_types.aggregations.TermsExclude': '_types/aggregations/bucket.ts#L1077-L1078', -'_types.aggregations.TermsInclude': '_types/aggregations/bucket.ts#L1074-L1075', -'_types.aggregations.TermsPartition': '_types/aggregations/bucket.ts#L1080-L1089', -'_types.aggregations.TestPopulation': '_types/aggregations/metric.ts#L342-L352', -'_types.aggregations.TimeSeriesAggregate': '_types/aggregations/Aggregate.ts#L732-L733', -'_types.aggregations.TimeSeriesAggregation': '_types/aggregations/bucket.ts#L1033-L1046', -'_types.aggregations.TimeSeriesBucket': '_types/aggregations/Aggregate.ts#L735-L737', -'_types.aggregations.TopHitsAggregate': '_types/aggregations/Aggregate.ts#L749-L755', -'_types.aggregations.TopHitsAggregation': '_types/aggregations/metric.ts#L369-L429', -'_types.aggregations.TopMetrics': '_types/aggregations/Aggregate.ts#L834-L838', -'_types.aggregations.TopMetricsAggregate': '_types/aggregations/Aggregate.ts#L829-L832', -'_types.aggregations.TopMetricsAggregation': '_types/aggregations/metric.ts#L431-L448', -'_types.aggregations.TopMetricsValue': '_types/aggregations/metric.ts#L450-L455', -'_types.aggregations.UnmappedRareTermsAggregate': '_types/aggregations/Aggregate.ts#L493-L499', -'_types.aggregations.UnmappedSamplerAggregate': '_types/aggregations/Aggregate.ts#L561-L562', -'_types.aggregations.UnmappedSignificantTermsAggregate': '_types/aggregations/Aggregate.ts#L692-L698', -'_types.aggregations.UnmappedTermsAggregate': '_types/aggregations/Aggregate.ts#L463-L469', -'_types.aggregations.ValueCountAggregate': '_types/aggregations/Aggregate.ts#L231-L236', -'_types.aggregations.ValueCountAggregation': '_types/aggregations/metric.ts#L457-L457', -'_types.aggregations.ValueType': '_types/aggregations/metric.ts#L459-L470', -'_types.aggregations.VariableWidthHistogramAggregate': '_types/aggregations/Aggregate.ts#L402-L404', -'_types.aggregations.VariableWidthHistogramAggregation': '_types/aggregations/bucket.ts#L1091-L1115', -'_types.aggregations.VariableWidthHistogramBucket': '_types/aggregations/Aggregate.ts#L406-L413', -'_types.aggregations.WeightedAverageAggregation': '_types/aggregations/metric.ts#L472-L486', -'_types.aggregations.WeightedAverageValue': '_types/aggregations/metric.ts#L488-L498', -'_types.aggregations.WeightedAvgAggregate': '_types/aggregations/Aggregate.ts#L224-L229', +'_types.aggregations.ScriptedMetricAggregate': '_types/aggregations/Aggregate.ts#L812-L818', +'_types.aggregations.ScriptedMetricAggregation': '_types/aggregations/metric.ts#L290-L316', +'_types.aggregations.SerialDifferencingAggregation': '_types/aggregations/pipeline.ts#L401-L410', +'_types.aggregations.SignificantLongTermsAggregate': '_types/aggregations/Aggregate.ts#L741-L743', +'_types.aggregations.SignificantLongTermsBucket': '_types/aggregations/Aggregate.ts#L750-L753', +'_types.aggregations.SignificantStringTermsAggregate': '_types/aggregations/Aggregate.ts#L755-L757', +'_types.aggregations.SignificantStringTermsBucket': '_types/aggregations/Aggregate.ts#L759-L761', +'_types.aggregations.SignificantTermsAggregateBase': '_types/aggregations/Aggregate.ts#L731-L739', +'_types.aggregations.SignificantTermsAggregation': '_types/aggregations/bucket.ts#L833-L910', +'_types.aggregations.SignificantTermsBucketBase': '_types/aggregations/Aggregate.ts#L745-L748', +'_types.aggregations.SignificantTextAggregation': '_types/aggregations/bucket.ts#L912-L987', +'_types.aggregations.SimpleMovingAverageAggregation': '_types/aggregations/pipeline.ts#L275-L278', +'_types.aggregations.SimpleValueAggregate': '_types/aggregations/Aggregate.ts#L243-L244', +'_types.aggregations.SingleBucketAggregateBase': '_types/aggregations/Aggregate.ts#L587-L597', +'_types.aggregations.SingleMetricAggregateBase': '_types/aggregations/Aggregate.ts#L190-L199', +'_types.aggregations.Spike': '_types/aggregations/Aggregate.ts#L421-L421', +'_types.aggregations.StandardDeviationBounds': '_types/aggregations/Aggregate.ts#L286-L293', +'_types.aggregations.StandardDeviationBoundsAsString': '_types/aggregations/Aggregate.ts#L295-L302', +'_types.aggregations.Stationary': '_types/aggregations/Aggregate.ts#L435-L435', +'_types.aggregations.StatsAggregate': '_types/aggregations/Aggregate.ts#L262-L278', +'_types.aggregations.StatsAggregation': '_types/aggregations/metric.ts#L318-L318', +'_types.aggregations.StatsBucketAggregate': '_types/aggregations/Aggregate.ts#L280-L284', +'_types.aggregations.StatsBucketAggregation': '_types/aggregations/pipeline.ts#L412-L412', +'_types.aggregations.StepChange': '_types/aggregations/Aggregate.ts#L423-L423', +'_types.aggregations.StringRareTermsAggregate': '_types/aggregations/Aggregate.ts#L554-L558', +'_types.aggregations.StringRareTermsBucket': '_types/aggregations/Aggregate.ts#L560-L562', +'_types.aggregations.StringStatsAggregate': '_types/aggregations/Aggregate.ts#L866-L877', +'_types.aggregations.StringStatsAggregation': '_types/aggregations/metric.ts#L320-L326', +'_types.aggregations.StringTermsAggregate': '_types/aggregations/Aggregate.ts#L495-L500', +'_types.aggregations.StringTermsBucket': '_types/aggregations/Aggregate.ts#L506-L508', +'_types.aggregations.SumAggregate': '_types/aggregations/Aggregate.ts#L216-L221', +'_types.aggregations.SumAggregation': '_types/aggregations/metric.ts#L328-L328', +'_types.aggregations.SumBucketAggregation': '_types/aggregations/pipeline.ts#L414-L417', +'_types.aggregations.TDigest': '_types/aggregations/metric.ts#L248-L259', +'_types.aggregations.TDigestExecutionHint': '_types/aggregations/metric.ts#L261-L264', +'_types.aggregations.TDigestPercentileRanksAggregate': '_types/aggregations/Aggregate.ts#L182-L183', +'_types.aggregations.TDigestPercentilesAggregate': '_types/aggregations/Aggregate.ts#L179-L180', +'_types.aggregations.TTestAggregate': '_types/aggregations/Aggregate.ts#L911-L918', +'_types.aggregations.TTestAggregation': '_types/aggregations/metric.ts#L330-L344', +'_types.aggregations.TTestType': '_types/aggregations/metric.ts#L358-L371', +'_types.aggregations.TermsAggregateBase': '_types/aggregations/Aggregate.ts#L488-L493', +'_types.aggregations.TermsAggregation': '_types/aggregations/bucket.ts#L989-L1057', +'_types.aggregations.TermsAggregationCollectMode': '_types/aggregations/bucket.ts#L1082-L1091', +'_types.aggregations.TermsAggregationExecutionHint': '_types/aggregations/bucket.ts#L1093-L1098', +'_types.aggregations.TermsBucketBase': '_types/aggregations/Aggregate.ts#L502-L504', +'_types.aggregations.TermsExclude': '_types/aggregations/bucket.ts#L1103-L1104', +'_types.aggregations.TermsInclude': '_types/aggregations/bucket.ts#L1100-L1101', +'_types.aggregations.TermsPartition': '_types/aggregations/bucket.ts#L1106-L1115', +'_types.aggregations.TestPopulation': '_types/aggregations/metric.ts#L346-L356', +'_types.aggregations.TimeSeriesAggregate': '_types/aggregations/Aggregate.ts#L803-L804', +'_types.aggregations.TimeSeriesAggregation': '_types/aggregations/bucket.ts#L1059-L1072', +'_types.aggregations.TimeSeriesBucket': '_types/aggregations/Aggregate.ts#L806-L808', +'_types.aggregations.TopHitsAggregate': '_types/aggregations/Aggregate.ts#L820-L826', +'_types.aggregations.TopHitsAggregation': '_types/aggregations/metric.ts#L373-L433', +'_types.aggregations.TopMetrics': '_types/aggregations/Aggregate.ts#L905-L909', +'_types.aggregations.TopMetricsAggregate': '_types/aggregations/Aggregate.ts#L900-L903', +'_types.aggregations.TopMetricsAggregation': '_types/aggregations/metric.ts#L435-L452', +'_types.aggregations.TopMetricsValue': '_types/aggregations/metric.ts#L454-L459', +'_types.aggregations.TrendChange': '_types/aggregations/Aggregate.ts#L437-L441', +'_types.aggregations.UnmappedRareTermsAggregate': '_types/aggregations/Aggregate.ts#L564-L570', +'_types.aggregations.UnmappedSamplerAggregate': '_types/aggregations/Aggregate.ts#L632-L633', +'_types.aggregations.UnmappedSignificantTermsAggregate': '_types/aggregations/Aggregate.ts#L763-L769', +'_types.aggregations.UnmappedTermsAggregate': '_types/aggregations/Aggregate.ts#L534-L540', +'_types.aggregations.ValueCountAggregate': '_types/aggregations/Aggregate.ts#L236-L241', +'_types.aggregations.ValueCountAggregation': '_types/aggregations/metric.ts#L461-L461', +'_types.aggregations.ValueType': '_types/aggregations/metric.ts#L463-L474', +'_types.aggregations.VariableWidthHistogramAggregate': '_types/aggregations/Aggregate.ts#L473-L475', +'_types.aggregations.VariableWidthHistogramAggregation': '_types/aggregations/bucket.ts#L1117-L1141', +'_types.aggregations.VariableWidthHistogramBucket': '_types/aggregations/Aggregate.ts#L477-L484', +'_types.aggregations.WeightedAverageAggregation': '_types/aggregations/metric.ts#L476-L490', +'_types.aggregations.WeightedAverageValue': '_types/aggregations/metric.ts#L492-L502', +'_types.aggregations.WeightedAvgAggregate': '_types/aggregations/Aggregate.ts#L229-L234', '_types.analysis.Analyzer': '_types/analysis/analyzers.ts#L427-L480', '_types.analysis.ApostropheTokenFilter': '_types/analysis/token_filters.ts#L451-L453', '_types.analysis.ArabicAnalyzer': '_types/analysis/analyzers.ts#L72-L77', @@ -849,7 +868,7 @@ '_types.mapping.DoubleNumberProperty': '_types/mapping/core.ts#L167-L170', '_types.mapping.DoubleRangeProperty': '_types/mapping/range.ts#L34-L36', '_types.mapping.DynamicMapping': '_types/mapping/dynamic-template.ts#L50-L59', -'_types.mapping.DynamicProperty': '_types/mapping/core.ts#L353-L384', +'_types.mapping.DynamicProperty': '_types/mapping/core.ts#L359-L390', '_types.mapping.DynamicTemplate': '_types/mapping/dynamic-template.ts#L23-L43', '_types.mapping.FieldAliasProperty': '_types/mapping/specialized.ts#L64-L67', '_types.mapping.FieldMapping': '_types/mapping/meta-fields.ts#L24-L27', @@ -867,7 +886,7 @@ '_types.mapping.HistogramProperty': '_types/mapping/specialized.ts#L69-L72', '_types.mapping.IcuCollationProperty': '_types/mapping/specialized.ts#L103-L127', '_types.mapping.IndexField': '_types/mapping/meta-fields.ts#L46-L48', -'_types.mapping.IndexOptions': '_types/mapping/core.ts#L309-L314', +'_types.mapping.IndexOptions': '_types/mapping/core.ts#L315-L320', '_types.mapping.IntegerNumberProperty': '_types/mapping/core.ts#L172-L175', '_types.mapping.IntegerRangeProperty': '_types/mapping/range.ts#L42-L44', '_types.mapping.IpProperty': '_types/mapping/specialized.ts#L74-L88', @@ -876,7 +895,7 @@ '_types.mapping.KeywordProperty': '_types/mapping/core.ts#L109-L128', '_types.mapping.LongNumberProperty': '_types/mapping/core.ts#L177-L180', '_types.mapping.LongRangeProperty': '_types/mapping/range.ts#L50-L52', -'_types.mapping.MatchOnlyTextProperty': '_types/mapping/core.ts#L282-L307', +'_types.mapping.MatchOnlyTextProperty': '_types/mapping/core.ts#L288-L313', '_types.mapping.MatchType': '_types/mapping/dynamic-template.ts#L45-L48', '_types.mapping.Murmur3HashProperty': '_types/mapping/specialized.ts#L90-L92', '_types.mapping.NestedProperty': '_types/mapping/complex.ts#L40-L45', @@ -891,15 +910,15 @@ '_types.mapping.RangePropertyBase': '_types/mapping/range.ts#L23-L27', '_types.mapping.RankFeatureProperty': '_types/mapping/core.ts#L207-L210', '_types.mapping.RankFeaturesProperty': '_types/mapping/core.ts#L212-L215', -'_types.mapping.RankVectorElementType': '_types/mapping/core.ts#L386-L390', +'_types.mapping.RankVectorElementType': '_types/mapping/core.ts#L392-L396', '_types.mapping.RankVectorProperty': '_types/mapping/core.ts#L217-L224', '_types.mapping.RoutingField': '_types/mapping/meta-fields.ts#L50-L52', '_types.mapping.RuntimeField': '_types/mapping/RuntimeFields.ts#L26-L50', '_types.mapping.RuntimeFieldFetchFields': '_types/mapping/RuntimeFields.ts#L56-L60', '_types.mapping.RuntimeFieldType': '_types/mapping/RuntimeFields.ts#L62-L73', '_types.mapping.ScaledFloatNumberProperty': '_types/mapping/core.ts#L197-L201', -'_types.mapping.SearchAsYouTypeProperty': '_types/mapping/core.ts#L263-L274', -'_types.mapping.SemanticTextProperty': '_types/mapping/core.ts#L238-L261', +'_types.mapping.SearchAsYouTypeProperty': '_types/mapping/core.ts#L269-L280', +'_types.mapping.SemanticTextProperty': '_types/mapping/core.ts#L238-L267', '_types.mapping.ShapeProperty': '_types/mapping/geo.ts#L81-L93', '_types.mapping.ShortNumberProperty': '_types/mapping/core.ts#L182-L185', '_types.mapping.SizeField': '_types/mapping/meta-fields.ts#L54-L56', @@ -911,14 +930,14 @@ '_types.mapping.SuggestContext': '_types/mapping/specialized.ts#L43-L48', '_types.mapping.SyntheticSourceKeepEnum': '_types/mapping/Property.ts#L100-L118', '_types.mapping.TermVectorOption': '_types/mapping/TermVectorOption.ts#L20-L28', -'_types.mapping.TextIndexPrefixes': '_types/mapping/core.ts#L316-L319', -'_types.mapping.TextProperty': '_types/mapping/core.ts#L321-L338', +'_types.mapping.TextIndexPrefixes': '_types/mapping/core.ts#L322-L325', +'_types.mapping.TextProperty': '_types/mapping/core.ts#L327-L344', '_types.mapping.TimeSeriesMetricType': '_types/mapping/TimeSeriesMetricType.ts#L20-L26', '_types.mapping.TokenCountProperty': '_types/mapping/specialized.ts#L94-L101', '_types.mapping.TypeMapping': '_types/mapping/TypeMapping.ts#L34-L57', '_types.mapping.UnsignedLongNumberProperty': '_types/mapping/core.ts#L192-L195', -'_types.mapping.VersionProperty': '_types/mapping/core.ts#L340-L342', -'_types.mapping.WildcardProperty': '_types/mapping/core.ts#L344-L351', +'_types.mapping.VersionProperty': '_types/mapping/core.ts#L346-L348', +'_types.mapping.WildcardProperty': '_types/mapping/core.ts#L350-L357', '_types.query_dsl.BoolQuery': '_types/query_dsl/compound.ts#L29-L56', '_types.query_dsl.BoostingQuery': '_types/query_dsl/compound.ts#L58-L74', '_types.query_dsl.ChildScoreMode': '_types/query_dsl/joining.ts#L25-L39', @@ -1067,28 +1086,36 @@ 'autoscaling.get_autoscaling_policy.Response': 'autoscaling/get_autoscaling_policy/GetAutoscalingPolicyResponse.ts#L22-L25', 'autoscaling.put_autoscaling_policy.Request': 'autoscaling/put_autoscaling_policy/PutAutoscalingPolicyRequest.ts#L25-L57', 'autoscaling.put_autoscaling_policy.Response': 'autoscaling/put_autoscaling_policy/PutAutoscalingPolicyResponse.ts#L22-L25', -'cat._types.CatAliasesColumn': 'cat/_types/CatBase.ts#L1283-L1315', -'cat._types.CatAllocationColumn': 'cat/_types/CatBase.ts#L1317-L1382', +'cat._types.CatAliasesColumn': 'cat/_types/CatBase.ts#L1150-L1182', +'cat._types.CatAllocationColumn': 'cat/_types/CatBase.ts#L1184-L1249', 'cat._types.CatAnomalyDetectorColumn': 'cat/_types/CatBase.ts#L32-L401', -'cat._types.CatComponentColumn': 'cat/_types/CatBase.ts#L1384-L1421', -'cat._types.CatCountColumn': 'cat/_types/CatBase.ts#L1423-L1440', +'cat._types.CatComponentColumn': 'cat/_types/CatBase.ts#L1251-L1288', +'cat._types.CatCountColumn': 'cat/_types/CatBase.ts#L1290-L1307', 'cat._types.CatDatafeedColumn': 'cat/_types/CatBase.ts#L405-L471', 'cat._types.CatDfaColumn': 'cat/_types/CatBase.ts#L473-L558', -'cat._types.CatFieldDataColumn': 'cat/_types/CatBase.ts#L1442-L1472', +'cat._types.CatFieldDataColumn': 'cat/_types/CatBase.ts#L1309-L1339', +'cat._types.CatHealthColumn': 'cat/_types/CatBase.ts#L1341-L1418', +'cat._types.CatIndicesColumn': 'cat/_types/CatBase.ts#L1420-L2088', +'cat._types.CatMasterColumn': 'cat/_types/CatBase.ts#L2090-L2110', 'cat._types.CatNodeColumn': 'cat/_types/CatBase.ts#L560-L1012', -'cat._types.CatRecoveryColumn': 'cat/_types/CatBase.ts#L1014-L1145', +'cat._types.CatNodeattrsColumn': 'cat/_types/CatBase.ts#L2112-L2153', +'cat._types.CatPendingTasksColumn': 'cat/_types/CatBase.ts#L2438-L2460', +'cat._types.CatPluginsColumn': 'cat/_types/CatBase.ts#L2233-L2259', +'cat._types.CatRecoveryColumn': 'cat/_types/CatBase.ts#L2261-L2393', 'cat._types.CatRequestBase': 'cat/_types/CatBase.ts#L28-L30', -'cat._types.CatSegmentsColumn': 'cat/_types/CatBase.ts#L1147-L1212', -'cat._types.CatShardColumn': 'cat/_types/CatBase.ts#L1772-L2145', -'cat._types.CatSnapshotsColumn': 'cat/_types/CatBase.ts#L1214-L1281', -'cat._types.CatThreadPoolColumn': 'cat/_types/CatBase.ts#L2148-L2248', -'cat._types.CatTrainedModelsColumn': 'cat/_types/CatBase.ts#L1486-L1560', -'cat._types.CatTransformColumn': 'cat/_types/CatBase.ts#L1565-L1769', +'cat._types.CatSegmentsColumn': 'cat/_types/CatBase.ts#L1014-L1079', +'cat._types.CatShardColumn': 'cat/_types/CatBase.ts#L2770-L3143', +'cat._types.CatSnapshotsColumn': 'cat/_types/CatBase.ts#L1081-L1148', +'cat._types.CatTasksColumn': 'cat/_types/CatBase.ts#L2155-L2231', +'cat._types.CatTemplatesColumn': 'cat/_types/CatBase.ts#L2409-L2436', +'cat._types.CatThreadPoolColumn': 'cat/_types/CatBase.ts#L3146-L3246', +'cat._types.CatTrainedModelsColumn': 'cat/_types/CatBase.ts#L2484-L2558', +'cat._types.CatTransformColumn': 'cat/_types/CatBase.ts#L2563-L2767', 'cat.aliases.AliasesRecord': 'cat/aliases/types.ts#L22-L53', 'cat.aliases.Request': 'cat/aliases/CatAliasesRequest.ts#L24-L77', 'cat.aliases.Response': 'cat/aliases/CatAliasesResponse.ts#L22-L25', 'cat.allocation.AllocationRecord': 'cat/allocation/types.ts#L25-L99', -'cat.allocation.Request': 'cat/allocation/CatAllocationRequest.ts#L24-L78', +'cat.allocation.Request': 'cat/allocation/CatAllocationRequest.ts#L24-L76', 'cat.allocation.Response': 'cat/allocation/CatAllocationResponse.ts#L22-L25', 'cat.component_templates.ComponentTemplate': 'cat/component_templates/types.ts#L20-L28', 'cat.component_templates.Request': 'cat/component_templates/CatComponentTemplatesRequest.ts#L24-L81', @@ -1097,68 +1124,68 @@ 'cat.count.Request': 'cat/count/CatCountRequest.ts#L23-L68', 'cat.count.Response': 'cat/count/CatCountResponse.ts#L22-L25', 'cat.fielddata.FielddataRecord': 'cat/fielddata/types.ts#L20-L48', -'cat.fielddata.Request': 'cat/fielddata/CatFielddataRequest.ts#L23-L70', +'cat.fielddata.Request': 'cat/fielddata/CatFielddataRequest.ts#L23-L68', 'cat.fielddata.Response': 'cat/fielddata/CatFielddataResponse.ts#L22-L25', 'cat.health.HealthRecord': 'cat/health/types.ts#L23-L99', -'cat.health.Request': 'cat/health/CatHealthRequest.ts#L24-L70', +'cat.health.Request': 'cat/health/CatHealthRequest.ts#L23-L65', 'cat.health.Response': 'cat/health/CatHealthResponse.ts#L22-L25', 'cat.help.Request': 'cat/help/CatHelpRequest.ts#L20-L36', 'cat.help.Response': 'cat/help/CatHelpResponse.ts#L20-L25', 'cat.indices.IndicesRecord': 'cat/indices/types.ts#L20-L808', -'cat.indices.Request': 'cat/indices/CatIndicesRequest.ts#L30-L109', +'cat.indices.Request': 'cat/indices/CatIndicesRequest.ts#L24-L99', 'cat.indices.Response': 'cat/indices/CatIndicesResponse.ts#L22-L25', 'cat.master.MasterRecord': 'cat/master/types.ts#L20-L39', 'cat.master.Request': 'cat/master/CatMasterRequest.ts#L24-L68', 'cat.master.Response': 'cat/master/CatMasterResponse.ts#L22-L25', 'cat.ml_data_frame_analytics.DataFrameAnalyticsRecord': 'cat/ml_data_frame_analytics/types.ts#L22-L102', -'cat.ml_data_frame_analytics.Request': 'cat/ml_data_frame_analytics/CatDataFrameAnalyticsRequest.ts#L24-L70', +'cat.ml_data_frame_analytics.Request': 'cat/ml_data_frame_analytics/CatDataFrameAnalyticsRequest.ts#L23-L64', 'cat.ml_data_frame_analytics.Response': 'cat/ml_data_frame_analytics/CatDataFrameAnalyticsResponse.ts#L22-L25', 'cat.ml_datafeeds.DatafeedsRecord': 'cat/ml_datafeeds/types.ts#L22-L87', -'cat.ml_datafeeds.Request': 'cat/ml_datafeeds/CatDatafeedsRequest.ts#L24-L85', +'cat.ml_datafeeds.Request': 'cat/ml_datafeeds/CatDatafeedsRequest.ts#L23-L80', 'cat.ml_datafeeds.Response': 'cat/ml_datafeeds/CatDatafeedsResponse.ts#L22-L25', 'cat.ml_jobs.JobsRecord': 'cat/ml_jobs/types.ts#L24-L347', -'cat.ml_jobs.Request': 'cat/ml_jobs/CatJobsRequest.ts#L24-L89', +'cat.ml_jobs.Request': 'cat/ml_jobs/CatJobsRequest.ts#L23-L80', 'cat.ml_jobs.Response': 'cat/ml_jobs/CatJobsResponse.ts#L22-L25', -'cat.ml_trained_models.Request': 'cat/ml_trained_models/CatTrainedModelsRequest.ts#L25-L80', +'cat.ml_trained_models.Request': 'cat/ml_trained_models/CatTrainedModelsRequest.ts#L24-L73', 'cat.ml_trained_models.Response': 'cat/ml_trained_models/CatTrainedModelsResponse.ts#L22-L25', 'cat.ml_trained_models.TrainedModelsRecord': 'cat/ml_trained_models/types.ts#L23-L115', 'cat.nodeattrs.NodeAttributesRecord': 'cat/nodeattrs/types.ts#L20-L55', 'cat.nodeattrs.Request': 'cat/nodeattrs/CatNodeAttributesRequest.ts#L24-L67', 'cat.nodeattrs.Response': 'cat/nodeattrs/CatNodeAttributesResponse.ts#L22-L25', 'cat.nodes.NodesRecord': 'cat/nodes/types.ts#L23-L542', -'cat.nodes.Request': 'cat/nodes/CatNodesRequest.ts#L24-L79', +'cat.nodes.Request': 'cat/nodes/CatNodesRequest.ts#L24-L71', 'cat.nodes.Response': 'cat/nodes/CatNodesResponse.ts#L22-L25', 'cat.pending_tasks.PendingTasksRecord': 'cat/pending_tasks/types.ts#L20-L41', -'cat.pending_tasks.Request': 'cat/pending_tasks/CatPendingTasksRequest.ts#L24-L71', +'cat.pending_tasks.Request': 'cat/pending_tasks/CatPendingTasksRequest.ts#L24-L67', 'cat.pending_tasks.Response': 'cat/pending_tasks/CatPendingTasksResponse.ts#L22-L25', 'cat.plugins.PluginsRecord': 'cat/plugins/types.ts#L22-L52', 'cat.plugins.Request': 'cat/plugins/CatPluginsRequest.ts#L24-L72', 'cat.plugins.Response': 'cat/plugins/CatPluginsResponse.ts#L22-L25', 'cat.recovery.RecoveryRecord': 'cat/recovery/types.ts#L24-L155', -'cat.recovery.Request': 'cat/recovery/CatRecoveryRequest.ts#L24-L92', +'cat.recovery.Request': 'cat/recovery/CatRecoveryRequest.ts#L23-L83', 'cat.recovery.Response': 'cat/recovery/CatRecoveryResponse.ts#L22-L25', 'cat.repositories.RepositoriesRecord': 'cat/repositories/types.ts#L20-L31', 'cat.repositories.Request': 'cat/repositories/CatRepositoriesRequest.ts#L24-L67', 'cat.repositories.Response': 'cat/repositories/CatRepositoriesResponse.ts#L22-L25', -'cat.segments.Request': 'cat/segments/CatSegmentsRequest.ts#L24-L87', +'cat.segments.Request': 'cat/segments/CatSegmentsRequest.ts#L24-L83', 'cat.segments.Response': 'cat/segments/CatSegmentsResponse.ts#L22-L25', 'cat.segments.SegmentsRecord': 'cat/segments/types.ts#L22-L107', -'cat.shards.Request': 'cat/shards/CatShardsRequest.ts#L24-L81', +'cat.shards.Request': 'cat/shards/CatShardsRequest.ts#L24-L73', 'cat.shards.Response': 'cat/shards/CatShardsResponse.ts#L22-L25', 'cat.shards.ShardsRecord': 'cat/shards/types.ts#L20-L427', -'cat.snapshots.Request': 'cat/snapshots/CatSnapshotsRequest.ts#L24-L84', +'cat.snapshots.Request': 'cat/snapshots/CatSnapshotsRequest.ts#L24-L80', 'cat.snapshots.Response': 'cat/snapshots/CatSnapshotsResponse.ts#L22-L25', 'cat.snapshots.SnapshotsRecord': 'cat/snapshots/types.ts#L24-L96', -'cat.tasks.Request': 'cat/tasks/CatTasksRequest.ts#L24-L82', +'cat.tasks.Request': 'cat/tasks/CatTasksRequest.ts#L24-L78', 'cat.tasks.Response': 'cat/tasks/CatTasksResponse.ts#L22-L25', 'cat.tasks.TasksRecord': 'cat/tasks/types.ts#L22-L101', 'cat.templates.Request': 'cat/templates/CatTemplatesRequest.ts#L24-L79', 'cat.templates.Response': 'cat/templates/CatTemplatesResponse.ts#L22-L25', 'cat.templates.TemplatesRecord': 'cat/templates/types.ts#L22-L48', -'cat.thread_pool.Request': 'cat/thread_pool/CatThreadPoolRequest.ts#L24-L83', +'cat.thread_pool.Request': 'cat/thread_pool/CatThreadPoolRequest.ts#L24-L79', 'cat.thread_pool.Response': 'cat/thread_pool/CatThreadPoolResponse.ts#L22-L25', 'cat.thread_pool.ThreadPoolRecord': 'cat/thread_pool/types.ts#L22-L124', -'cat.transforms.Request': 'cat/transforms/CatTransformsRequest.ts#L25-L89', +'cat.transforms.Request': 'cat/transforms/CatTransformsRequest.ts#L24-L84', 'cat.transforms.Response': 'cat/transforms/CatTransformsResponse.ts#L22-L25', 'cat.transforms.TransformsRecord': 'cat/transforms/types.ts#L22-L197', 'ccr._types.FollowIndexStats': 'ccr/_types/FollowIndexStats.ts#L30-L35', @@ -1712,7 +1739,7 @@ 'indices.open.Response': 'indices/open/IndicesOpenResponse.ts#L20-L25', 'indices.promote_data_stream.Request': 'indices/promote_data_stream/IndicesPromoteDataStreamRequest.ts#L24-L58', 'indices.promote_data_stream.Response': 'indices/promote_data_stream/IndicesPromoteDataStreamResponse.ts#L22-L25', -'indices.put_alias.Request': 'indices/put_alias/IndicesPutAliasRequest.ts#L25-L103', +'indices.put_alias.Request': 'indices/put_alias/IndicesPutAliasRequest.ts#L25-L104', 'indices.put_alias.Response': 'indices/put_alias/IndicesPutAliasResponse.ts#L22-L25', 'indices.put_data_lifecycle.Request': 'indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L25-L93', 'indices.put_data_lifecycle.Response': 'indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L25', @@ -1744,7 +1771,7 @@ 'indices.recovery.ShardRecovery': 'indices/recovery/types.ts#L118-L135', 'indices.recovery.TranslogStatus': 'indices/recovery/types.ts#L102-L109', 'indices.recovery.VerifyIndex': 'indices/recovery/types.ts#L111-L116', -'indices.refresh.Request': 'indices/refresh/IndicesRefreshRequest.ts#L23-L83', +'indices.refresh.Request': 'indices/refresh/IndicesRefreshRequest.ts#L23-L85', 'indices.refresh.Response': 'indices/refresh/IndicesRefreshResponse.ts#L22-L25', 'indices.reload_search_analyzers.ReloadDetails': 'indices/reload_search_analyzers/types.ts#L27-L31', 'indices.reload_search_analyzers.ReloadResult': 'indices/reload_search_analyzers/types.ts#L22-L25', @@ -1781,7 +1808,7 @@ 'indices.shard_stores.ShardStoreWrapper': 'indices/shard_stores/types.ts#L58-L60', 'indices.shrink.Request': 'indices/shrink/IndicesShrinkRequest.ts#L27-L113', 'indices.shrink.Response': 'indices/shrink/IndicesShrinkResponse.ts#L22-L28', -'indices.simulate_index_template.Request': 'indices/simulate_index_template/IndicesSimulateIndexTemplateRequest.ts#L24-L67', +'indices.simulate_index_template.Request': 'indices/simulate_index_template/IndicesSimulateIndexTemplateRequest.ts#L25-L70', 'indices.simulate_index_template.Response': 'indices/simulate_index_template/IndicesSimulateIndexTemplateResponse.ts#L25-L30', 'indices.simulate_template.Overlapping': 'indices/simulate_template/IndicesSimulateTemplateResponse.ts#L39-L42', 'indices.simulate_template.Request': 'indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L135', @@ -2015,7 +2042,7 @@ 'inference.sparse_embedding.Response': 'inference/sparse_embedding/SparseEmbeddingResponse.ts#L22-L25', 'inference.stream_completion.Request': 'inference/stream_completion/StreamInferenceRequest.ts#L25-L71', 'inference.stream_completion.Response': 'inference/stream_completion/StreamInferenceResponse.ts#L22-L25', -'inference.text_embedding.Request': 'inference/text_embedding/TextEmbeddingRequest.ts#L25-L63', +'inference.text_embedding.Request': 'inference/text_embedding/TextEmbeddingRequest.ts#L25-L76', 'inference.text_embedding.Response': 'inference/text_embedding/TextEmbeddingResponse.ts#L22-L25', 'inference.update.Request': 'inference/update/UpdateInferenceRequest.ts#L25-L61', 'inference.update.Response': 'inference/update/UpdateInferenceResponse.ts#L22-L25', @@ -2146,7 +2173,7 @@ 'logstash.delete_pipeline.Request': 'logstash/delete_pipeline/LogstashDeletePipelineRequest.ts#L23-L47', 'logstash.get_pipeline.Request': 'logstash/get_pipeline/LogstashGetPipelineRequest.ts#L23-L50', 'logstash.get_pipeline.Response': 'logstash/get_pipeline/LogstashGetPipelineResponse.ts#L24-L27', -'logstash.put_pipeline.Request': 'logstash/put_pipeline/LogstashPutPipelineRequest.ts#L24-L51', +'logstash.put_pipeline.Request': 'logstash/put_pipeline/LogstashPutPipelineRequest.ts#L24-L52', 'migration.deprecations.Deprecation': 'migration/deprecations/types.ts#L32-L47', 'migration.deprecations.DeprecationLevel': 'migration/deprecations/types.ts#L23-L30', 'migration.deprecations.Request': 'migration/deprecations/DeprecationInfoRequest.ts#L23-L49', @@ -2176,20 +2203,20 @@ 'ml._types.CategorizationAnalyzerDefinition': 'ml/_types/Analysis.ts#L184-L198', 'ml._types.CategorizationStatus': 'ml/_types/Model.ts#L84-L87', 'ml._types.Category': 'ml/_types/Category.ts#L23-L49', -'ml._types.ChunkingConfig': 'ml/_types/Datafeed.ts#L251-L264', -'ml._types.ChunkingMode': 'ml/_types/Datafeed.ts#L245-L249', +'ml._types.ChunkingConfig': 'ml/_types/Datafeed.ts#L254-L267', +'ml._types.ChunkingMode': 'ml/_types/Datafeed.ts#L248-L252', 'ml._types.ClassificationInferenceOptions': 'ml/_types/inference.ts#L118-L133', 'ml._types.CommonTokenizationConfig': 'ml/_types/inference.ts#L160-L186', 'ml._types.ConditionOperator': 'ml/_types/Rule.ts#L74-L79', -'ml._types.DataCounts': 'ml/_types/Job.ts#L352-L372', -'ml._types.DataDescription': 'ml/_types/Job.ts#L374-L390', -'ml._types.Datafeed': 'ml/_types/Datafeed.ts#L37-L61', +'ml._types.DataCounts': 'ml/_types/Job.ts#L354-L374', +'ml._types.DataDescription': 'ml/_types/Job.ts#L376-L392', +'ml._types.Datafeed': 'ml/_types/Datafeed.ts#L37-L64', 'ml._types.DatafeedAuthorization': 'ml/_types/Authorization.ts#L31-L43', -'ml._types.DatafeedConfig': 'ml/_types/Datafeed.ts#L63-L120', -'ml._types.DatafeedRunningState': 'ml/_types/Datafeed.ts#L210-L224', -'ml._types.DatafeedState': 'ml/_types/Datafeed.ts#L136-L141', -'ml._types.DatafeedStats': 'ml/_types/Datafeed.ts#L143-L172', -'ml._types.DatafeedTimingStats': 'ml/_types/Datafeed.ts#L174-L202', +'ml._types.DatafeedConfig': 'ml/_types/Datafeed.ts#L66-L123', +'ml._types.DatafeedRunningState': 'ml/_types/Datafeed.ts#L213-L227', +'ml._types.DatafeedState': 'ml/_types/Datafeed.ts#L139-L144', +'ml._types.DatafeedStats': 'ml/_types/Datafeed.ts#L146-L175', +'ml._types.DatafeedTimingStats': 'ml/_types/Datafeed.ts#L177-L205', 'ml._types.DataframeAnalysis': 'ml/_types/DataframeAnalytics.ts#L134-L213', 'ml._types.DataframeAnalysisAnalyzedFields': 'ml/_types/DataframeAnalytics.ts#L238-L244', 'ml._types.DataframeAnalysisClassification': 'ml/_types/DataframeAnalytics.ts#L227-L236', @@ -2227,7 +2254,7 @@ 'ml._types.DataframeEvaluationRegressionMetricsHuber': 'ml/_types/DataframeEvaluation.ts#L117-L120', 'ml._types.DataframeEvaluationRegressionMetricsMsle': 'ml/_types/DataframeEvaluation.ts#L112-L115', 'ml._types.DataframeState': 'ml/_types/Dataframe.ts#L20-L26', -'ml._types.DelayedDataCheckConfig': 'ml/_types/Datafeed.ts#L122-L133', +'ml._types.DelayedDataCheckConfig': 'ml/_types/Datafeed.ts#L125-L136', 'ml._types.DeploymentAllocationState': 'ml/_types/TrainedModel.ts#L331-L344', 'ml._types.DeploymentAssignmentState': 'ml/_types/TrainedModel.ts#L346-L363', 'ml._types.DetectionRule': 'ml/_types/Rule.ts#L25-L39', @@ -2237,7 +2264,7 @@ 'ml._types.DiscoveryNodeCompact': 'ml/_types/DiscoveryNode.ts#L39-L48', 'ml._types.DiscoveryNodeContent': 'ml/_types/DiscoveryNode.ts#L27-L37', 'ml._types.ExcludeFrequent': 'ml/_types/Detector.ts#L145-L150', -'ml._types.ExponentialAverageCalculationContext': 'ml/_types/Datafeed.ts#L204-L208', +'ml._types.ExponentialAverageCalculationContext': 'ml/_types/Datafeed.ts#L207-L211', 'ml._types.FillMaskInferenceOptions': 'ml/_types/inference.ts#L284-L299', 'ml._types.FillMaskInferenceUpdateOptions': 'ml/_types/inference.ts#L430-L437', 'ml._types.Filter': 'ml/_types/Filter.ts#L22-L29', @@ -2253,14 +2280,14 @@ 'ml._types.Influence': 'ml/_types/Anomaly.ts#L141-L144', 'ml._types.Influencer': 'ml/_types/Influencer.ts#L24-L76', 'ml._types.Job': 'ml/_types/Job.ts#L61-L180', -'ml._types.JobBlocked': 'ml/_types/Job.ts#L392-L395', -'ml._types.JobBlockedReason': 'ml/_types/Job.ts#L397-L401', -'ml._types.JobConfig': 'ml/_types/Job.ts#L182-L283', -'ml._types.JobForecastStatistics': 'ml/_types/Job.ts#L343-L350', +'ml._types.JobBlocked': 'ml/_types/Job.ts#L394-L397', +'ml._types.JobBlockedReason': 'ml/_types/Job.ts#L399-L403', +'ml._types.JobConfig': 'ml/_types/Job.ts#L182-L285', +'ml._types.JobForecastStatistics': 'ml/_types/Job.ts#L345-L352', 'ml._types.JobState': 'ml/_types/Job.ts#L36-L52', 'ml._types.JobStatistics': 'ml/_types/Job.ts#L54-L59', -'ml._types.JobStats': 'ml/_types/Job.ts#L284-L330', -'ml._types.JobTimingStats': 'ml/_types/Job.ts#L332-L341', +'ml._types.JobStats': 'ml/_types/Job.ts#L286-L332', +'ml._types.JobTimingStats': 'ml/_types/Job.ts#L334-L343', 'ml._types.LearningToRankConfig': 'ml/_types/inference.ts#L87-L91', 'ml._types.MemoryStatus': 'ml/_types/Model.ts#L89-L93', 'ml._types.ModelPackageConfig': 'ml/_types/TrainedModel.ts#L257-L272', @@ -2287,7 +2314,7 @@ 'ml._types.RoutingState': 'ml/_types/TrainedModel.ts#L408-L429', 'ml._types.RuleAction': 'ml/_types/Rule.ts#L41-L50', 'ml._types.RuleCondition': 'ml/_types/Rule.ts#L52-L65', -'ml._types.RunningStateSearchInterval': 'ml/_types/Datafeed.ts#L226-L243', +'ml._types.RunningStateSearchInterval': 'ml/_types/Datafeed.ts#L229-L246', 'ml._types.SnapshotUpgradeState': 'ml/_types/Model.ts#L95-L100', 'ml._types.TextClassificationInferenceOptions': 'ml/_types/inference.ts#L202-L214', 'ml._types.TextClassificationInferenceUpdateOptions': 'ml/_types/inference.ts#L382-L391', @@ -2497,7 +2524,7 @@ 'ml.update_data_frame_analytics.Request': 'ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsRequest.ts#L24-L80', 'ml.update_data_frame_analytics.Response': 'ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsResponse.ts#L30-L45', 'ml.update_datafeed.Request': 'ml/update_datafeed/MlUpdateDatafeedRequest.ts#L31-L164', -'ml.update_datafeed.Response': 'ml/update_datafeed/MlUpdateDatafeedResponse.ts#L31-L49', +'ml.update_datafeed.Response': 'ml/update_datafeed/MlUpdateDatafeedResponse.ts#L31-L52', 'ml.update_filter.Request': 'ml/update_filter/MlUpdateFilterRequest.ts#L23-L60', 'ml.update_filter.Response': 'ml/update_filter/MlUpdateFilterResponse.ts#L22-L28', 'ml.update_job.Request': 'ml/update_job/MlUpdateJobRequest.ts#L33-L147', @@ -3063,10 +3090,17 @@ 'sql.query.Response': 'sql/query/QuerySqlResponse.ts#L23-L60', 'sql.query.SqlFormat': 'sql/query/QuerySqlRequest.ts#L153-L161', 'sql.translate.Request': 'sql/translate/TranslateSqlRequest.ts#L25-L65', -'sql.translate.Response': 'sql/translate/TranslateSqlResponse.ts#L27-L37', +'sql.translate.Response': 'sql/translate/TranslateSqlResponse.ts#L28-L39', 'ssl.certificates.CertificateInformation': 'ssl/certificates/types.ts#L22-L57', 'ssl.certificates.Request': 'ssl/certificates/GetCertificatesRequest.ts#L22-L55', 'ssl.certificates.Response': 'ssl/certificates/GetCertificatesResponse.ts#L22-L25', +'streams.logs_disable.Request': 'streams/logs_disable/StreamsLogsDisableRequest.ts#L23-L55', +'streams.logs_disable.Response': 'streams/logs_disable/StreamsLogsDisableResponse.ts#L22-L25', +'streams.logs_enable.Request': 'streams/logs_enable/StreamsLogsEnableRequest.ts#L23-L59', +'streams.logs_enable.Response': 'streams/logs_enable/StreamsLogsEnableResponse.ts#L22-L25', +'streams.status.LogsStatus': 'streams/status/StreamsStatusResponse.ts#L26-L31', +'streams.status.Request': 'streams/status/StreamsStatusRequest.ts#L23-L47', +'streams.status.Response': 'streams/status/StreamsStatusResponse.ts#L20-L24', 'synonyms._types.SynonymRule': 'synonyms/_types/SynonymRule.ts#L26-L37', 'synonyms._types.SynonymRuleRead': 'synonyms/_types/SynonymRule.ts#L40-L50', 'synonyms._types.SynonymsUpdateResult': 'synonyms/_types/SynonymsUpdateResult.ts#L23-L34', @@ -3355,10 +3389,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/b4afa4a1d904ffd9b606881169c11fbf8c4859e2/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/ccd7bc8f567f1b62ee424f0ece0d2d74b5e4035b/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/indices/ElasticsearchIndicesAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java index ab9c707ed..6f00813b1 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 @@ -3403,6 +3403,9 @@ public CompletableFuture recovery() { * seconds. You can change this default interval with the * index.refresh_interval setting. *

+ * In Elastic Cloud Serverless, the default refresh interval is 5 seconds across + * all indices. + *

* Refresh requests are synchronous and do not return a response until the * refresh operation completes. *

@@ -3437,6 +3440,9 @@ public CompletableFuture refresh(RefreshRequest request) { * seconds. You can change this default interval with the * index.refresh_interval setting. *

+ * In Elastic Cloud Serverless, the default refresh interval is 5 seconds across + * all indices. + *

* Refresh requests are synchronous and do not return a response until the * refresh operation completes. *

@@ -3472,6 +3478,9 @@ public final CompletableFuture refresh( * seconds. You can change this default interval with the * index.refresh_interval setting. *

+ * In Elastic Cloud Serverless, the default refresh interval is 5 seconds across + * all indices. + *

* Refresh requests are synchronous and do not return a response until the * refresh operation completes. *

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 8a65a9b5e..b1c6c748c 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 @@ -3458,6 +3458,9 @@ public RecoveryResponse recovery() throws IOException, ElasticsearchException { * seconds. You can change this default interval with the * index.refresh_interval setting. *

+ * In Elastic Cloud Serverless, the default refresh interval is 5 seconds across + * all indices. + *

* Refresh requests are synchronous and do not return a response until the * refresh operation completes. *

@@ -3492,6 +3495,9 @@ public RefreshResponse refresh(RefreshRequest request) throws IOException, Elast * seconds. You can change this default interval with the * index.refresh_interval setting. *

+ * In Elastic Cloud Serverless, the default refresh interval is 5 seconds across + * all indices. + *

* Refresh requests are synchronous and do not return a response until the * refresh operation completes. *

@@ -3527,6 +3533,9 @@ public final RefreshResponse refresh(Functionindex.refresh_interval setting. *

+ * In Elastic Cloud Serverless, the default refresh interval is 5 seconds across + * all indices. + *

* Refresh requests are synchronous and do not return a response until the * refresh operation completes. *

diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java index d8cb94f97..3ac65f3b5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/RefreshRequest.java @@ -68,6 +68,9 @@ * seconds. You can change this default interval with the * index.refresh_interval setting. *

+ * In Elastic Cloud Serverless, the default refresh interval is 5 seconds across + * all indices. + *

* Refresh requests are synchronous and do not return a response until the * refresh operation completes. *

diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateIndexTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateIndexTemplateRequest.java index c9f0ba011..06b5461c3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateIndexTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/SimulateIndexTemplateRequest.java @@ -24,6 +24,8 @@ import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; import co.elastic.clients.json.ObjectBuilderDeserializer; import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.transport.Endpoint; @@ -31,6 +33,7 @@ import co.elastic.clients.util.ApiTypeHelper; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; import java.lang.Boolean; import java.lang.String; import java.util.HashMap; @@ -64,8 +67,8 @@ * "../doc-files/api-spec.html#indices.simulate_index_template.Request">API * specification */ - -public class SimulateIndexTemplateRequest extends RequestBase { +@JsonpDeserializable +public class SimulateIndexTemplateRequest extends RequestBase implements JsonpSerializable { @Nullable private final String cause; @@ -80,6 +83,8 @@ public class SimulateIndexTemplateRequest extends RequestBase { private final String name; + private final IndexTemplate indexTemplate; + // --------------------------------------------------------------------------------------------- private SimulateIndexTemplateRequest(Builder builder) { @@ -89,6 +94,7 @@ private SimulateIndexTemplateRequest(Builder builder) { this.includeDefaults = builder.includeDefaults; this.masterTimeout = builder.masterTimeout; this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name"); + this.indexTemplate = ApiTypeHelper.requireNonNull(builder.indexTemplate, this, "indexTemplate"); } @@ -148,6 +154,21 @@ public final String name() { return this.name; } + /** + * Required - Request body. + */ + public final IndexTemplate indexTemplate() { + return this.indexTemplate; + } + + /** + * Serialize this value to JSON. + */ + public void serialize(JsonGenerator generator, JsonpMapper mapper) { + this.indexTemplate.serialize(generator, mapper); + + } + // --------------------------------------------------------------------------------------------- /** @@ -171,6 +192,8 @@ public static class Builder extends RequestBase.AbstractBuilder private String name; + private IndexTemplate indexTemplate; + /** * User defined reason for dry-run creating the new template for simulation * purposes @@ -234,6 +257,29 @@ public final Builder name(String value) { return this; } + /** + * Required - Request body. + */ + public final Builder indexTemplate(IndexTemplate value) { + this.indexTemplate = value; + return this; + } + + /** + * Required - Request body. + */ + public final Builder indexTemplate(Function> fn) { + return this.indexTemplate(fn.apply(new IndexTemplate.Builder()).build()); + } + + @Override + public Builder withJson(JsonParser parser, JsonpMapper mapper) { + + @SuppressWarnings("unchecked") + IndexTemplate value = (IndexTemplate) IndexTemplate._DESERIALIZER.deserialize(parser, mapper); + return this.indexTemplate(value); + } + @Override protected Builder self() { return this; @@ -252,6 +298,15 @@ public SimulateIndexTemplateRequest build() { } } + public static final JsonpDeserializer _DESERIALIZER = createSimulateIndexTemplateRequestDeserializer(); + protected static JsonpDeserializer createSimulateIndexTemplateRequestDeserializer() { + + JsonpDeserializer valueDeserializer = IndexTemplate._DESERIALIZER; + + return JsonpDeserializer.of(valueDeserializer.acceptedEvents(), (parser, mapper, event) -> new Builder() + .indexTemplate(valueDeserializer.deserialize(parser, mapper, event)).build()); + } + // --------------------------------------------------------------------------------------------- /** @@ -318,5 +373,5 @@ public SimulateIndexTemplateRequest build() { } return params; - }, SimpleEndpoint.emptyMap(), false, SimulateIndexTemplateResponse._DESERIALIZER); + }, SimpleEndpoint.emptyMap(), true, SimulateIndexTemplateResponse._DESERIALIZER); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TextEmbeddingRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TextEmbeddingRequest.java index 042082f7f..36e7b4e75 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TextEmbeddingRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TextEmbeddingRequest.java @@ -72,6 +72,9 @@ public class TextEmbeddingRequest extends RequestBase implements JsonpSerializab private final List input; + @Nullable + private final String inputType; + @Nullable private final JsonData taskSettings; @@ -84,6 +87,7 @@ private TextEmbeddingRequest(Builder builder) { this.inferenceId = ApiTypeHelper.requireNonNull(builder.inferenceId, this, "inferenceId"); this.input = ApiTypeHelper.unmodifiableRequired(builder.input, this, "input"); + this.inputType = builder.inputType; this.taskSettings = builder.taskSettings; this.timeout = builder.timeout; @@ -111,6 +115,32 @@ public final List input() { return this.input; } + /** + * The input data type for the text embedding model. Possible values include: + *

    + *
  • SEARCH
  • + *
  • INGEST
  • + *
  • CLASSIFICATION
  • + *
  • CLUSTERING Not all services support all values. Unsupported + * values will trigger a validation exception. Accepted values depend on the + * configured inference service, refer to the relevant service-specific + * documentation for more info.
  • + *
+ *
+ *

+ * info The input_type parameter specified on the root level of the + * request body will take precedence over the input_type parameter + * specified in task_settings. + *

+ *
+ *

+ * API name: {@code input_type} + */ + @Nullable + public final String inputType() { + return this.inputType; + } + /** * Optional task settings *

@@ -151,6 +181,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { } generator.writeEnd(); + } + if (this.inputType != null) { + generator.writeKey("input_type"); + generator.write(this.inputType); + } if (this.taskSettings != null) { generator.writeKey("task_settings"); @@ -173,6 +208,9 @@ public static class Builder extends RequestBase.AbstractBuilder private List input; + @Nullable + private String inputType; + @Nullable private JsonData taskSettings; @@ -213,6 +251,32 @@ public final Builder input(String value, String... values) { return this; } + /** + * The input data type for the text embedding model. Possible values include: + *

    + *
  • SEARCH
  • + *
  • INGEST
  • + *
  • CLASSIFICATION
  • + *
  • CLUSTERING Not all services support all values. Unsupported + * values will trigger a validation exception. Accepted values depend on the + * configured inference service, refer to the relevant service-specific + * documentation for more info.
  • + *
+ *
+ *

+ * info The input_type parameter specified on the root level of the + * request body will take precedence over the input_type parameter + * specified in task_settings. + *

+ *
+ *

+ * API name: {@code input_type} + */ + public final Builder inputType(@Nullable String value) { + this.inputType = value; + return this; + } + /** * Optional task settings *

@@ -271,6 +335,7 @@ public TextEmbeddingRequest build() { protected static void setupTextEmbeddingRequestDeserializer(ObjectDeserializer op) { op.add(Builder::input, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "input"); + op.add(Builder::inputType, JsonpDeserializer.stringDeserializer(), "input_type"); op.add(Builder::taskSettings, JsonData._DESERIALIZER, "task_settings"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/PutPipelineRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/PutPipelineRequest.java index d8ef0378d..323934b60 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/PutPipelineRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/logstash/PutPipelineRequest.java @@ -89,7 +89,9 @@ public static PutPipelineRequest of(Function * API name: {@code id} */ @@ -126,7 +128,9 @@ public static class Builder extends RequestBase.AbstractBuilder private Pipeline pipeline; /** - * Required - An identifier for the pipeline. + * Required - An identifier for the pipeline. Pipeline IDs must begin with a + * letter or underscore and contain only letters, underscores, dashes, hyphens + * and numbers. *

* API name: {@code id} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/Datafeed.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/Datafeed.java index 18a02acf7..9c3fe92ca 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/Datafeed.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/Datafeed.java @@ -172,6 +172,15 @@ public final String datafeedId() { } /** + * The interval at which scheduled queries are made while the datafeed runs in + * real time. The default value is either the bucket span for short bucket + * spans, or, for longer bucket spans, a sensible fraction of the bucket span. + * For example: 150s. When frequency is shorter than + * the bucket span, interim results for the last (partial) bucket are written + * then eventually overwritten by the full bucket results. If the datafeed uses + * aggregations, this value must be divisible by the interval of the date + * histogram aggregation. + *

* API name: {@code frequency} */ @Nullable @@ -516,6 +525,15 @@ public final Builder datafeedId(String value) { } /** + * The interval at which scheduled queries are made while the datafeed runs in + * real time. The default value is either the bucket span for short bucket + * spans, or, for longer bucket spans, a sensible fraction of the bucket span. + * For example: 150s. When frequency is shorter than + * the bucket span, interim results for the last (partial) bucket are written + * then eventually overwritten by the full bucket results. If the datafeed uses + * aggregations, this value must be divisible by the interval of the date + * histogram aggregation. + *

* API name: {@code frequency} */ public final Builder frequency(@Nullable Time value) { @@ -524,6 +542,15 @@ public final Builder frequency(@Nullable Time value) { } /** + * The interval at which scheduled queries are made while the datafeed runs in + * real time. The default value is either the bucket span for short bucket + * spans, or, for longer bucket spans, a sensible fraction of the bucket span. + * For example: 150s. When frequency is shorter than + * the bucket span, interim results for the last (partial) bucket are written + * then eventually overwritten by the full bucket results. If the datafeed uses + * aggregations, this value must be divisible by the interval of the date + * histogram aggregation. + *

* API name: {@code frequency} */ public final Builder frequency(Function> fn) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/FillMaskInferenceOptions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/FillMaskInferenceOptions.java index b35a4ffb6..787d24831 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/FillMaskInferenceOptions.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/FillMaskInferenceOptions.java @@ -26,7 +26,6 @@ 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; @@ -74,6 +73,7 @@ public class FillMaskInferenceOptions implements InferenceConfigCreateVariant, J @Nullable private final String resultsField; + @Nullable private final Vocabulary vocabulary; // --------------------------------------------------------------------------------------------- @@ -84,7 +84,7 @@ private FillMaskInferenceOptions(Builder builder) { this.numTopClasses = builder.numTopClasses; this.tokenization = builder.tokenization; this.resultsField = builder.resultsField; - this.vocabulary = ApiTypeHelper.requireNonNull(builder.vocabulary, this, "vocabulary"); + this.vocabulary = builder.vocabulary; } @@ -148,8 +148,9 @@ public final String resultsField() { } /** - * Required - API name: {@code vocabulary} + * API name: {@code vocabulary} */ + @Nullable public final Vocabulary vocabulary() { return this.vocabulary; } @@ -185,8 +186,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.resultsField); } - generator.writeKey("vocabulary"); - this.vocabulary.serialize(generator, mapper); + if (this.vocabulary != null) { + generator.writeKey("vocabulary"); + this.vocabulary.serialize(generator, mapper); + + } } @@ -216,6 +220,7 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private String resultsField; + @Nullable private Vocabulary vocabulary; /** @@ -285,15 +290,15 @@ public final Builder resultsField(@Nullable String value) { } /** - * Required - API name: {@code vocabulary} + * API name: {@code vocabulary} */ - public final Builder vocabulary(Vocabulary value) { + public final Builder vocabulary(@Nullable Vocabulary value) { this.vocabulary = value; return this; } /** - * Required - API name: {@code vocabulary} + * API name: {@code vocabulary} */ public final Builder vocabulary(Function> fn) { return this.vocabulary(fn.apply(new Vocabulary.Builder()).build()); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/TextEmbeddingInferenceOptions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/TextEmbeddingInferenceOptions.java index 6af156c02..231358994 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/TextEmbeddingInferenceOptions.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/TextEmbeddingInferenceOptions.java @@ -26,7 +26,6 @@ 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; @@ -71,6 +70,7 @@ public class TextEmbeddingInferenceOptions implements InferenceConfigCreateVaria @Nullable private final String resultsField; + @Nullable private final Vocabulary vocabulary; // --------------------------------------------------------------------------------------------- @@ -80,7 +80,7 @@ private TextEmbeddingInferenceOptions(Builder builder) { this.embeddingSize = builder.embeddingSize; this.tokenization = builder.tokenization; this.resultsField = builder.resultsField; - this.vocabulary = ApiTypeHelper.requireNonNull(builder.vocabulary, this, "vocabulary"); + this.vocabulary = builder.vocabulary; } @@ -128,8 +128,9 @@ public final String resultsField() { } /** - * Required - API name: {@code vocabulary} + * API name: {@code vocabulary} */ + @Nullable public final Vocabulary vocabulary() { return this.vocabulary; } @@ -160,8 +161,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.resultsField); } - generator.writeKey("vocabulary"); - this.vocabulary.serialize(generator, mapper); + if (this.vocabulary != null) { + generator.writeKey("vocabulary"); + this.vocabulary.serialize(generator, mapper); + + } } @@ -188,6 +192,7 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private String resultsField; + @Nullable private Vocabulary vocabulary; /** @@ -241,15 +246,15 @@ public final Builder resultsField(@Nullable String value) { } /** - * Required - API name: {@code vocabulary} + * API name: {@code vocabulary} */ - public final Builder vocabulary(Vocabulary value) { + public final Builder vocabulary(@Nullable Vocabulary value) { this.vocabulary = value; return this; } /** - * Required - API name: {@code vocabulary} + * API name: {@code vocabulary} */ public final Builder vocabulary(Function> fn) { return this.vocabulary(fn.apply(new Vocabulary.Builder()).build()); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/TextExpansionInferenceOptions.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/TextExpansionInferenceOptions.java index 4258574f5..65f2aea38 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/TextExpansionInferenceOptions.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/TextExpansionInferenceOptions.java @@ -26,7 +26,6 @@ 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; @@ -67,6 +66,7 @@ public class TextExpansionInferenceOptions implements InferenceConfigCreateVaria @Nullable private final String resultsField; + @Nullable private final Vocabulary vocabulary; // --------------------------------------------------------------------------------------------- @@ -75,7 +75,7 @@ private TextExpansionInferenceOptions(Builder builder) { this.tokenization = builder.tokenization; this.resultsField = builder.resultsField; - this.vocabulary = ApiTypeHelper.requireNonNull(builder.vocabulary, this, "vocabulary"); + this.vocabulary = builder.vocabulary; } @@ -113,8 +113,9 @@ public final String resultsField() { } /** - * Required - API name: {@code vocabulary} + * API name: {@code vocabulary} */ + @Nullable public final Vocabulary vocabulary() { return this.vocabulary; } @@ -140,8 +141,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write(this.resultsField); } - generator.writeKey("vocabulary"); - this.vocabulary.serialize(generator, mapper); + if (this.vocabulary != null) { + generator.writeKey("vocabulary"); + this.vocabulary.serialize(generator, mapper); + + } } @@ -165,6 +169,7 @@ public static class Builder extends WithJsonObjectBuilderBase @Nullable private String resultsField; + @Nullable private Vocabulary vocabulary; /** @@ -208,15 +213,15 @@ public final Builder resultsField(@Nullable String value) { } /** - * Required - API name: {@code vocabulary} + * API name: {@code vocabulary} */ - public final Builder vocabulary(Vocabulary value) { + public final Builder vocabulary(@Nullable Vocabulary value) { this.vocabulary = value; return this; } /** - * Required - API name: {@code vocabulary} + * API name: {@code vocabulary} */ public final Builder vocabulary(Function> fn) { return this.vocabulary(fn.apply(new Vocabulary.Builder()).build()); diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedResponse.java index 519cfc854..db45fd255 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/ml/UpdateDatafeedResponse.java @@ -169,6 +169,15 @@ public final String datafeedId() { } /** + * The interval at which scheduled queries are made while the datafeed runs in + * real time. The default value is either the bucket span for short bucket + * spans, or, for longer bucket spans, a sensible fraction of the bucket span. + * For example: 150s. When frequency is shorter than + * the bucket span, interim results for the last (partial) bucket are written + * then eventually overwritten by the full bucket results. If the datafeed uses + * aggregations, this value must be divisible by the interval of the date + * histogram aggregation. + *

* API name: {@code frequency} */ @Nullable @@ -487,6 +496,15 @@ public final Builder datafeedId(String value) { } /** + * The interval at which scheduled queries are made while the datafeed runs in + * real time. The default value is either the bucket span for short bucket + * spans, or, for longer bucket spans, a sensible fraction of the bucket span. + * For example: 150s. When frequency is shorter than + * the bucket span, interim results for the last (partial) bucket are written + * then eventually overwritten by the full bucket results. If the datafeed uses + * aggregations, this value must be divisible by the interval of the date + * histogram aggregation. + *

* API name: {@code frequency} */ public final Builder frequency(@Nullable Time value) { @@ -495,6 +513,15 @@ public final Builder frequency(@Nullable Time value) { } /** + * The interval at which scheduled queries are made while the datafeed runs in + * real time. The default value is either the bucket span for short bucket + * spans, or, for longer bucket spans, a sensible fraction of the bucket span. + * For example: 150s. When frequency is shorter than + * the bucket span, interim results for the last (partial) bucket are written + * then eventually overwritten by the full bucket results. If the datafeed uses + * aggregations, this value must be divisible by the interval of the date + * histogram aggregation. + *

* API name: {@code frequency} */ public final Builder frequency(Function> fn) { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/DeleteNodeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/DeleteNodeRequest.java index 33686353f..5d8b23f47 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/DeleteNodeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/DeleteNodeRequest.java @@ -21,7 +21,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.elasticsearch._types.TimeUnit; +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; @@ -74,12 +74,12 @@ public class DeleteNodeRequest extends RequestBase { @Nullable - private final TimeUnit masterTimeout; + private final Time masterTimeout; private final String nodeId; @Nullable - private final TimeUnit timeout; + private final Time timeout; // --------------------------------------------------------------------------------------------- @@ -102,7 +102,7 @@ public static DeleteNodeRequest of(Function implements ObjectBuilder { @Nullable - private TimeUnit masterTimeout; + private Time masterTimeout; private String nodeId; @Nullable - private TimeUnit timeout; + private Time timeout; /** * Period to wait for a connection to the master node. If no response is @@ -149,11 +149,21 @@ public static class Builder extends RequestBase.AbstractBuilder *

* API name: {@code master_timeout} */ - public final Builder masterTimeout(@Nullable TimeUnit value) { + 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 node id of node to be removed from the shutdown state *

@@ -170,11 +180,21 @@ public final Builder nodeId(String value) { *

* API name: {@code timeout} */ - public final Builder timeout(@Nullable TimeUnit value) { + 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; @@ -246,10 +266,10 @@ public DeleteNodeRequest build() { request -> { Map params = new HashMap<>(); if (request.masterTimeout != null) { - params.put("master_timeout", request.masterTimeout.jsonValue()); + params.put("master_timeout", request.masterTimeout._toJsonString()); } if (request.timeout != null) { - params.put("timeout", request.timeout.jsonValue()); + params.put("timeout", request.timeout._toJsonString()); } return params; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/GetNodeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/GetNodeRequest.java index 12bff7d54..737548cb0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/GetNodeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/GetNodeRequest.java @@ -21,7 +21,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.elasticsearch._types.TimeUnit; +import co.elastic.clients.elasticsearch._types.Time; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.ObjectBuilderDeserializer; @@ -77,7 +77,7 @@ public class GetNodeRequest extends RequestBase { @Nullable - private final TimeUnit masterTimeout; + private final Time masterTimeout; private final List nodeId; @@ -101,7 +101,7 @@ public static GetNodeRequest of(Function> * API name: {@code master_timeout} */ @Nullable - public final TimeUnit masterTimeout() { + public final Time masterTimeout() { return this.masterTimeout; } @@ -122,7 +122,7 @@ public final List nodeId() { public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { @Nullable - private TimeUnit masterTimeout; + private Time masterTimeout; @Nullable private List nodeId; @@ -133,11 +133,21 @@ public static class Builder extends RequestBase.AbstractBuilder impleme *

* API name: {@code master_timeout} */ - public final Builder masterTimeout(@Nullable TimeUnit value) { + 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()); + } + /** * Which node for which to retrieve the shutdown status *

@@ -244,7 +254,7 @@ public GetNodeRequest build() { request -> { Map params = new HashMap<>(); if (request.masterTimeout != null) { - params.put("master_timeout", request.masterTimeout.jsonValue()); + params.put("master_timeout", request.masterTimeout._toJsonString()); } return params; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/PutNodeRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/PutNodeRequest.java index 648d57de4..fe71ff12d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/PutNodeRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/shutdown/PutNodeRequest.java @@ -21,7 +21,7 @@ import co.elastic.clients.elasticsearch._types.ErrorResponse; import co.elastic.clients.elasticsearch._types.RequestBase; -import co.elastic.clients.elasticsearch._types.TimeUnit; +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; @@ -91,7 +91,7 @@ public class PutNodeRequest extends RequestBase implements JsonpSerializable { private final String allocationDelay; @Nullable - private final TimeUnit masterTimeout; + private final Time masterTimeout; private final String nodeId; @@ -101,7 +101,7 @@ public class PutNodeRequest extends RequestBase implements JsonpSerializable { private final String targetNodeName; @Nullable - private final TimeUnit timeout; + private final Time timeout; private final Type type; @@ -145,7 +145,7 @@ public final String allocationDelay() { * API name: {@code master_timeout} */ @Nullable - public final TimeUnit masterTimeout() { + public final Time masterTimeout() { return this.masterTimeout; } @@ -192,7 +192,7 @@ public final String targetNodeName() { * API name: {@code timeout} */ @Nullable - public final TimeUnit timeout() { + public final Time timeout() { return this.timeout; } @@ -255,7 +255,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private String allocationDelay; @Nullable - private TimeUnit masterTimeout; + private Time masterTimeout; private String nodeId; @@ -265,7 +265,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme private String targetNodeName; @Nullable - private TimeUnit timeout; + private Time timeout; private Type type; @@ -290,11 +290,21 @@ public final Builder allocationDelay(@Nullable String value) { *

* API name: {@code master_timeout} */ - public final Builder masterTimeout(@Nullable TimeUnit value) { + public final Builder masterTimeout(@Nullable Time value) { this.masterTimeout = value; return this; } + /** + * The 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 node identifier. This parameter is not validated against the * cluster's active nodes. This enables you to register a node for shut down @@ -339,11 +349,21 @@ public final Builder targetNodeName(@Nullable String value) { *

* API name: {@code timeout} */ - public final Builder timeout(@Nullable TimeUnit value) { + public final Builder timeout(@Nullable Time value) { this.timeout = value; return this; } + /** + * The 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 - Valid values are restart, remove, or replace. Use restart when you * need to temporarily shut down a node to perform an upgrade, make @@ -452,10 +472,10 @@ protected static void setupPutNodeRequestDeserializer(ObjectDeserializer { Map params = new HashMap<>(); if (request.masterTimeout != null) { - params.put("master_timeout", request.masterTimeout.jsonValue()); + params.put("master_timeout", request.masterTimeout._toJsonString()); } if (request.timeout != null) { - params.put("timeout", request.timeout.jsonValue()); + params.put("timeout", request.timeout._toJsonString()); } return params; diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateResponse.java index 28537a69a..af893a98d 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/sql/TranslateResponse.java @@ -26,6 +26,7 @@ import co.elastic.clients.elasticsearch._types.query_dsl.Query; import co.elastic.clients.elasticsearch._types.query_dsl.QueryVariant; import co.elastic.clients.elasticsearch.core.search.SourceConfig; +import co.elastic.clients.elasticsearch.core.search.TrackHits; import co.elastic.clients.json.JsonpDeserializable; import co.elastic.clients.json.JsonpDeserializer; import co.elastic.clients.json.JsonpMapper; @@ -84,6 +85,9 @@ public class TranslateResponse implements JsonpSerializable { private final List sort; + @Nullable + private final TrackHits trackTotalHits; + // --------------------------------------------------------------------------------------------- private TranslateResponse(Builder builder) { @@ -94,6 +98,7 @@ private TranslateResponse(Builder builder) { this.fields = ApiTypeHelper.unmodifiable(builder.fields); this.query = builder.query; this.sort = ApiTypeHelper.unmodifiable(builder.sort); + this.trackTotalHits = builder.trackTotalHits; } @@ -146,6 +151,14 @@ public final List sort() { return this.sort; } + /** + * API name: {@code track_total_hits} + */ + @Nullable + public final TrackHits trackTotalHits() { + return this.trackTotalHits; + } + /** * Serialize this object to JSON. */ @@ -203,6 +216,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeEnd(); } + if (this.trackTotalHits != null) { + generator.writeKey("track_total_hits"); + this.trackTotalHits.serialize(generator, mapper); + + } } @@ -236,6 +254,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement @Nullable private List sort; + @Nullable + private TrackHits trackTotalHits; + /** * API name: {@code aggregations} *

@@ -379,6 +400,21 @@ public final Builder sort(Function> fn) { + return this.trackTotalHits(fn.apply(new TrackHits.Builder()).build()); + } + @Override protected Builder self() { return this; @@ -414,6 +450,7 @@ protected static void setupTranslateResponseDeserializer(ObjectDeserializer { + + public ElasticsearchStreamsAsyncClient(ElasticsearchTransport transport) { + super(transport, null); + } + + public ElasticsearchStreamsAsyncClient(ElasticsearchTransport transport, + @Nullable TransportOptions transportOptions) { + super(transport, transportOptions); + } + + @Override + public ElasticsearchStreamsAsyncClient withTransportOptions(@Nullable TransportOptions transportOptions) { + return new ElasticsearchStreamsAsyncClient(this.transport, transportOptions); + } + + // ----- Endpoint: streams.logs_disable + + /** + * Disable logs stream. + *

+ * Turn off the logs stream feature for this cluster. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture logsDisable(LogsDisableRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) LogsDisableRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Disable logs stream. + *

+ * Turn off the logs stream feature for this cluster. + * + * @param fn + * a function that initializes a builder to create the + * {@link LogsDisableRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture logsDisable( + Function> fn) { + return logsDisable(fn.apply(new LogsDisableRequest.Builder()).build()); + } + + /** + * Disable logs stream. + *

+ * Turn off the logs stream feature for this cluster. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture logsDisable() { + return this.transport.performRequestAsync(new LogsDisableRequest.Builder().build(), + LogsDisableRequest._ENDPOINT, this.transportOptions); + } + + // ----- Endpoint: streams.logs_enable + + /** + * Enable logs stream. + *

+ * Turn on the logs stream feature for this cluster. + *

+ * NOTE: To protect existing data, this feature can be turned on only if the + * cluster does not have existing indices or data streams that match the pattern + * logs|logs.*. If those indices or data streams exist, a + * 409 - Conflict response and error is returned. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture logsEnable(LogsEnableRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) LogsEnableRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Enable logs stream. + *

+ * Turn on the logs stream feature for this cluster. + *

+ * NOTE: To protect existing data, this feature can be turned on only if the + * cluster does not have existing indices or data streams that match the pattern + * logs|logs.*. If those indices or data streams exist, a + * 409 - Conflict response and error is returned. + * + * @param fn + * a function that initializes a builder to create the + * {@link LogsEnableRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture logsEnable( + Function> fn) { + return logsEnable(fn.apply(new LogsEnableRequest.Builder()).build()); + } + + /** + * Enable logs stream. + *

+ * Turn on the logs stream feature for this cluster. + *

+ * NOTE: To protect existing data, this feature can be turned on only if the + * cluster does not have existing indices or data streams that match the pattern + * logs|logs.*. If those indices or data streams exist, a + * 409 - Conflict response and error is returned. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture logsEnable() { + return this.transport.performRequestAsync(new LogsEnableRequest.Builder().build(), LogsEnableRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: streams.status + + /** + * Get the status of streams. + *

+ * Get the current status for all types of streams. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture status(StreamsStatusRequest request) { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) StreamsStatusRequest._ENDPOINT; + + return this.transport.performRequestAsync(request, endpoint, this.transportOptions); + } + + /** + * Get the status of streams. + *

+ * Get the current status for all types of streams. + * + * @param fn + * a function that initializes a builder to create the + * {@link StreamsStatusRequest} + * @see Documentation + * on elastic.co + */ + + public final CompletableFuture status( + Function> fn) { + return status(fn.apply(new StreamsStatusRequest.Builder()).build()); + } + + /** + * Get the status of streams. + *

+ * Get the current status for all types of streams. + * + * @see Documentation + * on elastic.co + */ + + public CompletableFuture status() { + return this.transport.performRequestAsync(new StreamsStatusRequest.Builder().build(), + StreamsStatusRequest._ENDPOINT, this.transportOptions); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/ElasticsearchStreamsClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/ElasticsearchStreamsClient.java new file mode 100644 index 000000000..10dee28fe --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/ElasticsearchStreamsClient.java @@ -0,0 +1,241 @@ +/* + * 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.streams; + +import co.elastic.clients.ApiClient; +import co.elastic.clients.elasticsearch._types.ElasticsearchException; +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.transport.ElasticsearchTransport; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.JsonEndpoint; +import co.elastic.clients.transport.Transport; +import co.elastic.clients.transport.TransportOptions; +import co.elastic.clients.util.ObjectBuilder; +import java.io.IOException; +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. +// +//---------------------------------------------------------------- + +/** + * Client for the streams namespace. + */ +public class ElasticsearchStreamsClient extends ApiClient { + + public ElasticsearchStreamsClient(ElasticsearchTransport transport) { + super(transport, null); + } + + public ElasticsearchStreamsClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions) { + super(transport, transportOptions); + } + + @Override + public ElasticsearchStreamsClient withTransportOptions(@Nullable TransportOptions transportOptions) { + return new ElasticsearchStreamsClient(this.transport, transportOptions); + } + + // ----- Endpoint: streams.logs_disable + + /** + * Disable logs stream. + *

+ * Turn off the logs stream feature for this cluster. + * + * @see Documentation + * on elastic.co + */ + + public LogsDisableResponse logsDisable(LogsDisableRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) LogsDisableRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Disable logs stream. + *

+ * Turn off the logs stream feature for this cluster. + * + * @param fn + * a function that initializes a builder to create the + * {@link LogsDisableRequest} + * @see Documentation + * on elastic.co + */ + + public final LogsDisableResponse logsDisable( + Function> fn) + throws IOException, ElasticsearchException { + return logsDisable(fn.apply(new LogsDisableRequest.Builder()).build()); + } + + /** + * Disable logs stream. + *

+ * Turn off the logs stream feature for this cluster. + * + * @see Documentation + * on elastic.co + */ + + public LogsDisableResponse logsDisable() throws IOException, ElasticsearchException { + return this.transport.performRequest(new LogsDisableRequest.Builder().build(), LogsDisableRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: streams.logs_enable + + /** + * Enable logs stream. + *

+ * Turn on the logs stream feature for this cluster. + *

+ * NOTE: To protect existing data, this feature can be turned on only if the + * cluster does not have existing indices or data streams that match the pattern + * logs|logs.*. If those indices or data streams exist, a + * 409 - Conflict response and error is returned. + * + * @see Documentation + * on elastic.co + */ + + public LogsEnableResponse logsEnable(LogsEnableRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) LogsEnableRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Enable logs stream. + *

+ * Turn on the logs stream feature for this cluster. + *

+ * NOTE: To protect existing data, this feature can be turned on only if the + * cluster does not have existing indices or data streams that match the pattern + * logs|logs.*. If those indices or data streams exist, a + * 409 - Conflict response and error is returned. + * + * @param fn + * a function that initializes a builder to create the + * {@link LogsEnableRequest} + * @see Documentation + * on elastic.co + */ + + public final LogsEnableResponse logsEnable(Function> fn) + throws IOException, ElasticsearchException { + return logsEnable(fn.apply(new LogsEnableRequest.Builder()).build()); + } + + /** + * Enable logs stream. + *

+ * Turn on the logs stream feature for this cluster. + *

+ * NOTE: To protect existing data, this feature can be turned on only if the + * cluster does not have existing indices or data streams that match the pattern + * logs|logs.*. If those indices or data streams exist, a + * 409 - Conflict response and error is returned. + * + * @see Documentation + * on elastic.co + */ + + public LogsEnableResponse logsEnable() throws IOException, ElasticsearchException { + return this.transport.performRequest(new LogsEnableRequest.Builder().build(), LogsEnableRequest._ENDPOINT, + this.transportOptions); + } + + // ----- Endpoint: streams.status + + /** + * Get the status of streams. + *

+ * Get the current status for all types of streams. + * + * @see Documentation + * on elastic.co + */ + + public StreamsStatusResponse status(StreamsStatusRequest request) throws IOException, ElasticsearchException { + @SuppressWarnings("unchecked") + JsonEndpoint endpoint = (JsonEndpoint) StreamsStatusRequest._ENDPOINT; + + return this.transport.performRequest(request, endpoint, this.transportOptions); + } + + /** + * Get the status of streams. + *

+ * Get the current status for all types of streams. + * + * @param fn + * a function that initializes a builder to create the + * {@link StreamsStatusRequest} + * @see Documentation + * on elastic.co + */ + + public final StreamsStatusResponse status( + Function> fn) + throws IOException, ElasticsearchException { + return status(fn.apply(new StreamsStatusRequest.Builder()).build()); + } + + /** + * Get the status of streams. + *

+ * Get the current status for all types of streams. + * + * @see Documentation + * on elastic.co + */ + + public StreamsStatusResponse status() throws IOException, ElasticsearchException { + return this.transport.performRequest(new StreamsStatusRequest.Builder().build(), StreamsStatusRequest._ENDPOINT, + this.transportOptions); + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/LogsDisableRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/LogsDisableRequest.java new file mode 100644 index 000000000..c361eb4ed --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/LogsDisableRequest.java @@ -0,0 +1,220 @@ +/* + * 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.streams; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.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. +//---------------------------------------------------------------- +// +// 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: streams.logs_disable.Request + +/** + * Disable logs stream. + *

+ * Turn off the logs stream feature for this cluster. + * + * @see API + * specification + */ + +public class LogsDisableRequest extends RequestBase { + @Nullable + private final Time masterTimeout; + + @Nullable + private final Time timeout; + + // --------------------------------------------------------------------------------------------- + + private LogsDisableRequest(Builder builder) { + + this.masterTimeout = builder.masterTimeout; + this.timeout = builder.timeout; + + } + + public static LogsDisableRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * The 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; + } + + /** + * The 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; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link LogsDisableRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private Time masterTimeout; + + @Nullable + private Time timeout; + + /** + * The 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; + } + + /** + * The 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()); + } + + /** + * The 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; + } + + /** + * The 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; + } + + /** + * Builds a {@link LogsDisableRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public LogsDisableRequest build() { + _checkSingleUse(); + + return new LogsDisableRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code streams.logs_disable}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/streams.logs_disable", + + // Request method + request -> { + return "POST"; + + }, + + // Request path + request -> { + return "/_streams/logs/_disable"; + + }, + + // Path parameters + request -> { + return Collections.emptyMap(); + }, + + // Request parameters + request -> { + 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, LogsDisableResponse._DESERIALIZER); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/LogsDisableResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/LogsDisableResponse.java new file mode 100644 index 000000000..4b49a88ea --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/LogsDisableResponse.java @@ -0,0 +1,107 @@ +/* + * 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.streams; + +import co.elastic.clients.elasticsearch._types.AcknowledgedResponseBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: streams.logs_disable.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class LogsDisableResponse extends AcknowledgedResponseBase { + // --------------------------------------------------------------------------------------------- + + private LogsDisableResponse(Builder builder) { + super(builder); + + } + + public static LogsDisableResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link LogsDisableResponse}. + */ + + public static class Builder extends AcknowledgedResponseBase.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link LogsDisableResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public LogsDisableResponse build() { + _checkSingleUse(); + + return new LogsDisableResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link LogsDisableResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, LogsDisableResponse::setupLogsDisableResponseDeserializer); + + protected static void setupLogsDisableResponseDeserializer(ObjectDeserializer op) { + AcknowledgedResponseBase.setupAcknowledgedResponseBaseDeserializer(op); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/LogsEnableRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/LogsEnableRequest.java new file mode 100644 index 000000000..5d5dee7d9 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/LogsEnableRequest.java @@ -0,0 +1,225 @@ +/* + * 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.streams; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.Time; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.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. +//---------------------------------------------------------------- +// +// 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: streams.logs_enable.Request + +/** + * Enable logs stream. + *

+ * Turn on the logs stream feature for this cluster. + *

+ * NOTE: To protect existing data, this feature can be turned on only if the + * cluster does not have existing indices or data streams that match the pattern + * logs|logs.*. If those indices or data streams exist, a + * 409 - Conflict response and error is returned. + * + * @see API + * specification + */ + +public class LogsEnableRequest extends RequestBase { + @Nullable + private final Time masterTimeout; + + @Nullable + private final Time timeout; + + // --------------------------------------------------------------------------------------------- + + private LogsEnableRequest(Builder builder) { + + this.masterTimeout = builder.masterTimeout; + this.timeout = builder.timeout; + + } + + public static LogsEnableRequest of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * The 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; + } + + /** + * The 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; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link LogsEnableRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private Time masterTimeout; + + @Nullable + private Time timeout; + + /** + * The 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; + } + + /** + * The 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()); + } + + /** + * The 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; + } + + /** + * The 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; + } + + /** + * Builds a {@link LogsEnableRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public LogsEnableRequest build() { + _checkSingleUse(); + + return new LogsEnableRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code streams.logs_enable}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/streams.logs_enable", + + // Request method + request -> { + return "POST"; + + }, + + // Request path + request -> { + return "/_streams/logs/_enable"; + + }, + + // Path parameters + request -> { + return Collections.emptyMap(); + }, + + // Request parameters + request -> { + 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, LogsEnableResponse._DESERIALIZER); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/LogsEnableResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/LogsEnableResponse.java new file mode 100644 index 000000000..1e041965a --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/LogsEnableResponse.java @@ -0,0 +1,107 @@ +/* + * 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.streams; + +import co.elastic.clients.elasticsearch._types.AcknowledgedResponseBase; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: streams.logs_enable.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class LogsEnableResponse extends AcknowledgedResponseBase { + // --------------------------------------------------------------------------------------------- + + private LogsEnableResponse(Builder builder) { + super(builder); + + } + + public static LogsEnableResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link LogsEnableResponse}. + */ + + public static class Builder extends AcknowledgedResponseBase.AbstractBuilder + implements + ObjectBuilder { + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link LogsEnableResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public LogsEnableResponse build() { + _checkSingleUse(); + + return new LogsEnableResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link LogsEnableResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, LogsEnableResponse::setupLogsEnableResponseDeserializer); + + protected static void setupLogsEnableResponseDeserializer(ObjectDeserializer op) { + AcknowledgedResponseBase.setupAcknowledgedResponseBaseDeserializer(op); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/StreamsStatusRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/StreamsStatusRequest.java new file mode 100644 index 000000000..44120062b --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/StreamsStatusRequest.java @@ -0,0 +1,168 @@ +/* + * 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.streams; + +import co.elastic.clients.elasticsearch._types.ErrorResponse; +import co.elastic.clients.elasticsearch._types.RequestBase; +import co.elastic.clients.elasticsearch._types.TimeUnit; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.transport.Endpoint; +import co.elastic.clients.transport.endpoints.SimpleEndpoint; +import co.elastic.clients.util.ObjectBuilder; +import jakarta.json.stream.JsonGenerator; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: streams.status.Request + +/** + * Get the status of streams. + *

+ * Get the current status for all types of streams. + * + * @see API + * specification + */ + +public class StreamsStatusRequest extends RequestBase { + @Nullable + private final TimeUnit masterTimeout; + + // --------------------------------------------------------------------------------------------- + + private StreamsStatusRequest(Builder builder) { + + this.masterTimeout = builder.masterTimeout; + + } + + public static StreamsStatusRequest 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 TimeUnit masterTimeout() { + return this.masterTimeout; + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link StreamsStatusRequest}. + */ + + public static class Builder extends RequestBase.AbstractBuilder + implements + ObjectBuilder { + @Nullable + private TimeUnit 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 TimeUnit value) { + this.masterTimeout = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link StreamsStatusRequest}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public StreamsStatusRequest build() { + _checkSingleUse(); + + return new StreamsStatusRequest(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Endpoint "{@code streams.status}". + */ + public static final Endpoint _ENDPOINT = new SimpleEndpoint<>( + "es/streams.status", + + // Request method + request -> { + return "GET"; + + }, + + // Request path + request -> { + return "/_streams/status"; + + }, + + // Path parameters + request -> { + return Collections.emptyMap(); + }, + + // Request parameters + request -> { + Map params = new HashMap<>(); + if (request.masterTimeout != null) { + params.put("master_timeout", request.masterTimeout.jsonValue()); + } + return params; + + }, SimpleEndpoint.emptyMap(), false, StreamsStatusResponse._DESERIALIZER); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/StreamsStatusResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/StreamsStatusResponse.java new file mode 100644 index 000000000..d5e7ba409 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/StreamsStatusResponse.java @@ -0,0 +1,162 @@ +/* + * 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.streams; + +import co.elastic.clients.elasticsearch.streams.status.LogsStatus; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.util.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: streams.status.Response + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class StreamsStatusResponse implements JsonpSerializable { + private final LogsStatus logs; + + // --------------------------------------------------------------------------------------------- + + private StreamsStatusResponse(Builder builder) { + + this.logs = ApiTypeHelper.requireNonNull(builder.logs, this, "logs"); + + } + + public static StreamsStatusResponse of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - API name: {@code logs} + */ + public final LogsStatus logs() { + return this.logs; + } + + /** + * 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("logs"); + this.logs.serialize(generator, mapper); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link StreamsStatusResponse}. + */ + + public static class Builder extends WithJsonObjectBuilderBase + implements + ObjectBuilder { + private LogsStatus logs; + + /** + * Required - API name: {@code logs} + */ + public final Builder logs(LogsStatus value) { + this.logs = value; + return this; + } + + /** + * Required - API name: {@code logs} + */ + public final Builder logs(Function> fn) { + return this.logs(fn.apply(new LogsStatus.Builder()).build()); + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link StreamsStatusResponse}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public StreamsStatusResponse build() { + _checkSingleUse(); + + return new StreamsStatusResponse(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link StreamsStatusResponse} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer + .lazy(Builder::new, StreamsStatusResponse::setupStreamsStatusResponseDeserializer); + + protected static void setupStreamsStatusResponseDeserializer(ObjectDeserializer op) { + + op.add(Builder::logs, LogsStatus._DESERIALIZER, "logs"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/status/LogsStatus.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/status/LogsStatus.java new file mode 100644 index 000000000..3ff19579c --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/streams/status/LogsStatus.java @@ -0,0 +1,156 @@ +/* + * 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.streams.status; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.JsonpSerializable; +import co.elastic.clients.json.JsonpUtils; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.Boolean; +import java.util.Objects; +import java.util.function.Function; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: streams.status.LogsStatus + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public class LogsStatus implements JsonpSerializable { + private final boolean enabled; + + // --------------------------------------------------------------------------------------------- + + private LogsStatus(Builder builder) { + + this.enabled = ApiTypeHelper.requireNonNull(builder.enabled, this, "enabled", false); + + } + + public static LogsStatus of(Function> fn) { + return fn.apply(new Builder()).build(); + } + + /** + * Required - If true, the logs stream feature is enabled. + *

+ * API name: {@code enabled} + */ + public final boolean enabled() { + return this.enabled; + } + + /** + * 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("enabled"); + generator.write(this.enabled); + + } + + @Override + public String toString() { + return JsonpUtils.toString(this); + } + + // --------------------------------------------------------------------------------------------- + + /** + * Builder for {@link LogsStatus}. + */ + + public static class Builder extends WithJsonObjectBuilderBase implements ObjectBuilder { + private Boolean enabled; + + /** + * Required - If true, the logs stream feature is enabled. + *

+ * API name: {@code enabled} + */ + public final Builder enabled(boolean value) { + this.enabled = value; + return this; + } + + @Override + protected Builder self() { + return this; + } + + /** + * Builds a {@link LogsStatus}. + * + * @throws NullPointerException + * if some of the required fields are null. + */ + public LogsStatus build() { + _checkSingleUse(); + + return new LogsStatus(this); + } + } + + // --------------------------------------------------------------------------------------------- + + /** + * Json deserializer for {@link LogsStatus} + */ + public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new, + LogsStatus::setupLogsStatusDeserializer); + + protected static void setupLogsStatusDeserializer(ObjectDeserializer op) { + + op.add(Builder::enabled, JsonpDeserializer.booleanDeserializer(), "enabled"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/json/jackson/JacksonJsonBuffer.java b/java-client/src/main/java/co/elastic/clients/json/jackson/JacksonJsonBuffer.java index c6656937e..333040c5e 100644 --- a/java-client/src/main/java/co/elastic/clients/json/jackson/JacksonJsonBuffer.java +++ b/java-client/src/main/java/co/elastic/clients/json/jackson/JacksonJsonBuffer.java @@ -30,6 +30,7 @@ import jakarta.json.stream.JsonParser; import java.io.IOException; +import java.io.StringWriter; import java.lang.reflect.Type; class JacksonJsonBuffer implements JsonBuffer, JsonData { @@ -99,4 +100,19 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) { } } } + + /** + * Renders this buffer as a JSON string for debugger and logging convenience. + */ + @Override + public String toString() { + StringWriter writer = new StringWriter(); + try (JacksonJsonpGenerator generator = new JacksonJsonpGenerator(mapper.objectMapper().createGenerator(writer))) { + serialize(generator, mapper); + generator.close(); + return writer.toString(); + } catch (IOException e) { + return String.format("JacksonJsonBuffer: error rendering JSON: %s", e.getMessage()); + } + } } diff --git a/java-client/src/test/java/co/elastic/clients/json/jackson/JacksonJsonBufferTest.java b/java-client/src/test/java/co/elastic/clients/json/jackson/JacksonJsonBufferTest.java new file mode 100644 index 000000000..6014db7ac --- /dev/null +++ b/java-client/src/test/java/co/elastic/clients/json/jackson/JacksonJsonBufferTest.java @@ -0,0 +1,71 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package co.elastic.clients.json.jackson; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.util.TokenBuffer; +import org.apache.commons.lang3.StringUtils; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class JacksonJsonBufferTest { + + private JacksonJsonpMapper mapper() { + return new JacksonJsonpMapper(new ObjectMapper()); + } + + @Test + public void testToString_rendersJson() throws Exception { + ObjectMapper om = new ObjectMapper(); + TokenBuffer buffer = new TokenBuffer(om, false); + buffer.writeStartObject(); + buffer.writeStringField("foo", "bar"); + buffer.writeNumberField("baz", 42); + buffer.writeEndObject(); + + JacksonJsonBuffer jsonBuffer = new JacksonJsonBuffer(buffer, mapper()); + String json = jsonBuffer.toString(); + assertTrue(json.contains("\"foo\":\"bar\"")); + assertTrue(json.contains("\"baz\":42")); + assertTrue(json.startsWith("{") && json.endsWith("}")); + } + + @Test + public void testToString_emptyBuffer() throws Exception { + ObjectMapper om = new ObjectMapper(); + TokenBuffer buffer = new TokenBuffer(om, false); + JacksonJsonBuffer jsonBuffer = new JacksonJsonBuffer(buffer, mapper()); + String json = jsonBuffer.toString(); + assertEquals(StringUtils.EMPTY, json.trim()); + } + + @Test + public void testToString_invalidBuffer() throws Exception { + ObjectMapper om = new ObjectMapper(); + TokenBuffer buffer = new TokenBuffer(om, false); + // Write some invalid JSON (start object but don't close) + buffer.writeStartObject(); + JacksonJsonBuffer jsonBuffer = new JacksonJsonBuffer(buffer, mapper()); + String json = jsonBuffer.toString(); + // Should not throw, but may contain error or partial output + assertTrue(json.startsWith("{")); + } +}