As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Maps Navconnect v1 API

class google.maps.navconnect_v1.types.AuthToken(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

An authentication token.

token

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

Type

str

expire_time

Output only. Time at which the authentication token will expire.

Type

google.protobuf.timestamp_pb2.Timestamp

class google.maps.navconnect_v1.types.CreateTripRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for NavConnectService.CreateTrip.

parent

Required. The parent resource under which this trip will be created. Format: projects/{project_number}

Type

str

trip_id

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.

Type

str

trip

Required. The trip to create.

Type

google.maps.navconnect_v1.types.Trip

class google.maps.navconnect_v1.types.GetTripRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for NavConnectService.GetTrip.

name

Required. The resource name of the trip to get. Format: projects/{project}/trips/{trip_id}

Type

str

class google.maps.navconnect_v1.types.Location(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A location as reported by the mobile application.

point

Output only. The location lat/lng.

Type

google.type.latlng_pb2.LatLng

source_time

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

Type

google.protobuf.timestamp_pb2.Timestamp

server_time

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

Type

google.protobuf.timestamp_pb2.Timestamp

class google.maps.navconnect_v1.types.Stop(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

point

Required. The location of the stop as a lat/lng.

Type

google.type.latlng_pb2.LatLng

class google.maps.navconnect_v1.types.Trip(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A trip.

name

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

Type

str

config

Immutable. The configuration for the trip.

Type

google.maps.navconnect_v1.types.TripConfig

android_app_id

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.

Type

str

ios_app_id

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.

Type

str

auth_token

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.

Type

google.maps.navconnect_v1.types.AuthToken

state

Output only. The Trip state.

Type

google.maps.navconnect_v1.types.Trip.State

execution

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

Type

google.maps.navconnect_v1.types.TripExecution

create_time

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

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Time at which the server received the latest trip update.

Type

google.protobuf.timestamp_pb2.Timestamp

class State(value)[source]

Bases: proto.enums.Enum

All possible trip states.

Values:
STATE_UNSPECIFIED (0):

The trip state is unspecified.

NEW (1):

The trip was created but has not yet started.

ENROUTE (2):

The transporter is enroute to the destination.

ARRIVED (3):

The transporter arrived at the destination.

SUSPENDED (4):

The trip was suspended.

FAILED (5):

The trip failed to complete successfully.

CLIENT_ERROR (6):

The trip failed due to a client error.

class google.maps.navconnect_v1.types.TripConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Configuration for the trip.

enable_high_frequency_updates

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.

Type

bool

enable_pubsub

Optional. Whether to enable pubsub notifications for the trip.

Type

bool

pubsub_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.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.maps.navconnect_v1.types.TripExecution(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Data about the execution of the trip.

origin

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

Type

google.maps.navconnect_v1.types.Location

destination

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

Type

google.maps.navconnect_v1.types.Stop

location

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

Type

google.maps.navconnect_v1.types.Location

traveled_duration

Output only. Time traveled thus far.

Type

google.protobuf.duration_pb2.Duration

remaining_duration

Output only. Time left on this trip as estimated by Google.

Type

google.protobuf.duration_pb2.Duration

traveled_distance_meters

Output only. Distance traveled from the origin in meters.

This field is a member of oneof _traveled_distance_meters.

Type

int

remaining_distance_meters

Output only. Distance remaining to the destination in meters.

This field is a member of oneof _remaining_distance_meters.

Type

int

stop_added_in_route

Output only. Indicates whether a stop was added along the route.

This field is a member of oneof _stop_added_in_route.

Type

bool