Class GeoBounds
- java.lang.Object
-
- org.opensearch.client.opensearch._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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeoBounds.Builderstatic classGeoBounds.Kind
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<GeoBounds>_DESERIALIZER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object_get()GeoBounds.Kind_kind()Get the of the kind of variant held by this object.CoordsGeoBoundscoords()Get thecoordsvariant value.booleanisCoords()Is this variant instance of kindcoords?booleanisTlbr()Is this variant instance of kindtlbr?booleanisTrbl()Is this variant instance of kindtrbl?booleanisWkt()Is this variant instance of kindwkt?static GeoBoundsof(java.util.function.Function<GeoBounds.Builder,ObjectBuilder<GeoBounds>> fn)voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)TopLeftBottomRightGeoBoundstlbr()Get thetlbrvariant value.TopRightBottomLeftGeoBoundstrbl()Get thetrblvariant value.WktGeoBoundswkt()Get thewktvariant value.
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<GeoBounds> _DESERIALIZER
-
-
Method Detail
-
_kind
public final GeoBounds.Kind _kind()
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<GeoBounds.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()
- Specified by:
_getin interfaceTaggedUnion<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 kindcoords?
-
coords
public CoordsGeoBounds coords()
Get thecoordsvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thecoordskind.
-
isTlbr
public boolean isTlbr()
Is this variant instance of kindtlbr?
-
tlbr
public TopLeftBottomRightGeoBounds tlbr()
Get thetlbrvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thetlbrkind.
-
isTrbl
public boolean isTrbl()
Is this variant instance of kindtrbl?
-
trbl
public TopRightBottomLeftGeoBounds trbl()
Get thetrblvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thetrblkind.
-
isWkt
public boolean isWkt()
Is this variant instance of kindwkt?
-
wkt
public WktGeoBounds wkt()
Get thewktvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thewktkind.
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)- Specified by:
serializein interfaceJsonpSerializable
-
-