Resource: SelectedRoute
A SelectedRoute represents a specific route that a customer wants to periodically retrieve information (e.g. duration) for contracted use cases.
| JSON representation | 
|---|
| { "name": string, "displayName": string, "createTime": string, "state": enum ( | 
| Fields | |
|---|---|
| name | 
 Identifier. Resource name of the  Format: projects/{project}/selectedRoutes/{selectedRoute} | 
| displayName | 
 Optional. Display name of the route. This is an optional field that can be used by the customer. It does not have to be unique. | 
| createTime | 
 Output only. Time when the selected route was first created. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples:  | 
| state | 
 Output only. The state of the selected route. | 
| routeAttributes | 
 Optional. The custom attributes for the selected route. Adding them allows filtering / grouping of the routes when retrieving historical and real-time routes information. Up to 10 attributes are supported per route. Each key and value should be a non empty string and can have up to 100 characters. The keys must not start with "goog". An object containing a list of  | 
| Union field route_type. Currently onlyDynamicRouteis supported.route_typecan be only one of the following: | |
| dynamicRoute | 
 The  | 
| validationError | 
 Output only. The validation error for the selected route when the state is STATE_INVALID. | 
DynamicRoute
This represents a route with waypoints (origin, destination and intermediates). The actual route is guaranteed to pass all the waypoints, but it could change from time to time due to varying traffic condition.
| JSON representation | 
|---|
| { "origin": { object ( | 
| Fields | |
|---|---|
| origin | 
 Required. Origin location of the route. | 
| destination | 
 Required. Ending location of the route. | 
| intermediates[] | 
 Optional. A set of intermediate waypoints along the route (excluding terminal points). They are always passing-by points. Up to 25 intermediate waypoints are supported. Adding them properly can reduce the variation of actual route from time to time. | 
LatLng
An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.
| JSON representation | 
|---|
| { "latitude": number, "longitude": number } | 
| Fields | |
|---|---|
| latitude | 
 The latitude in degrees. It must be in the range [-90.0, +90.0]. | 
| longitude | 
 The longitude in degrees. It must be in the range [-180.0, +180.0]. | 
State
The state of the selected route.
| Enums | |
|---|---|
| STATE_UNSPECIFIED | The state of this route is not set. | 
| STATE_SCHEDULING | The route has been created and is being scheduled. | 
| STATE_RUNNING | The route has been created and has an active schedule. | 
| STATE_DELETING | The route has been marked for deletion. | 
| STATE_VALIDATING | The route is in the process of being validated. | 
| STATE_INVALID | The route is invalid based on one of the validation criteria. | 
ValidationError
The validation error for the selected route.
| Enums | |
|---|---|
| VALIDATION_ERROR_UNSPECIFIED | The validation error of this route is not set. | 
| VALIDATION_ERROR_ROUTE_OUTSIDE_JURISDICTION | The route is outside the jurisdiction of the project. | 
| VALIDATION_ERROR_LOW_ROAD_USAGE | The route has low road usage (very few people pass through it). | 
| Methods | |
|---|---|
| 
 | Creates multiple SelectedRoutes and starts a schedule to periodically retrieve cache information for each of the routes. | 
| 
 | Creates a SelectedRoute and starts a schedule to periodically retrieve cache information for the route. | 
| 
 | Deletes the specified SelectedRoute for the specified project. | 
| 
 | Gets a SelectedRoute as specified by its name. | 
| 
 | Lists all SelectedRoutes for the specified project with pagination. |