Class GeoHashPrecision
java.lang.Object
org.opensearch.client.opensearch._types.GeoHashPrecision
- All Implemented Interfaces:
JsonpSerializable,PlainJsonSerializable,TaggedUnion<GeoHashPrecision.Kind,Object>
@JsonpDeserializable
@Generated("org.opensearch.client.codegen.CodeGenerator")
public class GeoHashPrecision
extends Object
implements TaggedUnion<GeoHashPrecision.Kind,Object>, PlainJsonSerializable
The level of geohash precision, which can be expressed as a geohash length between 1 and 12 or as a distance measure, such as
"1km" or "10m".
-
Nested Class Summary
Nested Classes -
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.static GeoHashPrecision.Builderbuilder()distance()Get thedistancevariant value.booleanGet thegeohash_lengthvariant value.inthashCode()booleanIs this variant instance of kinddistance?booleanIs this variant instance of kindgeohash_length?static GeoHashPrecisionvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.json.PlainJsonSerializable
toJsonString
-
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>
-
of
public static GeoHashPrecision of(Function<GeoHashPrecision.Builder, ObjectBuilder<GeoHashPrecision>> fn) -
_toJsonString
-
isDistance
public boolean isDistance()Is this variant instance of kinddistance? -
distance
Get thedistancevariant value.- Throws:
IllegalStateException- if the current variant is not thedistancekind.
-
isGeohashLength
public boolean isGeohashLength()Is this variant instance of kindgeohash_length? -
geohashLength
Get thegeohash_lengthvariant value.- Throws:
IllegalStateException- if the current variant is not thegeohash_lengthkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toBuilder
-
builder
-
hashCode
public int hashCode() -
equals
-