Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion java-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ signing {
dependencies {
// Compile and test with the last 7.x version to make sure transition scenarios where
// the Java API client coexists with a 7.x HLRC work fine
val elasticsearchVersion = "8.19.0"
val elasticsearchVersion = "8.19.18"
val jacksonVersion = "2.17.0"
val openTelemetryVersion = "1.29.0"
val jackson3Version = "3.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;

}

Expand All @@ -77,16 +79,18 @@ public static TextIndexPrefixes of(Function<Builder, ObjectBuilder<TextIndexPref
}

/**
* Required - API name: {@code max_chars}
* API name: {@code max_chars}
*/
public final int maxChars() {
@Nullable
public final Integer maxChars() {
return this.maxChars;
}

/**
* Required - API name: {@code min_chars}
* API name: {@code min_chars}
*/
public final int minChars() {
@Nullable
public final Integer minChars() {
return this.minChars;
}

Expand All @@ -101,11 +105,16 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {

protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {

generator.writeKey("max_chars");
generator.write(this.maxChars);
if (this.maxChars != null) {
generator.writeKey("max_chars");
generator.write(this.maxChars);

generator.writeKey("min_chars");
generator.write(this.minChars);
}
if (this.minChars != null) {
generator.writeKey("min_chars");
generator.write(this.minChars);

}

}

Expand All @@ -121,8 +130,10 @@ public String toString() {
*/

public static class Builder extends WithJsonObjectBuilderBase<Builder> implements ObjectBuilder<TextIndexPrefixes> {
@Nullable
private Integer maxChars;

@Nullable
private Integer minChars;

public Builder() {
Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,20 +186,23 @@ public SourceConfig build() {
public static final JsonpDeserializer<SourceConfig> _DESERIALIZER = JsonpDeserializer
.lazy(() -> JsonpDeserializer.of(EnumSet.of(JsonParser.Event.START_OBJECT, JsonParser.Event.START_ARRAY,
JsonParser.Event.VALUE_TRUE, JsonParser.Event.VALUE_FALSE), (parser, mapper, event) -> {
return switch (event) {
case VALUE_TRUE -> SourceConfig.of(b -> b.fetch(true));
case VALUE_FALSE -> SourceConfig.of(b -> b.fetch(false));
case START_ARRAY -> {
List<String> includes = JsonpDeserializer
.arrayDeserializer(JsonpDeserializer.stringDeserializer())
.deserialize(parser, mapper, event);
yield SourceConfig.of(b -> b.filter(f -> f.includes(includes)));
}
case START_OBJECT -> {
SourceFilter filter = SourceFilter._DESERIALIZER.deserialize(parser, mapper, event);
yield SourceConfig.of(b -> b.filter(filter));
}
default -> null;
};
}));
switch (event) {
case VALUE_TRUE :
return SourceConfig.of(b -> b.fetch(true));
case VALUE_FALSE :
return SourceConfig.of(b -> b.fetch(false));
case START_ARRAY : {
List<String> includes = JsonpDeserializer
.arrayDeserializer(JsonpDeserializer.stringDeserializer())
.deserialize(parser, mapper, event);
return SourceConfig.of(b -> b.filter(f -> f.includes(includes)));
}
case START_OBJECT : {
SourceFilter filter = SourceFilter._DESERIALIZER.deserialize(parser, mapper, event);
return SourceConfig.of(b -> b.filter(filter));
}
default :
return null;
}
}));
}
Original file line number Diff line number Diff line change
Expand Up @@ -3381,10 +3381,10 @@
if (hash.length > 1) {
hash = hash.substring(1);
}
window.location = "https://github.com/elastic/elasticsearch-specification/tree/7519af4b0af73ca3853a06b148d0951e21e0ca37/specification/" + (paths[hash] || "");
window.location = "https://github.com/elastic/elasticsearch-specification/tree/2c64e145d46f8357f9333ce632b7d7a894e05865/specification/" + (paths[hash] || "");
</script>
</head>
<body>
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/7519af4b0af73ca3853a06b148d0951e21e0ca37/specification/">Elasticsearch API specification</a>.
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/2c64e145d46f8357f9333ce632b7d7a894e05865/specification/">Elasticsearch API specification</a>.
</body>
</html>
Loading