Package com.azure.maps.route.models
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RouteSectionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RouteSection from the JsonReader.Get the delayInSeconds property: Delay in seconds caused by the incident.Get the delayMagnitude property: The magnitude of delay caused by the incident.Get the effectiveSpeedInKmh property: Effective speed of the incident in km/h, averaged over its entire length.Get the endPointIndex property: Index of the last point (offset 0) in the route this section applies to.Get the sectionType property: Section types of the reported route response.Get the simpleCategory property: Type of the incident.Get the startPointIndex property: Index of the first point (offset 0) in the route this section applies to.getTec()Get the tec property: Details of the traffic event, using definitions in the [TPEG2-TEC](https://www.iso.org/standard/63116.html) standard.Get the travelMode property: Travel mode for the calculated route.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.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
-
RouteSection
public RouteSection()Creates an instance of RouteSection class.
-
-
Method Details
-
getStartPointIndex
Get the startPointIndex property: Index of the first point (offset 0) in the route this section applies to.- Returns:
- the startPointIndex value.
-
getEndPointIndex
Get the endPointIndex property: Index of the last point (offset 0) in the route this section applies to.- Returns:
- the endPointIndex value.
-
getSectionType
Get the sectionType property: Section types of the reported route response.- Returns:
- the sectionType value.
-
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
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
Get the effectiveSpeedInKmh property: Effective speed of the incident in km/h, averaged over its entire length.- Returns:
- the effectiveSpeedInKmh value.
-
getDelayInSeconds
Get the delayInSeconds property: Delay in seconds caused by the incident.- Returns:
- the delayInSeconds value.
-
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
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
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<RouteSection>- Throws:
IOException
-
fromJson
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.
-