Skip to content

Commit 12567b2

Browse files
committed
[codegen] update to latest spec
1 parent b51d109 commit 12567b2

File tree

10 files changed

+1677
-165
lines changed

10 files changed

+1677
-165
lines changed

java-client/src/main/java/co/elastic/clients/elasticsearch/doc-files/api-spec.html

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,61 +2149,67 @@
21492149
'ml.validate_detector.Response': 'ml/validate_detector/MlValidateDetectorResponse.ts#L22-L24',
21502150
'monitoring.bulk.Request': 'monitoring/bulk/BulkMonitoringRequest.ts#L24-L59',
21512151
'monitoring.bulk.Response': 'monitoring/bulk/BulkMonitoringResponse.ts#L23-L32',
2152-
'nodes._types.AdaptiveSelection': 'nodes/_types/Stats.ts#L403-L432',
2153-
'nodes._types.Breaker': 'nodes/_types/Stats.ts#L434-L459',
2154-
'nodes._types.Cgroup': 'nodes/_types/Stats.ts#L461-L474',
2155-
'nodes._types.CgroupCpu': 'nodes/_types/Stats.ts#L487-L504',
2156-
'nodes._types.CgroupCpuStat': 'nodes/_types/Stats.ts#L506-L519',
2157-
'nodes._types.CgroupMemory': 'nodes/_types/Stats.ts#L521-L537',
2158-
'nodes._types.Client': 'nodes/_types/Stats.ts#L649-L696',
2152+
'nodes._types.AdaptiveSelection': 'nodes/_types/Stats.ts#L439-L468',
2153+
'nodes._types.Breaker': 'nodes/_types/Stats.ts#L470-L495',
2154+
'nodes._types.Cgroup': 'nodes/_types/Stats.ts#L497-L510',
2155+
'nodes._types.CgroupCpu': 'nodes/_types/Stats.ts#L523-L540',
2156+
'nodes._types.CgroupCpuStat': 'nodes/_types/Stats.ts#L542-L555',
2157+
'nodes._types.CgroupMemory': 'nodes/_types/Stats.ts#L557-L573',
2158+
'nodes._types.Client': 'nodes/_types/Stats.ts#L720-L767',
21592159
'nodes._types.ClusterAppliedStats': 'nodes/_types/Stats.ts#L221-L223',
21602160
'nodes._types.ClusterStateQueue': 'nodes/_types/Stats.ts#L248-L261',
21612161
'nodes._types.ClusterStateUpdate': 'nodes/_types/Stats.ts#L278-L343',
2162-
'nodes._types.Context': 'nodes/_types/Stats.ts#L997-L1002',
2163-
'nodes._types.Cpu': 'nodes/_types/Stats.ts#L539-L548',
2164-
'nodes._types.CpuAcct': 'nodes/_types/Stats.ts#L476-L485',
2165-
'nodes._types.DataPathStats': 'nodes/_types/Stats.ts#L550-L594',
2162+
'nodes._types.Context': 'nodes/_types/Stats.ts#L1068-L1073',
2163+
'nodes._types.Cpu': 'nodes/_types/Stats.ts#L575-L584',
2164+
'nodes._types.CpuAcct': 'nodes/_types/Stats.ts#L512-L521',
2165+
'nodes._types.DataPathStats': 'nodes/_types/Stats.ts#L586-L630',
21662166
'nodes._types.Discovery': 'nodes/_types/Stats.ts#L201-L219',
2167-
'nodes._types.ExtendedMemoryStats': 'nodes/_types/Stats.ts#L622-L631',
2168-
'nodes._types.FileSystem': 'nodes/_types/Stats.ts#L698-L716',
2169-
'nodes._types.FileSystemTotal': 'nodes/_types/Stats.ts#L757-L786',
2170-
'nodes._types.GarbageCollector': 'nodes/_types/Stats.ts#L923-L928',
2171-
'nodes._types.GarbageCollectorTotal': 'nodes/_types/Stats.ts#L930-L943',
2172-
'nodes._types.Http': 'nodes/_types/Stats.ts#L633-L647',
2167+
'nodes._types.ExtendedMemoryStats': 'nodes/_types/Stats.ts#L658-L667',
2168+
'nodes._types.FileSystem': 'nodes/_types/Stats.ts#L769-L787',
2169+
'nodes._types.FileSystemTotal': 'nodes/_types/Stats.ts#L828-L857',
2170+
'nodes._types.GarbageCollector': 'nodes/_types/Stats.ts#L994-L999',
2171+
'nodes._types.GarbageCollectorTotal': 'nodes/_types/Stats.ts#L1001-L1014',
2172+
'nodes._types.Http': 'nodes/_types/Stats.ts#L669-L688',
2173+
'nodes._types.HttpRoute': 'nodes/_types/Stats.ts#L690-L693',
2174+
'nodes._types.HttpRouteRequests': 'nodes/_types/Stats.ts#L695-L699',
2175+
'nodes._types.HttpRouteResponses': 'nodes/_types/Stats.ts#L701-L706',
21732176
'nodes._types.IndexingPressure': 'nodes/_types/Stats.ts#L116-L121',
21742177
'nodes._types.IndexingPressureMemory': 'nodes/_types/Stats.ts#L123-L142',
21752178
'nodes._types.Ingest': 'nodes/_types/Stats.ts#L345-L354',
2176-
'nodes._types.IngestTotal': 'nodes/_types/Stats.ts#L356-L377',
2177-
'nodes._types.IoStatDevice': 'nodes/_types/Stats.ts#L730-L755',
2178-
'nodes._types.IoStats': 'nodes/_types/Stats.ts#L718-L728',
2179-
'nodes._types.Jvm': 'nodes/_types/Stats.ts#L811-L845',
2180-
'nodes._types.JvmClasses': 'nodes/_types/Stats.ts#L908-L921',
2181-
'nodes._types.JvmMemoryStats': 'nodes/_types/Stats.ts#L847-L876',
2182-
'nodes._types.JvmThreads': 'nodes/_types/Stats.ts#L897-L906',
2183-
'nodes._types.KeyedProcessor': 'nodes/_types/Stats.ts#L379-L382',
2184-
'nodes._types.MemoryStats': 'nodes/_types/Stats.ts#L596-L620',
2185-
'nodes._types.NodeBufferPool': 'nodes/_types/Stats.ts#L788-L809',
2179+
'nodes._types.IngestStats': 'nodes/_types/Stats.ts#L356-L394',
2180+
'nodes._types.IngestTotal': 'nodes/_types/Stats.ts#L396-L413',
2181+
'nodes._types.IoStatDevice': 'nodes/_types/Stats.ts#L801-L826',
2182+
'nodes._types.IoStats': 'nodes/_types/Stats.ts#L789-L799',
2183+
'nodes._types.Jvm': 'nodes/_types/Stats.ts#L882-L916',
2184+
'nodes._types.JvmClasses': 'nodes/_types/Stats.ts#L979-L992',
2185+
'nodes._types.JvmMemoryStats': 'nodes/_types/Stats.ts#L918-L947',
2186+
'nodes._types.JvmThreads': 'nodes/_types/Stats.ts#L968-L977',
2187+
'nodes._types.KeyedProcessor': 'nodes/_types/Stats.ts#L415-L418',
2188+
'nodes._types.MemoryStats': 'nodes/_types/Stats.ts#L632-L656',
2189+
'nodes._types.NodeBufferPool': 'nodes/_types/Stats.ts#L859-L880',
21862190
'nodes._types.NodeReloadError': 'nodes/_types/NodeReloadResult.ts#L24-L27',
21872191
'nodes._types.NodeReloadResult': 'nodes/_types/NodeReloadResult.ts#L29-L30',
21882192
'nodes._types.NodesResponseBase': 'nodes/_types/NodesResponseBase.ts#L22-L29',
2189-
'nodes._types.OperatingSystem': 'nodes/_types/Stats.ts#L945-L951',
2190-
'nodes._types.Pool': 'nodes/_types/Stats.ts#L878-L895',
2193+
'nodes._types.OperatingSystem': 'nodes/_types/Stats.ts#L1016-L1022',
2194+
'nodes._types.Pool': 'nodes/_types/Stats.ts#L949-L966',
21912195
'nodes._types.PressureMemory': 'nodes/_types/Stats.ts#L144-L199',
2192-
'nodes._types.Process': 'nodes/_types/Stats.ts#L953-L975',
2193-
'nodes._types.Processor': 'nodes/_types/Stats.ts#L384-L401',
2196+
'nodes._types.Process': 'nodes/_types/Stats.ts#L1024-L1046',
2197+
'nodes._types.Processor': 'nodes/_types/Stats.ts#L420-L437',
21942198
'nodes._types.PublishedClusterStates': 'nodes/_types/Stats.ts#L263-L276',
21952199
'nodes._types.Recording': 'nodes/_types/Stats.ts#L225-L230',
21962200
'nodes._types.RepositoryLocation': 'nodes/_types/RepositoryMeteringInformation.ts#L68-L74',
21972201
'nodes._types.RepositoryMeteringInformation': 'nodes/_types/RepositoryMeteringInformation.ts#L24-L66',
21982202
'nodes._types.RequestCounts': 'nodes/_types/RepositoryMeteringInformation.ts#L76-L103',
2199-
'nodes._types.ScriptCache': 'nodes/_types/Stats.ts#L1031-L1045',
2200-
'nodes._types.Scripting': 'nodes/_types/Stats.ts#L977-L995',
2203+
'nodes._types.ScriptCache': 'nodes/_types/Stats.ts#L1102-L1116',
2204+
'nodes._types.Scripting': 'nodes/_types/Stats.ts#L1048-L1066',
22012205
'nodes._types.SerializedClusterState': 'nodes/_types/Stats.ts#L232-L238',
22022206
'nodes._types.SerializedClusterStateDetail': 'nodes/_types/Stats.ts#L240-L246',
2207+
'nodes._types.SizeHttpHistogram': 'nodes/_types/Stats.ts#L714-L718',
22032208
'nodes._types.Stats': 'nodes/_types/Stats.ts#L30-L114',
2204-
'nodes._types.ThreadCount': 'nodes/_types/Stats.ts#L1004-L1029',
2205-
'nodes._types.Transport': 'nodes/_types/Stats.ts#L1047-L1090',
2206-
'nodes._types.TransportHistogram': 'nodes/_types/Stats.ts#L1092-L1106',
2209+
'nodes._types.ThreadCount': 'nodes/_types/Stats.ts#L1075-L1100',
2210+
'nodes._types.TimeHttpHistogram': 'nodes/_types/Stats.ts#L708-L712',
2211+
'nodes._types.Transport': 'nodes/_types/Stats.ts#L1118-L1161',
2212+
'nodes._types.TransportHistogram': 'nodes/_types/Stats.ts#L1163-L1177',
22072213
'nodes.clear_repositories_metering_archive.Request': 'nodes/clear_repositories_metering_archive/ClearRepositoriesMeteringArchiveRequest.ts#L24-L43',
22082214
'nodes.clear_repositories_metering_archive.Response': 'nodes/clear_repositories_metering_archive/ClearRepositoriesMeteringArchiveResponse.ts#L36-L38',
22092215
'nodes.clear_repositories_metering_archive.ResponseBase': 'nodes/clear_repositories_metering_archive/ClearRepositoriesMeteringArchiveResponse.ts#L25-L34',
@@ -2909,10 +2915,10 @@
29092915
if (hash.length > 1) {
29102916
hash = hash.substring(1);
29112917
}
2912-
window.location = "https://github.com/elastic/elasticsearch-specification/tree/b2ad2265c9a6469efee4426abbc45df5b0fe1c54/specification/" + (paths[hash] || "");
2918+
window.location = "https://github.com/elastic/elasticsearch-specification/tree/b26b9a16e0840ede1f2ec45e5209ff123097fa5a/specification/" + (paths[hash] || "");
29132919
</script>
29142920
</head>
29152921
<body>
2916-
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/b2ad2265c9a6469efee4426abbc45df5b0fe1c54/specification/">Elasticsearch API specification</a>.
2922+
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/b26b9a16e0840ede1f2ec45e5209ff123097fa5a/specification/">Elasticsearch API specification</a>.
29172923
</body>
29182924
</html>

java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/Http.java

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
import jakarta.json.stream.JsonGenerator;
3333
import java.lang.Integer;
3434
import java.lang.Long;
35+
import java.lang.String;
3536
import java.util.List;
37+
import java.util.Map;
3638
import java.util.Objects;
3739
import java.util.function.Function;
3840
import javax.annotation.Nullable;
@@ -69,13 +71,16 @@ public class Http implements JsonpSerializable {
6971

7072
private final List<Client> clients;
7173

74+
private final Map<String, HttpRoute> routes;
75+
7276
// ---------------------------------------------------------------------------------------------
7377

7478
private Http(Builder builder) {
7579

7680
this.currentOpen = builder.currentOpen;
7781
this.totalOpened = builder.totalOpened;
7882
this.clients = ApiTypeHelper.unmodifiable(builder.clients);
83+
this.routes = ApiTypeHelper.unmodifiableRequired(builder.routes, this, "routes");
7984

8085
}
8186

@@ -115,6 +120,15 @@ public final List<Client> clients() {
115120
return this.clients;
116121
}
117122

123+
/**
124+
* Required - Detailed HTTP stats broken down by route
125+
* <p>
126+
* API name: {@code routes}
127+
*/
128+
public final Map<String, HttpRoute> routes() {
129+
return this.routes;
130+
}
131+
118132
/**
119133
* Serialize this object to JSON.
120134
*/
@@ -146,6 +160,17 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
146160
generator.writeEnd();
147161

148162
}
163+
if (ApiTypeHelper.isDefined(this.routes)) {
164+
generator.writeKey("routes");
165+
generator.writeStartObject();
166+
for (Map.Entry<String, HttpRoute> item0 : this.routes.entrySet()) {
167+
generator.writeKey(item0.getKey());
168+
item0.getValue().serialize(generator, mapper);
169+
170+
}
171+
generator.writeEnd();
172+
173+
}
149174

150175
}
151176

@@ -170,6 +195,8 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
170195
@Nullable
171196
private List<Client> clients;
172197

198+
private Map<String, HttpRoute> routes;
199+
173200
/**
174201
* Current number of open HTTP connections for the node.
175202
* <p>
@@ -234,6 +261,41 @@ public final Builder clients(Function<Client.Builder, ObjectBuilder<Client>> fn)
234261
return clients(fn.apply(new Client.Builder()).build());
235262
}
236263

264+
/**
265+
* Required - Detailed HTTP stats broken down by route
266+
* <p>
267+
* API name: {@code routes}
268+
* <p>
269+
* Adds all entries of <code>map</code> to <code>routes</code>.
270+
*/
271+
public final Builder routes(Map<String, HttpRoute> map) {
272+
this.routes = _mapPutAll(this.routes, map);
273+
return this;
274+
}
275+
276+
/**
277+
* Required - Detailed HTTP stats broken down by route
278+
* <p>
279+
* API name: {@code routes}
280+
* <p>
281+
* Adds an entry to <code>routes</code>.
282+
*/
283+
public final Builder routes(String key, HttpRoute value) {
284+
this.routes = _mapPut(this.routes, key, value);
285+
return this;
286+
}
287+
288+
/**
289+
* Required - Detailed HTTP stats broken down by route
290+
* <p>
291+
* API name: {@code routes}
292+
* <p>
293+
* Adds an entry to <code>routes</code> using a builder lambda.
294+
*/
295+
public final Builder routes(String key, Function<HttpRoute.Builder, ObjectBuilder<HttpRoute>> fn) {
296+
return routes(key, fn.apply(new HttpRoute.Builder()).build());
297+
}
298+
237299
@Override
238300
protected Builder self() {
239301
return this;
@@ -265,6 +327,7 @@ protected static void setupHttpDeserializer(ObjectDeserializer<Http.Builder> op)
265327
op.add(Builder::currentOpen, JsonpDeserializer.integerDeserializer(), "current_open");
266328
op.add(Builder::totalOpened, JsonpDeserializer.longDeserializer(), "total_opened");
267329
op.add(Builder::clients, JsonpDeserializer.arrayDeserializer(Client._DESERIALIZER), "clients");
330+
op.add(Builder::routes, JsonpDeserializer.stringMapDeserializer(HttpRoute._DESERIALIZER), "routes");
268331

269332
}
270333

0 commit comments

Comments
 (0)