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.MessageAn authentication token.
- token¶
Output only. The authentication token that should be passed to the mobile application.
- Type
- expire_time¶
Output only. Time at which the authentication token will expire.
- class google.maps.navconnect_v1.types.CreateTripRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for NavConnectService.CreateTrip.
- parent¶
Required. The parent resource under which this trip will be created. Format: projects/{project_number}
- Type
- 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
- trip¶
Required. The trip to create.
- class google.maps.navconnect_v1.types.GetTripRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for NavConnectService.GetTrip.
- name¶
Required. The resource name of the trip to get. Format: projects/{project}/trips/{trip_id}
- Type
- route_polyline_format¶
Optional. The format of the route polyline to return. If not set,
SIMPLEroute polyline will be returned.
- class RoutePolylineFormat(value)[source]¶
Bases:
proto.enums.EnumSpecifies the format of the route polyline.
- Values:
- ROUTE_POLYLINE_FORMAT_UNSPECIFIED (0):
The route polyline format is unspecified.
- SIMPLE (1):
The route polyline is returned as a simple array of points represented as
google.type.LatLng.- ENCODED (4):
The route polyline is returned as an encoded string. See https://developers.google.com/maps/documentation/utilities/polylinealgorithm.
- S2ENCODED (2):
The route polyline is encoded as a S2Polyline. See https://s2geometry.io/devguide/basic_types.html.
- GEO_JSON (3):
The route polyline is returned as a GeoJSON LineString. See https://tools.ietf.org/html/rfc7946#section-3.1.4.
- class google.maps.navconnect_v1.types.Location(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA 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.
- server_time¶
Output only. The time at which the server received this location update.
- class google.maps.navconnect_v1.types.Route(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA route polyline.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- simple_polyline¶
Output only. The route as a simple list of latlngs.
This field is a member of oneof
format.
- encoded_polyline¶
Output only. The route as an encoded polyline. See https://developers.google.com/maps/documentation/utilities/polylinealgorithm.
This field is a member of oneof
format.- Type
- s2_polyline¶
Output only. The route as an encoded S2Polyline. See https://s2geometry.io/devguide/basic_types.html.
This field is a member of oneof
format.- Type
- geo_json¶
Output only. The route as a GeoJSON LineString. See https://tools.ietf.org/html/rfc7946#section-3.1.4.
This field is a member of oneof
format.
- traffic_information¶
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.
- Type
MutableSequence[google.maps.navconnect_v1.types.SpeedReadingInterval]
- class google.maps.navconnect_v1.types.RouteDeviation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRoute deviation information.
- location¶
Output only. Location where the deviation occurred.
- source¶
Output only. Source for the deviation trigger.
- class TriggerSource(value)[source]¶
Bases:
proto.enums.EnumThe source that triggered the route deviation.
- Values:
- TRIGGER_SOURCE_UNSPECIFIED (0):
The trigger source is unspecified.
- DRIVER_INITIATED_REROUTE (1):
The route deviation was triggered by the driver (e.g. wrong turn).
- SYSTEM_INITIATED_REROUTE (2):
The route deviation was triggered by the system (e.g. traffic closure).
- class google.maps.navconnect_v1.types.SimplePolyline(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents a polyline using a simple list of points.
- points¶
Output only. Ordered list of points representing the polyline.
- Type
MutableSequence[google.type.latlng_pb2.LatLng]
- class google.maps.navconnect_v1.types.SpeedReadingInterval(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageTraffic 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
Speedcategories.- start_polyline_point_index¶
Output only. The starting index of this interval in the path.
This field is a member of oneof
_start_polyline_point_index.- Type
- end_polyline_point_index¶
Output only. The ending index of this interval in the path.
This field is a member of oneof
_end_polyline_point_index.- Type
- speed¶
Output only. Traffic speed in this interval.
- class Speed(value)[source]¶
Bases:
proto.enums.EnumThe classification of polyline speed based on traffic data.
- Values:
- SPEED_UNSPECIFIED (0):
The speed is unspecified.
- NORMAL (1):
Normal speed, no traffic delays.
- SLOW (2):
Slowdown detected, light to medium amount of traffic.
- TRAFFIC_JAM (3):
Traffic delays, including standstill traffic.
- class google.maps.navconnect_v1.types.Stop(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA 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.MessageA trip.
- name¶
Output only. Identifier. The resource name of the trip. Format: projects/{project_number}/trips/{trip_id}.
- Type
- config¶
Immutable. The configuration for the trip.
- 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_idorios_app_idmust be set.- Type
- 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_idorios_app_idmust be set.- Type
- 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.
- state¶
Output only. The 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.
- create_time¶
Output only. Time according to the server when the trip was created.
- update_time¶
Output only. Time at which the server received the latest trip update.
- class State(value)[source]¶
Bases:
proto.enums.EnumAll 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.MessageConfiguration 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
- 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_idios_app_idauth_tokenconfig
NOTE: This field is ignored if
enable_pubsubis false.
- enable_remaining_route_reporting¶
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.
- Type
- class google.maps.navconnect_v1.types.TripExecution(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageData 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.
- destination¶
Output only. The destination of the trip as reported by the mobile application.
- 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¶
Output only. Provides the polyline for the remaining portion of the route.
- last_route_deviation¶
Output only. The most recent route deviation event captured during the trip.
- traveled_duration¶
Output only. Time traveled thus far.
- remaining_duration¶
Output only. Time left on this trip as estimated by Google.
- traveled_distance_meters¶
Output only. Distance traveled from the origin in meters.
This field is a member of oneof
_traveled_distance_meters.- Type