Skip to content

Commit c709407

Browse files
committed
[codegen] update to latest spec
1 parent 66c37cd commit c709407

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

+129
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

+33-33
Original file line numberDiff line numberDiff line change
@@ -784,85 +784,85 @@
784784
'_types.mapping.AggregateMetricDoubleProperty': '_types/mapping/complex.ts#L61-L66',
785785
'_types.mapping.AllField': '_types/mapping/meta-fields.ts#L29-L40',
786786
'_types.mapping.BinaryProperty': '_types/mapping/core.ts#L54-L56',
787-
'_types.mapping.BooleanProperty': '_types/mapping/core.ts#L58-L64',
788-
'_types.mapping.ByteNumberProperty': '_types/mapping/core.ts#L172-L175',
787+
'_types.mapping.BooleanProperty': '_types/mapping/core.ts#L58-L73',
788+
'_types.mapping.ByteNumberProperty': '_types/mapping/core.ts#L181-L184',
789789
'_types.mapping.CompletionProperty': '_types/mapping/specialized.ts#L33-L41',
790790
'_types.mapping.CompositeSubField': '_types/mapping/RuntimeFields.ts#L52-L54',
791791
'_types.mapping.ConstantKeywordProperty': '_types/mapping/specialized.ts#L50-L53',
792792
'_types.mapping.CorePropertyBase': '_types/mapping/core.ts#L45-L48',
793793
'_types.mapping.DataStreamTimestamp': '_types/mapping/TypeMapping.ts#L59-L61',
794-
'_types.mapping.DateNanosProperty': '_types/mapping/core.ts#L78-L86',
795-
'_types.mapping.DateProperty': '_types/mapping/core.ts#L66-L76',
794+
'_types.mapping.DateNanosProperty': '_types/mapping/core.ts#L87-L95',
795+
'_types.mapping.DateProperty': '_types/mapping/core.ts#L75-L85',
796796
'_types.mapping.DateRangeProperty': '_types/mapping/range.ts#L29-L32',
797797
'_types.mapping.DenseVectorIndexOptions': '_types/mapping/DenseVectorIndexOptions.ts#L22-L27',
798798
'_types.mapping.DenseVectorProperty': '_types/mapping/complex.ts#L52-L59',
799799
'_types.mapping.DocValuesPropertyBase': '_types/mapping/core.ts#L50-L52',
800-
'_types.mapping.DoubleNumberProperty': '_types/mapping/core.ts#L152-L155',
800+
'_types.mapping.DoubleNumberProperty': '_types/mapping/core.ts#L161-L164',
801801
'_types.mapping.DoubleRangeProperty': '_types/mapping/range.ts#L34-L36',
802802
'_types.mapping.DynamicMapping': '_types/mapping/dynamic-template.ts#L49-L58',
803-
'_types.mapping.DynamicProperty': '_types/mapping/core.ts#L302-L333',
803+
'_types.mapping.DynamicProperty': '_types/mapping/core.ts#L311-L342',
804804
'_types.mapping.DynamicTemplate': '_types/mapping/dynamic-template.ts#L22-L42',
805805
'_types.mapping.FieldAliasProperty': '_types/mapping/specialized.ts#L55-L58',
806806
'_types.mapping.FieldMapping': '_types/mapping/meta-fields.ts#L24-L27',
807807
'_types.mapping.FieldNamesField': '_types/mapping/meta-fields.ts#L42-L44',
808808
'_types.mapping.FieldType': '_types/mapping/Property.ts#L166-L213',
809809
'_types.mapping.FlattenedProperty': '_types/mapping/complex.ts#L26-L37',
810-
'_types.mapping.FloatNumberProperty': '_types/mapping/core.ts#L142-L145',
810+
'_types.mapping.FloatNumberProperty': '_types/mapping/core.ts#L151-L154',
811811
'_types.mapping.FloatRangeProperty': '_types/mapping/range.ts#L38-L40',
812812
'_types.mapping.GeoOrientation': '_types/mapping/geo.ts#L34-L39',
813813
'_types.mapping.GeoPointProperty': '_types/mapping/geo.ts#L24-L32',
814814
'_types.mapping.GeoShapeProperty': '_types/mapping/geo.ts#L41-L54',
815815
'_types.mapping.GeoStrategy': '_types/mapping/geo.ts#L56-L59',
816-
'_types.mapping.HalfFloatNumberProperty': '_types/mapping/core.ts#L147-L150',
816+
'_types.mapping.HalfFloatNumberProperty': '_types/mapping/core.ts#L156-L159',
817817
'_types.mapping.HistogramProperty': '_types/mapping/specialized.ts#L60-L63',
818818
'_types.mapping.IcuCollationProperty': '_types/mapping/specialized.ts#L94-L118',
819819
'_types.mapping.IndexField': '_types/mapping/meta-fields.ts#L46-L48',
820-
'_types.mapping.IndexOptions': '_types/mapping/core.ts#L258-L263',
821-
'_types.mapping.IntegerNumberProperty': '_types/mapping/core.ts#L157-L160',
820+
'_types.mapping.IndexOptions': '_types/mapping/core.ts#L267-L272',
821+
'_types.mapping.IntegerNumberProperty': '_types/mapping/core.ts#L166-L169',
822822
'_types.mapping.IntegerRangeProperty': '_types/mapping/range.ts#L42-L44',
823823
'_types.mapping.IpProperty': '_types/mapping/specialized.ts#L65-L79',
824824
'_types.mapping.IpRangeProperty': '_types/mapping/range.ts#L46-L48',
825-
'_types.mapping.JoinProperty': '_types/mapping/core.ts#L88-L92',
826-
'_types.mapping.KeywordProperty': '_types/mapping/core.ts#L94-L113',
827-
'_types.mapping.LongNumberProperty': '_types/mapping/core.ts#L162-L165',
825+
'_types.mapping.JoinProperty': '_types/mapping/core.ts#L97-L101',
826+
'_types.mapping.KeywordProperty': '_types/mapping/core.ts#L103-L122',
827+
'_types.mapping.LongNumberProperty': '_types/mapping/core.ts#L171-L174',
828828
'_types.mapping.LongRangeProperty': '_types/mapping/range.ts#L50-L52',
829-
'_types.mapping.MatchOnlyTextProperty': '_types/mapping/core.ts#L231-L256',
829+
'_types.mapping.MatchOnlyTextProperty': '_types/mapping/core.ts#L240-L265',
830830
'_types.mapping.MatchType': '_types/mapping/dynamic-template.ts#L44-L47',
831831
'_types.mapping.Murmur3HashProperty': '_types/mapping/specialized.ts#L81-L83',
832832
'_types.mapping.NestedProperty': '_types/mapping/complex.ts#L39-L44',
833-
'_types.mapping.NumberPropertyBase': '_types/mapping/core.ts#L115-L135',
833+
'_types.mapping.NumberPropertyBase': '_types/mapping/core.ts#L124-L144',
834834
'_types.mapping.ObjectProperty': '_types/mapping/complex.ts#L46-L50',
835-
'_types.mapping.OnScriptError': '_types/mapping/core.ts#L137-L140',
836-
'_types.mapping.PercolatorProperty': '_types/mapping/core.ts#L188-L190',
835+
'_types.mapping.OnScriptError': '_types/mapping/core.ts#L146-L149',
836+
'_types.mapping.PercolatorProperty': '_types/mapping/core.ts#L197-L199',
837837
'_types.mapping.PointProperty': '_types/mapping/geo.ts#L66-L71',
838838
'_types.mapping.Property': '_types/mapping/Property.ts#L96-L164',
839839
'_types.mapping.PropertyBase': '_types/mapping/Property.ts#L84-L94',
840840
'_types.mapping.RangePropertyBase': '_types/mapping/range.ts#L23-L27',
841-
'_types.mapping.RankFeatureProperty': '_types/mapping/core.ts#L192-L195',
842-
'_types.mapping.RankFeaturesProperty': '_types/mapping/core.ts#L197-L200',
841+
'_types.mapping.RankFeatureProperty': '_types/mapping/core.ts#L201-L204',
842+
'_types.mapping.RankFeaturesProperty': '_types/mapping/core.ts#L206-L209',
843843
'_types.mapping.RoutingField': '_types/mapping/meta-fields.ts#L50-L52',
844844
'_types.mapping.RuntimeField': '_types/mapping/RuntimeFields.ts#L26-L50',
845845
'_types.mapping.RuntimeFieldFetchFields': '_types/mapping/RuntimeFields.ts#L56-L60',
846846
'_types.mapping.RuntimeFieldType': '_types/mapping/RuntimeFields.ts#L62-L72',
847-
'_types.mapping.ScaledFloatNumberProperty': '_types/mapping/core.ts#L182-L186',
848-
'_types.mapping.SearchAsYouTypeProperty': '_types/mapping/core.ts#L212-L223',
849-
'_types.mapping.SemanticTextProperty': '_types/mapping/core.ts#L206-L210',
847+
'_types.mapping.ScaledFloatNumberProperty': '_types/mapping/core.ts#L191-L195',
848+
'_types.mapping.SearchAsYouTypeProperty': '_types/mapping/core.ts#L221-L232',
849+
'_types.mapping.SemanticTextProperty': '_types/mapping/core.ts#L215-L219',
850850
'_types.mapping.ShapeProperty': '_types/mapping/geo.ts#L73-L85',
851-
'_types.mapping.ShortNumberProperty': '_types/mapping/core.ts#L167-L170',
851+
'_types.mapping.ShortNumberProperty': '_types/mapping/core.ts#L176-L179',
852852
'_types.mapping.SizeField': '_types/mapping/meta-fields.ts#L54-L56',
853853
'_types.mapping.SourceField': '_types/mapping/meta-fields.ts#L58-L65',
854854
'_types.mapping.SourceFieldMode': '_types/mapping/meta-fields.ts#L67-L75',
855-
'_types.mapping.SparseVectorProperty': '_types/mapping/core.ts#L202-L204',
855+
'_types.mapping.SparseVectorProperty': '_types/mapping/core.ts#L211-L213',
856856
'_types.mapping.SuggestContext': '_types/mapping/specialized.ts#L43-L48',
857857
'_types.mapping.TermVectorOption': '_types/mapping/TermVectorOption.ts#L20-L28',
858-
'_types.mapping.TextIndexPrefixes': '_types/mapping/core.ts#L265-L268',
859-
'_types.mapping.TextProperty': '_types/mapping/core.ts#L270-L287',
858+
'_types.mapping.TextIndexPrefixes': '_types/mapping/core.ts#L274-L277',
859+
'_types.mapping.TextProperty': '_types/mapping/core.ts#L279-L296',
860860
'_types.mapping.TimeSeriesMetricType': '_types/mapping/TimeSeriesMetricType.ts#L20-L26',
861861
'_types.mapping.TokenCountProperty': '_types/mapping/specialized.ts#L85-L92',
862862
'_types.mapping.TypeMapping': '_types/mapping/TypeMapping.ts#L34-L57',
863-
'_types.mapping.UnsignedLongNumberProperty': '_types/mapping/core.ts#L177-L180',
864-
'_types.mapping.VersionProperty': '_types/mapping/core.ts#L289-L291',
865-
'_types.mapping.WildcardProperty': '_types/mapping/core.ts#L293-L300',
863+
'_types.mapping.UnsignedLongNumberProperty': '_types/mapping/core.ts#L186-L189',
864+
'_types.mapping.VersionProperty': '_types/mapping/core.ts#L298-L300',
865+
'_types.mapping.WildcardProperty': '_types/mapping/core.ts#L302-L309',
866866
'_types.query_dsl.BoolQuery': '_types/query_dsl/compound.ts#L29-L56',
867867
'_types.query_dsl.BoostingQuery': '_types/query_dsl/compound.ts#L58-L74',
868868
'_types.query_dsl.ChildScoreMode': '_types/query_dsl/joining.ts#L25-L39',
@@ -1316,8 +1316,8 @@
13161316
'enrich._types.Summary': 'enrich/_types/Policy.ts#L24-L26',
13171317
'enrich.delete_policy.Request': 'enrich/delete_policy/DeleteEnrichPolicyRequest.ts#L23-L37',
13181318
'enrich.delete_policy.Response': 'enrich/delete_policy/DeleteEnrichPolicyResponse.ts#L22-L24',
1319-
'enrich.execute_policy.EnrichPolicyPhase': 'enrich/execute_policy/types.ts#L24-L29',
1320-
'enrich.execute_policy.ExecuteEnrichPolicyStatus': 'enrich/execute_policy/types.ts#L20-L22',
1319+
'enrich.execute_policy.EnrichPolicyPhase': 'enrich/execute_policy/types.ts#L25-L31',
1320+
'enrich.execute_policy.ExecuteEnrichPolicyStatus': 'enrich/execute_policy/types.ts#L20-L23',
13211321
'enrich.execute_policy.Request': 'enrich/execute_policy/ExecuteEnrichPolicyRequest.ts#L23-L45',
13221322
'enrich.execute_policy.Response': 'enrich/execute_policy/ExecuteEnrichPolicyResponse.ts#L23-L28',
13231323
'enrich.get_policy.Request': 'enrich/get_policy/GetEnrichPolicyRequest.ts#L23-L38',
@@ -2973,10 +2973,10 @@
29732973
if (hash.length > 1) {
29742974
hash = hash.substring(1);
29752975
}
2976-
window.location = "https://github.com/elastic/elasticsearch-specification/tree/c00564eff0272d108c60271c404740322331a9be/specification/" + (paths[hash] || "");
2976+
window.location = "https://github.com/elastic/elasticsearch-specification/tree/01990f0fb08d95f8116318112a2b085f8c044cab/specification/" + (paths[hash] || "");
29772977
</script>
29782978
</head>
29792979
<body>
2980-
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/c00564eff0272d108c60271c404740322331a9be/specification/">Elasticsearch API specification</a>.
2980+
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/01990f0fb08d95f8116318112a2b085f8c044cab/specification/">Elasticsearch API specification</a>.
29812981
</body>
29822982
</html>

0 commit comments

Comments
 (0)