diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java
index 0f3a7b1518..59508b445f 100644
--- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java
+++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/mapping/RuntimeField.java
@@ -81,6 +81,9 @@ public class RuntimeField implements DynamicTemplateVariant, JsonpSerializable {
@Nullable
private final Script script;
+ @Nullable
+ private final OnScriptError onScriptError;
+
private final RuntimeFieldType type;
// ---------------------------------------------------------------------------------------------
@@ -94,6 +97,7 @@ private RuntimeField(Builder builder) {
this.targetField = builder.targetField;
this.targetIndex = builder.targetIndex;
this.script = builder.script;
+ this.onScriptError = builder.onScriptError;
this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type");
}
@@ -178,6 +182,14 @@ public final Script script() {
return this.script;
}
+ /**
+ * API name: {@code on_script_error}
+ */
+ @Nullable
+ public final OnScriptError onScriptError() {
+ return this.onScriptError;
+ }
+
/**
* Required - Field type, which can be: boolean,
* composite, date, double,
@@ -247,6 +259,10 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
this.script.serialize(generator, mapper);
}
+ if (this.onScriptError != null) {
+ generator.writeKey("on_script_error");
+ this.onScriptError.serialize(generator, mapper);
+ }
generator.writeKey("type");
this.type.serialize(generator, mapper);
@@ -285,6 +301,9 @@ public static class Builder extends WithJsonObjectBuilderBase implement
@Nullable
private Script script;
+ @Nullable
+ private OnScriptError onScriptError;
+
private RuntimeFieldType type;
public Builder() {
@@ -297,6 +316,7 @@ private Builder(RuntimeField instance) {
this.targetField = instance.targetField;
this.targetIndex = instance.targetIndex;
this.script = instance.script;
+ this.onScriptError = instance.onScriptError;
this.type = instance.type;
}
@@ -431,6 +451,14 @@ public final Builder script(Function> fn)
return this.script(fn.apply(new Script.Builder()).build());
}
+ /**
+ * API name: {@code on_script_error}
+ */
+ public final Builder onScriptError(@Nullable OnScriptError value) {
+ this.onScriptError = value;
+ return this;
+ }
+
/**
* Required - Field type, which can be: boolean,
* composite, date, double,
@@ -486,6 +514,7 @@ protected static void setupRuntimeFieldDeserializer(ObjectDeserializer 1) {
hash = hash.substring(1);
}
- window.location = "https://github.com/elastic/elasticsearch-specification/tree/b5550652a718400bf19023a2a2a3166fec5c1802/specification/" + (paths[hash] || "");
+ window.location = "https://github.com/elastic/elasticsearch-specification/tree/b30c4748d4e9a305eb5bf0cc352d8188c0824f2e/specification/" + (paths[hash] || "");
- Please see the Elasticsearch API specification.
+ Please see the Elasticsearch API specification.