Class RouteSection

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

public final class RouteSection extends Object implements com.azure.json.JsonSerializable<RouteSection>
Route sections contain additional information about parts of a route. Each section contains at least the elements `startPointIndex`, `endPointIndex`, and `sectionType`.
  • Constructor Details

    • RouteSection

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

    • getStartPointIndex

      public Integer getStartPointIndex()
      Get the startPointIndex property: Index of the first point (offset 0) in the route this section applies to.
      Returns:
      the startPointIndex value.
    • getEndPointIndex

      public Integer getEndPointIndex()
      Get the endPointIndex property: Index of the last point (offset 0) in the route this section applies to.
      Returns:
      the endPointIndex value.
    • getSectionType

      public RouteSectionType getSectionType()
      Get the sectionType property: Section types of the reported route response.
      Returns:
      the sectionType value.
    • getTravelMode

      public RouteTravelMode getTravelMode()
      Get the travelMode property: Travel mode for the calculated route. The value will be set to `other` if the requested mode of transport is not possible in this section.
      Returns:
      the travelMode value.
    • getSimpleCategory

      public RouteDelayReason getSimpleCategory()
      Get the simpleCategory property: Type of the incident. Can currently be JAM, ROAD_WORK, ROAD_CLOSURE, or OTHER. See "tec" for detailed information.
      Returns:
      the simpleCategory value.
    • getEffectiveSpeedInKmh

      public Integer getEffectiveSpeedInKmh()
      Get the effectiveSpeedInKmh property: Effective speed of the incident in km/h, averaged over its entire length.
      Returns:
      the effectiveSpeedInKmh value.
    • getDelayInSeconds

      public Integer getDelayInSeconds()
      Get the delayInSeconds property: Delay in seconds caused by the incident.
      Returns:
      the delayInSeconds value.
    • getDelayMagnitude

      public DelayMagnitude getDelayMagnitude()
      Get the delayMagnitude property: The magnitude of delay caused by the incident. These values correspond to the values of the response field ty of the [Get Traffic Incident Detail API](https://docs.microsoft.com/rest/api/maps/traffic/gettrafficincidentdetail).
      Returns:
      the delayMagnitude value.
    • getTec

      public RouteSectionTec getTec()
      Get the tec property: Details of the traffic event, using definitions in the [TPEG2-TEC](https://www.iso.org/standard/63116.html) standard. Can contain effectCode and causes elements.
      Returns:
      the tec value.
    • setTec

      public RouteSection setTec(RouteSectionTec tec)
      Set the tec property: Details of the traffic event, using definitions in the [TPEG2-TEC](https://www.iso.org/standard/63116.html) standard. Can contain effectCode and causes elements.
      Parameters:
      tec - the tec value to set.
      Returns:
      the RouteSection 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<RouteSection>
      Throws:
      IOException
    • fromJson

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