Class Script
- java.lang.Object
-
- org.opensearch.client.opensearch._types.Script
-
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<Script.Kind,java.lang.Object>
@JsonpDeserializable public class Script extends java.lang.Object implements TaggedUnion<Script.Kind,java.lang.Object>, JsonpSerializable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classScript.Builderstatic classScript.Kind
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<Script>_DESERIALIZER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object_get()Script.Kind_kind()Get the of the kind of variant held by this object.InlineScriptinline()Get theinlinevariant value.booleanisInline()Is this variant instance of kindinline?booleanisStored()Is this variant instance of kindstored?static Scriptof(java.util.function.Function<Script.Builder,ObjectBuilder<Script>> fn)voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)StoredScriptIdstored()Get thestoredvariant value.
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<Script> _DESERIALIZER
-
-
Method Detail
-
_kind
public final Script.Kind _kind()
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<Script.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()
- Specified by:
_getin interfaceTaggedUnion<Script.Kind,java.lang.Object>
-
of
public static Script of(java.util.function.Function<Script.Builder,ObjectBuilder<Script>> fn)
-
isInline
public boolean isInline()
Is this variant instance of kindinline?
-
inline
public InlineScript inline()
Get theinlinevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theinlinekind.
-
isStored
public boolean isStored()
Is this variant instance of kindstored?
-
stored
public StoredScriptId stored()
Get thestoredvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thestoredkind.
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)- Specified by:
serializein interfaceJsonpSerializable
-
-