Class MapsGeofenceGeometry
java.lang.Object
com.azure.messaging.eventgrid.systemevents.MapsGeofenceGeometry
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MapsGeofenceGeometry>
public final class MapsGeofenceGeometry
extends Object
implements com.azure.json.JsonSerializable<MapsGeofenceGeometry>
The geofence geometry.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MapsGeofenceGeometryfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of MapsGeofenceGeometry from the JsonReader.Get the deviceId property: ID of the device.doubleGet the distance property: Distance from the coordinate to the closest border of the geofence.Get the geometryId property: The unique ID for the geofence geometry.doubleGet the nearestLat property: Latitude of the nearest point of the geometry.doubleGet the nearestLon property: Longitude of the nearest point of the geometry.getUdId()Get the udId property: The unique id returned from user upload service when uploading a geofence.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Method Details
-
getDeviceId
Get the deviceId property: ID of the device.- Returns:
- the deviceId value.
-
getDistance
public double getDistance()Get the distance property: Distance from the coordinate to the closest border of the geofence. Positive means the coordinate is outside of the geofence. If the coordinate is outside of the geofence, but more than the value of searchBuffer away from the closest geofence border, then the value is 999. Negative means the coordinate is inside of the geofence. If the coordinate is inside the polygon, but more than the value of searchBuffer away from the closest geofencing border,then the value is -999. A value of 999 means that there is great confidence the coordinate is well outside the geofence. A value of -999 means that there is great confidence the coordinate is well within the geofence.- Returns:
- the distance value.
-
getGeometryId
Get the geometryId property: The unique ID for the geofence geometry.- Returns:
- the geometryId value.
-
getNearestLat
public double getNearestLat()Get the nearestLat property: Latitude of the nearest point of the geometry.- Returns:
- the nearestLat value.
-
getNearestLon
public double getNearestLon()Get the nearestLon property: Longitude of the nearest point of the geometry.- Returns:
- the nearestLon value.
-
getUdId
Get the udId property: The unique id returned from user upload service when uploading a geofence. Will not be included in geofencing post API.- Returns:
- the udId value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<MapsGeofenceGeometry>- Throws:
IOException
-
fromJson
public static MapsGeofenceGeometry fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of MapsGeofenceGeometry from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of MapsGeofenceGeometry if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the MapsGeofenceGeometry.
-