func (queue *Queue) CreateTask(taskId string, payload *TaskDefinitionRequest) (*TaskStatusResponse, error) {
	cd := tcclient.Client(*queue)
	responseObject, _, err := (&cd).APICall(payload, "PUT", "/task/"+url.QueryEscape(taskId), new(TaskStatusResponse), nil)
	return responseObject.(*TaskStatusResponse), err
}
func (queue *Queue) CreateTask(taskId string, payload *TaskDefinitionRequest) (*TaskStatusResponse, error) {
	cd := tcclient.Client(*queue)
	responseObject, _, err := (&cd).APICall(payload, "PUT", "/task/"+url.QueryEscape(taskId), new(TaskStatusResponse), nil)
	return responseObject.(*TaskStatusResponse), err
}
// Create a new task, this is an **idempotent** operation, so repeat it if
// you get an internal server error or network connection is dropped.
//
// **Task `deadline`**: the deadline property can be no more than 5 days
// into the future. This is to limit the amount of pending tasks not being
// taken care of. Ideally, you should use a much shorter deadline.
//
// **Task expiration**: the `expires` property must be greater than the
// task `deadline`. If not provided it will default to `deadline` + one
// year. Notice, that artifacts created by task must expire before the task.
//
// **Task specific routing-keys**: using the `task.routes` property you may
// define task specific routing-keys. If a task has a task specific
// routing-key: `<route>`, then when the AMQP message about the task is
// published, the message will be CC'ed with the routing-key:
// `route.<route>`. This is useful if you want another component to listen
// for completed tasks you have posted.  The caller must have scope
// `queue:route:<route>` for each route.
//
// **Dependencies**: any tasks referenced in `task.dependencies` must have
// already been created at the time of this call.
//
// **Scopes**: Note that the scopes required to complete this API call depend
// on the content of the `scopes`, `routes`, `schedulerId`, `priority`,
// `provisionerId`, and `workerType` properties of the task definition.
//
// **Legacy Scopes**: The `queue:create-task:..` scope without a priority and
// the `queue:define-task:..` and `queue:task-group-id:..` scopes are considered
// legacy and should not be used. Note that the new, non-legacy scopes require
// a `queue:scheduler-id:..` scope as well as scopes for the proper priority.
//
// Required scopes:
//   All of:
//   * For scope in scopes each <scope>
//   * For route in routes each queue:route:<route>
//   * Any of:
//     - All of:
//       * queue:scheduler-id:<schedulerId>
//       * For priority in priorities each queue:create-task:<priority>:<provisionerId>/<workerType>
//     - If legacyScopes:
//         Any of:
//         - queue:create-task:<provisionerId>/<workerType>
//         - All of:
//           * queue:define-task:<provisionerId>/<workerType>
//           * queue:task-group-id:<schedulerId>/<taskGroupId>
//           * queue:schedule-task:<schedulerId>/<taskGroupId>/<taskId>
//
// See #createTask