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 Feb 5, 2025
1 parent 76aaee2 commit 91b5307
Show file tree
Hide file tree
Showing 4 changed files with 202 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
public class ComponentTemplate implements JsonpSerializable {
private final String name;

@Nullable
private final String version;

private final String aliasCount;
Expand All @@ -79,7 +80,7 @@ public class ComponentTemplate implements JsonpSerializable {
private ComponentTemplate(Builder builder) {

this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name");
this.version = ApiTypeHelper.requireNonNull(builder.version, this, "version");
this.version = builder.version;
this.aliasCount = ApiTypeHelper.requireNonNull(builder.aliasCount, this, "aliasCount");
this.mappingCount = ApiTypeHelper.requireNonNull(builder.mappingCount, this, "mappingCount");
this.settingsCount = ApiTypeHelper.requireNonNull(builder.settingsCount, this, "settingsCount");
Expand All @@ -100,8 +101,9 @@ public final String name() {
}

/**
* Required - API name: {@code version}
* API name: {@code version}
*/
@Nullable
public final String version() {
return this.version;
}
Expand Down Expand Up @@ -155,9 +157,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("name");
generator.write(this.name);

generator.writeKey("version");
generator.write(this.version);
if (this.version != null) {
generator.writeKey("version");
generator.write(this.version);

}
generator.writeKey("alias_count");
generator.write(this.aliasCount);

Expand Down Expand Up @@ -189,6 +193,7 @@ public String toString() {
public static class Builder extends WithJsonObjectBuilderBase<Builder> implements ObjectBuilder<ComponentTemplate> {
private String name;

@Nullable
private String version;

private String aliasCount;
Expand All @@ -210,9 +215,9 @@ public final Builder name(String value) {
}

/**
* Required - API name: {@code version}
* API name: {@code version}
*/
public final Builder version(String value) {
public final Builder version(@Nullable String value) {
this.version = value;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1837,8 +1837,8 @@
'ml._types.AnalysisLimits': 'ml/_types/Analysis.ts#L161-L172',
'ml._types.AnalysisMemoryLimit': 'ml/_types/Analysis.ts#L174-L179',
'ml._types.Anomaly': 'ml/_types/Anomaly.ts#L24-L121',
'ml._types.AnomalyCause': 'ml/_types/Anomaly.ts#L123-L138',
'ml._types.AnomalyExplanation': 'ml/_types/Anomaly.ts#L156-L197',
'ml._types.AnomalyCause': 'ml/_types/Anomaly.ts#L123-L139',
'ml._types.AnomalyExplanation': 'ml/_types/Anomaly.ts#L157-L198',
'ml._types.ApiKeyAuthorization': 'ml/_types/Authorization.ts#L20-L29',
'ml._types.AppliesTo': 'ml/_types/Rule.ts#L67-L72',
'ml._types.BucketInfluencer': 'ml/_types/Bucket.ts#L79-L127',
Expand Down Expand Up @@ -1915,14 +1915,14 @@
'ml._types.Filter': 'ml/_types/Filter.ts#L22-L29',
'ml._types.FilterRef': 'ml/_types/Filter.ts#L31-L41',
'ml._types.FilterType': 'ml/_types/Filter.ts#L43-L46',
'ml._types.GeoResults': 'ml/_types/Anomaly.ts#L145-L154',
'ml._types.GeoResults': 'ml/_types/Anomaly.ts#L146-L155',
'ml._types.Hyperparameter': 'ml/_types/TrainedModel.ts#L261-L275',
'ml._types.Hyperparameters': 'ml/_types/DataframeAnalytics.ts#L420-L526',
'ml._types.Include': 'ml/_types/Include.ts#L20-L47',
'ml._types.InferenceConfigCreateContainer': 'ml/_types/inference.ts#L23-L80',
'ml._types.InferenceConfigUpdateContainer': 'ml/_types/inference.ts#L284-L306',
'ml._types.InferenceResponseResult': 'ml/_types/inference.ts#L447-L495',
'ml._types.Influence': 'ml/_types/Anomaly.ts#L140-L143',
'ml._types.Influence': 'ml/_types/Anomaly.ts#L141-L144',
'ml._types.Influencer': 'ml/_types/Influencer.ts#L24-L76',
'ml._types.Job': 'ml/_types/Job.ts#L61-L180',
'ml._types.JobBlocked': 'ml/_types/Job.ts#L392-L395',
Expand Down Expand Up @@ -2968,10 +2968,10 @@
if (hash.length > 1) {
hash = hash.substring(1);
}
window.location = "https://github.com/elastic/elasticsearch-specification/tree/13f3d17f24d5126a9fd51cd43024a3d261c7a73f/specification/" + (paths[hash] || "");
window.location = "https://github.com/elastic/elasticsearch-specification/tree/cc849b6b0bb5b01a4482c506dab7c31499c6777a/specification/" + (paths[hash] || "");
</script>
</head>
<body>
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/13f3d17f24d5126a9fd51cd43024a3d261c7a73f/specification/">Elasticsearch API specification</a>.
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/cc849b6b0bb5b01a4482c506dab7c31499c6777a/specification/">Elasticsearch API specification</a>.
</body>
</html>
Loading

0 comments on commit 91b5307

Please sign in to comment.