- Resource: Task
- Type
- TaskOutcomeLocationSource
- JourneySharingInfo
- TaskTrackingViewConfig
- VisibilityOption
- Methods
Resource: 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.
JSON representation |
---|
{ "name": string, "type": enum ( |
Fields | |
---|---|
name |
Must be in the format |
type |
Required. Immutable. Defines the type of the Task. For example, a break or shipment. |
state |
Required. The current execution state of the Task. |
task |
The outcome of the Task. |
task |
The timestamp that indicates when the A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
task |
The location where the |
task |
Indicates where the value of the |
tracking |
Immutable. This field facilitates the storing of an ID so you can avoid using a complicated mapping. You cannot set
|
delivery |
Output only. The ID of the vehicle that is executing this Task. Delivery Vehicle IDs are subject to the following restrictions:
|
planned |
Immutable. The location where the Task will be completed. Optional for |
task |
Required. Immutable. The time needed to execute a Task at this location. A duration in seconds with up to nine fractional digits, ending with ' |
target |
The time window during which the task should be completed. |
journey |
Output only. Journey sharing-specific fields. Not populated when state is |
task |
The configuration for task tracking that specifies which data elements are visible to the end users under what circumstances. |
attributes[] |
A list of custom Task attributes. Each attribute must have a unique key. |
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. |
TaskOutcomeLocationSource
The identity of the source that populated the taskOutcomeLocation
.
Enums | |
---|---|
TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED |
The task outcome before it is set. |
PROVIDER |
The provider-specified the taskOutcomeLocation . |
LAST_VEHICLE_LOCATION |
The provider didn't specify the taskOutcomeLocation , so Fleet Engine used the last known vehicle location. |
JourneySharingInfo
Journey sharing specific fields.
JSON representation |
---|
{ "remainingVehicleJourneySegments": [ { object ( |
Fields | |
---|---|
remaining |
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, |
last |
Indicates the vehicle's last reported location of the assigned vehicle. |
last |
Indicates whether the vehicle's lastLocation can be snapped to the |
TaskTrackingViewConfig
The configuration message that defines when a data element of a Task should be visible to the end users.
JSON representation |
---|
{ "routePolylinePointsVisibility": { object ( |
Fields | |
---|---|
route |
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 |
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 |
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 |
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 |
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 |
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.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field visibility_option . The specific visibility option chosen. visibility_option can be only one of the following: |
|
remaining |
This data element is visible to the end users if the remaining stop count <= remainingStopCountThreshold. |
duration |
This data element is visible to the end users if the ETA to the stop <= durationUntilEstimatedArrivalTimeThreshold. A duration in seconds with up to nine fractional digits, ending with ' |
remaining |
This data element is visible to the end users if the remaining driving distance in meters <= remainingDrivingDistanceMetersThreshold. |
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. |
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. |
Methods |
|
---|---|
|
Creates and returns a batch of new Task objects. |
|
Creates and returns a new Task object. |
|
Gets information about a Task . |
|
Gets all Task s that meet the specified filtering criteria. |
|
Updates Task data. |