# Package maps.fleetengine.delivery.v1

## Index

- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryService` (interface)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.BatchCreateTasksRequest` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.BatchCreateTasksResponse` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.CreateTaskRequest` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeleteDeliveryVehicleRequest` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeleteTaskRequest` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform` (enum)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType` (enum)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicle` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType` (enum)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicleAttribute` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicleLocation` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor` (enum)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus` (enum)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.GetTaskRequest` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.ListTasksRequest` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.ListTasksResponse` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.LocationInfo` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.LocationInfo.PointSource` (enum)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task.JourneySharingInfo` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task.State` (enum)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task.TaskOutcome` (enum)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource` (enum)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task.Type` (enum)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TaskAttribute` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TaskTrackingInfo` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TaskTrackingViewConfig` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TimeWindow` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.UpdateTaskRequest` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.VehicleJourneySegment` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.VehicleStop` (message)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.VehicleStop.State` (enum)
- `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.VehicleStop.TaskInfo` (message)

## DeliveryService

The Last Mile Delivery service.

| BatchCreateTasks |
|---|
| `` rpc BatchCreateTasks(`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.BatchCreateTasksRequest`) returns (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.BatchCreateTasksResponse`) `` Creates and returns a batch of new `Task` objects. |

| CreateDeliveryVehicle |
|---|
| `` rpc CreateDeliveryVehicle(`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest`) returns (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicle`) `` Creates and returns a new `DeliveryVehicle`. |

| CreateTask |
|---|
| `` rpc CreateTask(`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.CreateTaskRequest`) returns (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task`) `` Creates and returns a new `Task` object. |

| DeleteDeliveryVehicle |
|---|
| `` rpc DeleteDeliveryVehicle(`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeleteDeliveryVehicleRequest`) returns (`https://protobuf.dev/reference/protobuf/google.protobuf#empty`) `` Deletes a DeliveryVehicle from the Fleet Engine. Returns FAILED_PRECONDITION if the DeliveryVehicle has OPEN Tasks assigned to it. |

| DeleteTask |
|---|
| `` rpc DeleteTask(`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeleteTaskRequest`) returns (`https://protobuf.dev/reference/protobuf/google.protobuf#empty`) `` Deletes a single Task. Returns FAILED_PRECONDITION if the Task is OPEN and assigned to a DeliveryVehicle. |

| GetDeliveryVehicle |
|---|
| `` rpc GetDeliveryVehicle(`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest`) returns (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicle`) `` Returns the specified `DeliveryVehicle` instance. |

| GetTask |
|---|
| `` rpc GetTask(`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.GetTaskRequest`) returns (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task`) `` Gets information about a `Task`. |

| GetTaskTrackingInfo |
|---|
| `` rpc GetTaskTrackingInfo(`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest`) returns (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TaskTrackingInfo`) `` Returns the specified `TaskTrackingInfo` instance. |

| ListDeliveryVehicles |
|---|
| `` rpc ListDeliveryVehicles(`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest`) returns (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse`) `` Gets all `DeliveryVehicle`s that meet the specified filtering criteria. |

| ListTasks |
|---|
| `` rpc ListTasks(`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.ListTasksRequest`) returns (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.ListTasksResponse`) `` Gets all `Task`s that meet the specified filtering criteria. |

| UpdateDeliveryVehicle |
|---|
| `` rpc UpdateDeliveryVehicle(`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest`) returns (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicle`) `` Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns `Tasks` to the `DeliveryVehicle`. You cannot update the name of the `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`, but it must contain all of the `VehicleJourneySegment`s to be persisted on the `DeliveryVehicle`. The `task_id`s are retrieved from `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are assigned to the `DeliveryVehicle` if they have not yet been assigned. |

| UpdateTask |
|---|
| `` rpc UpdateTask(`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.UpdateTaskRequest`) returns (`https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task`) `` Updates `Task` data. |

## BatchCreateTasksRequest

The `BatchCreateTask` request message.

| Fields ||
|---|---|
| `header` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader` 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. |
| `parent` | `string` 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. |
| `requests[]` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.CreateTaskRequest` Required. The request message that specifies the resources to create. Note: You can create a maximum of 500 tasks in a batch. |

## BatchCreateTasksResponse

The `BatchCreateTask` response message.

| Fields ||
|---|---|
| `tasks[]` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task` The created Tasks. |

## CreateDeliveryVehicleRequest

The `CreateDeliveryVehicle` request message.

| Fields ||
|---|---|
| `header` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader` Optional. The standard Delivery API request header. |
| `parent` | `string` Required. Must be in the format `providers/{provider}`. The provider must be the Google Cloud Project ID. For example, `sample-cloud-project`. |
| `delivery_vehicle_id` | `string` 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 '#'. |
| `delivery_vehicle` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicle` 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. |

## CreateTaskRequest

The `CreateTask` request message.

| Fields ||
|---|---|
| `header` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader` Optional. The standard Delivery API request header. |
| `parent` | `string` Required. Must be in the format `providers/{provider}`. The `provider` must be the Google Cloud Project ID. For example, `sample-cloud-project`. |
| `task_id` | `string` 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 '#'. |
| `task` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.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` The following fields can be optionally set: - `target_time_window` - `task_tracking_view_config` - `attributes` Note: The Task's `name` field is ignored. All other Task fields must not be set; otherwise, an error is returned. |

## DeleteDeliveryVehicleRequest

DeleteDeliveryVehicle request message.

| Fields ||
|---|---|
| `header` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader` Optional. The standard Delivery API request header. |
| `name` | `string` 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`. |

## DeleteTaskRequest

DeleteTask request message.

| Fields ||
|---|---|
| `header` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader` Optional. The standard Delivery API request header. |
| `name` | `string` Required. Must be in the format `providers/{provider}/tasks/{task}`. The `provider` must be the Google Cloud Project ID. For example, `sample-cloud-project`. |

## DeliveryRequestHeader

A RequestHeader contains fields common to all Delivery RPC requests.

| Fields ||
|---|---|
| `language_code` | `string` 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`. |
| `region_code` | `string` Required. CLDR region code of the region where the request originates. Field value example: `US`. |
| `sdk_version` | `string` Version of the calling SDK, if applicable. The version format is "major.minor.patch", example: `1.1.2`. |
| `os_version` | `string` Version of the operating system on which the calling SDK is running. Field value examples: `4.4.1`, `12.1`. |
| `device_model` | `string` Model of the device on which the calling SDK is running. Field value examples: `iPhone12,1`, `SM-G920F`. |
| `sdk_type` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType` The type of SDK sending the request. |
| `maps_sdk_version` | `string` Version of the MapSDK which the calling SDK depends on, if applicable. The version format is "major.minor.patch", example: `5.2.1`. |
| `nav_sdk_version` | `string` Version of the NavSDK which the calling SDK depends on, if applicable. The version format is "major.minor.patch", example: `2.1.0`. |
| `platform` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform` Platform of the calling SDK. |
| `manufacturer` | `string` Manufacturer of the Android device from the calling SDK, only applicable for the Android SDKs. Field value example: `Samsung`. |
| `android_api_level` | `int32` Android API level of the calling SDK, only applicable for the Android SDKs. Field value example: `23`. |
| `trace_id` | `string` Optional ID that can be provided for logging purposes in order to identify the request. |

## Platform

The platform of the calling SDK.

| Enums ||
|---|---|
| `PLATFORM_UNSPECIFIED` | The default value. This value is used if the platform is omitted. |
| `ANDROID` | The request is coming from Android. |
| `IOS` | The request is coming from iOS. |
| `WEB` | The request is coming from the web. |

## SdkType

Possible types of SDK.

| Enums ||
|---|---|
| `SDK_TYPE_UNSPECIFIED` | The default value. This value is used if the `sdk_type` is omitted. |
| `CONSUMER` | The calling SDK is Consumer. |
| `DRIVER` | The calling SDK is Driver. |
| `JAVASCRIPT` | The calling SDK is JavaScript. |

## DeliveryVehicle

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.

| Fields ||
|---|---|
| `name` | `string` The unique name of this Delivery Vehicle. The format is `providers/{provider}/deliveryVehicles/{vehicle}`. |
| `last_location` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicleLocation` The last reported location of the Delivery Vehicle. |
| `past_locations[]` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicleLocation` Input only. Locations where this Delivery Vehicle has been in the past that haven't yet been reported to Fleet Engine. This is used in `UpdateDeliveryVehicleRequest` to record locations which were previously unable to be sent to the server. Typically this happens when the Delivery Vehicle does not have internet connectivity. |
| `navigation_status` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus` The Delivery Vehicle's navigation status. |
| `current_route_segment` | `bytes` 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 `LatLng`s 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. |
| `current_route_segment_end_point` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/google.type#google.type.LatLng` 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. |
| `remaining_distance_meters` | `https://protobuf.dev/reference/protobuf/google.protobuf#int32-value` 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 `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicle.FIELDS.bytes.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 `Task`s assigned to the Delivery Vehicle. Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the `current_route_segment` field is empty. |
| `remaining_duration` | `https://protobuf.dev/reference/protobuf/google.protobuf#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 `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicle.FIELDS.bytes.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. |
| `remaining_vehicle_journey_segments[]` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.VehicleJourneySegment` 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`. |
| `attributes[]` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicleAttribute` 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` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType` The type of this delivery vehicle. If unset, this will default to `AUTO`. |

## DeliveryVehicleType

The type of delivery vehicle.

| Enums ||
|---|---|
| `DELIVERY_VEHICLE_TYPE_UNSPECIFIED` | The value is unused. |
| `AUTO` | An automobile. |
| `TWO_WHEELER` | A motorcycle, moped, or other two-wheeled vehicle |
| `BICYCLE` | Human-powered transport. |
| `PEDESTRIAN` | A human transporter, typically walking or running, traveling along pedestrian pathways. |

## DeliveryVehicleAttribute

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

| Fields ||
|---|---|
| `key` | `string` The attribute's key. |
| `value` | `string` The attribute's value. |
| Union field `delivery_vehicle_attribute_value`. The attribute's value, can be in string, bool, or double type. `delivery_vehicle_attribute_value` can be only one of the following: ||
| `string_value` | `string` 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. |
| `bool_value` | `bool` Boolean typed attribute value. |
| `number_value` | `double` Double typed attribute value. |

## DeliveryVehicleLocation

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

| Fields ||
|---|---|
| `location` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/google.type#google.type.LatLng` 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`. |
| `horizontal_accuracy (deprecated)` | `https://protobuf.dev/reference/protobuf/google.protobuf#double-value` > [!WARNING] > This item is deprecated! Deprecated: Use `latlng_accuracy` instead. |
| `latlng_accuracy` | `https://protobuf.dev/reference/protobuf/google.protobuf#double-value` Accuracy of `location` in meters as a radius. |
| `heading` | `https://protobuf.dev/reference/protobuf/google.protobuf#int32-value` Direction the vehicle is moving in degrees. 0 represents North. The valid range is \[0,360). |
| `bearing_accuracy (deprecated)` | `https://protobuf.dev/reference/protobuf/google.protobuf#double-value` > [!WARNING] > This item is deprecated! Deprecated: Use `heading_accuracy` instead. |
| `heading_accuracy` | `https://protobuf.dev/reference/protobuf/google.protobuf#double-value` Accuracy of `heading` in degrees. |
| `altitude` | `https://protobuf.dev/reference/protobuf/google.protobuf#double-value` Altitude in meters above WGS84. |
| `vertical_accuracy (deprecated)` | `https://protobuf.dev/reference/protobuf/google.protobuf#double-value` > [!WARNING] > This item is deprecated! Deprecated: Use `altitude_accuracy` instead. |
| `altitude_accuracy` | `https://protobuf.dev/reference/protobuf/google.protobuf#double-value` Accuracy of `altitude` in meters. |
| `speed_kmph (deprecated)` | `https://protobuf.dev/reference/protobuf/google.protobuf#int32-value` > [!WARNING] > This item is deprecated! Speed of the vehicle in kilometers per hour. Deprecated: Use `speed` instead. |
| `speed` | `https://protobuf.dev/reference/protobuf/google.protobuf#double-value` Speed of the vehicle in meters/second |
| `speed_accuracy` | `https://protobuf.dev/reference/protobuf/google.protobuf#double-value` Accuracy of `speed` in meters/second. |
| `update_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` The time when `location` was reported by the sensor according to the sensor's clock. |
| `server_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` Output only. The time when the server received the location information. |
| `location_sensor` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor` Provider of location data (for example, `GPS`). |
| `is_road_snapped` | `https://protobuf.dev/reference/protobuf/google.protobuf#bool-value` Whether `location` is snapped to a road. |
| `is_gps_sensor_enabled` | `https://protobuf.dev/reference/protobuf/google.protobuf#bool-value` Input only. Indicates whether the GPS sensor is enabled on the mobile device. |
| `time_since_update` | `https://protobuf.dev/reference/protobuf/google.protobuf#int32-value` 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. |
| `num_stale_updates (deprecated)` | `https://protobuf.dev/reference/protobuf/google.protobuf#int32-value` > [!WARNING] > This item is deprecated! Input only. Deprecated: Other signals are now used to determine if a location is stale. |
| `raw_location` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/google.type#google.type.LatLng` Raw vehicle location (unprocessed by road-snapper). |
| `raw_location_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` Timestamp associated with the raw location. |
| `raw_location_sensor` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor` Source of the raw location. Defaults to `GPS`. |
| `raw_location_accuracy` | `https://protobuf.dev/reference/protobuf/google.protobuf#double-value` Accuracy of `raw_location` as a radius, in meters. |
| `flp_location` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/google.type#google.type.LatLng` The location from Android's Fused Location Provider. |
| `flp_update_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` Update timestamp of `flp_location` |
| `flp_latlng_accuracy_meters` | `https://protobuf.dev/reference/protobuf/google.protobuf#double-value` Accuracy of `flp_location` in meters as a radius. |
| `flp_heading_degrees` | `https://protobuf.dev/reference/protobuf/google.protobuf#int32-value` Direction the vehicle is moving in degrees, as determined by the Fused Location Provider. 0 represents North. The valid range is \[0,360). |
| `supplemental_location` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/google.type#google.type.LatLng` Supplemental location provided by the integrating app. |
| `supplemental_location_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` Timestamp associated with the supplemental location. |
| `supplemental_location_sensor` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor` Source of the supplemental location. Defaults to `CUSTOMER_SUPPLIED_LOCATION`. |
| `supplemental_location_accuracy` | `https://protobuf.dev/reference/protobuf/google.protobuf#double-value` Accuracy of `supplemental_location` as a radius, in meters. |
| `road_snapped (deprecated)` | `bool` > [!WARNING] > This item is deprecated! Deprecated: Use `is_road_snapped` instead. |

## DeliveryVehicleLocationSensor

The sensor or methodology used to determine the location.

| Enums ||
|---|---|
| `UNKNOWN_SENSOR` | The sensor is unspecified or unknown. |
| `GPS` | GPS or Assisted GPS. |
| `NETWORK` | Assisted GPS, cell tower ID, or WiFi access point. |
| `PASSIVE` | Cell tower ID or WiFi access point. |
| `ROAD_SNAPPED_LOCATION_PROVIDER` | A location determined by the mobile device to be the most likely road position. |
| `CUSTOMER_SUPPLIED_LOCATION` | 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` | 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` | Android's Fused Location Provider. |
| `CORE_LOCATION` | The location provider on Apple operating systems. |

## DeliveryVehicleNavigationStatus

The vehicle's navigation status.

| Enums ||
|---|---|
| `UNKNOWN_NAVIGATION_STATUS` | Unspecified navigation status. |
| `NO_GUIDANCE` | The Driver app's navigation is in `FREE_NAV` mode. |
| `ENROUTE_TO_DESTINATION` | Turn-by-turn navigation is available and the Driver app navigation has entered `GUIDED_NAV` mode. |
| `OFF_ROUTE` | The vehicle has gone off the suggested route. |
| `ARRIVED_AT_DESTINATION` | The vehicle is within approximately 50m of the destination. |

## GetDeliveryVehicleRequest

The `GetDeliveryVehicle` request message.

| Fields ||
|---|---|
| `header` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader` Optional. The standard Delivery API request header. |
| `name` | `string` 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`. |

## GetTaskRequest

The `GetTask` request message.

| Fields ||
|---|---|
| `header` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader` Optional. The standard Delivery API request header. |
| `name` | `string` Required. Must be in the format `providers/{provider}/tasks/{task}`. The `provider` must be the Google Cloud Project ID. For example, `sample-cloud-project`. |

## GetTaskTrackingInfoRequest

The `GetTaskTrackingInfoRequest` request message.

| Fields ||
|---|---|
| `header` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader` Optional. The standard Delivery API request header. |
| `name` | `string` 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`. |

## ListDeliveryVehiclesRequest

The `ListDeliveryVehicles` request message.

| Fields ||
|---|---|
| `header` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader` Optional. The standard Delivery API request header. |
| `parent` | `string` Required. Must be in the format `providers/{provider}`. The `provider` must be the Google Cloud Project ID. For example, `sample-cloud-project`. |
| `page_size` | `int32` 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. |
| `page_token` | `string` 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. |
| `filter` | `string` 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. |
| `viewport` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/google.geo.type#google.geo.type.Viewport` Optional. A filter that limits the vehicles returned to those whose last known location was in the rectangular area defined by the viewport. |

## ListDeliveryVehiclesResponse

The `ListDeliveryVehicles` response message.

| Fields ||
|---|---|
| `delivery_vehicles[]` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicle` 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. |
| `next_page_token` | `string` 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. |
| `total_size` | `int64` The total number of delivery vehicles that match the request criteria, across all pages. |

## ListTasksRequest

The `ListTasks` request message.

| Fields ||
|---|---|
| `header` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader` Optional. The standard Delivery API request header. |
| `parent` | `string` Required. Must be in the format `providers/{provider}`. The `provider` must be the Google Cloud Project ID. For example, `sample-cloud-project`. |
| `page_size` | `int32` 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. |
| `page_token` | `string` 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. |
| `filter` | `string` 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](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). |

## ListTasksResponse

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

| Fields ||
|---|---|
| `tasks[]` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task` 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. |
| `next_page_token` | `string` 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. |
| `total_size` | `int64` The total number of Tasks that match the request criteria, across all pages. |

## LocationInfo

A location with any additional identifiers.

| Fields ||
|---|---|
| `point` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/google.type#google.type.LatLng` The location's coordinates. Either `point` or `place` must be specified as input. If both are specified, `point` will be used for routing and `place` will be used for metadata. If only `place` is specified as input, `point` will be calculated from the `place` and included in the output. |
| `place` | `string` The resource name of the place that represents this location. The format is `places/{place_id}`. Either `point` or `place` must be specified as input. If both are specified, `point` will be used for routing and `place` will be used for metadata. `place` is only included in the output if it was included in the input, meaning that there is no `place` lookup from `LatLng` performed. This is an experimental feature. |
| `point_location_source` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.LocationInfo.PointSource` Output only. The source of the latlng `point` field. This is part of an experimental feature. |

## PointSource

Indicates the source of a `LatLng`.

| Enums ||
|---|---|
| `POINT_SOURCE_UNSPECIFIED` | Point source unspecified. |
| `POINT_SOURCE_DEVELOPER_PROVIDED` | The `LatLng` was explicitly provided by the developer. |
| `POINT_SOURCE_CALCULATED_FROM_PLACE` | The `LatLng` was calculated from the provided place. |

## Task

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.

| Fields ||
|---|---|
| `name` | `string` Must be in the format `providers/{provider}/tasks/{task}`. |
| `type` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task.Type` Required. Immutable. Defines the type of the Task. For example, a break or shipment. |
| `state` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task.State` Required. The current execution state of the Task. |
| `task_outcome` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task.TaskOutcome` The outcome of the Task. |
| `task_outcome_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` The timestamp that indicates when the `Task`'s outcome was set by the provider. |
| `task_outcome_location` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.LocationInfo` 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). |
| `task_outcome_location_source` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource` Indicates where the value of the `task_outcome_location` came from. |
| `tracking_id` | `string` 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 '#'. |
| `delivery_vehicle_id` | `string` 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 '#'. |
| `planned_location` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.LocationInfo` Immutable. The location where the Task will be completed. Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. |
| `task_duration` | `https://protobuf.dev/reference/protobuf/google.protobuf#duration` Required. Immutable. The time needed to execute a Task at this location. |
| `target_time_window` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TimeWindow` The time window during which the task should be completed. |
| `journey_sharing_info` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task.JourneySharingInfo` Output only. Journey sharing-specific fields. Not populated when state is `CLOSED`. |
| `task_tracking_view_config` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TaskTrackingViewConfig` The configuration for task tracking that specifies which data elements are visible to the end users under what circumstances. |
| `attributes[]` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TaskAttribute` A list of custom Task attributes. Each attribute must have a unique key. |

## JourneySharingInfo

Journey sharing specific fields.

| Fields ||
|---|---|
| `remaining_vehicle_journey_segments[]` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.VehicleJourneySegment` 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 `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicle.FIELDS.bytes.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`. |
| `last_location` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicleLocation` Indicates the vehicle's last reported location of the assigned vehicle. |
| `last_location_snappable` | `bool` 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. |

## State

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

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Default. Used for an unspecified or unrecognized Task state. |
| `OPEN` | 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` | When the vehicle passes the vehicle stop for this Task. |

## TaskOutcome

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

| Enums ||
|---|---|
| `TASK_OUTCOME_UNSPECIFIED` | The Task outcome before its value is set. |
| `SUCCEEDED` | The Task completed successfully. |
| `FAILED` | Either the Task couldn't be completed, or it was cancelled. |

## TaskOutcomeLocationSource

The identity of the source that populated the `task_outcome_location`.

| Enums ||
|---|---|
| `TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED` | The task outcome before it is set. |
| `PROVIDER` | The provider-specified the `task_outcome_location`. |
| `LAST_VEHICLE_LOCATION` | The provider didn't specify the `task_outcome_location`, so Fleet Engine used the last known vehicle location. |

## Type

The type of Task.

| Enums ||
|---|---|
| `TYPE_UNSPECIFIED` | Default, the Task type is unknown. |
| `PICKUP` | 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` | 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` | 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` | 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. |

## TaskAttribute

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

| Fields ||
|---|---|
| `key` | `string` The attribute's key. Keys may not contain the colon character (:). |
| Union field `task_attribute_value`. The attribute's value, can be in string, bool, or double type. If none are set the TaskAttribute string_value will be stored as the empty string "". `task_attribute_value` can be only one of the following: ||
| `string_value` | `string` String typed attribute value. |
| `bool_value` | `bool` Boolean typed attribute value. |
| `number_value` | `double` Double typed attribute value. |

## TaskTrackingInfo

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.

| Fields ||
|---|---|
| `name` | `string` Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, where `tracking` represents the tracking ID. |
| `tracking_id` | `string` 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 '#'. |
| `vehicle_location` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicleLocation` The vehicle's last location. |
| `route_polyline_points[]` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/google.type#google.type.LatLng` A list of points which when connected forms a polyline of the vehicle's expected route to the location of this task. |
| `remaining_stop_count` | `https://protobuf.dev/reference/protobuf/google.protobuf#int32-value` 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. |
| `remaining_driving_distance_meters` | `https://protobuf.dev/reference/protobuf/google.protobuf#int32-value` The total remaining distance in meters to the `VehicleStop` of interest. |
| `estimated_arrival_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` The timestamp that indicates the estimated arrival time to the stop location. |
| `estimated_task_completion_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` The timestamp that indicates the estimated completion time of a Task. |
| `state` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task.State` The current execution state of the Task. |
| `task_outcome` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.Task.TaskOutcome` The outcome of attempting to execute a Task. |
| `task_outcome_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` The timestamp that indicates when the Task's outcome was set by the provider. |
| `planned_location` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.LocationInfo` Immutable. The location where the Task will be completed. |
| `target_time_window` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TimeWindow` The time window during which the task should be completed. |
| `attributes[]` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TaskAttribute` The custom attributes set on the task. |

## TaskTrackingViewConfig

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

| Fields ||
|---|---|
| `route_polyline_points_visibility` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption` 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. |
| `estimated_arrival_time_visibility` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption` 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. |
| `estimated_task_completion_time_visibility` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption` 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. |
| `remaining_driving_distance_visibility` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption` 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. |
| `remaining_stop_count_visibility` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption` 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. |
| `vehicle_location_visibility` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption` 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. |

## VisibilityOption

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

| Fields ||
|---|---|
| Union field `visibility_option`. The specific visibility option chosen. `visibility_option` can be only one of the following: ||
| `remaining_stop_count_threshold` | `int32` This data element is visible to the end users if the remaining stop count \<= remaining_stop_count_threshold. |
| `duration_until_estimated_arrival_time_threshold` | `https://protobuf.dev/reference/protobuf/google.protobuf#duration` This data element is visible to the end users if the ETA to the stop \<= duration_until_estimated_arrival_time_threshold. |
| `remaining_driving_distance_meters_threshold` | `int32` This data element is visible to the end users if the remaining driving distance in meters \<= remaining_driving_distance_meters_threshold. |
| `always` | `bool` If set to true, this data element is always visible to the end users with no thresholds. This field cannot be set to false. |
| `never` | `bool` If set to true, this data element is always hidden from the end users with no thresholds. This field cannot be set to false. |

## TimeWindow

A time range.

| Fields ||
|---|---|
| `start_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` Required. The start time of the time window (inclusive). |
| `end_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` Required. The end time of the time window (inclusive). |

## UpdateDeliveryVehicleRequest

The `UpdateDeliveryVehicle` request message.

| Fields ||
|---|---|
| `header` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader` Optional. The standard Delivery API request header. |
| `delivery_vehicle` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryVehicle` Required. The `DeliveryVehicle` entity update to apply. Note: You cannot update the name of the `DeliveryVehicle`. |
| `update_mask` | `https://protobuf.dev/reference/protobuf/google.protobuf#field-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"`. |

## UpdateTaskRequest

The `UpdateTask` request message.

| Fields ||
|---|---|
| `header` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.DeliveryRequestHeader` Optional. The standard Delivery API request header. |
| `task` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.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. |
| `update_mask` | `https://protobuf.dev/reference/protobuf/google.protobuf#field-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"`. |

## VehicleJourneySegment

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.

| Fields ||
|---|---|
| `stop` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.VehicleStop` Specifies the stop location, along with the `Task`s associated with the stop. Some fields of the VehicleStop might not be present if this journey segment is part of `JourneySharingInfo`. |
| `driving_distance_meters` | `https://protobuf.dev/reference/protobuf/google.protobuf#int32-value` 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`. |
| `driving_duration` | `https://protobuf.dev/reference/protobuf/google.protobuf#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. |
| `path[]` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/google.type#google.type.LatLng` 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 `LatLng`s 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. |

## VehicleStop

Describes a point where a Vehicle stops to perform one or more `Task`s.

| Fields ||
|---|---|
| `planned_location` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.LocationInfo` Required. The location of the stop. Note that the locations in the `Task`s 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. |
| `tasks[]` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.VehicleStop.TaskInfo` The list of `Task`s to be performed at this stop. This field won't be populated in the response of a `GetTask` call. |
| `state` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.VehicleStop.State` The state of the `VehicleStop`. This field won't be populated in the response of a `GetTask` call. |

## State

The current state of a `VehicleStop`.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unknown. |
| `NEW` | Created, but not actively routing. |
| `ENROUTE` | Assigned and actively routing. |
| `ARRIVED` | Arrived at stop. Assumes that when the Vehicle is routing to the next stop, that all previous stops have been completed. |

## TaskInfo

Additional information about the Task performed at this stop.

| Fields ||
|---|---|
| `task_id` | `string` 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 '#'. |
| `task_duration` | `https://protobuf.dev/reference/protobuf/google.protobuf#duration` Output only. The time required to perform the Task. |
| `target_time_window` | `https://developers.google.com/maps/documentation/mobility/fleet-engine/reference/tasks/rpc/maps.fleetengine.delivery.v1#maps.fleetengine.delivery.v1.TimeWindow` Output only. The time window during which the task should be completed. This is only set in the response to `GetDeliveryVehicle`. |