Class GeoHashPrecision
java.lang.Object
co.elastic.clients.elasticsearch._types.GeoHashPrecision
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<GeoHashPrecision.Kind,Object>
@JsonpDeserializable
public class GeoHashPrecision
extends Object
implements TaggedUnion<GeoHashPrecision.Kind,Object>, JsonpSerializable
A precision that can be expressed as a geohash length between 1 and 12, or a
distance measure like "1km", "10m".
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionfinal Object_get()final GeoHashPrecision.Kind_kind()Get the of the kind of variant held by this object.distance()Get thedistancevariant value.Get thegeohash_lengthvariant value.booleanIs this variant instance of kinddistance?booleanIs this variant instance of kindgeohash_length?static GeoHashPrecisionvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) toString()
-
Field Details
-
_DESERIALIZER
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<GeoHashPrecision.Kind,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<GeoHashPrecision.Kind,Object>
-
_toJsonString
-
of
public static GeoHashPrecision of(Function<GeoHashPrecision.Builder, ObjectBuilder<GeoHashPrecision>> fn) -
isGeohashLength
public boolean isGeohashLength()Is this variant instance of kindgeohash_length? -
geohashLength
Get thegeohash_lengthvariant value.- Throws:
IllegalStateException- if the current variant is not of thegeohash_lengthkind.
-
isDistance
public boolean isDistance()Is this variant instance of kinddistance? -
distance
Get thedistancevariant value.- Throws:
IllegalStateException- if the current variant is not of thedistancekind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
-