Class PinnedQuery
- java.lang.Object
-
- org.opensearch.client.opensearch._types.query_dsl.QueryBase
-
- org.opensearch.client.opensearch._types.query_dsl.PinnedQuery
-
- All Implemented Interfaces:
JsonpSerializable,QueryVariant,TaggedUnion<PinnedQuery.Kind,java.lang.Object>
@JsonpDeserializable public class PinnedQuery extends QueryBase implements TaggedUnion<PinnedQuery.Kind,java.lang.Object>, QueryVariant, JsonpSerializable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPinnedQuery.Builderstatic classPinnedQuery.KindPinnedQueryvariant kinds.-
Nested classes/interfaces inherited from class org.opensearch.client.opensearch._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
All Methods Static Methods Instance Methods Concrete Methods 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 org.opensearch.client.opensearch._types.query_dsl.QueryBase
boost, queryName, serializeInternal, setupQueryBaseDeserializer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opensearch.client.opensearch._types.query_dsl.QueryVariant
_toQuery
-
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<PinnedQuery> _DESERIALIZER
-
-
Method Detail
-
_queryKind
public Query.Kind _queryKind()
Query variant kind.- Specified by:
_queryKindin interfaceQueryVariant
-
_kind
public final PinnedQuery.Kind _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
public final Query 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
public java.util.List<PinnedDoc> docs()
Get thedocsvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thedocskind.
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Description copied from class:QueryBaseSerialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable- Overrides:
serializein classQueryBase
-
setupPinnedQueryDeserializer
protected static void setupPinnedQueryDeserializer(ObjectDeserializer<PinnedQuery.Builder> op)
-
-