Class CompletionToolType
java.lang.Object
co.elastic.clients.elasticsearch.inference.CompletionToolType
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<CompletionToolType.Kind,Object>
@JsonpDeserializable
public class CompletionToolType
extends Object
implements TaggedUnion<CompletionToolType.Kind,Object>, JsonpSerializable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfinal Object_get()final CompletionToolType.Kind_kind()Get the of the kind of variant held by this object.booleanisObject()Is this variant instance of kindobject?booleanisString()Is this variant instance of kindstring?object()Get theobjectvariant value.static CompletionToolTypevoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) string()Get thestringvariant value.toString()
-
Field Details
-
_DESERIALIZER
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<CompletionToolType.Kind,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<CompletionToolType.Kind,Object>
-
of
public static CompletionToolType of(Function<CompletionToolType.Builder, ObjectBuilder<CompletionToolType>> fn) -
isObject
public boolean isObject()Is this variant instance of kindobject? -
object
Get theobjectvariant value.- Throws:
IllegalStateException- if the current variant is not of theobjectkind.
-
isString
public boolean isString()Is this variant instance of kindstring? -
string
Get thestringvariant value.- Throws:
IllegalStateException- if the current variant is not of thestringkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
-