Skip to content

Commit 2d5bf2d

Browse files
committed
[codegen] Update to latest API specification
1 parent 1e3c382 commit 2d5bf2d

File tree

3 files changed

+18
-59
lines changed

3 files changed

+18
-59
lines changed

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

Lines changed: 5 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
package co.elastic.clients.elasticsearch._types.mapping;
2525

26-
import co.elastic.clients.json.JsonData;
2726
import co.elastic.clients.json.JsonpDeserializable;
2827
import co.elastic.clients.json.JsonpDeserializer;
2928
import co.elastic.clients.json.JsonpMapper;
@@ -51,8 +50,6 @@
5150
*/
5251

5352
public abstract class PropertyBase implements JsonpSerializable {
54-
private final Map<String, JsonData> localMetadata;
55-
5653
private final Map<String, String> meta;
5754

5855
private final Map<String, Property> properties;
@@ -69,7 +66,6 @@ public abstract class PropertyBase implements JsonpSerializable {
6966

7067
protected PropertyBase(AbstractBuilder<?> builder) {
7168

72-
this.localMetadata = ApiTypeHelper.unmodifiable(builder.localMetadata);
7369
this.meta = ApiTypeHelper.unmodifiable(builder.meta);
7470
this.properties = ApiTypeHelper.unmodifiable(builder.properties);
7571
this.ignoreAbove = builder.ignoreAbove;
@@ -79,13 +75,8 @@ protected PropertyBase(AbstractBuilder<?> builder) {
7975
}
8076

8177
/**
82-
* API name: {@code local_metadata}
83-
*/
84-
public final Map<String, JsonData> localMetadata() {
85-
return this.localMetadata;
86-
}
87-
88-
/**
78+
* Metadata about the field.
79+
* <p>
8980
* API name: {@code meta}
9081
*/
9182
public final Map<String, String> meta() {
@@ -133,17 +124,6 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {
133124

134125
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
135126

136-
if (ApiTypeHelper.isDefined(this.localMetadata)) {
137-
generator.writeKey("local_metadata");
138-
generator.writeStartObject();
139-
for (Map.Entry<String, JsonData> item0 : this.localMetadata.entrySet()) {
140-
generator.writeKey(item0.getKey());
141-
item0.getValue().serialize(generator, mapper);
142-
143-
}
144-
generator.writeEnd();
145-
146-
}
147127
if (ApiTypeHelper.isDefined(this.meta)) {
148128
generator.writeKey("meta");
149129
generator.writeStartObject();
@@ -197,9 +177,6 @@ public String toString() {
197177
protected abstract static class AbstractBuilder<BuilderT extends AbstractBuilder<BuilderT>>
198178
extends
199179
WithJsonObjectBuilderBase<BuilderT> {
200-
@Nullable
201-
private Map<String, JsonData> localMetadata;
202-
203180
@Nullable
204181
private Map<String, String> meta;
205182

@@ -216,26 +193,8 @@ protected abstract static class AbstractBuilder<BuilderT extends AbstractBuilder
216193
private Map<String, Property> fields;
217194

218195
/**
219-
* API name: {@code local_metadata}
220-
* <p>
221-
* Adds all entries of <code>map</code> to <code>localMetadata</code>.
222-
*/
223-
public final BuilderT localMetadata(Map<String, JsonData> map) {
224-
this.localMetadata = _mapPutAll(this.localMetadata, map);
225-
return self();
226-
}
227-
228-
/**
229-
* API name: {@code local_metadata}
196+
* Metadata about the field.
230197
* <p>
231-
* Adds an entry to <code>localMetadata</code>.
232-
*/
233-
public final BuilderT localMetadata(String key, JsonData value) {
234-
this.localMetadata = _mapPut(this.localMetadata, key, value);
235-
return self();
236-
}
237-
238-
/**
239198
* API name: {@code meta}
240199
* <p>
241200
* Adds all entries of <code>map</code> to <code>meta</code>.
@@ -246,6 +205,8 @@ public final BuilderT meta(Map<String, String> map) {
246205
}
247206

248207
/**
208+
* Metadata about the field.
209+
* <p>
249210
* API name: {@code meta}
250211
* <p>
251212
* Adds an entry to <code>meta</code>.
@@ -337,8 +298,6 @@ public final BuilderT fields(String key, Function<Property.Builder, ObjectBuilde
337298
protected static <BuilderT extends AbstractBuilder<BuilderT>> void setupPropertyBaseDeserializer(
338299
ObjectDeserializer<BuilderT> op) {
339300

340-
op.add(AbstractBuilder::localMetadata, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER),
341-
"local_metadata");
342301
op.add(AbstractBuilder::meta, JsonpDeserializer.stringMapDeserializer(JsonpDeserializer.stringDeserializer()),
343302
"meta");
344303
op.add(AbstractBuilder::properties, JsonpDeserializer.stringMapDeserializer(Property._DESERIALIZER),

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@
671671
'_types.mapping.FieldAliasProperty': '_types/mapping/specialized.ts#L48-L51',
672672
'_types.mapping.FieldMapping': '_types/mapping/meta-fields.ts#L24-L27',
673673
'_types.mapping.FieldNamesField': '_types/mapping/meta-fields.ts#L42-L44',
674-
'_types.mapping.FieldType': '_types/mapping/Property.ts#L70-L113',
674+
'_types.mapping.FieldType': '_types/mapping/Property.ts#L73-L116',
675675
'_types.mapping.FlattenedProperty': '_types/mapping/complex.ts#L25-L36',
676676
'_types.mapping.FloatNumberProperty': '_types/mapping/core.ts#L156-L159',
677677
'_types.mapping.FloatRangeProperty': '_types/mapping/range.ts#L46-L48',
@@ -700,8 +700,8 @@
700700
'_types.mapping.OnScriptError': '_types/mapping/core.ts#L145-L148',
701701
'_types.mapping.PercolatorProperty': '_types/mapping/core.ts#L214-L216',
702702
'_types.mapping.PointProperty': '_types/mapping/geo.ts#L62-L67',
703-
'_types.mapping.Property': '_types/mapping/Property.ts#L52-L68',
704-
'_types.mapping.PropertyBase': '_types/mapping/Property.ts#L43-L50',
703+
'_types.mapping.Property': '_types/mapping/Property.ts#L55-L71',
704+
'_types.mapping.PropertyBase': '_types/mapping/Property.ts#L43-L53',
705705
'_types.mapping.RangePropertyBase': '_types/mapping/range.ts#L23-L27',
706706
'_types.mapping.RankFeatureProperty': '_types/mapping/core.ts#L218-L221',
707707
'_types.mapping.RankFeaturesProperty': '_types/mapping/core.ts#L223-L225',
@@ -2319,10 +2319,10 @@
23192319
if (hash.length > 1) {
23202320
hash = hash.substring(1);
23212321
}
2322-
window.location = "https://github.com/elastic/elasticsearch-specification/tree/ecbb204f697e82575febfeae209c2eca4a8912fd/specification/" + (paths[hash] || "");
2322+
window.location = "https://github.com/elastic/elasticsearch-specification/tree/3fce738c33988c6222c9032831ba566bf2d63885/specification/" + (paths[hash] || "");
23232323
</script>
23242324
</head>
23252325
<body>
2326-
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/ecbb204f697e82575febfeae209c2eca4a8912fd/specification/">Elasticsearch API specification</a>.
2326+
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/3fce738c33988c6222c9032831ba566bf2d63885/specification/">Elasticsearch API specification</a>.
23272327
</body>
23282328
</html>

java-client/src/main/java/co/elastic/clients/elasticsearch/ilm/ExplainLifecycleRequest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ public final Time masterTimeout() {
109109
}
110110

111111
/**
112-
* Filters the returned indices to only indices that are managed by ILM.
112+
* Filters the returned indices to only indices that are managed by ILM and are
113+
* in an error state, either due to an encountering an error while executing the
114+
* policy, or attempting to use a policy that does not exist.
113115
* <p>
114116
* API name: {@code only_errors}
115117
*/
@@ -119,9 +121,7 @@ public final Boolean onlyErrors() {
119121
}
120122

121123
/**
122-
* Filters the returned indices to only indices that are managed by ILM and are
123-
* in an error state, either due to an encountering an error while executing the
124-
* policy, or attempting to use a policy that does not exist.
124+
* Filters the returned indices to only indices that are managed by ILM.
125125
* <p>
126126
* API name: {@code only_managed}
127127
*/
@@ -198,7 +198,9 @@ public final Builder masterTimeout(Function<Time.Builder, ObjectBuilder<Time>> f
198198
}
199199

200200
/**
201-
* Filters the returned indices to only indices that are managed by ILM.
201+
* Filters the returned indices to only indices that are managed by ILM and are
202+
* in an error state, either due to an encountering an error while executing the
203+
* policy, or attempting to use a policy that does not exist.
202204
* <p>
203205
* API name: {@code only_errors}
204206
*/
@@ -208,9 +210,7 @@ public final Builder onlyErrors(@Nullable Boolean value) {
208210
}
209211

210212
/**
211-
* Filters the returned indices to only indices that are managed by ILM and are
212-
* in an error state, either due to an encountering an error while executing the
213-
* policy, or attempting to use a policy that does not exist.
213+
* Filters the returned indices to only indices that are managed by ILM.
214214
* <p>
215215
* API name: {@code only_managed}
216216
*/

0 commit comments

Comments
 (0)