Class GeoBounds

java.lang.Object
co.elastic.clients.elasticsearch._types.GeoBounds
All Implemented Interfaces:
JsonpSerializable, TaggedUnion<GeoBounds.Kind,​java.lang.Object>

@JsonpDeserializable
public class GeoBounds
extends java.lang.Object
implements TaggedUnion<GeoBounds.Kind,​java.lang.Object>, JsonpSerializable
A geo bounding box. It can be represented in various ways:
  • as 4 top/bottom/left/right coordinates
  • as 2 top_left / bottom_right points
  • as 2 top_right / bottom_left points
  • as a WKT bounding box
See Also:
API specification
  • Field Details

  • Method Details

    • _kind

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

      public final java.lang.Object _get()
      Specified by:
      _get in interface TaggedUnion<GeoBounds.Kind,​java.lang.Object>
    • of

      public static GeoBounds of​(java.util.function.Function<GeoBounds.Builder,​ObjectBuilder<GeoBounds>> fn)
    • isCoords

      public boolean isCoords()
      Is this variant instance of kind coords?
    • coords

      public CoordsGeoBounds coords()
      Get the coords variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the coords kind.
    • isTlbr

      public boolean isTlbr()
      Is this variant instance of kind tlbr?
    • tlbr

      Get the tlbr variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the tlbr kind.
    • isTrbl

      public boolean isTrbl()
      Is this variant instance of kind trbl?
    • trbl

      Get the trbl variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the trbl kind.
    • isWkt

      public boolean isWkt()
      Is this variant instance of kind wkt?
    • wkt

      public WktGeoBounds wkt()
      Get the wkt variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the wkt kind.
    • serialize

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