Skip to content

Commit 91b5307

Browse files
committed
[codegen] update to latest spec
1 parent 76aaee2 commit 91b5307

File tree

4 files changed

+202
-105
lines changed

4 files changed

+202
-105
lines changed

java-client/src/main/java/co/elastic/clients/elasticsearch/cat/component_templates/ComponentTemplate.java

+11-6
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
public class ComponentTemplate implements JsonpSerializable {
6363
private final String name;
6464

65+
@Nullable
6566
private final String version;
6667

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

8182
this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name");
82-
this.version = ApiTypeHelper.requireNonNull(builder.version, this, "version");
83+
this.version = builder.version;
8384
this.aliasCount = ApiTypeHelper.requireNonNull(builder.aliasCount, this, "aliasCount");
8485
this.mappingCount = ApiTypeHelper.requireNonNull(builder.mappingCount, this, "mappingCount");
8586
this.settingsCount = ApiTypeHelper.requireNonNull(builder.settingsCount, this, "settingsCount");
@@ -100,8 +101,9 @@ public final String name() {
100101
}
101102

102103
/**
103-
* Required - API name: {@code version}
104+
* API name: {@code version}
104105
*/
106+
@Nullable
105107
public final String version() {
106108
return this.version;
107109
}
@@ -155,9 +157,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
155157
generator.writeKey("name");
156158
generator.write(this.name);
157159

158-
generator.writeKey("version");
159-
generator.write(this.version);
160+
if (this.version != null) {
161+
generator.writeKey("version");
162+
generator.write(this.version);
160163

164+
}
161165
generator.writeKey("alias_count");
162166
generator.write(this.aliasCount);
163167

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

196+
@Nullable
192197
private String version;
193198

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

212217
/**
213-
* Required - API name: {@code version}
218+
* API name: {@code version}
214219
*/
215-
public final Builder version(String value) {
220+
public final Builder version(@Nullable String value) {
216221
this.version = value;
217222
return this;
218223
}

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -1837,8 +1837,8 @@
18371837
'ml._types.AnalysisLimits': 'ml/_types/Analysis.ts#L161-L172',
18381838
'ml._types.AnalysisMemoryLimit': 'ml/_types/Analysis.ts#L174-L179',
18391839
'ml._types.Anomaly': 'ml/_types/Anomaly.ts#L24-L121',
1840-
'ml._types.AnomalyCause': 'ml/_types/Anomaly.ts#L123-L138',
1841-
'ml._types.AnomalyExplanation': 'ml/_types/Anomaly.ts#L156-L197',
1840+
'ml._types.AnomalyCause': 'ml/_types/Anomaly.ts#L123-L139',
1841+
'ml._types.AnomalyExplanation': 'ml/_types/Anomaly.ts#L157-L198',
18421842
'ml._types.ApiKeyAuthorization': 'ml/_types/Authorization.ts#L20-L29',
18431843
'ml._types.AppliesTo': 'ml/_types/Rule.ts#L67-L72',
18441844
'ml._types.BucketInfluencer': 'ml/_types/Bucket.ts#L79-L127',
@@ -1915,14 +1915,14 @@
19151915
'ml._types.Filter': 'ml/_types/Filter.ts#L22-L29',
19161916
'ml._types.FilterRef': 'ml/_types/Filter.ts#L31-L41',
19171917
'ml._types.FilterType': 'ml/_types/Filter.ts#L43-L46',
1918-
'ml._types.GeoResults': 'ml/_types/Anomaly.ts#L145-L154',
1918+
'ml._types.GeoResults': 'ml/_types/Anomaly.ts#L146-L155',
19191919
'ml._types.Hyperparameter': 'ml/_types/TrainedModel.ts#L261-L275',
19201920
'ml._types.Hyperparameters': 'ml/_types/DataframeAnalytics.ts#L420-L526',
19211921
'ml._types.Include': 'ml/_types/Include.ts#L20-L47',
19221922
'ml._types.InferenceConfigCreateContainer': 'ml/_types/inference.ts#L23-L80',
19231923
'ml._types.InferenceConfigUpdateContainer': 'ml/_types/inference.ts#L284-L306',
19241924
'ml._types.InferenceResponseResult': 'ml/_types/inference.ts#L447-L495',
1925-
'ml._types.Influence': 'ml/_types/Anomaly.ts#L140-L143',
1925+
'ml._types.Influence': 'ml/_types/Anomaly.ts#L141-L144',
19261926
'ml._types.Influencer': 'ml/_types/Influencer.ts#L24-L76',
19271927
'ml._types.Job': 'ml/_types/Job.ts#L61-L180',
19281928
'ml._types.JobBlocked': 'ml/_types/Job.ts#L392-L395',
@@ -2968,10 +2968,10 @@
29682968
if (hash.length > 1) {
29692969
hash = hash.substring(1);
29702970
}
2971-
window.location = "https://github.com/elastic/elasticsearch-specification/tree/13f3d17f24d5126a9fd51cd43024a3d261c7a73f/specification/" + (paths[hash] || "");
2971+
window.location = "https://github.com/elastic/elasticsearch-specification/tree/cc849b6b0bb5b01a4482c506dab7c31499c6777a/specification/" + (paths[hash] || "");
29722972
</script>
29732973
</head>
29742974
<body>
2975-
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/13f3d17f24d5126a9fd51cd43024a3d261c7a73f/specification/">Elasticsearch API specification</a>.
2975+
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/cc849b6b0bb5b01a4482c506dab7c31499c6777a/specification/">Elasticsearch API specification</a>.
29762976
</body>
29772977
</html>

0 commit comments

Comments
 (0)