From 38afc9687782a0545117ef4a82ee68baa1d6e7cb Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Tue, 30 Jun 2026 13:30:32 +0000 Subject: [PATCH] [codegen] update to latest spec --- .../_types/mapping/TextIndexPrefixes.java | 45 ++++++++++++------- .../elasticsearch/doc-files/api-spec.html | 4 +- 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TextIndexPrefixes.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TextIndexPrefixes.java index 1802423738..7dc1a8c21b 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TextIndexPrefixes.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/TextIndexPrefixes.java @@ -26,13 +26,13 @@ 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.Integer; import java.util.Objects; import java.util.function.Function; +import javax.annotation.Nullable; //---------------------------------------------------------------- // THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. @@ -59,16 +59,18 @@ */ @JsonpDeserializable public class TextIndexPrefixes implements JsonpSerializable { - private final int maxChars; + @Nullable + private final Integer maxChars; - private final int minChars; + @Nullable + private final Integer minChars; // --------------------------------------------------------------------------------------------- private TextIndexPrefixes(Builder builder) { - this.maxChars = ApiTypeHelper.requireNonNull(builder.maxChars, this, "maxChars", 0); - this.minChars = ApiTypeHelper.requireNonNull(builder.minChars, this, "minChars", 0); + this.maxChars = builder.maxChars; + this.minChars = builder.minChars; } @@ -77,16 +79,18 @@ public static TextIndexPrefixes of(Function implements ObjectBuilder { + @Nullable private Integer maxChars; + @Nullable private Integer minChars; public Builder() { @@ -133,17 +144,17 @@ private Builder(TextIndexPrefixes instance) { } /** - * Required - API name: {@code max_chars} + * API name: {@code max_chars} */ - public final Builder maxChars(int value) { + public final Builder maxChars(@Nullable Integer value) { this.maxChars = value; return this; } /** - * Required - API name: {@code min_chars} + * API name: {@code min_chars} */ - public final Builder minChars(int value) { + public final Builder minChars(@Nullable Integer value) { this.minChars = value; return this; } 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 10732cac5d..628ea040d3 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 @@ -3509,10 +3509,10 @@ if (hash.length > 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/31789f4216047ef7ba7969e31610fa2bbfe696b1/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/b5550652a718400bf19023a2a2a3166fec5c1802/specification/" + (paths[hash] || ""); - Please see the Elasticsearch API specification. + Please see the Elasticsearch API specification.