Class RouteLeg

java.lang.Object
com.azure.maps.route.models.RouteLeg
All Implemented Interfaces:
com.azure.json.JsonSerializable<RouteLeg>

public final class RouteLeg extends Object implements com.azure.json.JsonSerializable<RouteLeg>
A description of a part of a route, comprised of a list of points. Each additional waypoint provided in the request will result in an additional leg in the returned route.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of RouteLeg class.
  • Method Summary

    Modifier and Type
    Method
    Description
    static RouteLeg
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of RouteLeg from the JsonReader.
    List<com.azure.core.models.GeoPosition>
    Returns a list of GeoPosition coordinates.
    Get the summary property: Summary object for route section.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • RouteLeg

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

    • getSummary

      public RouteLegSummary getSummary()
      Get the summary property: Summary object for route section.
      Returns:
      the summary value.
    • getPoints

      public List<com.azure.core.models.GeoPosition> getPoints()
      Returns a list of GeoPosition coordinates.
      Returns:
      a list of GeoPosition coordinates.
    • toJson

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

      public static RouteLeg fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of RouteLeg from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of RouteLeg 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 RouteLeg.