'Populates a TaskQueueAddRequest with the data from a pull Task instance.
Args:
task: The Task instance to use as a source for the data to be added to
task_request.
task_request: The taskqueue_service_pb.TaskQueueAddRequest to populate.
transactional: If true then populates the task_request.transaction message
with information from the enclosing transaction (if any).
Raises:
BadTaskStateError: if the task doesn\'t have a payload, or has already been
added to a Queue.
BadTransactionStateError: if the transactional argument is True and there
is no enclosing transaction.
InvalidTaskNameError: if the transactional argument is True and the task
is named.'

def __FillAddPullTasksRequest(self, task, task_request, transactional):

    task_request.set_mode(taskqueue_service_pb.TaskQueueMode.PULL)
    self.__FillTaskCommon(task, task_request, transactional)
    if (task.payload is not None):
        task_request.set_body(task.payload)
    else:
        raise BadTaskStateError('Pull    task    must    have    a    payload')
