# ConsumableTrafficPolyline

- [JSON representation](https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/ConsumableTrafficPolyline#SCHEMA_REPRESENTATION)
- [SpeedReadingInterval](https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/ConsumableTrafficPolyline#SpeedReadingInterval)
  - [JSON representation](https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/ConsumableTrafficPolyline#SpeedReadingInterval.SCHEMA_REPRESENTATION)
- [Speed](https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/ConsumableTrafficPolyline#Speed)

Traffic density along a Vehicle's path.

| JSON representation |
|---|
| ``` { "speedReadingInterval": [ { object (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/ConsumableTrafficPolyline#SpeedReadingInterval`) } ], "encodedPathToWaypoint": string } ``` |

| Fields ||
|---|---|
| `speedReadingInterval[]` | ``object (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/ConsumableTrafficPolyline#SpeedReadingInterval`)`` Traffic speed along the path from the previous waypoint to the current waypoint. |
| `encodedPathToWaypoint` | `string` The path the driver is taking from the previous waypoint to the current waypoint. This path has landmarks in it so clients can show traffic markers along the path (see `speedReadingInterval`). Decoding is not yet supported. |

## SpeedReadingInterval

Traffic density indicator on a contiguous segment of a path. Given a path with points P_0, P_1, ... , P_N (zero-based index), the SpeedReadingInterval defines an interval and describes its traffic using the following categories.

| JSON representation |
|---|
| ``` { "startPolylinePointIndex": integer, "endPolylinePointIndex": integer, "speed": enum (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/ConsumableTrafficPolyline#Speed`) } ``` |

| Fields ||
|---|---|
| `startPolylinePointIndex` | `integer` The starting index of this interval in the path. In JSON, when the index is 0, the field will appear to be unpopulated. |
| `endPolylinePointIndex` | `integer` The ending index of this interval in the path. In JSON, when the index is 0, the field will appear to be unpopulated. |
| `speed` | ``enum (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/trips/rest/v1/ConsumableTrafficPolyline#Speed`)`` Traffic speed in this interval. |

## Speed

The classification of polyline speed based on traffic data.

| Enums ||
|---|---|
| `SPEED_UNSPECIFIED` | Default value. This value is unused. |
| `NORMAL` | Normal speed, no traffic delays. |
| `SLOW` | Slowdown detected, medium amount of traffic. |
| `TRAFFIC_JAM` | Traffic delays. |