Class MessageContent
java.lang.Object
co.elastic.clients.elasticsearch.inference.MessageContent
- All Implemented Interfaces:
JsonpSerializable
,TaggedUnion<MessageContent.Kind,
Object>
@JsonpDeserializable
public class MessageContent
extends Object
implements TaggedUnion<MessageContent.Kind,Object>, JsonpSerializable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static enum
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfinal Object
_get()
final MessageContent.Kind
_kind()
Get the of the kind of variant held by this object.boolean
isObject()
Is this variant instance of kindobject
?boolean
isString()
Is this variant instance of kindstring
?object()
Get theobject
variant value.static MessageContent
void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) string()
Get thestring
variant value.toString()
-
Field Details
-
_DESERIALIZER
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<MessageContent.Kind,
Object> - Returns:
- the variant kind
-
_get
- Specified by:
_get
in interfaceTaggedUnion<MessageContent.Kind,
Object>
-
of
-
isObject
public boolean isObject()Is this variant instance of kindobject
? -
object
Get theobject
variant value.- Throws:
IllegalStateException
- if the current variant is not of theobject
kind.
-
isString
public boolean isString()Is this variant instance of kindstring
? -
string
Get thestring
variant value.- Throws:
IllegalStateException
- if the current variant is not of thestring
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
-