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 Details

    • RouteDirections

      public RouteDirections()
      Creates an instance of RouteDirections class.
  • Method Details

    • getFormatVersion

      public String getFormatVersion()
      Get the formatVersion property: Format Version property.
      Returns:
      the formatVersion value.
    • getRoutes

      public List<MapsSearchRoute> getRoutes()
      Get the routes property: Routes array.
      Returns:
      the routes value.
    • getOptimizedWaypoints

      public List<RouteOptimizedWaypoint> 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

      public RouteReport getReport()
      Get the report property: Reports the effective settings used in the current call.
      Returns:
      the report value.
    • setReport

      public RouteDirections setReport(RouteReport report)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<RouteDirections>
      Throws:
      IOException
    • fromJson

      public static RouteDirections fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.