예제 #1
0
파일: Types.php 프로젝트: minudika/airavata
 public function read($input)
 {
     $xfer = 0;
     $fname = null;
     $ftype = 0;
     $fid = 0;
     $xfer += $input->readStructBegin($fname);
     while (true) {
         $xfer += $input->readFieldBegin($fname, $ftype, $fid);
         if ($ftype == TType::STOP) {
             break;
         }
         switch ($fid) {
             case 1:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->allExperimentCount);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->completedExperimentCount);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->cancelledExperimentCount);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 4:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->failedExperimentCount);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 5:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->createdExperimentCount);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 6:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->runningExperimentCount);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 7:
                 if ($ftype == TType::LST) {
                     $this->allExperiments = array();
                     $_size35 = 0;
                     $_etype38 = 0;
                     $xfer += $input->readListBegin($_etype38, $_size35);
                     for ($_i39 = 0; $_i39 < $_size35; ++$_i39) {
                         $elem40 = null;
                         $elem40 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
                         $xfer += $elem40->read($input);
                         $this->allExperiments[] = $elem40;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 8:
                 if ($ftype == TType::LST) {
                     $this->completedExperiments = array();
                     $_size41 = 0;
                     $_etype44 = 0;
                     $xfer += $input->readListBegin($_etype44, $_size41);
                     for ($_i45 = 0; $_i45 < $_size41; ++$_i45) {
                         $elem46 = null;
                         $elem46 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
                         $xfer += $elem46->read($input);
                         $this->completedExperiments[] = $elem46;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 9:
                 if ($ftype == TType::LST) {
                     $this->failedExperiments = array();
                     $_size47 = 0;
                     $_etype50 = 0;
                     $xfer += $input->readListBegin($_etype50, $_size47);
                     for ($_i51 = 0; $_i51 < $_size47; ++$_i51) {
                         $elem52 = null;
                         $elem52 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
                         $xfer += $elem52->read($input);
                         $this->failedExperiments[] = $elem52;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 10:
                 if ($ftype == TType::LST) {
                     $this->cancelledExperiments = array();
                     $_size53 = 0;
                     $_etype56 = 0;
                     $xfer += $input->readListBegin($_etype56, $_size53);
                     for ($_i57 = 0; $_i57 < $_size53; ++$_i57) {
                         $elem58 = null;
                         $elem58 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
                         $xfer += $elem58->read($input);
                         $this->cancelledExperiments[] = $elem58;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 11:
                 if ($ftype == TType::LST) {
                     $this->createdExperiments = array();
                     $_size59 = 0;
                     $_etype62 = 0;
                     $xfer += $input->readListBegin($_etype62, $_size59);
                     for ($_i63 = 0; $_i63 < $_size59; ++$_i63) {
                         $elem64 = null;
                         $elem64 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
                         $xfer += $elem64->read($input);
                         $this->createdExperiments[] = $elem64;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 12:
                 if ($ftype == TType::LST) {
                     $this->runningExperiments = array();
                     $_size65 = 0;
                     $_etype68 = 0;
                     $xfer += $input->readListBegin($_etype68, $_size65);
                     for ($_i69 = 0; $_i69 < $_size65; ++$_i69) {
                         $elem70 = null;
                         $elem70 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
                         $xfer += $elem70->read($input);
                         $this->runningExperiments[] = $elem70;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
예제 #2
0
 public function read($input)
 {
   $xfer = 0;
   $fname = null;
   $ftype = 0;
   $fid = 0;
   $xfer += $input->readStructBegin($fname);
   while (true)
   {
     $xfer += $input->readFieldBegin($fname, $ftype, $fid);
     if ($ftype == TType::STOP) {
       break;
     }
     switch ($fid)
     {
       case 1:
         if ($ftype == TType::I32) {
           $xfer += $input->readI32($this->allExperimentCount);
         } else {
           $xfer += $input->skip($ftype);
         }
         break;
       case 2:
         if ($ftype == TType::I32) {
           $xfer += $input->readI32($this->completedExperimentCount);
         } else {
           $xfer += $input->skip($ftype);
         }
         break;
       case 3:
         if ($ftype == TType::I32) {
           $xfer += $input->readI32($this->cancelledExperimentCount);
         } else {
           $xfer += $input->skip($ftype);
         }
         break;
       case 4:
         if ($ftype == TType::I32) {
           $xfer += $input->readI32($this->failedExperimentCount);
         } else {
           $xfer += $input->skip($ftype);
         }
         break;
       case 5:
         if ($ftype == TType::LST) {
           $this->allExperiments = array();
           $_size28 = 0;
           $_etype31 = 0;
           $xfer += $input->readListBegin($_etype31, $_size28);
           for ($_i32 = 0; $_i32 < $_size28; ++$_i32)
           {
             $elem33 = null;
             $elem33 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
             $xfer += $elem33->read($input);
             $this->allExperiments []= $elem33;
           }
           $xfer += $input->readListEnd();
         } else {
           $xfer += $input->skip($ftype);
         }
         break;
       case 6:
         if ($ftype == TType::LST) {
           $this->completedExperiments = array();
           $_size34 = 0;
           $_etype37 = 0;
           $xfer += $input->readListBegin($_etype37, $_size34);
           for ($_i38 = 0; $_i38 < $_size34; ++$_i38)
           {
             $elem39 = null;
             $elem39 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
             $xfer += $elem39->read($input);
             $this->completedExperiments []= $elem39;
           }
           $xfer += $input->readListEnd();
         } else {
           $xfer += $input->skip($ftype);
         }
         break;
       case 7:
         if ($ftype == TType::LST) {
           $this->failedExperiments = array();
           $_size40 = 0;
           $_etype43 = 0;
           $xfer += $input->readListBegin($_etype43, $_size40);
           for ($_i44 = 0; $_i44 < $_size40; ++$_i44)
           {
             $elem45 = null;
             $elem45 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
             $xfer += $elem45->read($input);
             $this->failedExperiments []= $elem45;
           }
           $xfer += $input->readListEnd();
         } else {
           $xfer += $input->skip($ftype);
         }
         break;
       case 8:
         if ($ftype == TType::LST) {
           $this->cancelledExperiments = array();
           $_size46 = 0;
           $_etype49 = 0;
           $xfer += $input->readListBegin($_etype49, $_size46);
           for ($_i50 = 0; $_i50 < $_size46; ++$_i50)
           {
             $elem51 = null;
             $elem51 = new \Airavata\Model\Experiment\ExperimentSummaryModel();
             $xfer += $elem51->read($input);
             $this->cancelledExperiments []= $elem51;
           }
           $xfer += $input->readListEnd();
         } else {
           $xfer += $input->skip($ftype);
         }
         break;
       default:
         $xfer += $input->skip($ftype);
         break;
     }
     $xfer += $input->readFieldEnd();
   }
   $xfer += $input->readStructEnd();
   return $xfer;
 }