Skip to content

Commit

Permalink
[codegen] update to latest spec
Browse files Browse the repository at this point in the history
  • Loading branch information
l-trotta committed Sep 16, 2024
1 parent 0c14348 commit 7c46ddd
Show file tree
Hide file tree
Showing 10 changed files with 1,677 additions and 165 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2149,61 +2149,67 @@
'ml.validate_detector.Response': 'ml/validate_detector/MlValidateDetectorResponse.ts#L22-L24',
'monitoring.bulk.Request': 'monitoring/bulk/BulkMonitoringRequest.ts#L24-L59',
'monitoring.bulk.Response': 'monitoring/bulk/BulkMonitoringResponse.ts#L23-L32',
'nodes._types.AdaptiveSelection': 'nodes/_types/Stats.ts#L403-L432',
'nodes._types.Breaker': 'nodes/_types/Stats.ts#L434-L459',
'nodes._types.Cgroup': 'nodes/_types/Stats.ts#L461-L474',
'nodes._types.CgroupCpu': 'nodes/_types/Stats.ts#L487-L504',
'nodes._types.CgroupCpuStat': 'nodes/_types/Stats.ts#L506-L519',
'nodes._types.CgroupMemory': 'nodes/_types/Stats.ts#L521-L537',
'nodes._types.Client': 'nodes/_types/Stats.ts#L649-L696',
'nodes._types.AdaptiveSelection': 'nodes/_types/Stats.ts#L439-L468',
'nodes._types.Breaker': 'nodes/_types/Stats.ts#L470-L495',
'nodes._types.Cgroup': 'nodes/_types/Stats.ts#L497-L510',
'nodes._types.CgroupCpu': 'nodes/_types/Stats.ts#L523-L540',
'nodes._types.CgroupCpuStat': 'nodes/_types/Stats.ts#L542-L555',
'nodes._types.CgroupMemory': 'nodes/_types/Stats.ts#L557-L573',
'nodes._types.Client': 'nodes/_types/Stats.ts#L720-L767',
'nodes._types.ClusterAppliedStats': 'nodes/_types/Stats.ts#L221-L223',
'nodes._types.ClusterStateQueue': 'nodes/_types/Stats.ts#L248-L261',
'nodes._types.ClusterStateUpdate': 'nodes/_types/Stats.ts#L278-L343',
'nodes._types.Context': 'nodes/_types/Stats.ts#L997-L1002',
'nodes._types.Cpu': 'nodes/_types/Stats.ts#L539-L548',
'nodes._types.CpuAcct': 'nodes/_types/Stats.ts#L476-L485',
'nodes._types.DataPathStats': 'nodes/_types/Stats.ts#L550-L594',
'nodes._types.Context': 'nodes/_types/Stats.ts#L1068-L1073',
'nodes._types.Cpu': 'nodes/_types/Stats.ts#L575-L584',
'nodes._types.CpuAcct': 'nodes/_types/Stats.ts#L512-L521',
'nodes._types.DataPathStats': 'nodes/_types/Stats.ts#L586-L630',
'nodes._types.Discovery': 'nodes/_types/Stats.ts#L201-L219',
'nodes._types.ExtendedMemoryStats': 'nodes/_types/Stats.ts#L622-L631',
'nodes._types.FileSystem': 'nodes/_types/Stats.ts#L698-L716',
'nodes._types.FileSystemTotal': 'nodes/_types/Stats.ts#L757-L786',
'nodes._types.GarbageCollector': 'nodes/_types/Stats.ts#L923-L928',
'nodes._types.GarbageCollectorTotal': 'nodes/_types/Stats.ts#L930-L943',
'nodes._types.Http': 'nodes/_types/Stats.ts#L633-L647',
'nodes._types.ExtendedMemoryStats': 'nodes/_types/Stats.ts#L658-L667',
'nodes._types.FileSystem': 'nodes/_types/Stats.ts#L769-L787',
'nodes._types.FileSystemTotal': 'nodes/_types/Stats.ts#L828-L857',
'nodes._types.GarbageCollector': 'nodes/_types/Stats.ts#L994-L999',
'nodes._types.GarbageCollectorTotal': 'nodes/_types/Stats.ts#L1001-L1014',
'nodes._types.Http': 'nodes/_types/Stats.ts#L669-L688',
'nodes._types.HttpRoute': 'nodes/_types/Stats.ts#L690-L693',
'nodes._types.HttpRouteRequests': 'nodes/_types/Stats.ts#L695-L699',
'nodes._types.HttpRouteResponses': 'nodes/_types/Stats.ts#L701-L706',
'nodes._types.IndexingPressure': 'nodes/_types/Stats.ts#L116-L121',
'nodes._types.IndexingPressureMemory': 'nodes/_types/Stats.ts#L123-L142',
'nodes._types.Ingest': 'nodes/_types/Stats.ts#L345-L354',
'nodes._types.IngestTotal': 'nodes/_types/Stats.ts#L356-L377',
'nodes._types.IoStatDevice': 'nodes/_types/Stats.ts#L730-L755',
'nodes._types.IoStats': 'nodes/_types/Stats.ts#L718-L728',
'nodes._types.Jvm': 'nodes/_types/Stats.ts#L811-L845',
'nodes._types.JvmClasses': 'nodes/_types/Stats.ts#L908-L921',
'nodes._types.JvmMemoryStats': 'nodes/_types/Stats.ts#L847-L876',
'nodes._types.JvmThreads': 'nodes/_types/Stats.ts#L897-L906',
'nodes._types.KeyedProcessor': 'nodes/_types/Stats.ts#L379-L382',
'nodes._types.MemoryStats': 'nodes/_types/Stats.ts#L596-L620',
'nodes._types.NodeBufferPool': 'nodes/_types/Stats.ts#L788-L809',
'nodes._types.IngestStats': 'nodes/_types/Stats.ts#L356-L394',
'nodes._types.IngestTotal': 'nodes/_types/Stats.ts#L396-L413',
'nodes._types.IoStatDevice': 'nodes/_types/Stats.ts#L801-L826',
'nodes._types.IoStats': 'nodes/_types/Stats.ts#L789-L799',
'nodes._types.Jvm': 'nodes/_types/Stats.ts#L882-L916',
'nodes._types.JvmClasses': 'nodes/_types/Stats.ts#L979-L992',
'nodes._types.JvmMemoryStats': 'nodes/_types/Stats.ts#L918-L947',
'nodes._types.JvmThreads': 'nodes/_types/Stats.ts#L968-L977',
'nodes._types.KeyedProcessor': 'nodes/_types/Stats.ts#L415-L418',
'nodes._types.MemoryStats': 'nodes/_types/Stats.ts#L632-L656',
'nodes._types.NodeBufferPool': 'nodes/_types/Stats.ts#L859-L880',
'nodes._types.NodeReloadError': 'nodes/_types/NodeReloadResult.ts#L24-L27',
'nodes._types.NodeReloadResult': 'nodes/_types/NodeReloadResult.ts#L29-L30',
'nodes._types.NodesResponseBase': 'nodes/_types/NodesResponseBase.ts#L22-L29',
'nodes._types.OperatingSystem': 'nodes/_types/Stats.ts#L945-L951',
'nodes._types.Pool': 'nodes/_types/Stats.ts#L878-L895',
'nodes._types.OperatingSystem': 'nodes/_types/Stats.ts#L1016-L1022',
'nodes._types.Pool': 'nodes/_types/Stats.ts#L949-L966',
'nodes._types.PressureMemory': 'nodes/_types/Stats.ts#L144-L199',
'nodes._types.Process': 'nodes/_types/Stats.ts#L953-L975',
'nodes._types.Processor': 'nodes/_types/Stats.ts#L384-L401',
'nodes._types.Process': 'nodes/_types/Stats.ts#L1024-L1046',
'nodes._types.Processor': 'nodes/_types/Stats.ts#L420-L437',
'nodes._types.PublishedClusterStates': 'nodes/_types/Stats.ts#L263-L276',
'nodes._types.Recording': 'nodes/_types/Stats.ts#L225-L230',
'nodes._types.RepositoryLocation': 'nodes/_types/RepositoryMeteringInformation.ts#L68-L74',
'nodes._types.RepositoryMeteringInformation': 'nodes/_types/RepositoryMeteringInformation.ts#L24-L66',
'nodes._types.RequestCounts': 'nodes/_types/RepositoryMeteringInformation.ts#L76-L103',
'nodes._types.ScriptCache': 'nodes/_types/Stats.ts#L1031-L1045',
'nodes._types.Scripting': 'nodes/_types/Stats.ts#L977-L995',
'nodes._types.ScriptCache': 'nodes/_types/Stats.ts#L1102-L1116',
'nodes._types.Scripting': 'nodes/_types/Stats.ts#L1048-L1066',
'nodes._types.SerializedClusterState': 'nodes/_types/Stats.ts#L232-L238',
'nodes._types.SerializedClusterStateDetail': 'nodes/_types/Stats.ts#L240-L246',
'nodes._types.SizeHttpHistogram': 'nodes/_types/Stats.ts#L714-L718',
'nodes._types.Stats': 'nodes/_types/Stats.ts#L30-L114',
'nodes._types.ThreadCount': 'nodes/_types/Stats.ts#L1004-L1029',
'nodes._types.Transport': 'nodes/_types/Stats.ts#L1047-L1090',
'nodes._types.TransportHistogram': 'nodes/_types/Stats.ts#L1092-L1106',
'nodes._types.ThreadCount': 'nodes/_types/Stats.ts#L1075-L1100',
'nodes._types.TimeHttpHistogram': 'nodes/_types/Stats.ts#L708-L712',
'nodes._types.Transport': 'nodes/_types/Stats.ts#L1118-L1161',
'nodes._types.TransportHistogram': 'nodes/_types/Stats.ts#L1163-L1177',
'nodes.clear_repositories_metering_archive.Request': 'nodes/clear_repositories_metering_archive/ClearRepositoriesMeteringArchiveRequest.ts#L24-L43',
'nodes.clear_repositories_metering_archive.Response': 'nodes/clear_repositories_metering_archive/ClearRepositoriesMeteringArchiveResponse.ts#L36-L38',
'nodes.clear_repositories_metering_archive.ResponseBase': 'nodes/clear_repositories_metering_archive/ClearRepositoriesMeteringArchiveResponse.ts#L25-L34',
Expand Down Expand Up @@ -2909,10 +2915,10 @@
if (hash.length > 1) {
hash = hash.substring(1);
}
window.location = "https://github.com/elastic/elasticsearch-specification/tree/b2ad2265c9a6469efee4426abbc45df5b0fe1c54/specification/" + (paths[hash] || "");
window.location = "https://github.com/elastic/elasticsearch-specification/tree/a37d0218e4755ffe229c1a0efccc48e8f7d2d44b/specification/" + (paths[hash] || "");
</script>
</head>
<body>
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/b2ad2265c9a6469efee4426abbc45df5b0fe1c54/specification/">Elasticsearch API specification</a>.
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/a37d0218e4755ffe229c1a0efccc48e8f7d2d44b/specification/">Elasticsearch API specification</a>.
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
import jakarta.json.stream.JsonGenerator;
import java.lang.Integer;
import java.lang.Long;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Nullable;
Expand Down Expand Up @@ -69,13 +71,16 @@ public class Http implements JsonpSerializable {

private final List<Client> clients;

private final Map<String, HttpRoute> routes;

// ---------------------------------------------------------------------------------------------

private Http(Builder builder) {

this.currentOpen = builder.currentOpen;
this.totalOpened = builder.totalOpened;
this.clients = ApiTypeHelper.unmodifiable(builder.clients);
this.routes = ApiTypeHelper.unmodifiableRequired(builder.routes, this, "routes");

}

Expand Down Expand Up @@ -115,6 +120,15 @@ public final List<Client> clients() {
return this.clients;
}

/**
* Required - Detailed HTTP stats broken down by route
* <p>
* API name: {@code routes}
*/
public final Map<String, HttpRoute> routes() {
return this.routes;
}

/**
* Serialize this object to JSON.
*/
Expand Down Expand Up @@ -146,6 +160,17 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeEnd();

}
if (ApiTypeHelper.isDefined(this.routes)) {
generator.writeKey("routes");
generator.writeStartObject();
for (Map.Entry<String, HttpRoute> item0 : this.routes.entrySet()) {
generator.writeKey(item0.getKey());
item0.getValue().serialize(generator, mapper);

}
generator.writeEnd();

}

}

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

private Map<String, HttpRoute> routes;

/**
* Current number of open HTTP connections for the node.
* <p>
Expand Down Expand Up @@ -234,6 +261,41 @@ public final Builder clients(Function<Client.Builder, ObjectBuilder<Client>> fn)
return clients(fn.apply(new Client.Builder()).build());
}

/**
* Required - Detailed HTTP stats broken down by route
* <p>
* API name: {@code routes}
* <p>
* Adds all entries of <code>map</code> to <code>routes</code>.
*/
public final Builder routes(Map<String, HttpRoute> map) {
this.routes = _mapPutAll(this.routes, map);
return this;
}

/**
* Required - Detailed HTTP stats broken down by route
* <p>
* API name: {@code routes}
* <p>
* Adds an entry to <code>routes</code>.
*/
public final Builder routes(String key, HttpRoute value) {
this.routes = _mapPut(this.routes, key, value);
return this;
}

/**
* Required - Detailed HTTP stats broken down by route
* <p>
* API name: {@code routes}
* <p>
* Adds an entry to <code>routes</code> using a builder lambda.
*/
public final Builder routes(String key, Function<HttpRoute.Builder, ObjectBuilder<HttpRoute>> fn) {
return routes(key, fn.apply(new HttpRoute.Builder()).build());
}

@Override
protected Builder self() {
return this;
Expand Down Expand Up @@ -265,6 +327,7 @@ protected static void setupHttpDeserializer(ObjectDeserializer<Http.Builder> op)
op.add(Builder::currentOpen, JsonpDeserializer.integerDeserializer(), "current_open");
op.add(Builder::totalOpened, JsonpDeserializer.longDeserializer(), "total_opened");
op.add(Builder::clients, JsonpDeserializer.arrayDeserializer(Client._DESERIALIZER), "clients");
op.add(Builder::routes, JsonpDeserializer.stringMapDeserializer(HttpRoute._DESERIALIZER), "routes");

}

Expand Down
Loading

0 comments on commit 7c46ddd

Please sign in to comment.