java.lang.Object
org.opensearch.client.opensearch._types.query_dsl.SpanQuery
All Implemented Interfaces:
JsonpSerializable, PlainJsonSerializable, TaggedUnion<SpanQuery.Kind,SpanQueryVariant>

@JsonpDeserializable @Generated("org.opensearch.client.codegen.CodeGenerator") public class SpanQuery extends Object implements TaggedUnion<SpanQuery.Kind,SpanQueryVariant>, PlainJsonSerializable
  • Field Details

  • Constructor Details

  • Method Details

    • _kind

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

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

    • isFieldMaskingSpan

      public boolean isFieldMaskingSpan()
      Is this variant instance of kind field_masking_span?
    • fieldMaskingSpan

      public SpanFieldMaskingQuery fieldMaskingSpan()
      Get the field_masking_span variant value.
      Throws:
      IllegalStateException - if the current variant is not the field_masking_span kind.
    • isSpanContaining

      public boolean isSpanContaining()
      Is this variant instance of kind span_containing?
    • spanContaining

      public SpanContainingQuery spanContaining()
      Get the span_containing variant value.
      Throws:
      IllegalStateException - if the current variant is not the span_containing kind.
    • isSpanFirst

      public boolean isSpanFirst()
      Is this variant instance of kind span_first?
    • spanFirst

      public SpanFirstQuery spanFirst()
      Get the span_first variant value.
      Throws:
      IllegalStateException - if the current variant is not the span_first kind.
    • isSpanGap

      public boolean isSpanGap()
      Is this variant instance of kind span_gap?
    • spanGap

      public SpanGapQuery spanGap()
      Get the span_gap variant value.
      Throws:
      IllegalStateException - if the current variant is not the span_gap kind.
    • isSpanMulti

      public boolean isSpanMulti()
      Is this variant instance of kind span_multi?
    • spanMulti

      public SpanMultiTermQuery spanMulti()
      Get the span_multi variant value.
      Throws:
      IllegalStateException - if the current variant is not the span_multi kind.
    • isSpanNear

      public boolean isSpanNear()
      Is this variant instance of kind span_near?
    • spanNear

      public SpanNearQuery spanNear()
      Get the span_near variant value.
      Throws:
      IllegalStateException - if the current variant is not the span_near kind.
    • isSpanNot

      public boolean isSpanNot()
      Is this variant instance of kind span_not?
    • spanNot

      public SpanNotQuery spanNot()
      Get the span_not variant value.
      Throws:
      IllegalStateException - if the current variant is not the span_not kind.
    • isSpanOr

      public boolean isSpanOr()
      Is this variant instance of kind span_or?
    • spanOr

      public SpanOrQuery spanOr()
      Get the span_or variant value.
      Throws:
      IllegalStateException - if the current variant is not the span_or kind.
    • isSpanTerm

      public boolean isSpanTerm()
      Is this variant instance of kind span_term?
    • spanTerm

      public SpanTermQuery spanTerm()
      Get the span_term variant value.
      Throws:
      IllegalStateException - if the current variant is not the span_term kind.
    • isSpanWithin

      public boolean isSpanWithin()
      Is this variant instance of kind span_within?
    • spanWithin

      public SpanWithinQuery spanWithin()
      Get the span_within variant value.
      Throws:
      IllegalStateException - if the current variant is not the span_within kind.
    • serialize

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

      @Nonnull public SpanQuery.Builder toBuilder()
    • builder

      @Nonnull public static SpanQuery.Builder builder()
    • setupSpanQueryDeserializer

      protected static void setupSpanQueryDeserializer(ObjectDeserializer<SpanQuery.Builder> op)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object