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<java.lang.Object>, UnionVariant

@JsonpDeserializable
public class PinnedQuery
extends QueryBase
implements TaggedUnion<java.lang.Object>, QueryVariant, JsonpSerializable
  • Field Details

  • Constructor Details

  • Method Details

    • _variantType

      public java.lang.String _variantType()
      Query variant type
      Specified by:
      _variantType in interface UnionVariant
    • _type

      public java.lang.String _type()
      Description copied from interface: TaggedUnion
      Get the of the type of the variant held by this union object.
      Specified by:
      _type in interface TaggedUnion<java.lang.Object>
      Returns:
      the variant type
    • _get

      public java.lang.Object _get()
      Specified by:
      _get in interface TaggedUnion<java.lang.Object>
    • organic

      public Query organic()
      Required - API name: organic
    • ids

      public java.util.List<java.lang.String> ids()
      Get the ids variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the ids kind.
    • docs

      public java.util.List<PinnedDoc> docs()
      Get the docs variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the docs kind.
    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Description copied from class: QueryBase
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
      Overrides:
      serialize in class QueryBase
    • setupPinnedQueryDeserializer

      protected static void setupPinnedQueryDeserializer​(DelegatingDeserializer<PinnedQuery.Builder> op)