function listAction(KalturaUploadTokenFilter $filter = null, KalturaFilterPager $pager = null)
 {
     $kparams = array();
     if ($filter !== null) {
         $this->client->addParam($kparams, "filter", $filter->toParams());
     }
     if ($pager !== null) {
         $this->client->addParam($kparams, "pager", $pager->toParams());
     }
     $this->client->queueServiceActionCall("uploadtoken", "list", $kparams);
     if ($this->client->isMultiRequest()) {
         return null;
     }
     $resultObject = $this->client->doQueue();
     $this->client->throwExceptionIfError($resultObject);
     $this->client->validateObjectType($resultObject, "KalturaUploadTokenListResponse");
     return $resultObject;
 }
 /**
  * List upload token by filter with pager support. 
  * When using a user session the service will be restricted to users objects only.
  * 
  * @action list
  * @param KalturaUploadTokenFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaUploadTokenListResponse
  */
 function listAction(KalturaUploadTokenFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaUploadTokenFilter();
     }
     if (!$pager) {
         $pager = new KalturaFilterPager();
     }
     $this->restrictPeerToCurrentUser();
     // translate the user id (puser id) to kuser id
     if ($filter->userIdEqual !== null) {
         $kuser = kuserPeer::getKuserByPartnerAndUid($this->getPartnerId(), $filter->userIdEqual);
         if ($kuser) {
             $filter->userIdEqual = $kuser->getId();
         } else {
             $filter->userIdEqual = -1;
         }
         // no result will be returned when the user is missing
     }
     // create the filter
     $uploadTokenFilter = new UploadTokenFilter();
     $filter->toObject($uploadTokenFilter);
     $c = new Criteria();
     $uploadTokenFilter->attachToCriteria($c);
     $totalCount = UploadTokenPeer::doCount($c);
     $pager->attachToCriteria($c);
     $list = UploadTokenPeer::doSelect($c);
     // create the response object
     $newList = KalturaUploadTokenArray::fromUploadTokenArray($list);
     $response = new KalturaUploadTokenListResponse();
     $response->objects = $newList;
     $response->totalCount = $totalCount;
     return $response;
 }