Package com.azure.maps.route.models
Class RouteDirections
java.lang.Object
com.azure.maps.route.models.RouteDirections
- All Implemented Interfaces:
com.azure.json.JsonSerializable<RouteDirections>
public class RouteDirections
extends Object
implements com.azure.json.JsonSerializable<RouteDirections>
This object is returned from a successful Route Directions call.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RouteDirectionsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RouteDirections from the JsonReader.Get the formatVersion property: Format Version property.Get the optimizedWaypoints property: Optimized sequence of waypoints.Get the report property: Reports the effective settings used in the current call.Get the routes property: Routes array.setReport(RouteReport report) Set the report property: Reports the effective settings used in the current call.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
-
Constructor Details
-
RouteDirections
public RouteDirections()Creates an instance of RouteDirections class.
-
-
Method Details
-
getFormatVersion
Get the formatVersion property: Format Version property.- Returns:
- the formatVersion value.
-
getRoutes
Get the routes property: Routes array.- Returns:
- the routes value.
-
getOptimizedWaypoints
Get the optimizedWaypoints property: Optimized sequence of waypoints. It shows the index from the user provided waypoint sequence for the original and optimized list. For instance, a response: ``` <optimizedWaypoints> <waypoint providedIndex="0" optimizedIndex="1"/> <waypoint providedIndex="1" optimizedIndex="2"/> <waypoint providedIndex="2" optimizedIndex="0"/> </optimizedWaypoints> ``` means that the original sequence is [0, 1, 2] and optimized sequence is [1, 2, 0]. Since the index starts by 0 the original is "first, second, third" while the optimized is "second, third, first".- Returns:
- the optimizedWaypoints value.
-
getReport
Get the report property: Reports the effective settings used in the current call.- Returns:
- the report value.
-
setReport
Set the report property: Reports the effective settings used in the current call.- Parameters:
report- the report value to set.- Returns:
- the RouteDirections object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<RouteDirections>- Throws:
IOException
-
fromJson
Reads an instance of RouteDirections from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of RouteDirections if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the RouteDirections.
-