Package google.maps.navconnect.v1

Index

Service for NavConnect clients to create and get trips.

CreateTrip

rpc CreateTrip(CreateTripRequest) returns (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
GetTrip

rpc GetTrip(GetTripRequest) returns (Trip)

Gets a trip.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

AuthToken

An authentication token.

Fields
token

string

Output only. The authentication token that should be passed to the mobile application.

expire_time

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

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}

Location

A location as reported by the mobile application.

Fields
point

LatLng

Output only. The location lat/lng.

source_time

Timestamp

Output only. The time when the location was sourced as denoted by the client.

server_time

Timestamp

Output only. The time at which the server received this location update.

Stop

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

Fields
point

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

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

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

State

Output only. The Trip state.

execution

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

Timestamp

Output only. Time according to the server when the trip was created.

update_time

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.

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

FieldMask

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.

TripExecution

Data about the execution of the trip.

Fields
origin

Location

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

destination

Stop

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

location

Location

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

traveled_duration

Duration

Output only. Time traveled thus far.

remaining_duration

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.