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 Fleetengine Delivery v1 API

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

Bases: proto.message.Message

The BatchCreateTask request message.

header

Optional. The standard Delivery API request header. Note: If you set this field, then the header field in the CreateTaskRequest messages must either be empty, or it must match this field.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryRequestHeader

parent

Required. The parent resource shared by all tasks. This value must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project. The parent field in the CreateTaskRequest messages must either be empty, or it must match this field.

Type

str

requests

Required. The request message that specifies the resources to create. Note: You can create a maximum of 500 tasks in a batch.

Type

MutableSequence[google.maps.fleetengine_delivery_v1.types.CreateTaskRequest]

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

Bases: proto.message.Message

The BatchCreateTask response message.

tasks

The created Tasks.

Type

MutableSequence[google.maps.fleetengine_delivery_v1.types.Task]

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

Bases: proto.message.Message

The CreateDeliveryVehicle request message.

header

Optional. The standard Delivery API request header.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryRequestHeader

parent

Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

Type

str

delivery_vehicle_id

Required. The Delivery Vehicle ID must be unique and subject to the following restrictions:

  • Must be a valid Unicode string.

  • Limited to a maximum length of 64 characters.

  • Normalized according to [Unicode Normalization Form C] (http://www.unicode.org/reports/tr15/).

  • May not contain any of the following ASCII characters: ‘/’, ‘:’, ‘?’, ‘,’, or ‘#’.

Type

str

delivery_vehicle

Required. The DeliveryVehicle entity to create. When creating a new delivery vehicle, you may set the following optional fields:

  • type

  • last_location

  • attributes

Note: The DeliveryVehicle’s name field is ignored. All other DeliveryVehicle fields must not be set; otherwise, an error is returned.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicle

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

Bases: proto.message.Message

The CreateTask request message.

header

Optional. The standard Delivery API request header.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryRequestHeader

parent

Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

Type

str

task_id

Required. The Task ID must be unique, but it should be not a shipment tracking ID. To store a shipment tracking ID, use the tracking_id field. Note that multiple tasks can have the same tracking_id. Task IDs are subject to the following restrictions:

  • Must be a valid Unicode string.

  • Limited to a maximum length of 64 characters.

  • Normalized according to [Unicode Normalization Form C] (http://www.unicode.org/reports/tr15/).

  • May not contain any of the following ASCII characters: ‘/’, ‘:’, ‘?’, ‘,’, or ‘#’.

Type

str

task

Required. The Task entity to create. When creating a Task, the following fields are required:

  • type

  • state (must be set to OPEN)

  • tracking_id (must not be set for UNAVAILABLE or SCHEDULED_STOP tasks, but required for all other task types)

  • planned_location (optional for UNAVAILABLE tasks)

  • task_duration

Note: The Task’s name field is ignored. All other Task fields must not be set; otherwise, an error is returned.

Type

google.maps.fleetengine_delivery_v1.types.Task

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

Bases: proto.message.Message

A RequestHeader contains fields common to all Delivery RPC requests.

language_code

The BCP-47 language code, such as en-US or sr-Latn. For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none is specified, the response may be in any language, with a preference for English if such a name exists. Field value example: en-US.

Type

str

region_code

Required. CLDR region code of the region where the request originates. Field value example: US.

Type

str

sdk_version

Version of the calling SDK, if applicable. The version format is “major.minor.patch”, example: 1.1.2.

Type

str

os_version

Version of the operating system on which the calling SDK is running. Field value examples: 4.4.1, 12.1.

Type

str

device_model

Model of the device on which the calling SDK is running. Field value examples: iPhone12,1, SM-G920F.

Type

str

sdk_type

The type of SDK sending the request.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryRequestHeader.SdkType

maps_sdk_version

Version of the MapSDK which the calling SDK depends on, if applicable. The version format is “major.minor.patch”, example: 5.2.1.

Type

str

nav_sdk_version

Version of the NavSDK which the calling SDK depends on, if applicable. The version format is “major.minor.patch”, example: 2.1.0.

Type

str

platform

Platform of the calling SDK.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryRequestHeader.Platform

manufacturer

Manufacturer of the Android device from the calling SDK, only applicable for the Android SDKs. Field value example: Samsung.

Type

str

android_api_level

Android API level of the calling SDK, only applicable for the Android SDKs. Field value example: 23.

Type

int

trace_id

Optional ID that can be provided for logging purposes in order to identify the request.

Type

str

class Platform(value)[source]

Bases: proto.enums.Enum

The platform of the calling SDK.

Values:
PLATFORM_UNSPECIFIED (0):

The default value. This value is used if the platform is omitted.

ANDROID (1):

The request is coming from Android.

IOS (2):

The request is coming from iOS.

WEB (3):

The request is coming from the web.

class SdkType(value)[source]

Bases: proto.enums.Enum

Possible types of SDK.

Values:
SDK_TYPE_UNSPECIFIED (0):

The default value. This value is used if the sdk_type is omitted.

CONSUMER (1):

The calling SDK is Consumer.

DRIVER (2):

The calling SDK is Driver.

JAVASCRIPT (3):

The calling SDK is JavaScript.

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

Bases: proto.message.Message

The DeliveryVehicle message. A delivery vehicle transports shipments from a depot to a delivery location, and from a pickup location to the depot. In some cases, delivery vehicles also transport shipments directly from the pickup location to the delivery location.

Note: gRPC and REST APIs use different field naming conventions. For example, the DeliveryVehicle.current_route_segment field in the gRPC API and the DeliveryVehicle.currentRouteSegment field in the REST API refer to the same field.

name

The unique name of this Delivery Vehicle. The format is providers/{provider}/deliveryVehicles/{vehicle}.

Type

str

last_location

The last reported location of the Delivery Vehicle.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicleLocation

navigation_status

The Delivery Vehicle’s navigation status.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicleNavigationStatus

current_route_segment

The encoded polyline specifying the route that the navigation recommends taking to the next waypoint. Your driver app updates this when a stop is reached or passed, and when the navigation reroutes. These LatLngs are returned in Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path (gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments[0].path (REST) for all active Tasks assigned to the Vehicle.

There are a few cases where this field might not be used to populate Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path (gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments[0].path (REST):

  • The endpoint of the current_route_segment does not match DeliveryVehicle.remaining_vehicle_journey_segments[0].stop (gRPC) or DeliveryVehicle.remainingVehicleJourneySegments[0].stop (REST).

  • The driver app has not updated its location recently, so the last updated value for this field might be stale.

  • The driver app has recently updated its location, but the current_route_segment is stale, and points to a previous vehicle stop.

In these cases, Fleet Engine populates this field with a route from the most recently passed VehicleStop to the upcoming VehicleStop to ensure that the consumer of this field has the best available information on the current path of the Delivery Vehicle.

Type

bytes

current_route_segment_end_point

The location where the current_route_segment ends. This is not currently populated by the driver app, but you can supply it on UpdateDeliveryVehicle calls. It is either the LatLng from the upcoming vehicle stop, or the last LatLng of the current_route_segment. Fleet Engine will then do its best to interpolate to an actual VehicleStop.

This field is ignored in UpdateDeliveryVehicle calls if the current_route_segment field is empty.

Type

google.type.latlng_pb2.LatLng

remaining_distance_meters

The remaining driving distance for the current_route_segment. The Driver app typically provides this field, but there are some circumstances in which Fleet Engine will override the value sent by the app. For more information, see [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. This field is returned in Task.remaining_vehicle_journey_segments[0].driving_distance_meters (gRPC) or Task.remainingVehicleJourneySegments[0].drivingDistanceMeters (REST) for all active Tasks assigned to the Delivery Vehicle.

Fleet Engine ignores this field in UpdateDeliveryVehicleRequest if the current_route_segment field is empty.

Type

google.protobuf.wrappers_pb2.Int32Value

remaining_duration

The remaining driving time for the current_route_segment. The Driver app typically provides this field, but there are some circumstances in which Fleet Engine will override the value sent by the app. For more information, see [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. This field is returned in Task.remaining_vehicle_journey_segments[0].driving_duration (gRPC) or Task.remainingVehicleJourneySegments[0].drivingDuration (REST) for all active tasks assigned to the Delivery Vehicle.

Fleet Engine ignores this field in UpdateDeliveryVehicleRequest if the current_route_segment field is empty.

Type

google.protobuf.duration_pb2.Duration

remaining_vehicle_journey_segments

The journey segments assigned to this Delivery Vehicle, starting from the Vehicle’s most recently reported location. This field won’t be populated in the response of ListDeliveryVehicles.

Type

MutableSequence[google.maps.fleetengine_delivery_v1.types.VehicleJourneySegment]

attributes

A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have at most 100 attributes, and each attribute must have a unique key.

Type

MutableSequence[google.maps.fleetengine_delivery_v1.types.DeliveryVehicleAttribute]

type_

The type of this delivery vehicle. If unset, this will default to AUTO.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicle.DeliveryVehicleType

class DeliveryVehicleType(value)[source]

Bases: proto.enums.Enum

The type of delivery vehicle.

Values:
DELIVERY_VEHICLE_TYPE_UNSPECIFIED (0):

The value is unused.

AUTO (1):

An automobile.

TWO_WHEELER (2):

A motorcycle, moped, or other two-wheeled vehicle

BICYCLE (3):

Human-powered transport.

PEDESTRIAN (4):

A human transporter, typically walking or running, traveling along pedestrian pathways.

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

Bases: proto.message.Message

Describes a vehicle attribute as a key-value pair. The “key:value” string length cannot exceed 256 characters.

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.

key

The attribute’s key.

Type

str

value

The attribute’s value.

Type

str

string_value

String typed attribute value.

Note: This is identical to the value field which will eventually be deprecated. For create or update methods, either field can be used, but it’s strongly recommended to use string_value. If both string_value and value are set, they must be identical or an error will be thrown. Both fields are populated in responses.

This field is a member of oneof delivery_vehicle_attribute_value.

Type

str

bool_value

Boolean typed attribute value.

This field is a member of oneof delivery_vehicle_attribute_value.

Type

bool

number_value

Double typed attribute value.

This field is a member of oneof delivery_vehicle_attribute_value.

Type

float

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

Bases: proto.message.Message

The location, speed, and heading of a vehicle at a point in time.

location

The location of the vehicle. When it is sent to Fleet Engine, the vehicle’s location is a GPS location. When you receive it in a response, the vehicle’s location can be either a GPS location, a supplemental location, or some other estimated location. The source is specified in location_sensor.

Type

google.type.latlng_pb2.LatLng

horizontal_accuracy

Deprecated: Use latlng_accuracy instead.

Type

google.protobuf.wrappers_pb2.DoubleValue

latlng_accuracy

Accuracy of location in meters as a radius.

Type

google.protobuf.wrappers_pb2.DoubleValue

heading

Direction the vehicle is moving in degrees. 0 represents North. The valid range is [0,360).

Type

google.protobuf.wrappers_pb2.Int32Value

bearing_accuracy

Deprecated: Use heading_accuracy instead.

Type

google.protobuf.wrappers_pb2.DoubleValue

heading_accuracy

Accuracy of heading in degrees.

Type

google.protobuf.wrappers_pb2.DoubleValue

altitude

Altitude in meters above WGS84.

Type

google.protobuf.wrappers_pb2.DoubleValue

vertical_accuracy

Deprecated: Use altitude_accuracy instead.

Type

google.protobuf.wrappers_pb2.DoubleValue

altitude_accuracy

Accuracy of altitude in meters.

Type

google.protobuf.wrappers_pb2.DoubleValue

speed_kmph

Speed of the vehicle in kilometers per hour. Deprecated: Use speed instead.

Type

google.protobuf.wrappers_pb2.Int32Value

speed

Speed of the vehicle in meters/second

Type

google.protobuf.wrappers_pb2.DoubleValue

speed_accuracy

Accuracy of speed in meters/second.

Type

google.protobuf.wrappers_pb2.DoubleValue

update_time

The time when location was reported by the sensor according to the sensor’s clock.

Type

google.protobuf.timestamp_pb2.Timestamp

server_time

Output only. The time when the server received the location information.

Type

google.protobuf.timestamp_pb2.Timestamp

location_sensor

Provider of location data (for example, GPS).

Type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicleLocationSensor

is_road_snapped

Whether location is snapped to a road.

Type

google.protobuf.wrappers_pb2.BoolValue

is_gps_sensor_enabled

Input only. Indicates whether the GPS sensor is enabled on the mobile device.

Type

google.protobuf.wrappers_pb2.BoolValue

time_since_update

Input only. Time (in seconds) since this location was first sent to the server. This will be zero for the first update. If the time is unknown (for example, when the app restarts), this value resets to zero.

Type

google.protobuf.wrappers_pb2.Int32Value

num_stale_updates

Input only. Deprecated: Other signals are now used to determine if a location is stale.

Type

google.protobuf.wrappers_pb2.Int32Value

raw_location

Raw vehicle location (unprocessed by road-snapper).

Type

google.type.latlng_pb2.LatLng

raw_location_time

Timestamp associated with the raw location.

Type

google.protobuf.timestamp_pb2.Timestamp

raw_location_sensor

Source of the raw location. Defaults to GPS.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicleLocationSensor

raw_location_accuracy

Accuracy of raw_location as a radius, in meters.

Type

google.protobuf.wrappers_pb2.DoubleValue

supplemental_location

Supplemental location provided by the integrating app.

Type

google.type.latlng_pb2.LatLng

supplemental_location_time

Timestamp associated with the supplemental location.

Type

google.protobuf.timestamp_pb2.Timestamp

supplemental_location_sensor

Source of the supplemental location. Defaults to CUSTOMER_SUPPLIED_LOCATION.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicleLocationSensor

supplemental_location_accuracy

Accuracy of supplemental_location as a radius, in meters.

Type

google.protobuf.wrappers_pb2.DoubleValue

road_snapped

Deprecated: Use is_road_snapped instead.

Type

bool

class google.maps.fleetengine_delivery_v1.types.DeliveryVehicleLocationSensor(value)[source]

Bases: proto.enums.Enum

The sensor or methodology used to determine the location.

Values:
UNKNOWN_SENSOR (0):

The sensor is unspecified or unknown.

GPS (1):

GPS or Assisted GPS.

NETWORK (2):

Assisted GPS, cell tower ID, or WiFi access point.

PASSIVE (3):

Cell tower ID or WiFi access point.

ROAD_SNAPPED_LOCATION_PROVIDER (4):

A location determined by the mobile device to be the most likely road position.

CUSTOMER_SUPPLIED_LOCATION (5):

A customer-supplied location from an independent source. Typically, this value is used for a location provided from sources other than the mobile device running Driver SDK. If the original source is described by one of the other enum values, use that value. Locations marked CUSTOMER_SUPPLIED_LOCATION are typically provided via a DeliveryVehicle’s last_location.supplemental_location_sensor.

FLEET_ENGINE_LOCATION (6):

A location calculated by Fleet Engine based on the signals available to it. Output only. This value will be rejected if it is received in a request.

FUSED_LOCATION_PROVIDER (100):

Android’s Fused Location Provider.

CORE_LOCATION (200):

The location provider on Apple operating systems.

class google.maps.fleetengine_delivery_v1.types.DeliveryVehicleNavigationStatus(value)[source]

Bases: proto.enums.Enum

The vehicle’s navigation status.

Values:
UNKNOWN_NAVIGATION_STATUS (0):

Unspecified navigation status.

NO_GUIDANCE (1):

The Driver app’s navigation is in FREE_NAV mode.

ENROUTE_TO_DESTINATION (2):

Turn-by-turn navigation is available and the Driver app navigation has entered GUIDED_NAV mode.

OFF_ROUTE (3):

The vehicle has gone off the suggested route.

ARRIVED_AT_DESTINATION (4):

The vehicle is within approximately 50m of the destination.

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

Bases: proto.message.Message

The GetDeliveryVehicle request message.

header

Optional. The standard Delivery API request header.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryRequestHeader

name

Required. Must be in the format providers/{provider}/deliveryVehicles/{delivery_vehicle}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

Type

str

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

Bases: proto.message.Message

The GetTask request message.

header

Optional. The standard Delivery API request header.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryRequestHeader

name

Required. Must be in the format providers/{provider}/tasks/{task}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

Type

str

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

Bases: proto.message.Message

The GetTaskTrackingInfoRequest request message.

header

Optional. The standard Delivery API request header.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryRequestHeader

name

Required. Must be in the format providers/{provider}/taskTrackingInfo/{tracking_id}. The provider must be the Google Cloud Project ID, and the tracking_id must be the tracking ID associated with the task. An example name can be providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id.

Type

str

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

Bases: proto.message.Message

The ListDeliveryVehicles request message.

header

Optional. The standard Delivery API request header.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryRequestHeader

parent

Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

Type

str

page_size

Optional. The maximum number of vehicles to return. The service may return fewer than this number. If you don’t specify this number, then the server determines the number of results to return.

Type

int

page_token

Optional. A page token, received from a previous ListDeliveryVehicles call. You must provide this in order to retrieve the subsequent page.

When paginating, all other parameters provided to ListDeliveryVehicles must match the call that provided the page token.

Type

str

filter

Optional. A filter query to apply when listing delivery vehicles. See http://aip.dev/160 for examples of the filter syntax. If you don’t specify a value, or if you specify an empty string for the filter, then all delivery vehicles are returned.

Note that the only queries supported for ListDeliveryVehicles are on vehicle attributes (for example, attributes.<key> = <value> or attributes.<key1> = <value1> AND attributes.<key2> = <value2>). Also, all attributes are stored as strings, so the only supported comparisons against attributes are string comparisons. In order to compare against number or boolean values, the values must be explicitly quoted to be treated as strings (for example, attributes.<key> = "10" or attributes.<key> = "true").

The maximum number of restrictions allowed in a filter query is 50. A restriction is a part of the query of the form attribute.<KEY> <COMPARATOR> <VALUE>, for example attributes.foo = bar is 1 restriction.

Type

str

viewport

Optional. A filter that limits the vehicles returned to those whose last known location was in the rectangular area defined by the viewport.

Type

google.geo.type.types.Viewport

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

Bases: proto.message.Message

The ListDeliveryVehicles response message.

delivery_vehicles

The set of delivery vehicles that meet the requested filtering criteria. When no filter is specified, the request returns all delivery vehicles. A successful response can also be empty. An empty response indicates that no delivery vehicles were found meeting the requested filter criteria.

Type

MutableSequence[google.maps.fleetengine_delivery_v1.types.DeliveryVehicle]

next_page_token

You can pass this token in the ListDeliveryVehiclesRequest to continue to list results. When all of the results are returned, this field won’t be in the response, or it will be an empty string.

Type

str

total_size

The total number of delivery vehicles that match the request criteria, across all pages.

Type

int

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

Bases: proto.message.Message

The ListTasks request message.

header

Optional. The standard Delivery API request header.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryRequestHeader

parent

Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

Type

str

page_size

Optional. The maximum number of Tasks to return. The service may return fewer than this value. If you don’t specify this value, then the server determines the number of results to return.

Type

int

page_token

Optional. A page token received from a previous ListTasks call. You can provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListTasks must match the call that provided the page token.

Type

str

filter

Optional. A filter query to apply when listing Tasks. See http://aip.dev/160 for examples of filter syntax. If you don’t specify a value, or if you filter on an empty string, then all Tasks are returned. For information about the Task properties that you can filter on, see List tasks.

Type

str

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

Bases: proto.message.Message

The ListTasks response that contains the set of Tasks that meet the filter criteria in the ListTasksRequest.

tasks

The set of Tasks that meet the requested filtering criteria. When no filter is specified, the request returns all tasks. A successful response can also be empty. An empty response indicates that no Tasks were found meeting the requested filter criteria.

Type

MutableSequence[google.maps.fleetengine_delivery_v1.types.Task]

next_page_token

Pass this token in the ListTasksRequest to continue to list results. If all results have been returned, then this field is either an empty string, or it doesn’t appear in the response.

Type

str

total_size

The total number of Tasks that match the request criteria, across all pages.

Type

int

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

Bases: proto.message.Message

A location with any additional identifiers.

point

The location’s coordinates.

Type

google.type.latlng_pb2.LatLng

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

Bases: proto.message.Message

A Task in the Delivery API represents a single action to track. In general, there is a distinction between shipment-related Tasks and break Tasks. A shipment can have multiple Tasks associated with it. For example, there could be one Task for the pickup, and one for the drop-off or transfer. Also, different Tasks for a given shipment can be handled by different vehicles. For example, one vehicle could handle the pickup, driving the shipment to the hub, while another vehicle drives the same shipment from the hub to the drop-off location.

Note: gRPC and REST APIs use different field naming conventions. For example, the Task.journey_sharing_info field in the gRPC API and the Task.journeySharingInfo field in the REST API refer to the same field.

name

Must be in the format providers/{provider}/tasks/{task}.

Type

str

type_

Required. Immutable. Defines the type of the Task. For example, a break or shipment.

Type

google.maps.fleetengine_delivery_v1.types.Task.Type

state

Required. The current execution state of the Task.

Type

google.maps.fleetengine_delivery_v1.types.Task.State

task_outcome

The outcome of the Task.

Type

google.maps.fleetengine_delivery_v1.types.Task.TaskOutcome

task_outcome_time

The timestamp that indicates when the Task’s outcome was set by the provider.

Type

google.protobuf.timestamp_pb2.Timestamp

task_outcome_location

The location where the Task’s outcome was set. This value is updated as part of UpdateTask. If this value isn’t explicitly updated by the provider, then Fleet Engine populates it by default with the last known vehicle location (the raw location).

Type

google.maps.fleetengine_delivery_v1.types.LocationInfo

task_outcome_location_source

Indicates where the value of the task_outcome_location came from.

Type

google.maps.fleetengine_delivery_v1.types.Task.TaskOutcomeLocationSource

tracking_id

Immutable. This field facilitates the storing of an ID so you can avoid using a complicated mapping. You cannot set tracking_id for Tasks of type UNAVAILABLE and SCHEDULED_STOP. These IDs are subject to the following restrictions:

  • Must be a valid Unicode string.

  • Limited to a maximum length of 64 characters.

  • Normalized according to [Unicode Normalization Form C] (http://www.unicode.org/reports/tr15/).

  • May not contain any of the following ASCII characters: ‘/’, ‘:’, ‘?’, ‘,’, or ‘#’.

Type

str

delivery_vehicle_id

Output only. The ID of the vehicle that is executing this Task. Delivery Vehicle IDs are subject to the following restrictions:

  • Must be a valid Unicode string.

  • Limited to a maximum length of 64 characters.

  • Normalized according to [Unicode Normalization Form C] (http://www.unicode.org/reports/tr15/).

  • May not contain any of the following ASCII characters: ‘/’, ‘:’, ‘?’, ‘,’, or ‘#’.

Type

str

planned_location

Immutable. The location where the Task will be completed. Optional for UNAVAILABLE Tasks, but required for all other Tasks.

Type

google.maps.fleetengine_delivery_v1.types.LocationInfo

task_duration

Required. Immutable. The time needed to execute a Task at this location.

Type

google.protobuf.duration_pb2.Duration

target_time_window

The time window during which the task should be completed.

Type

google.maps.fleetengine_delivery_v1.types.TimeWindow

journey_sharing_info

Output only. Journey sharing-specific fields. Not populated when state is CLOSED.

Type

google.maps.fleetengine_delivery_v1.types.Task.JourneySharingInfo

task_tracking_view_config

The configuration for task tracking that specifies which data elements are visible to the end users under what circumstances.

Type

google.maps.fleetengine_delivery_v1.types.TaskTrackingViewConfig

attributes

A list of custom Task attributes. Each attribute must have a unique key.

Type

MutableSequence[google.maps.fleetengine_delivery_v1.types.TaskAttribute]

class JourneySharingInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Journey sharing specific fields.

remaining_vehicle_journey_segments

Tracking information for the stops that the assigned vehicle will make before it completes this Task. Note that this list can contain stops from other tasks.

The first segment, Task.journey_sharing_info.remaining_vehicle_journey_segments[0] (gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments[0] (REST), contains route information from the driver’s last known location to the upcoming VehicleStop. Current route information usually comes from the driver app, except for some cases noted in the documentation for [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. The other segments in Task.journey_sharing_info.remaining_vehicle_journey_segments (gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments (REST) are populated by Fleet Engine. They provide route information between the remaining VehicleStops.

Type

MutableSequence[google.maps.fleetengine_delivery_v1.types.VehicleJourneySegment]

last_location

Indicates the vehicle’s last reported location of the assigned vehicle.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicleLocation

last_location_snappable

Indicates whether the vehicle’s lastLocation can be snapped to the current_route_segment. This value is False if either last_location or current_route_segment don’t exist. This value is computed by Fleet Engine. Updates from clients are ignored.

Type

bool

class State(value)[source]

Bases: proto.enums.Enum

The state of a Task. This indicates the Tasks’s progress.

Values:
STATE_UNSPECIFIED (0):

Default. Used for an unspecified or unrecognized Task state.

OPEN (1):

Either the Task has not yet been assigned to a delivery vehicle, or the delivery vehicle has not yet passed the Task’s assigned vehicle stop.

CLOSED (2):

When the vehicle passes the vehicle stop for this Task.

class TaskOutcome(value)[source]

Bases: proto.enums.Enum

The outcome of attempting to execute a Task. When TaskState is closed, TaskOutcome indicates whether it was completed successfully.

Values:
TASK_OUTCOME_UNSPECIFIED (0):

The Task outcome before its value is set.

SUCCEEDED (1):

The Task completed successfully.

FAILED (2):

Either the Task couldn’t be completed, or it was cancelled.

class TaskOutcomeLocationSource(value)[source]

Bases: proto.enums.Enum

The identity of the source that populated the task_outcome_location.

Values:
TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED (0):

The task outcome before it is set.

PROVIDER (2):

The provider-specified the task_outcome_location.

LAST_VEHICLE_LOCATION (3):

The provider didn’t specify the task_outcome_location, so Fleet Engine used the last known vehicle location.

class Type(value)[source]

Bases: proto.enums.Enum

The type of Task.

Values:
TYPE_UNSPECIFIED (0):

Default, the Task type is unknown.

PICKUP (1):

A pickup Task is the action taken for picking up a shipment from a customer. Depot or feeder vehicle pickups should use the SCHEDULED_STOP type.

DELIVERY (2):

A delivery Task is the action taken for delivering a shipment to an end customer. Depot or feeder vehicle dropoffs should use the SCHEDULED_STOP type.

SCHEDULED_STOP (3):

A scheduled stop Task is used for planning purposes. For example, it could represent picking up or dropping off shipments from feeder vehicles or depots. It shouldn’t be used for any shipments that are picked up or dropped off from an end customer.

UNAVAILABLE (4):

A Task that means the Vehicle is not available for service. For example, this can happen when the driver takes a break, or when the vehicle is being refueled.

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

Bases: proto.message.Message

Describes a task attribute as a key-value pair. The “key:value” string length cannot exceed 256 characters.

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.

key

The attribute’s key. Keys may not contain the colon character (:).

Type

str

string_value

String typed attribute value.

This field is a member of oneof task_attribute_value.

Type

str

bool_value

Boolean typed attribute value.

This field is a member of oneof task_attribute_value.

Type

bool

number_value

Double typed attribute value.

This field is a member of oneof task_attribute_value.

Type

float

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

Bases: proto.message.Message

The TaskTrackingInfo message. The message contains task tracking information which will be used for display. If a tracking ID is associated with multiple Tasks, Fleet Engine uses a heuristic to decide which Task’s TaskTrackingInfo to select.

name

Must be in the format providers/{provider}/taskTrackingInfo/{tracking}, where tracking represents the tracking ID.

Type

str

tracking_id

Immutable. The tracking ID of a Task.

  • Must be a valid Unicode string.

  • Limited to a maximum length of 64 characters.

  • Normalized according to [Unicode Normalization Form C] (http://www.unicode.org/reports/tr15/).

  • May not contain any of the following ASCII characters: ‘/’, ‘:’, ‘?’, ‘,’, or ‘#’.

Type

str

vehicle_location

The vehicle’s last location.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicleLocation

route_polyline_points

A list of points which when connected forms a polyline of the vehicle’s expected route to the location of this task.

Type

MutableSequence[google.type.latlng_pb2.LatLng]

remaining_stop_count

Indicates the number of stops the vehicle remaining until the task stop is reached, including the task stop. For example, if the vehicle’s next stop is the task stop, the value will be 1.

Type

google.protobuf.wrappers_pb2.Int32Value

remaining_driving_distance_meters

The total remaining distance in meters to the VehicleStop of interest.

Type

google.protobuf.wrappers_pb2.Int32Value

estimated_arrival_time

The timestamp that indicates the estimated arrival time to the stop location.

Type

google.protobuf.timestamp_pb2.Timestamp

estimated_task_completion_time

The timestamp that indicates the estimated completion time of a Task.

Type

google.protobuf.timestamp_pb2.Timestamp

state

The current execution state of the Task.

Type

google.maps.fleetengine_delivery_v1.types.Task.State

task_outcome

The outcome of attempting to execute a Task.

Type

google.maps.fleetengine_delivery_v1.types.Task.TaskOutcome

task_outcome_time

The timestamp that indicates when the Task’s outcome was set by the provider.

Type

google.protobuf.timestamp_pb2.Timestamp

planned_location

Immutable. The location where the Task will be completed.

Type

google.maps.fleetengine_delivery_v1.types.LocationInfo

target_time_window

The time window during which the task should be completed.

Type

google.maps.fleetengine_delivery_v1.types.TimeWindow

attributes

The custom attributes set on the task.

Type

MutableSequence[google.maps.fleetengine_delivery_v1.types.TaskAttribute]

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

Bases: proto.message.Message

The configuration message that defines when a data element of a Task should be visible to the end users.

route_polyline_points_visibility

The field that specifies when route polyline points can be visible. If this field is not specified, the project level default visibility configuration for this data will be used.

Type

google.maps.fleetengine_delivery_v1.types.TaskTrackingViewConfig.VisibilityOption

estimated_arrival_time_visibility

The field that specifies when estimated arrival time can be visible. If this field is not specified, the project level default visibility configuration for this data will be used.

Type

google.maps.fleetengine_delivery_v1.types.TaskTrackingViewConfig.VisibilityOption

estimated_task_completion_time_visibility

The field that specifies when estimated task completion time can be visible. If this field is not specified, the project level default visibility configuration for this data will be used.

Type

google.maps.fleetengine_delivery_v1.types.TaskTrackingViewConfig.VisibilityOption

remaining_driving_distance_visibility

The field that specifies when remaining driving distance can be visible. If this field is not specified, the project level default visibility configuration for this data will be used.

Type

google.maps.fleetengine_delivery_v1.types.TaskTrackingViewConfig.VisibilityOption

remaining_stop_count_visibility

The field that specifies when remaining stop count can be visible. If this field is not specified, the project level default visibility configuration for this data will be used.

Type

google.maps.fleetengine_delivery_v1.types.TaskTrackingViewConfig.VisibilityOption

vehicle_location_visibility

The field that specifies when vehicle location can be visible. If this field is not specified, the project level default visibility configuration for this data will be used.

Type

google.maps.fleetengine_delivery_v1.types.TaskTrackingViewConfig.VisibilityOption

class VisibilityOption(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The option message that defines when a data element should be visible to the end users.

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.

remaining_stop_count_threshold

This data element is visible to the end users if the remaining stop count <= remaining_stop_count_threshold.

This field is a member of oneof visibility_option.

Type

int

duration_until_estimated_arrival_time_threshold

This data element is visible to the end users if the ETA to the stop <= duration_until_estimated_arrival_time_threshold.

This field is a member of oneof visibility_option.

Type

google.protobuf.duration_pb2.Duration

remaining_driving_distance_meters_threshold

This data element is visible to the end users if the remaining driving distance in meters <= remaining_driving_distance_meters_threshold.

This field is a member of oneof visibility_option.

Type

int

always

If set to true, this data element is always visible to the end users with no thresholds. This field cannot be set to false.

This field is a member of oneof visibility_option.

Type

bool

never

If set to true, this data element is always hidden from the end users with no thresholds. This field cannot be set to false.

This field is a member of oneof visibility_option.

Type

bool

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

Bases: proto.message.Message

A time range.

start_time

Required. The start time of the time window (inclusive).

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

Required. The end time of the time window (inclusive).

Type

google.protobuf.timestamp_pb2.Timestamp

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

Bases: proto.message.Message

The UpdateDeliveryVehicle request message.

header

Optional. The standard Delivery API request header.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryRequestHeader

delivery_vehicle

Required. The DeliveryVehicle entity update to apply. Note: You cannot update the name of the DeliveryVehicle.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicle

update_mask

Required. A field mask that indicates which DeliveryVehicle fields to update. Note that the update_mask must contain at least one field.

This is a comma-separated list of fully qualified names of fields. Example: "remaining_vehicle_journey_segments".

Type

google.protobuf.field_mask_pb2.FieldMask

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

Bases: proto.message.Message

The UpdateTask request message.

header

Optional. The standard Delivery API request header.

Type

google.maps.fleetengine_delivery_v1.types.DeliveryRequestHeader

task

Required. The Task associated with the update. The following fields are maintained by Fleet Engine. Do not update them using Task.update.

  • last_location.

  • last_location_snappable.

  • name.

  • remaining_vehicle_journey_segments.

  • task_outcome_location_source.

Note: You cannot change the value of task_outcome once you set it.

If the Task has been assigned to a delivery vehicle, then don’t set the Task state to CLOSED using Task.update. Instead, remove the VehicleStop that contains the Task from the delivery vehicle, which automatically sets the Task state to CLOSED.

Type

google.maps.fleetengine_delivery_v1.types.Task

update_mask

Required. The field mask that indicates which Task fields to update. Note: The update_mask must contain at least one field.

This is a comma-separated list of fully qualified names of fields. Example: "task_outcome,task_outcome_time,task_outcome_location".

Type

google.protobuf.field_mask_pb2.FieldMask

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

Bases: proto.message.Message

Represents a Vehicle’s travel segment - from its previous stop to the current stop. If it is the first active stop, then it is from the Vehicle’s current location to this stop.

stop

Specifies the stop location, along with the Tasks associated with the stop. Some fields of the VehicleStop might not be present if this journey segment is part of JourneySharingInfo.

Type

google.maps.fleetengine_delivery_v1.types.VehicleStop

driving_distance_meters

Output only. The travel distance from the previous stop to this stop. If the current stop is the first stop in the list of journey segments, then the starting point is the vehicle’s location recorded at the time that this stop was added to the list. This field might not be present if this journey segment is part of JourneySharingInfo.

Type

google.protobuf.wrappers_pb2.Int32Value

driving_duration

Output only. The travel time from the previous stop to this stop. If the current stop is the first stop in the list of journey segments, then the starting point is the Vehicle’s location recorded at the time that this stop was added to the list.

If this field is defined in the path Task.remaining_vehicle_journey_segments[0].driving_duration (gRPC) or Task.remainingVehicleJourneySegments[0].drivingDuration (REST), then it may be populated with the value from DeliveryVehicle.remaining_duration (gRPC) or DeliveryVehicle.remainingDuration (REST). This provides the remaining driving duration from the driver app’s latest known location rather than the driving time from the previous stop.

Type

google.protobuf.duration_pb2.Duration

path

Output only. The path from the previous stop to this stop. If the current stop is the first stop in the list of journey segments, then this is the path from the vehicle’s current location to this stop at the time that the stop was added to the list. This field might not be present if this journey segment is part of JourneySharingInfo.

If this field is defined in the path Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path (gRPC) or Task.journeySharingInfo.remainingVehicleJourneySegments[0].path (REST), then it may be populated with the LatLngs decoded from DeliveryVehicle.current_route_segment (gRPC) or DeliveryVehicle.currentRouteSegment (REST). This provides the driving path from the driver app’s latest known location rather than the path from the previous stop.

Type

MutableSequence[google.type.latlng_pb2.LatLng]

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

Bases: proto.message.Message

Describes a point where a Vehicle stops to perform one or more Tasks.

planned_location

Required. The location of the stop. Note that the locations in the Tasks might not exactly match this location, but will be within a short distance of it. This field won’t be populated in the response of a GetTask call.

Type

google.maps.fleetengine_delivery_v1.types.LocationInfo

tasks

The list of Tasks to be performed at this stop. This field won’t be populated in the response of a GetTask call.

Type

MutableSequence[google.maps.fleetengine_delivery_v1.types.VehicleStop.TaskInfo]

state

The state of the VehicleStop. This field won’t be populated in the response of a GetTask call.

Type

google.maps.fleetengine_delivery_v1.types.VehicleStop.State

class State(value)[source]

Bases: proto.enums.Enum

The current state of a VehicleStop.

Values:
STATE_UNSPECIFIED (0):

Unknown.

NEW (1):

Created, but not actively routing.

ENROUTE (2):

Assigned and actively routing.

ARRIVED (3):

Arrived at stop. Assumes that when the Vehicle is routing to the next stop, that all previous stops have been completed.

class TaskInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Additional information about the Task performed at this stop.

task_id

The Task ID. This field won’t be populated in the response of a GetTask call. Task IDs are subject to the following restrictions:

  • Must be a valid Unicode string.

  • Limited to a maximum length of 64 characters.

  • Normalized according to [Unicode Normalization Form C] (http://www.unicode.org/reports/tr15/).

  • May not contain any of the following ASCII characters: ‘/’, ‘:’, ‘?’, ‘,’, or ‘#’.

Type

str

task_duration

Output only. The time required to perform the Task.

Type

google.protobuf.duration_pb2.Duration

target_time_window

Output only. The time window during which the task should be completed. This is only set in the response to GetDeliveryVehicle.

Type

google.maps.fleetengine_delivery_v1.types.TimeWindow