CreateDeliveryTaskRequest.Builder

public static abstract class CreateDeliveryTaskRequest.Builder extends Object

Builder class for CreateDeliveryTaskRequest.

Public Method Summary

CreateDeliveryTaskRequest
build()
Returns new CreateDeliveryTaskRequest instance with the state set by the Builder.
abstract CreateDeliveryTaskRequest.Builder
setParentId(String parentId)
Sets the unique identifier for the transaction (e.g.
abstract CreateDeliveryTaskRequest.Builder
setPlannedWaypoint(Waypoint waypoint)
Sets the waypoint destination where the task will be completed.
abstract CreateDeliveryTaskRequest.Builder
setTaskDurationSeconds(long durationSeconds)
Sets the additional time to perform an action at this location, measured in seconds.
abstract CreateDeliveryTaskRequest.Builder
setTaskId(String taskId)
Sets the unique identifier for this task for this provider.
abstract CreateDeliveryTaskRequest.Builder
setTaskType(int taskType)
Sets the type of the task; for example, a pickup or scheduled stop.

Inherited Method Summary

Public Methods

public CreateDeliveryTaskRequest build ()

Returns new CreateDeliveryTaskRequest instance with the state set by the Builder.

Throws
IllegalArgumentException if the task
  • is set with an invalid delivery task type
  • is of type DELIVERY_UNAVAILABLE or DELIVERY_SCHEDULED_STOP and sets a parent id
  • is of type DELIVERY_PICKUP or DELIVERY_DELIVERY and does not have a planned waypoint
NullPointerException if any non-nullable values are not set.

public abstract CreateDeliveryTaskRequest.Builder setParentId (String parentId)

Sets the unique identifier for the transaction (e.g. a trip id or tracking id) that this task is a part of.

public abstract CreateDeliveryTaskRequest.Builder setPlannedWaypoint (Waypoint waypoint)

Sets the waypoint destination where the task will be completed.

public abstract CreateDeliveryTaskRequest.Builder setTaskDurationSeconds (long durationSeconds)

Sets the additional time to perform an action at this location, measured in seconds.

public abstract CreateDeliveryTaskRequest.Builder setTaskId (String taskId)

Sets the unique identifier for this task for this provider.

public abstract CreateDeliveryTaskRequest.Builder setTaskType (int taskType)

Sets the type of the task; for example, a pickup or scheduled stop.