Class SpanQuery
- java.lang.Object
-
- org.opensearch.client.opensearch._types.query_dsl.SpanQuery
-
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<SpanQuery.Kind,java.lang.Object>
@JsonpDeserializable public class SpanQuery extends java.lang.Object implements TaggedUnion<SpanQuery.Kind,java.lang.Object>, JsonpSerializable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSpanQuery.Builderstatic classSpanQuery.KindSpanQueryvariant kinds.
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<SpanQuery>_DESERIALIZER
-
Constructor Summary
Constructors Constructor Description SpanQuery(SpanQueryVariant value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object_get()SpanQuery.Kind_kind()Get the of the kind of variant held by this object.SpanFieldMaskingQueryfieldMaskingSpan()Get thefield_masking_spanvariant value.booleanisFieldMaskingSpan()Is this variant instance of kindfield_masking_span?booleanisSpanContaining()Is this variant instance of kindspan_containing?booleanisSpanFirst()Is this variant instance of kindspan_first?booleanisSpanGap()Is this variant instance of kindspan_gap?booleanisSpanMulti()Is this variant instance of kindspan_multi?booleanisSpanNear()Is this variant instance of kindspan_near?booleanisSpanNot()Is this variant instance of kindspan_not?booleanisSpanOr()Is this variant instance of kindspan_or?booleanisSpanTerm()Is this variant instance of kindspan_term?booleanisSpanWithin()Is this variant instance of kindspan_within?static SpanQueryof(java.util.function.Function<SpanQuery.Builder,ObjectBuilder<SpanQuery>> fn)voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupSpanQueryDeserializer(ObjectDeserializer<SpanQuery.Builder> op)SpanContainingQueryspanContaining()Get thespan_containingvariant value.SpanFirstQueryspanFirst()Get thespan_firstvariant value.SpanGapQueryspanGap()Get thespan_gapvariant value.SpanMultiTermQueryspanMulti()Get thespan_multivariant value.SpanNearQueryspanNear()Get thespan_nearvariant value.SpanNotQueryspanNot()Get thespan_notvariant value.SpanOrQueryspanOr()Get thespan_orvariant value.SpanTermQueryspanTerm()Get thespan_termvariant value.SpanWithinQueryspanWithin()Get thespan_withinvariant value.
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<SpanQuery> _DESERIALIZER
-
-
Constructor Detail
-
SpanQuery
public SpanQuery(SpanQueryVariant value)
-
-
Method Detail
-
_kind
public final SpanQuery.Kind _kind()
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<SpanQuery.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()
- Specified by:
_getin interfaceTaggedUnion<SpanQuery.Kind,java.lang.Object>
-
of
public static SpanQuery of(java.util.function.Function<SpanQuery.Builder,ObjectBuilder<SpanQuery>> fn)
-
isSpanContaining
public boolean isSpanContaining()
Is this variant instance of kindspan_containing?
-
spanContaining
public SpanContainingQuery spanContaining()
Get thespan_containingvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_containingkind.
-
isFieldMaskingSpan
public boolean isFieldMaskingSpan()
Is this variant instance of kindfield_masking_span?
-
fieldMaskingSpan
public SpanFieldMaskingQuery fieldMaskingSpan()
Get thefield_masking_spanvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thefield_masking_spankind.
-
isSpanFirst
public boolean isSpanFirst()
Is this variant instance of kindspan_first?
-
spanFirst
public SpanFirstQuery spanFirst()
Get thespan_firstvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_firstkind.
-
isSpanGap
public boolean isSpanGap()
Is this variant instance of kindspan_gap?
-
spanGap
public SpanGapQuery spanGap()
Get thespan_gapvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_gapkind.
-
isSpanMulti
public boolean isSpanMulti()
Is this variant instance of kindspan_multi?
-
spanMulti
public SpanMultiTermQuery spanMulti()
Get thespan_multivariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_multikind.
-
isSpanNear
public boolean isSpanNear()
Is this variant instance of kindspan_near?
-
spanNear
public SpanNearQuery spanNear()
Get thespan_nearvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_nearkind.
-
isSpanNot
public boolean isSpanNot()
Is this variant instance of kindspan_not?
-
spanNot
public SpanNotQuery spanNot()
Get thespan_notvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_notkind.
-
isSpanOr
public boolean isSpanOr()
Is this variant instance of kindspan_or?
-
spanOr
public SpanOrQuery spanOr()
Get thespan_orvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_orkind.
-
isSpanTerm
public boolean isSpanTerm()
Is this variant instance of kindspan_term?
-
spanTerm
public SpanTermQuery spanTerm()
Get thespan_termvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_termkind.
-
isSpanWithin
public boolean isSpanWithin()
Is this variant instance of kindspan_within?
-
spanWithin
public SpanWithinQuery spanWithin()
Get thespan_withinvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thespan_withinkind.
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)- Specified by:
serializein interfaceJsonpSerializable
-
setupSpanQueryDeserializer
protected static void setupSpanQueryDeserializer(ObjectDeserializer<SpanQuery.Builder> op)
-
-