'Populates a TaskQueueAddRequest with the data from a push 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 was already 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 __FillAddPushTasksRequest(self, task, task_request, transactional):

    task_request.set_mode(taskqueue_service_pb.TaskQueueMode.PUSH)
    self.__FillTaskCommon(task, task_request, transactional)
    adjusted_url = task.url
    if task.on_queue_url:
        adjusted_url = (self.__url + task.url)
    task_request.set_method(_METHOD_MAP.get(task.method))
    task_request.set_url(adjusted_url)
    if task.payload:
        task_request.set_body(task.payload)
    for (key, value) in _flatten_params(task.headers):
        header = task_request.add_header()
        header.set_key(key)
        header.set_value(value)
    if task.retry_options:
        self.__FillTaskQueueRetryParameters(task.retry_options, task_request.mutable_retry_parameters())
