REST Resource: selection.v1.projects.selectedRoutes

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 (State),
  "routeAttributes": {
    string: string,
    ...
  },

  // Union field route_type can be only one of the following:
  "dynamicRoute": {
    object (DynamicRoute)
  }
  // End of list of possible types for union field route_type.
  "validationError": enum (ValidationError)
}
Fields
name

string

Identifier. Resource name of the SelectedRoute.

Format: projects/{project}/selectedRoutes/{selectedRoute}

displayName

string

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

string (Timestamp format)

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: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

state

enum (State)

Output only. The state of the selected route.

routeAttributes

map (key: string, value: string)

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 "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Union field route_type. Currently only DynamicRoute is supported. route_type can be only one of the following:
dynamicRoute

object (DynamicRoute)

The SelectedRoute is a dynamic route.

validationError

enum (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 (LatLng)
  },
  "destination": {
    object (LatLng)
  },
  "intermediates": [
    {
      object (LatLng)
    }
  ]
}
Fields
origin

object (LatLng)

Required. Origin location of the route.

destination

object (LatLng)

Required. Ending location of the route.

intermediates[]

object (LatLng)

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

number

The latitude in degrees. It must be in the range [-90.0, +90.0].

longitude

number

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

batchCreate

Creates multiple SelectedRoutes and starts a schedule to periodically retrieve cache information for each of the routes.

create

Creates a SelectedRoute and starts a schedule to periodically retrieve cache information for the route.

delete

Deletes the specified SelectedRoute for the specified project.

get

Gets a SelectedRoute as specified by its name.

list

Lists all SelectedRoutes for the specified project with pagination.