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
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfinal Object_get()final Like.Kind_kind()Get the of the kind of variant held by this object.document()Get thedocumentvariant value.booleanIs this variant instance of kinddocument?booleanisText()Is this variant instance of kindtext?static Likeof(Function<Like.Builder, ObjectBuilder<Like>> fn) voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) text()Get thetextvariant 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<Like.Kind,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<Like.Kind,Object>
-
of
-
isDocument
public boolean isDocument()Is this variant instance of kinddocument? -
document
Get thedocumentvariant value.- Throws:
IllegalStateException- if the current variant is not of thedocumentkind.
-
isText
public boolean isText()Is this variant instance of kindtext? -
text
Get thetextvariant value.- Throws:
IllegalStateException- if the current variant is not of thetextkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
-