Skip to content

Commit 9e41251

Browse files
committed
[codegen] update to latest spec
1 parent b2e51db commit 9e41251

20 files changed

+2831
-139
lines changed

java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3284,7 +3284,9 @@ public final <TDocument> CompletableFuture<IndexResponse> index(
32843284
// ----- Endpoint: info
32853285

32863286
/**
3287-
* Get cluster info. Get basic build, version, and cluster information.
3287+
* Get cluster info. Get basic build, version, and cluster information. ::: In
3288+
* Serverless, this API is retained for backward compatibility only. Some
3289+
* response fields, such as the version number, should be ignored.
32883290
*
32893291
* @see <a href=
32903292
* "https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info">Documentation

java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3304,7 +3304,9 @@ public final <TDocument> IndexResponse index(
33043304
// ----- Endpoint: info
33053305

33063306
/**
3307-
* Get cluster info. Get basic build, version, and cluster information.
3307+
* Get cluster info. Get basic build, version, and cluster information. ::: In
3308+
* Serverless, this API is retained for backward compatibility only. Some
3309+
* response fields, such as the version number, should be ignored.
33083310
*
33093311
* @see <a href=
33103312
* "https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info">Documentation

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/ElasticsearchVersionInfo.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ public final String minimumWireCompatibilityVersion() {
181181
/**
182182
* Required - The Elasticsearch version number.
183183
* <p>
184+
* ::: IMPORTANT: For Serverless deployments, this static value is always
185+
* <code>8.11.0</code> and is used solely for backward compatibility with legacy
186+
* clients. Serverless environments are versionless and automatically upgraded,
187+
* so this value can be safely ignored.
188+
* <p>
184189
* API name: {@code number}
185190
*/
186191
public final String number() {
@@ -346,6 +351,11 @@ public final Builder minimumWireCompatibilityVersion(String value) {
346351
/**
347352
* Required - The Elasticsearch version number.
348353
* <p>
354+
* ::: IMPORTANT: For Serverless deployments, this static value is always
355+
* <code>8.11.0</code> and is used solely for backward compatibility with legacy
356+
* clients. Serverless environments are versionless and automatically upgraded,
357+
* so this value can be safely ignored.
358+
* <p>
349359
* API name: {@code number}
350360
*/
351361
public final Builder number(String value) {

java-client/src/main/java/co/elastic/clients/elasticsearch/_types/aggregations/FiltersBucket.java

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@
2121

2222
import co.elastic.clients.json.JsonpDeserializable;
2323
import co.elastic.clients.json.JsonpDeserializer;
24+
import co.elastic.clients.json.JsonpMapper;
2425
import co.elastic.clients.json.ObjectBuilderDeserializer;
2526
import co.elastic.clients.json.ObjectDeserializer;
2627
import co.elastic.clients.util.ObjectBuilder;
2728
import jakarta.json.stream.JsonGenerator;
29+
import java.lang.String;
2830
import java.util.Objects;
2931
import java.util.function.Function;
32+
import javax.annotation.Nullable;
3033

3134
//----------------------------------------------------------------
3235
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
@@ -53,17 +56,41 @@
5356
*/
5457
@JsonpDeserializable
5558
public class FiltersBucket extends MultiBucketBase {
59+
@Nullable
60+
private final String key;
61+
5662
// ---------------------------------------------------------------------------------------------
5763

5864
private FiltersBucket(Builder builder) {
5965
super(builder);
6066

67+
this.key = builder.key;
68+
6169
}
6270

6371
public static FiltersBucket of(Function<Builder, ObjectBuilder<FiltersBucket>> fn) {
6472
return fn.apply(new Builder()).build();
6573
}
6674

75+
/**
76+
* API name: {@code key}
77+
*/
78+
@Nullable
79+
public final String key() {
80+
return this.key;
81+
}
82+
83+
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
84+
85+
super.serializeInternal(generator, mapper);
86+
if (this.key != null) {
87+
generator.writeKey("key");
88+
generator.write(this.key);
89+
90+
}
91+
92+
}
93+
6794
// ---------------------------------------------------------------------------------------------
6895

6996
/**
@@ -73,6 +100,17 @@ public static FiltersBucket of(Function<Builder, ObjectBuilder<FiltersBucket>> f
73100
public static class Builder extends MultiBucketBase.AbstractBuilder<Builder>
74101
implements
75102
ObjectBuilder<FiltersBucket> {
103+
@Nullable
104+
private String key;
105+
106+
/**
107+
* API name: {@code key}
108+
*/
109+
public final Builder key(@Nullable String value) {
110+
this.key = value;
111+
return this;
112+
}
113+
76114
@Override
77115
protected Builder self() {
78116
return this;
@@ -101,6 +139,7 @@ public FiltersBucket build() {
101139

102140
protected static void setupFiltersBucketDeserializer(ObjectDeserializer<FiltersBucket.Builder> op) {
103141
MultiBucketBase.setupMultiBucketBaseDeserializer(op);
142+
op.add(Builder::key, JsonpDeserializer.stringDeserializer(), "key");
104143

105144
}
106145

java-client/src/main/java/co/elastic/clients/elasticsearch/core/InfoRequest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@
5050
// typedef: _global.info.Request
5151

5252
/**
53-
* Get cluster info. Get basic build, version, and cluster information.
53+
* Get cluster info. Get basic build, version, and cluster information. ::: In
54+
* Serverless, this API is retained for backward compatibility only. Some
55+
* response fields, such as the version number, should be ignored.
5456
*
5557
* @see <a href="../doc-files/api-spec.html#_global.info.Request">API
5658
* specification</a>

0 commit comments

Comments
 (0)