Skip to content

Commit a943af3

Browse files
committed
[codegen] update to latest spec
1 parent b8a2c00 commit a943af3

File tree

5 files changed

+207
-46
lines changed

5 files changed

+207
-46
lines changed

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

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
package co.elastic.clients.elasticsearch._types.mapping;
2121

22+
import co.elastic.clients.elasticsearch._types.Script;
2223
import co.elastic.clients.elasticsearch.indices.NumericFielddata;
2324
import co.elastic.clients.json.JsonpDeserializable;
2425
import co.elastic.clients.json.JsonpDeserializer;
@@ -70,6 +71,18 @@ public class BooleanProperty extends DocValuesPropertyBase implements PropertyVa
7071
@Nullable
7172
private final Boolean nullValue;
7273

74+
@Nullable
75+
private final Boolean ignoreMalformed;
76+
77+
@Nullable
78+
private final Script script;
79+
80+
@Nullable
81+
private final OnScriptError onScriptError;
82+
83+
@Nullable
84+
private final Boolean timeSeriesDimension;
85+
7386
// ---------------------------------------------------------------------------------------------
7487

7588
private BooleanProperty(Builder builder) {
@@ -79,6 +92,10 @@ private BooleanProperty(Builder builder) {
7992
this.fielddata = builder.fielddata;
8093
this.index = builder.index;
8194
this.nullValue = builder.nullValue;
95+
this.ignoreMalformed = builder.ignoreMalformed;
96+
this.script = builder.script;
97+
this.onScriptError = builder.onScriptError;
98+
this.timeSeriesDimension = builder.timeSeriesDimension;
8299

83100
}
84101

@@ -126,6 +143,41 @@ public final Boolean nullValue() {
126143
return this.nullValue;
127144
}
128145

146+
/**
147+
* API name: {@code ignore_malformed}
148+
*/
149+
@Nullable
150+
public final Boolean ignoreMalformed() {
151+
return this.ignoreMalformed;
152+
}
153+
154+
/**
155+
* API name: {@code script}
156+
*/
157+
@Nullable
158+
public final Script script() {
159+
return this.script;
160+
}
161+
162+
/**
163+
* API name: {@code on_script_error}
164+
*/
165+
@Nullable
166+
public final OnScriptError onScriptError() {
167+
return this.onScriptError;
168+
}
169+
170+
/**
171+
* For internal use by Elastic only. Marks the field as a time series dimension.
172+
* Defaults to false.
173+
* <p>
174+
* API name: {@code time_series_dimension}
175+
*/
176+
@Nullable
177+
public final Boolean timeSeriesDimension() {
178+
return this.timeSeriesDimension;
179+
}
180+
129181
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
130182

131183
generator.write("type", "boolean");
@@ -150,6 +202,25 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
150202
generator.write(this.nullValue);
151203

152204
}
205+
if (this.ignoreMalformed != null) {
206+
generator.writeKey("ignore_malformed");
207+
generator.write(this.ignoreMalformed);
208+
209+
}
210+
if (this.script != null) {
211+
generator.writeKey("script");
212+
this.script.serialize(generator, mapper);
213+
214+
}
215+
if (this.onScriptError != null) {
216+
generator.writeKey("on_script_error");
217+
this.onScriptError.serialize(generator, mapper);
218+
}
219+
if (this.timeSeriesDimension != null) {
220+
generator.writeKey("time_series_dimension");
221+
generator.write(this.timeSeriesDimension);
222+
223+
}
153224

154225
}
155226

@@ -174,6 +245,18 @@ public static class Builder extends DocValuesPropertyBase.AbstractBuilder<Builde
174245
@Nullable
175246
private Boolean nullValue;
176247

248+
@Nullable
249+
private Boolean ignoreMalformed;
250+
251+
@Nullable
252+
private Script script;
253+
254+
@Nullable
255+
private OnScriptError onScriptError;
256+
257+
@Nullable
258+
private Boolean timeSeriesDimension;
259+
177260
/**
178261
* API name: {@code boost}
179262
*/
@@ -213,6 +296,48 @@ public final Builder nullValue(@Nullable Boolean value) {
213296
return this;
214297
}
215298

299+
/**
300+
* API name: {@code ignore_malformed}
301+
*/
302+
public final Builder ignoreMalformed(@Nullable Boolean value) {
303+
this.ignoreMalformed = value;
304+
return this;
305+
}
306+
307+
/**
308+
* API name: {@code script}
309+
*/
310+
public final Builder script(@Nullable Script value) {
311+
this.script = value;
312+
return this;
313+
}
314+
315+
/**
316+
* API name: {@code script}
317+
*/
318+
public final Builder script(Function<Script.Builder, ObjectBuilder<Script>> fn) {
319+
return this.script(fn.apply(new Script.Builder()).build());
320+
}
321+
322+
/**
323+
* API name: {@code on_script_error}
324+
*/
325+
public final Builder onScriptError(@Nullable OnScriptError value) {
326+
this.onScriptError = value;
327+
return this;
328+
}
329+
330+
/**
331+
* For internal use by Elastic only. Marks the field as a time series dimension.
332+
* Defaults to false.
333+
* <p>
334+
* API name: {@code time_series_dimension}
335+
*/
336+
public final Builder timeSeriesDimension(@Nullable Boolean value) {
337+
this.timeSeriesDimension = value;
338+
return this;
339+
}
340+
216341
@Override
217342
protected Builder self() {
218343
return this;
@@ -245,6 +370,10 @@ protected static void setupBooleanPropertyDeserializer(ObjectDeserializer<Boolea
245370
op.add(Builder::fielddata, NumericFielddata._DESERIALIZER, "fielddata");
246371
op.add(Builder::index, JsonpDeserializer.booleanDeserializer(), "index");
247372
op.add(Builder::nullValue, JsonpDeserializer.booleanDeserializer(), "null_value");
373+
op.add(Builder::ignoreMalformed, JsonpDeserializer.booleanDeserializer(), "ignore_malformed");
374+
op.add(Builder::script, Script._DESERIALIZER, "script");
375+
op.add(Builder::onScriptError, OnScriptError._DESERIALIZER, "on_script_error");
376+
op.add(Builder::timeSeriesDimension, JsonpDeserializer.booleanDeserializer(), "time_series_dimension");
248377

249378
op.ignore("type");
250379
}

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

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -786,89 +786,89 @@
786786
'_types.mapping.AggregateMetricDoubleProperty': '_types/mapping/complex.ts#L51-L56',
787787
'_types.mapping.AllField': '_types/mapping/meta-fields.ts#L29-L40',
788788
'_types.mapping.BinaryProperty': '_types/mapping/core.ts#L54-L56',
789-
'_types.mapping.BooleanProperty': '_types/mapping/core.ts#L58-L64',
790-
'_types.mapping.ByteNumberProperty': '_types/mapping/core.ts#L172-L175',
789+
'_types.mapping.BooleanProperty': '_types/mapping/core.ts#L58-L73',
790+
'_types.mapping.ByteNumberProperty': '_types/mapping/core.ts#L181-L184',
791791
'_types.mapping.CompletionProperty': '_types/mapping/specialized.ts#L33-L41',
792792
'_types.mapping.CompositeSubField': '_types/mapping/RuntimeFields.ts#L52-L54',
793793
'_types.mapping.ConstantKeywordProperty': '_types/mapping/specialized.ts#L50-L53',
794794
'_types.mapping.CorePropertyBase': '_types/mapping/core.ts#L45-L48',
795795
'_types.mapping.DataStreamTimestamp': '_types/mapping/TypeMapping.ts#L59-L61',
796-
'_types.mapping.DateNanosProperty': '_types/mapping/core.ts#L78-L86',
797-
'_types.mapping.DateProperty': '_types/mapping/core.ts#L66-L76',
796+
'_types.mapping.DateNanosProperty': '_types/mapping/core.ts#L87-L95',
797+
'_types.mapping.DateProperty': '_types/mapping/core.ts#L75-L85',
798798
'_types.mapping.DateRangeProperty': '_types/mapping/range.ts#L29-L32',
799799
'_types.mapping.DenseVectorElementType': '_types/mapping/DenseVectorProperty.ts#L64-L80',
800800
'_types.mapping.DenseVectorIndexOptions': '_types/mapping/DenseVectorProperty.ts#L129-L162',
801801
'_types.mapping.DenseVectorIndexOptionsType': '_types/mapping/DenseVectorProperty.ts#L164-L197',
802802
'_types.mapping.DenseVectorProperty': '_types/mapping/DenseVectorProperty.ts#L23-L62',
803803
'_types.mapping.DenseVectorSimilarity': '_types/mapping/DenseVectorProperty.ts#L82-L127',
804804
'_types.mapping.DocValuesPropertyBase': '_types/mapping/core.ts#L50-L52',
805-
'_types.mapping.DoubleNumberProperty': '_types/mapping/core.ts#L152-L155',
805+
'_types.mapping.DoubleNumberProperty': '_types/mapping/core.ts#L161-L164',
806806
'_types.mapping.DoubleRangeProperty': '_types/mapping/range.ts#L34-L36',
807807
'_types.mapping.DynamicMapping': '_types/mapping/dynamic-template.ts#L49-L58',
808-
'_types.mapping.DynamicProperty': '_types/mapping/core.ts#L314-L345',
808+
'_types.mapping.DynamicProperty': '_types/mapping/core.ts#L323-L354',
809809
'_types.mapping.DynamicTemplate': '_types/mapping/dynamic-template.ts#L22-L42',
810810
'_types.mapping.FieldAliasProperty': '_types/mapping/specialized.ts#L55-L58',
811811
'_types.mapping.FieldMapping': '_types/mapping/meta-fields.ts#L24-L27',
812812
'_types.mapping.FieldNamesField': '_types/mapping/meta-fields.ts#L42-L44',
813813
'_types.mapping.FieldType': '_types/mapping/Property.ts#L187-L234',
814814
'_types.mapping.FlattenedProperty': '_types/mapping/complex.ts#L25-L36',
815-
'_types.mapping.FloatNumberProperty': '_types/mapping/core.ts#L142-L145',
815+
'_types.mapping.FloatNumberProperty': '_types/mapping/core.ts#L151-L154',
816816
'_types.mapping.FloatRangeProperty': '_types/mapping/range.ts#L38-L40',
817817
'_types.mapping.GeoOrientation': '_types/mapping/geo.ts#L34-L39',
818818
'_types.mapping.GeoPointProperty': '_types/mapping/geo.ts#L24-L32',
819819
'_types.mapping.GeoShapeProperty': '_types/mapping/geo.ts#L41-L55',
820820
'_types.mapping.GeoStrategy': '_types/mapping/geo.ts#L57-L60',
821-
'_types.mapping.HalfFloatNumberProperty': '_types/mapping/core.ts#L147-L150',
821+
'_types.mapping.HalfFloatNumberProperty': '_types/mapping/core.ts#L156-L159',
822822
'_types.mapping.HistogramProperty': '_types/mapping/specialized.ts#L60-L63',
823823
'_types.mapping.IcuCollationProperty': '_types/mapping/specialized.ts#L94-L118',
824824
'_types.mapping.IndexField': '_types/mapping/meta-fields.ts#L46-L48',
825-
'_types.mapping.IndexOptions': '_types/mapping/core.ts#L270-L275',
826-
'_types.mapping.IntegerNumberProperty': '_types/mapping/core.ts#L157-L160',
825+
'_types.mapping.IndexOptions': '_types/mapping/core.ts#L279-L284',
826+
'_types.mapping.IntegerNumberProperty': '_types/mapping/core.ts#L166-L169',
827827
'_types.mapping.IntegerRangeProperty': '_types/mapping/range.ts#L42-L44',
828828
'_types.mapping.IpProperty': '_types/mapping/specialized.ts#L65-L79',
829829
'_types.mapping.IpRangeProperty': '_types/mapping/range.ts#L46-L48',
830-
'_types.mapping.JoinProperty': '_types/mapping/core.ts#L88-L92',
831-
'_types.mapping.KeywordProperty': '_types/mapping/core.ts#L94-L113',
832-
'_types.mapping.LongNumberProperty': '_types/mapping/core.ts#L162-L165',
830+
'_types.mapping.JoinProperty': '_types/mapping/core.ts#L97-L101',
831+
'_types.mapping.KeywordProperty': '_types/mapping/core.ts#L103-L122',
832+
'_types.mapping.LongNumberProperty': '_types/mapping/core.ts#L171-L174',
833833
'_types.mapping.LongRangeProperty': '_types/mapping/range.ts#L50-L52',
834-
'_types.mapping.MatchOnlyTextProperty': '_types/mapping/core.ts#L243-L268',
834+
'_types.mapping.MatchOnlyTextProperty': '_types/mapping/core.ts#L252-L277',
835835
'_types.mapping.MatchType': '_types/mapping/dynamic-template.ts#L44-L47',
836836
'_types.mapping.Murmur3HashProperty': '_types/mapping/specialized.ts#L81-L83',
837837
'_types.mapping.NestedProperty': '_types/mapping/complex.ts#L38-L43',
838-
'_types.mapping.NumberPropertyBase': '_types/mapping/core.ts#L115-L135',
838+
'_types.mapping.NumberPropertyBase': '_types/mapping/core.ts#L124-L144',
839839
'_types.mapping.ObjectProperty': '_types/mapping/complex.ts#L45-L49',
840-
'_types.mapping.OnScriptError': '_types/mapping/core.ts#L137-L140',
841-
'_types.mapping.PercolatorProperty': '_types/mapping/core.ts#L188-L190',
840+
'_types.mapping.OnScriptError': '_types/mapping/core.ts#L146-L149',
841+
'_types.mapping.PercolatorProperty': '_types/mapping/core.ts#L197-L199',
842842
'_types.mapping.PointProperty': '_types/mapping/geo.ts#L67-L72',
843843
'_types.mapping.Property': '_types/mapping/Property.ts#L117-L185',
844844
'_types.mapping.PropertyBase': '_types/mapping/Property.ts#L84-L95',
845845
'_types.mapping.RangePropertyBase': '_types/mapping/range.ts#L23-L27',
846-
'_types.mapping.RankFeatureProperty': '_types/mapping/core.ts#L192-L195',
847-
'_types.mapping.RankFeaturesProperty': '_types/mapping/core.ts#L197-L200',
846+
'_types.mapping.RankFeatureProperty': '_types/mapping/core.ts#L201-L204',
847+
'_types.mapping.RankFeaturesProperty': '_types/mapping/core.ts#L206-L209',
848848
'_types.mapping.RoutingField': '_types/mapping/meta-fields.ts#L50-L52',
849849
'_types.mapping.RuntimeField': '_types/mapping/RuntimeFields.ts#L26-L50',
850850
'_types.mapping.RuntimeFieldFetchFields': '_types/mapping/RuntimeFields.ts#L56-L60',
851851
'_types.mapping.RuntimeFieldType': '_types/mapping/RuntimeFields.ts#L62-L73',
852-
'_types.mapping.ScaledFloatNumberProperty': '_types/mapping/core.ts#L182-L186',
853-
'_types.mapping.SearchAsYouTypeProperty': '_types/mapping/core.ts#L224-L235',
854-
'_types.mapping.SemanticTextProperty': '_types/mapping/core.ts#L206-L222',
852+
'_types.mapping.ScaledFloatNumberProperty': '_types/mapping/core.ts#L191-L195',
853+
'_types.mapping.SearchAsYouTypeProperty': '_types/mapping/core.ts#L233-L244',
854+
'_types.mapping.SemanticTextProperty': '_types/mapping/core.ts#L215-L231',
855855
'_types.mapping.ShapeProperty': '_types/mapping/geo.ts#L74-L86',
856-
'_types.mapping.ShortNumberProperty': '_types/mapping/core.ts#L167-L170',
856+
'_types.mapping.ShortNumberProperty': '_types/mapping/core.ts#L176-L179',
857857
'_types.mapping.SizeField': '_types/mapping/meta-fields.ts#L54-L56',
858858
'_types.mapping.SourceField': '_types/mapping/meta-fields.ts#L58-L65',
859859
'_types.mapping.SourceFieldMode': '_types/mapping/meta-fields.ts#L67-L75',
860-
'_types.mapping.SparseVectorProperty': '_types/mapping/core.ts#L202-L204',
860+
'_types.mapping.SparseVectorProperty': '_types/mapping/core.ts#L211-L213',
861861
'_types.mapping.SuggestContext': '_types/mapping/specialized.ts#L43-L48',
862862
'_types.mapping.SyntheticSourceKeepEnum': '_types/mapping/Property.ts#L97-L115',
863863
'_types.mapping.TermVectorOption': '_types/mapping/TermVectorOption.ts#L20-L28',
864-
'_types.mapping.TextIndexPrefixes': '_types/mapping/core.ts#L277-L280',
865-
'_types.mapping.TextProperty': '_types/mapping/core.ts#L282-L299',
864+
'_types.mapping.TextIndexPrefixes': '_types/mapping/core.ts#L286-L289',
865+
'_types.mapping.TextProperty': '_types/mapping/core.ts#L291-L308',
866866
'_types.mapping.TimeSeriesMetricType': '_types/mapping/TimeSeriesMetricType.ts#L20-L26',
867867
'_types.mapping.TokenCountProperty': '_types/mapping/specialized.ts#L85-L92',
868868
'_types.mapping.TypeMapping': '_types/mapping/TypeMapping.ts#L34-L57',
869-
'_types.mapping.UnsignedLongNumberProperty': '_types/mapping/core.ts#L177-L180',
870-
'_types.mapping.VersionProperty': '_types/mapping/core.ts#L301-L303',
871-
'_types.mapping.WildcardProperty': '_types/mapping/core.ts#L305-L312',
869+
'_types.mapping.UnsignedLongNumberProperty': '_types/mapping/core.ts#L186-L189',
870+
'_types.mapping.VersionProperty': '_types/mapping/core.ts#L310-L312',
871+
'_types.mapping.WildcardProperty': '_types/mapping/core.ts#L314-L321',
872872
'_types.query_dsl.BoolQuery': '_types/query_dsl/compound.ts#L29-L56',
873873
'_types.query_dsl.BoostingQuery': '_types/query_dsl/compound.ts#L58-L74',
874874
'_types.query_dsl.ChildScoreMode': '_types/query_dsl/joining.ts#L25-L39',
@@ -1331,8 +1331,8 @@
13311331
'enrich._types.Summary': 'enrich/_types/Policy.ts#L24-L26',
13321332
'enrich.delete_policy.Request': 'enrich/delete_policy/DeleteEnrichPolicyRequest.ts#L23-L37',
13331333
'enrich.delete_policy.Response': 'enrich/delete_policy/DeleteEnrichPolicyResponse.ts#L22-L24',
1334-
'enrich.execute_policy.EnrichPolicyPhase': 'enrich/execute_policy/types.ts#L24-L29',
1335-
'enrich.execute_policy.ExecuteEnrichPolicyStatus': 'enrich/execute_policy/types.ts#L20-L22',
1334+
'enrich.execute_policy.EnrichPolicyPhase': 'enrich/execute_policy/types.ts#L25-L31',
1335+
'enrich.execute_policy.ExecuteEnrichPolicyStatus': 'enrich/execute_policy/types.ts#L20-L23',
13361336
'enrich.execute_policy.Request': 'enrich/execute_policy/ExecuteEnrichPolicyRequest.ts#L23-L45',
13371337
'enrich.execute_policy.Response': 'enrich/execute_policy/ExecuteEnrichPolicyResponse.ts#L23-L28',
13381338
'enrich.get_policy.Request': 'enrich/get_policy/GetEnrichPolicyRequest.ts#L23-L38',
@@ -3049,10 +3049,10 @@
30493049
if (hash.length > 1) {
30503050
hash = hash.substring(1);
30513051
}
3052-
window.location = "https://github.com/elastic/elasticsearch-specification/tree/1a48397b0921bfc50fe27895ea772f222082892b/specification/" + (paths[hash] || "");
3052+
window.location = "https://github.com/elastic/elasticsearch-specification/tree/c623a5d20613557e3e5d63a7a32eb36b58ac92ec/specification/" + (paths[hash] || "");
30533053
</script>
30543054
</head>
30553055
<body>
3056-
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/1a48397b0921bfc50fe27895ea772f222082892b/specification/">Elasticsearch API specification</a>.
3056+
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/c623a5d20613557e3e5d63a7a32eb36b58ac92ec/specification/">Elasticsearch API specification</a>.
30573057
</body>
30583058
</html>

0 commit comments

Comments
 (0)