## Index

- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.NavConnectService` (interface)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.AuthToken` (message)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.CreateTripRequest` (message)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.GetTripRequest` (message)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.GetTripRequest.RoutePolylineFormat` (enum)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.Location` (message)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.Route` (message)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.RouteDeviation` (message)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.RouteDeviation.TriggerSource` (enum)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.SimplePolyline` (message)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.SpeedReadingInterval` (message)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.SpeedReadingInterval.Speed` (enum)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.Stop` (message)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.Trip` (message)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.Trip.State` (enum)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.TripConfig` (message)
- `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.TripExecution` (message)

## NavConnectService

Service for NavConnect clients to create and get trips.

| CreateTrip |
|---|
| `` rpc CreateTrip(`https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.CreateTripRequest`) returns (`https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.Trip`) `` Creates a trip. This must be called before the mobile application can start the trip. The returned trip will have the `auth_token` field set. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` IAM Permissions :   Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource: - `navigationconnect.trips.create` For more information, see the [IAM documentation](https://cloud.google.com/iam/docs). |

| GetTrip |
|---|
| `` rpc GetTrip(`https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.GetTripRequest`) returns (`https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.Trip`) `` Gets a trip. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` IAM Permissions :   Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource: - `navigationconnect.trips.get` For more information, see the [IAM documentation](https://cloud.google.com/iam/docs). |

## AuthToken

An authentication token.

| Fields ||
|---|---|
| `token` | `string` Output only. The authentication token that should be passed to the mobile application. |
| `expire_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` Output only. Time at which the authentication token will expire. |

## CreateTripRequest

Request message for NavConnectService.CreateTrip.

| Fields ||
|---|---|
| `parent` | `string` Required. The parent resource under which this trip will be created. Format: projects/{project_number} |
| `trip_id` | `string` Required. The ID to use for the trip, which will become the final component of the trip's resource name. This value must be a valid RFC-4122 UUID. |
| `trip` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.Trip` Required. The trip to create. |

## GetTripRequest

Request message for NavConnectService.GetTrip.

| Fields ||
|---|---|
| `name` | `string` Required. The resource name of the trip to get. Format: projects/{project}/trips/{trip_id} |
| `route_polyline_format` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.GetTripRequest.RoutePolylineFormat` Optional. The format of the route polyline to return. If not set, `SIMPLE` route polyline will be returned. |

## RoutePolylineFormat

Specifies the format of the route polyline.

| Enums ||
|---|---|
| `ROUTE_POLYLINE_FORMAT_UNSPECIFIED` | The route polyline format is unspecified. |
| `SIMPLE` | The route polyline is returned as a simple array of points represented as `google.type.LatLng`. |
| `ENCODED` | The route polyline is returned as an encoded string. See <https://developers.google.com/maps/documentation/utilities/polylinealgorithm>. |
| `S2ENCODED` | The route polyline is encoded as a S2Polyline. See <https://s2geometry.io/devguide/basic_types.html>. |
| `GEO_JSON` | The route polyline is returned as a GeoJSON LineString. See <https://tools.ietf.org/html/rfc7946#section-3.1.4>. |

## Location

A location as reported by the mobile application.

| Fields ||
|---|---|
| `point` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.type#google.type.LatLng` Output only. The location lat/lng. |
| `source_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` Output only. The time when the location was sourced as denoted by the client. |
| `server_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` Output only. The time at which the server received this location update. |

## Route

A route polyline.

| Fields ||
|---|---|
| `traffic_information[]` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.SpeedReadingInterval` Output only. Traffic information on the polyline described as speed reading intervals. NOTES: - The intervals are non-overlapping. - The intervals are contiguous. - The intervals cover the entire polyline. - The intervals are sorted by increasing index. - Speed is specified for each interval. |
| Union field `format`. The route format. The format populated is controlled by the `route_polyline_format` parameter. If not set, it defaults to a simple polyline. `format` can be only one of the following: ||
| `simple_polyline` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.SimplePolyline` Output only. The route as a simple list of latlngs. |
| `encoded_polyline` | `string` Output only. The route as an encoded polyline. See <https://developers.google.com/maps/documentation/utilities/polylinealgorithm>. |
| `s2_polyline` | `bytes` Output only. The route as an encoded S2Polyline. See <https://s2geometry.io/devguide/basic_types.html>. |
| `geo_json` | `https://protobuf.dev/reference/protobuf/google.protobuf#struct` Output only. The route as a GeoJSON LineString. See <https://tools.ietf.org/html/rfc7946#section-3.1.4>. |

## RouteDeviation

Route deviation information.

| Fields ||
|---|---|
| `location` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.Location` Output only. Location where the deviation occurred. |
| `source` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.RouteDeviation.TriggerSource` Output only. Source for the deviation trigger. |

## TriggerSource

The source that triggered the route deviation.

| Enums ||
|---|---|
| `TRIGGER_SOURCE_UNSPECIFIED` | The trigger source is unspecified. |
| `DRIVER_INITIATED_REROUTE` | The route deviation was triggered by the driver (e.g. wrong turn). |
| `SYSTEM_INITIATED_REROUTE` | The route deviation was triggered by the system (e.g. traffic closure). |

## SimplePolyline

Represents a polyline using a simple list of points.

| Fields ||
|---|---|
| `points[]` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.type#google.type.LatLng` Output only. Ordered list of points representing the polyline. |

## 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 `Speed` categories.

| Fields ||
|---|---|
| `speed` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.SpeedReadingInterval.Speed` Output only. Traffic speed in this interval. |
| `start_polyline_point_index` | `int32` Output only. The starting index of this interval in the path. |
| `end_polyline_point_index` | `int32` Output only. The ending index of this interval in the path. |

## Speed

The classification of polyline speed based on traffic data.

| Enums ||
|---|---|
| `SPEED_UNSPECIFIED` | The speed is unspecified. |
| `NORMAL` | Normal speed, no traffic delays. |
| `SLOW` | Slowdown detected, light to medium amount of traffic. |
| `TRAFFIC_JAM` | Traffic delays, including standstill traffic. |

## Stop

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

| Fields ||
|---|---|
| `point` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.type#google.type.LatLng` Required. The location of the stop as a lat/lng. |

## Trip

A trip.

| Fields ||
|---|---|
| `name` | `string` Output only. Identifier. The resource name of the trip. Format: projects/{project_number}/trips/{trip_id}. |
| `config` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.TripConfig` Immutable. The configuration for the trip. |
| `android_app_id` | `string` Input only. Immutable. The Android application ID of the mobile application that will use the trip. At least one of `android_app_id` or `ios_app_id` must be set. |
| `ios_app_id` | `string` Input only. Immutable. The iOS bundle ID of the mobile application that will use the trip. At least one of `android_app_id` or `ios_app_id` must be set. |
| `auth_token` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.AuthToken` Output only. An opaque token that authorizes access to begin a NavConnect trip in Google Maps or Waze and grants these applications access to update the trip. Only returned by `CreateTrip`. |
| `state` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.Trip.State` Output only. The Trip state. |
| `execution` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.TripExecution` Output only. The latest data about the execution of the trip. This may not be set if the trip is in an error state. |
| `create_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` Output only. Time according to the server when the trip was created. |
| `update_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` Output only. Time at which the server received the latest trip update. |

## State

All possible trip states.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | The trip state is unspecified. |
| `NEW` | The trip was created but has not yet started. |
| `ENROUTE` | The transporter is enroute to the destination. |
| `ARRIVED` | The transporter arrived at the destination. |
| `SUSPENDED` | The trip was suspended. |
| `FAILED` | The trip failed to complete successfully. |
| `CLIENT_ERROR` | The trip failed due to a client error. |
| `CANCELED` | The trip was explicitly canceled by the developer. |

## TripConfig

Configuration for the trip.

| Fields ||
|---|---|
| `enable_high_frequency_updates` | `bool` Optional. Whether to enable high-frequency trip updates. NOTE: Enabling this feature logs the trip under Enterprise Tier usage, and is subject to Enterprise Tier rates. |
| `enable_pubsub` | `bool` Optional. Whether to enable pubsub notifications for the trip. |
| `pubsub_field_mask` | `https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` Optional. If set, only the specified subset of the Trip fields will be included in the pubsub notifications. If not set, all Trip fields will be included in the pubsub notifications (default behavior). The following fields are not supported: - `android_app_id` - `ios_app_id` - `auth_token` - `config` NOTE: This field is ignored if `enable_pubsub` is false. |
| `enable_remaining_route_reporting` | `bool` Optional. Whether to enable remaining route reporting for the trip. NOTE: Enabling this feature logs the trip under Enterprise Tier usage, and is subject to Enterprise Tier rates. |
| `enable_route_deviation_reporting` | `bool` Optional. Whether to enable route deviation reporting for the trip. NOTE: Enabling this feature logs the trip under Enterprise Tier usage, and is subject to Enterprise Tier rates. |

## TripExecution

Data about the execution of the trip.

| Fields ||
|---|---|
| `origin` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.Location` Output only. Origin of the trip which is generally the transporter's location at start of the NavConnect trip. |
| `destination` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.Stop` Output only. The destination of the trip as reported by the mobile application. |
| `location` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.Location` Output only. The location signal representing the last known location of the transporter. This will be the road snapped location if available. |
| `remaining_route` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.Route` Output only. Provides the polyline for the remaining portion of the route. |
| `last_route_deviation` | `https://developers.google.com/maps/documentation/navigation/connect/reference/rpc/google.maps.navconnect.v1#google.maps.navconnect.v1.RouteDeviation` Output only. The most recent route deviation event captured during the trip. |
| `traveled_duration` | `https://protobuf.dev/reference/protobuf/google.protobuf#duration` Output only. Time traveled thus far. |
| `remaining_duration` | `https://protobuf.dev/reference/protobuf/google.protobuf#duration` Output only. Time left on this trip as estimated by Google. |
| `traveled_distance_meters` | `int32` Output only. Distance traveled from the origin in meters. |
| `remaining_distance_meters` | `int32` Output only. Distance remaining to the destination in meters. |
| `stop_added_in_route` | `bool` Output only. Indicates whether a stop was added along the route. |