From de00ee45ddbf4a0ac9989c8bb6a92d6c281c9ead Mon Sep 17 00:00:00 2001 From: Urs Keller Date: Wed, 10 Jan 2024 14:18:25 +0100 Subject: [PATCH] Add wrapper to builder --- .../opensearch/_types/query_dsl/Query.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java index 7413df3593..c0325958a3 100644 --- a/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java +++ b/java-client/src/main/java/org/opensearch/client/opensearch/_types/query_dsl/Query.java @@ -1153,6 +1153,23 @@ public WildcardQuery wildcard() { return TaggedUnionUtils.get(this, Kind.Wildcard); } + /** + * Is this variant instance of kind {@code wrapper}? + */ + public boolean isWrapper() { + return this._kind == Query.Kind.Wrapper; + } + + /** + * Get the {@code wrapper} variant value. + * + * @throws IllegalStateException + * if the current variant is not of the {@code wrapper} kind. + */ + public WrapperQuery wrapper() { + return (WrapperQuery) TaggedUnionUtils.get(this, Query.Kind.Wrapper); + } + /** * Is this variant instance of kind {@code type}? */