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 classPinnedQuery.Builderstatic classPinnedQuery.KindPinnedQueryvariant 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 thedocsvariant value.java.util.List<java.lang.String>ids()Get theidsvariant value.booleanisDocs()Is this variant instance of kinddocs?booleanisIds()Is this variant instance of kindids?static PinnedQueryof(java.util.function.Function<PinnedQuery.Builder,ObjectBuilder<PinnedQuery>> fn)Queryorganic()Required - API name:organicvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected static voidsetupPinnedQueryDeserializer(ObjectDeserializer<PinnedQuery.Builder> op)Methods inherited from class co.elastic.clients.elasticsearch._types.query_dsl.QueryBase
boost, queryName, serializeInternal, setupQueryBaseDeserializerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface co.elastic.clients.elasticsearch._types.query_dsl.QueryVariant
_toQuery
-
Field Details
-
_DESERIALIZER
-
-
Method Details
-
_queryKind
Query variant kind.- Specified by:
_queryKindin interfaceQueryVariant
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<PinnedQuery.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin 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 theidsvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theidskind.
-
isDocs
public boolean isDocs()Is this variant instance of kinddocs? -
docs
Get thedocsvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thedocskind.
-
serialize
Description copied from class:QueryBaseSerialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable- Overrides:
serializein classQueryBase
-
setupPinnedQueryDeserializer
-