Skip to content

Commit 560b32d

Browse files
committed
[codegen] update to latest spec
1 parent cbe8cbb commit 560b32d

File tree

79 files changed

+8248
-250
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+8248
-250
lines changed

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

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ public ElasticsearchXpackAsyncClient xpack() {
475475
* <li>JavaScript: Check out <code>client.helpers.*</code></li>
476476
* <li>.NET: Check out <code>BulkAllObservable</code></li>
477477
* <li>PHP: Check out bulk indexing.</li>
478+
* <li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
478479
* </ul>
479480
* <p>
480481
* <strong>Submitting bulk requests with cURL</strong>
@@ -653,6 +654,7 @@ public CompletableFuture<BulkResponse> bulk(BulkRequest request) {
653654
* <li>JavaScript: Check out <code>client.helpers.*</code></li>
654655
* <li>.NET: Check out <code>BulkAllObservable</code></li>
655656
* <li>PHP: Check out bulk indexing.</li>
657+
* <li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
656658
* </ul>
657659
* <p>
658660
* <strong>Submitting bulk requests with cURL</strong>
@@ -831,6 +833,7 @@ public final CompletableFuture<BulkResponse> bulk(Function<BulkRequest.Builder,
831833
* <li>JavaScript: Check out <code>client.helpers.*</code></li>
832834
* <li>.NET: Check out <code>BulkAllObservable</code></li>
833835
* <li>PHP: Check out bulk indexing.</li>
836+
* <li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
834837
* </ul>
835838
* <p>
836839
* <strong>Submitting bulk requests with cURL</strong>
@@ -3284,7 +3287,9 @@ public final <TDocument> CompletableFuture<IndexResponse> index(
32843287
// ----- Endpoint: info
32853288

32863289
/**
3287-
* Get cluster info. Get basic build, version, and cluster information.
3290+
* Get cluster info. Get basic build, version, and cluster information. ::: In
3291+
* Serverless, this API is retained for backward compatibility only. Some
3292+
* response fields, such as the version number, should be ignored.
32883293
*
32893294
* @see <a href=
32903295
* "https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info">Documentation
@@ -4184,6 +4189,20 @@ public final CompletableFuture<RankEvalResponse> rankEval(
41844189
* until it has successfully indexed <code>max_docs</code> documents into the
41854190
* target or it has gone through every document in the source query.
41864191
* <p>
4192+
* It's recommended to reindex on indices with a green status. Reindexing can
4193+
* fail when a node shuts down or crashes.
4194+
* <ul>
4195+
* <li>When requested with <code>wait_for_completion=true</code> (default), the
4196+
* request fails if the node shuts down.</li>
4197+
* <li>When requested with <code>wait_for_completion=false</code>, a task id is
4198+
* returned, which can be used via the task management API to monitor, debug, or
4199+
* cancel the task. The task may disappear or fail if the node shuts down. When
4200+
* retrying a failed reindex operation, it might be necessary to set
4201+
* <code>conflicts=proceed</code> or to first delete the partial destination
4202+
* index. Additionally, dry runs, checking disk space, and fetching index
4203+
* recovery information can help address the root cause.</li>
4204+
* </ul>
4205+
* <p>
41874206
* Refer to the linked documentation for examples of how to reindex documents.
41884207
*
41894208
* @see <a href=
@@ -4263,6 +4282,20 @@ public CompletableFuture<ReindexResponse> reindex(ReindexRequest request) {
42634282
* until it has successfully indexed <code>max_docs</code> documents into the
42644283
* target or it has gone through every document in the source query.
42654284
* <p>
4285+
* It's recommended to reindex on indices with a green status. Reindexing can
4286+
* fail when a node shuts down or crashes.
4287+
* <ul>
4288+
* <li>When requested with <code>wait_for_completion=true</code> (default), the
4289+
* request fails if the node shuts down.</li>
4290+
* <li>When requested with <code>wait_for_completion=false</code>, a task id is
4291+
* returned, which can be used via the task management API to monitor, debug, or
4292+
* cancel the task. The task may disappear or fail if the node shuts down. When
4293+
* retrying a failed reindex operation, it might be necessary to set
4294+
* <code>conflicts=proceed</code> or to first delete the partial destination
4295+
* index. Additionally, dry runs, checking disk space, and fetching index
4296+
* recovery information can help address the root cause.</li>
4297+
* </ul>
4298+
* <p>
42664299
* Refer to the linked documentation for examples of how to reindex documents.
42674300
*
42684301
* @param fn

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

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ public ElasticsearchXpackClient xpack() {
475475
* <li>JavaScript: Check out <code>client.helpers.*</code></li>
476476
* <li>.NET: Check out <code>BulkAllObservable</code></li>
477477
* <li>PHP: Check out bulk indexing.</li>
478+
* <li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
478479
* </ul>
479480
* <p>
480481
* <strong>Submitting bulk requests with cURL</strong>
@@ -653,6 +654,7 @@ public BulkResponse bulk(BulkRequest request) throws IOException, ElasticsearchE
653654
* <li>JavaScript: Check out <code>client.helpers.*</code></li>
654655
* <li>.NET: Check out <code>BulkAllObservable</code></li>
655656
* <li>PHP: Check out bulk indexing.</li>
657+
* <li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
656658
* </ul>
657659
* <p>
658660
* <strong>Submitting bulk requests with cURL</strong>
@@ -832,6 +834,7 @@ public final BulkResponse bulk(Function<BulkRequest.Builder, ObjectBuilder<BulkR
832834
* <li>JavaScript: Check out <code>client.helpers.*</code></li>
833835
* <li>.NET: Check out <code>BulkAllObservable</code></li>
834836
* <li>PHP: Check out bulk indexing.</li>
837+
* <li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
835838
* </ul>
836839
* <p>
837840
* <strong>Submitting bulk requests with cURL</strong>
@@ -3304,7 +3307,9 @@ public final <TDocument> IndexResponse index(
33043307
// ----- Endpoint: info
33053308

33063309
/**
3307-
* Get cluster info. Get basic build, version, and cluster information.
3310+
* Get cluster info. Get basic build, version, and cluster information. ::: In
3311+
* Serverless, this API is retained for backward compatibility only. Some
3312+
* response fields, such as the version number, should be ignored.
33083313
*
33093314
* @see <a href=
33103315
* "https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info">Documentation
@@ -4213,6 +4218,20 @@ public final RankEvalResponse rankEval(Function<RankEvalRequest.Builder, ObjectB
42134218
* until it has successfully indexed <code>max_docs</code> documents into the
42144219
* target or it has gone through every document in the source query.
42154220
* <p>
4221+
* It's recommended to reindex on indices with a green status. Reindexing can
4222+
* fail when a node shuts down or crashes.
4223+
* <ul>
4224+
* <li>When requested with <code>wait_for_completion=true</code> (default), the
4225+
* request fails if the node shuts down.</li>
4226+
* <li>When requested with <code>wait_for_completion=false</code>, a task id is
4227+
* returned, which can be used via the task management API to monitor, debug, or
4228+
* cancel the task. The task may disappear or fail if the node shuts down. When
4229+
* retrying a failed reindex operation, it might be necessary to set
4230+
* <code>conflicts=proceed</code> or to first delete the partial destination
4231+
* index. Additionally, dry runs, checking disk space, and fetching index
4232+
* recovery information can help address the root cause.</li>
4233+
* </ul>
4234+
* <p>
42164235
* Refer to the linked documentation for examples of how to reindex documents.
42174236
*
42184237
* @see <a href=
@@ -4292,6 +4311,20 @@ public ReindexResponse reindex(ReindexRequest request) throws IOException, Elast
42924311
* until it has successfully indexed <code>max_docs</code> documents into the
42934312
* target or it has gone through every document in the source query.
42944313
* <p>
4314+
* It's recommended to reindex on indices with a green status. Reindexing can
4315+
* fail when a node shuts down or crashes.
4316+
* <ul>
4317+
* <li>When requested with <code>wait_for_completion=true</code> (default), the
4318+
* request fails if the node shuts down.</li>
4319+
* <li>When requested with <code>wait_for_completion=false</code>, a task id is
4320+
* returned, which can be used via the task management API to monitor, debug, or
4321+
* cancel the task. The task may disappear or fail if the node shuts down. When
4322+
* retrying a failed reindex operation, it might be necessary to set
4323+
* <code>conflicts=proceed</code> or to first delete the partial destination
4324+
* index. Additionally, dry runs, checking disk space, and fetching index
4325+
* recovery information can help address the root cause.</li>
4326+
* </ul>
4327+
* <p>
42954328
* Refer to the linked documentation for examples of how to reindex documents.
42964329
*
42974330
* @param fn

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/DateHistogramAggregation.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,7 @@ public final Builder order(List<NamedValue<SortOrder>> list) {
656656
* <p>
657657
* Adds one or more values to <code>order</code>.
658658
*/
659+
@SafeVarargs
659660
public final Builder order(NamedValue<SortOrder> value, NamedValue<SortOrder>... values) {
660661
this.order = _listAdd(this.order, value, values);
661662
return this;

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/_types/aggregations/HistogramAggregation.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ public final Builder order(List<NamedValue<SortOrder>> list) {
500500
* <p>
501501
* Adds one or more values to <code>order</code>.
502502
*/
503+
@SafeVarargs
503504
public final Builder order(NamedValue<SortOrder> value, NamedValue<SortOrder>... values) {
504505
this.order = _listAdd(this.order, value, values);
505506
return this;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ public final Builder order(List<NamedValue<SortOrder>> list) {
329329
* <p>
330330
* Adds one or more values to <code>order</code>.
331331
*/
332+
@SafeVarargs
332333
public final Builder order(NamedValue<SortOrder> value, NamedValue<SortOrder>... values) {
333334
this.order = _listAdd(this.order, value, values);
334335
return this;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ public final Builder order(List<NamedValue<SortOrder>> list) {
713713
* <p>
714714
* Adds one or more values to <code>order</code>.
715715
*/
716+
@SafeVarargs
716717
public final Builder order(NamedValue<SortOrder> value, NamedValue<SortOrder>... values) {
717718
this.order = _listAdd(this.order, value, values);
718719
return this;

0 commit comments

Comments
 (0)