NavigationConnectEvent

Message published to Pub/Sub from Navigation Connect.

JSON representation
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "createdTrip": {
    object (Trip)
  },
  "updatedTrip": {
    object (Trip)
  }
  // End of mutually exclusive fields.
}
Fields
The event payload. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
createdTrip

object (Trip)

Represents a trip creation event.

updatedTrip

object (Trip)

Represents a trip update event.

End of mutually exclusive fields.

Trip

A trip.

JSON representation
{
  "name": string,
  "state": enum (State),
  "execution": {
    object (TripExecution)
  },
  "createTime": string,
  "updateTime": string
}
Fields
name

string

The resource name of the trip. Format: projects/{project_number}/trips/{trip_id}.

state

enum (State)

The Trip state.

execution

object (TripExecution)

The latest data about the execution of the trip. This may not be set if the trip is in an error state.

createTime

string (Timestamp format)

Time according to the server when the trip was created.

Uses RFC 3339, where generated output will always be Z-normalized and use 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".

updateTime

string (Timestamp format)

Time at which the server received the latest trip update.

Uses RFC 3339, where generated output will always be Z-normalized and use 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".

TripExecution

Data about the execution of the trip.

JSON representation
{
  "origin": {
    object (Location)
  },
  "destination": {
    object (Stop)
  },
  "location": {
    object (Location)
  },
  "remainingRoute": {
    object
  },
  "lastRouteDeviation": {
    object (RouteDeviation)
  },
  "traveledDuration": string,
  "remainingDuration": string,
  "traveledDistanceMeters": integer,
  "remainingDistanceMeters": integer,
  "stopAddedInRoute": boolean
}
Fields
origin

object (Location)

Origin of the trip which is generally the transporter's location at start of the NavConnect trip.

destination

object (Stop)

The destination of the trip as reported by the mobile application.

location

object (Location)

The location signal representing the last known location of the transporter. This will be the road snapped location if available.

remainingRoute

object (Struct format)

The remaining route with associated traffic information in GeoJSON FeatureCollection format.

Each Feature in the collection will have a LineString geometry representing a subset of the remaining route defined by two or more vertices. Feature properties will have a single property, speed with values NORMAL, SLOW, or TRAFFIC_JAM, representing the travel speed along that route subset.

See https://datatracker.ietf.org/doc/html/rfc7946, sections 3.1.4, 3.2 and 3.3.

lastRouteDeviation

object (RouteDeviation)

The most recent route deviation event captured during the trip.

traveledDuration

string (Duration format)

Time traveled thus far.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

remainingDuration

string (Duration format)

Time left on this trip as estimated by Google.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

traveledDistanceMeters

integer

Distance traveled from the origin in meters.

remainingDistanceMeters

integer

Distance remaining to the destination in meters.

stopAddedInRoute

boolean

Indicates whether any stops were added along the route.

Stop

A stop in the trip where some task is to be performed.

JSON representation
{
  "point": {
    object (LatLng)
  }
}
Fields
point

object (LatLng)

The location of the stop as a lat/lng.

RouteDeviation

Route deviation information.

JSON representation
{
  "location": {
    object (Location)
  },
  "source": enum (TriggerSource)
}
Fields
location

object (Location)

Location where the deviation occurred.

source

enum (TriggerSource)

Source for the deviation trigger.