Skip to content

Commit d6a33d3

Browse files
committed
[codegen] Update to latest API spec
1 parent bac7a0e commit d6a33d3

Some content is hidden

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

45 files changed

+6107
-323
lines changed

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

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@
6464
import co.elastic.clients.elasticsearch.core.GetScriptResponse;
6565
import co.elastic.clients.elasticsearch.core.GetSourceRequest;
6666
import co.elastic.clients.elasticsearch.core.GetSourceResponse;
67+
import co.elastic.clients.elasticsearch.core.HealthReportRequest;
68+
import co.elastic.clients.elasticsearch.core.HealthReportResponse;
6769
import co.elastic.clients.elasticsearch.core.IndexRequest;
6870
import co.elastic.clients.elasticsearch.core.IndexResponse;
6971
import co.elastic.clients.elasticsearch.core.InfoRequest;
@@ -1033,6 +1035,52 @@ public final <TDocument> CompletableFuture<GetSourceResponse<TDocument>> getSour
10331035
return getSource(fn.apply(new GetSourceRequest.Builder()).build(), tDocumentType);
10341036
}
10351037

1038+
// ----- Endpoint: health_report
1039+
1040+
/**
1041+
* Returns the health of the cluster.
1042+
*
1043+
* @see <a href=
1044+
* "https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html">Documentation
1045+
* on elastic.co</a>
1046+
*/
1047+
1048+
public CompletableFuture<HealthReportResponse> healthReport(HealthReportRequest request) {
1049+
@SuppressWarnings("unchecked")
1050+
JsonEndpoint<HealthReportRequest, HealthReportResponse, ErrorResponse> endpoint = (JsonEndpoint<HealthReportRequest, HealthReportResponse, ErrorResponse>) HealthReportRequest._ENDPOINT;
1051+
1052+
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
1053+
}
1054+
1055+
/**
1056+
* Returns the health of the cluster.
1057+
*
1058+
* @param fn
1059+
* a function that initializes a builder to create the
1060+
* {@link HealthReportRequest}
1061+
* @see <a href=
1062+
* "https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html">Documentation
1063+
* on elastic.co</a>
1064+
*/
1065+
1066+
public final CompletableFuture<HealthReportResponse> healthReport(
1067+
Function<HealthReportRequest.Builder, ObjectBuilder<HealthReportRequest>> fn) {
1068+
return healthReport(fn.apply(new HealthReportRequest.Builder()).build());
1069+
}
1070+
1071+
/**
1072+
* Returns the health of the cluster.
1073+
*
1074+
* @see <a href=
1075+
* "https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html">Documentation
1076+
* on elastic.co</a>
1077+
*/
1078+
1079+
public CompletableFuture<HealthReportResponse> healthReport() {
1080+
return this.transport.performRequestAsync(new HealthReportRequest.Builder().build(),
1081+
HealthReportRequest._ENDPOINT, this.transportOptions);
1082+
}
1083+
10361084
// ----- Endpoint: index
10371085

10381086
/**

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

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@
6565
import co.elastic.clients.elasticsearch.core.GetScriptResponse;
6666
import co.elastic.clients.elasticsearch.core.GetSourceRequest;
6767
import co.elastic.clients.elasticsearch.core.GetSourceResponse;
68+
import co.elastic.clients.elasticsearch.core.HealthReportRequest;
69+
import co.elastic.clients.elasticsearch.core.HealthReportResponse;
6870
import co.elastic.clients.elasticsearch.core.IndexRequest;
6971
import co.elastic.clients.elasticsearch.core.IndexResponse;
7072
import co.elastic.clients.elasticsearch.core.InfoRequest;
@@ -1050,6 +1052,53 @@ public final <TDocument> GetSourceResponse<TDocument> getSource(
10501052
return getSource(fn.apply(new GetSourceRequest.Builder()).build(), tDocumentType);
10511053
}
10521054

1055+
// ----- Endpoint: health_report
1056+
1057+
/**
1058+
* Returns the health of the cluster.
1059+
*
1060+
* @see <a href=
1061+
* "https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html">Documentation
1062+
* on elastic.co</a>
1063+
*/
1064+
1065+
public HealthReportResponse healthReport(HealthReportRequest request) throws IOException, ElasticsearchException {
1066+
@SuppressWarnings("unchecked")
1067+
JsonEndpoint<HealthReportRequest, HealthReportResponse, ErrorResponse> endpoint = (JsonEndpoint<HealthReportRequest, HealthReportResponse, ErrorResponse>) HealthReportRequest._ENDPOINT;
1068+
1069+
return this.transport.performRequest(request, endpoint, this.transportOptions);
1070+
}
1071+
1072+
/**
1073+
* Returns the health of the cluster.
1074+
*
1075+
* @param fn
1076+
* a function that initializes a builder to create the
1077+
* {@link HealthReportRequest}
1078+
* @see <a href=
1079+
* "https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html">Documentation
1080+
* on elastic.co</a>
1081+
*/
1082+
1083+
public final HealthReportResponse healthReport(
1084+
Function<HealthReportRequest.Builder, ObjectBuilder<HealthReportRequest>> fn)
1085+
throws IOException, ElasticsearchException {
1086+
return healthReport(fn.apply(new HealthReportRequest.Builder()).build());
1087+
}
1088+
1089+
/**
1090+
* Returns the health of the cluster.
1091+
*
1092+
* @see <a href=
1093+
* "https://www.elastic.co/guide/en/elasticsearch/reference/current/health-api.html">Documentation
1094+
* on elastic.co</a>
1095+
*/
1096+
1097+
public HealthReportResponse healthReport() throws IOException, ElasticsearchException {
1098+
return this.transport.performRequest(new HealthReportRequest.Builder().build(), HealthReportRequest._ENDPOINT,
1099+
this.transportOptions);
1100+
}
1101+
10531102
// ----- Endpoint: index
10541103

10551104
/**

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import co.elastic.clients.util.WithJsonObjectBuilderBase;
3636
import jakarta.json.stream.JsonGenerator;
3737
import java.lang.Integer;
38+
import java.lang.Long;
3839
import java.lang.String;
3940
import java.util.Objects;
4041
import java.util.function.Function;
@@ -60,7 +61,7 @@ public class QueryCacheStats implements JsonpSerializable {
6061
@Nullable
6162
private final String memorySize;
6263

63-
private final int memorySizeInBytes;
64+
private final long memorySizeInBytes;
6465

6566
private final int missCount;
6667

@@ -124,7 +125,7 @@ public final String memorySize() {
124125
/**
125126
* Required - API name: {@code memory_size_in_bytes}
126127
*/
127-
public final int memorySizeInBytes() {
128+
public final long memorySizeInBytes() {
128129
return this.memorySizeInBytes;
129130
}
130131

@@ -204,7 +205,7 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
204205
@Nullable
205206
private String memorySize;
206207

207-
private Integer memorySizeInBytes;
208+
private Long memorySizeInBytes;
208209

209210
private Integer missCount;
210211

@@ -253,7 +254,7 @@ public final Builder memorySize(@Nullable String value) {
253254
/**
254255
* Required - API name: {@code memory_size_in_bytes}
255256
*/
256-
public final Builder memorySizeInBytes(int value) {
257+
public final Builder memorySizeInBytes(long value) {
257258
this.memorySizeInBytes = value;
258259
return this;
259260
}
@@ -307,7 +308,7 @@ protected static void setupQueryCacheStatsDeserializer(ObjectDeserializer<QueryC
307308
op.add(Builder::evictions, JsonpDeserializer.integerDeserializer(), "evictions");
308309
op.add(Builder::hitCount, JsonpDeserializer.integerDeserializer(), "hit_count");
309310
op.add(Builder::memorySize, JsonpDeserializer.stringDeserializer(), "memory_size");
310-
op.add(Builder::memorySizeInBytes, JsonpDeserializer.integerDeserializer(), "memory_size_in_bytes");
311+
op.add(Builder::memorySizeInBytes, JsonpDeserializer.longDeserializer(), "memory_size_in_bytes");
311312
op.add(Builder::missCount, JsonpDeserializer.integerDeserializer(), "miss_count");
312313
op.add(Builder::totalCount, JsonpDeserializer.integerDeserializer(), "total_count");
313314

0 commit comments

Comments
 (0)