func (index *Index) InsertTask(namespace string, payload *InsertTaskRequest) (*IndexedTaskResponse, error) {
	cd := tcclient.Client(*index)
	responseObject, _, err := (&cd).APICall(payload, "PUT", "/task/"+url.QueryEscape(namespace), new(IndexedTaskResponse), nil)
	return responseObject.(*IndexedTaskResponse), err
}
func (index *Index) InsertTask(namespace string, payload *InsertTaskRequest) (*IndexedTaskResponse, error) {
	cd := tcclient.Client(*index)
	responseObject, _, err := (&cd).APICall(payload, "PUT", "/task/"+url.QueryEscape(namespace), new(IndexedTaskResponse), nil)
	return responseObject.(*IndexedTaskResponse), err
}
// Insert a task into the index.  If the new rank is less than the existing rank
// at the given index path, the task is not indexed but the response is still 200 OK.
//
// Please see the introduction above for information
// about indexing successfully completed tasks automatically using custom routes.
//
// Required scopes:
//   index:insert-task:<namespace>
//
// See #insertTask