java.lang.Object
co.elastic.clients.elasticsearch.security.query_user.UserQuery
All Implemented Interfaces:
JsonpSerializable, OpenTaggedUnion<UserQuery.Kind,Object>, TaggedUnion<UserQuery.Kind,Object>

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • _kind

      public final UserQuery.Kind _kind()
      Description copied from interface: TaggedUnion
      Get the of the kind of variant held by this object.
      Specified by:
      _kind in interface TaggedUnion<UserQuery.Kind,Object>
      Returns:
      the variant kind
    • _get

      public final Object _get()
      Specified by:
      _get in interface TaggedUnion<UserQuery.Kind,Object>
    • of

    • isIds

      public boolean isIds()
      Is this variant instance of kind ids?
    • ids

      public IdsQuery ids()
      Get the ids variant value.
      Throws:
      IllegalStateException - if the current variant is not of the ids kind.
    • isBool

      public boolean isBool()
      Is this variant instance of kind bool?
    • bool

      public BoolQuery bool()
      Get the bool variant value.
      Throws:
      IllegalStateException - if the current variant is not of the bool kind.
    • isExists

      public boolean isExists()
      Is this variant instance of kind exists?
    • exists

      public ExistsQuery exists()
      Get the exists variant value.
      Throws:
      IllegalStateException - if the current variant is not of the exists kind.
    • isMatch

      public boolean isMatch()
      Is this variant instance of kind match?
    • match

      public MatchQuery match()
      Get the match variant value.
      Throws:
      IllegalStateException - if the current variant is not of the match kind.
    • isMatchAll

      public boolean isMatchAll()
      Is this variant instance of kind match_all?
    • matchAll

      public MatchAllQuery matchAll()
      Get the match_all variant value.
      Throws:
      IllegalStateException - if the current variant is not of the match_all kind.
    • isPrefix

      public boolean isPrefix()
      Is this variant instance of kind prefix?
    • prefix

      public PrefixQuery prefix()
      Get the prefix variant value.
      Throws:
      IllegalStateException - if the current variant is not of the prefix kind.
    • isRange

      public boolean isRange()
      Is this variant instance of kind range?
    • range

      public RangeQuery range()
      Get the range variant value.
      Throws:
      IllegalStateException - if the current variant is not of the range kind.
    • isSimpleQueryString

      public boolean isSimpleQueryString()
      Is this variant instance of kind simple_query_string?
    • simpleQueryString

      public SimpleQueryStringQuery simpleQueryString()
      Get the simple_query_string variant value.
      Throws:
      IllegalStateException - if the current variant is not of the simple_query_string kind.
    • isTerm

      public boolean isTerm()
      Is this variant instance of kind term?
    • term

      public TermQuery term()
      Get the term variant value.
      Throws:
      IllegalStateException - if the current variant is not of the term kind.
    • isTerms

      public boolean isTerms()
      Is this variant instance of kind terms?
    • terms

      public TermsQuery terms()
      Get the terms variant value.
      Throws:
      IllegalStateException - if the current variant is not of the terms kind.
    • isWildcard

      public boolean isWildcard()
      Is this variant instance of kind wildcard?
    • wildcard

      public WildcardQuery wildcard()
      Get the wildcard variant value.
      Throws:
      IllegalStateException - if the current variant is not of the wildcard kind.
    • _isCustom

      public boolean _isCustom()
      Is this a custom UserQuery defined by a plugin?
    • _customKind

      @Nullable public final String _customKind()
      Get the actual kind when _kind() equals UserQuery.Kind._Custom (plugin-defined variant).
      Specified by:
      _customKind in interface OpenTaggedUnion<UserQuery.Kind,Object>
    • _custom

      public JsonData _custom()
      Get the custom plugin-defined variant value.
      Throws:
      IllegalStateException - if the current variant is not UserQuery.Kind._Custom.
    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Specified by:
      serialize in interface JsonpSerializable
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setupUserQueryDeserializer

      protected static void setupUserQueryDeserializer(ObjectDeserializer<UserQuery.Builder> op)