Class PinnedQuery
java.lang.Object
co.elastic.clients.elasticsearch._types.query_dsl.QueryBase
co.elastic.clients.elasticsearch._types.query_dsl.PinnedQuery
- All Implemented Interfaces:
QueryVariant
,JsonpSerializable
,TaggedUnion<PinnedQuery.Kind,java.lang.Object>
@JsonpDeserializable public class PinnedQuery extends QueryBase implements TaggedUnion<PinnedQuery.Kind,java.lang.Object>, QueryVariant, JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PinnedQuery.Builder
static class
PinnedQuery.Kind
PinnedQuery
variant kinds.Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase
QueryBase.AbstractBuilder<BuilderT extends QueryBase.AbstractBuilder<BuilderT>>
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<PinnedQuery>
_DESERIALIZER
-
Method Summary
Modifier and Type Method Description java.lang.Object
_get()
PinnedQuery.Kind
_kind()
Get the of the kind of variant held by this object.Query.Kind
_queryKind()
Query variant kind.java.util.List<PinnedDoc>
docs()
Get thedocs
variant value.java.util.List<java.lang.String>
ids()
Get theids
variant value.boolean
isDocs()
Is this variant instance of kinddocs
?boolean
isIds()
Is this variant instance of kindids
?static PinnedQuery
of(java.util.function.Function<PinnedQuery.Builder,ObjectBuilder<PinnedQuery>> fn)
Query
organic()
Required - API name:organic
void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
Serialize this object to JSON.protected static void
setupPinnedQueryDeserializer(ObjectDeserializer<PinnedQuery.Builder> op)
Methods inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase
boost, queryName, serializeInternal, setupQueryBaseDeserializer, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface co.elastic.clients.elasticsearch._types.query_dsl.QueryVariant
_toQuery
-
Field Details
-
_DESERIALIZER
-
-
Method Details
-
_queryKind
Query variant kind.- Specified by:
_queryKind
in interfaceQueryVariant
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<PinnedQuery.Kind,java.lang.Object>
- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<PinnedQuery.Kind,java.lang.Object>
-
of
public static PinnedQuery of(java.util.function.Function<PinnedQuery.Builder,ObjectBuilder<PinnedQuery>> fn) -
organic
Required - API name:organic
-
isIds
public boolean isIds()Is this variant instance of kindids
? -
ids
public java.util.List<java.lang.String> ids()Get theids
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theids
kind.
-
isDocs
public boolean isDocs()Is this variant instance of kinddocs
? -
docs
Get thedocs
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thedocs
kind.
-
serialize
Description copied from class:QueryBase
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
- Overrides:
serialize
in classQueryBase
-
setupPinnedQueryDeserializer
-