Class Like
java.lang.Object
co.elastic.clients.elasticsearch._types.query_dsl.Like
- All Implemented Interfaces:
JsonpSerializable
,TaggedUnion<Like.Kind,
Object>
@JsonpDeserializable
public class Like
extends Object
implements TaggedUnion<Like.Kind,Object>, JsonpSerializable
Text that we want similar documents for or a lookup to a document's field for
the text.
- See Also:
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Object
_get()
final Like.Kind
_kind()
Get the of the kind of variant held by this object.document()
Get thedocument
variant value.boolean
Is this variant instance of kinddocument
?boolean
isText()
Is this variant instance of kindtext
?static Like
of
(Function<Like.Builder, ObjectBuilder<Like>> fn) void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) text()
Get thetext
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<Like.Kind,
Object> - Returns:
- the variant kind
-
_get
- Specified by:
_get
in interfaceTaggedUnion<Like.Kind,
Object>
-
of
-
isDocument
public boolean isDocument()Is this variant instance of kinddocument
? -
document
Get thedocument
variant value.- Throws:
IllegalStateException
- if the current variant is not of thedocument
kind.
-
isText
public boolean isText()Is this variant instance of kindtext
? -
text
Get thetext
variant value.- Throws:
IllegalStateException
- if the current variant is not of thetext
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
-