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 0:
                 if ($ftype == TType::LST) {
                     $this->success = array();
                     $_size56 = 0;
                     $_etype59 = 0;
                     $xfer += $input->readListBegin($_etype59, $_size56);
                     for ($_i60 = 0; $_i60 < $_size56; ++$_i60) {
                         $elem61 = null;
                         $elem61 = new \Airavata\Model\Workspace\Experiment\DataObjectType();
                         $xfer += $elem61->read($input);
                         $this->success[] = $elem61;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
 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::STRING) {
                     $xfer += $input->readString($this->experimentID);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->projectID);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->creationTime);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 4:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->userName);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 5:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->name);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 6:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->description);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 7:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->applicationId);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 8:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->applicationVersion);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 9:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->workflowTemplateId);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 10:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->workflowTemplateVersion);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 11:
                 if ($ftype == TType::STRUCT) {
                     $this->userConfigurationData = new \Airavata\Model\Workspace\Experiment\UserConfigurationData();
                     $xfer += $this->userConfigurationData->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 12:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->workflowExecutionInstanceId);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 13:
                 if ($ftype == TType::LST) {
                     $this->experimentInputs = array();
                     $_size84 = 0;
                     $_etype87 = 0;
                     $xfer += $input->readListBegin($_etype87, $_size84);
                     for ($_i88 = 0; $_i88 < $_size84; ++$_i88) {
                         $elem89 = null;
                         $elem89 = new \Airavata\Model\Workspace\Experiment\DataObjectType();
                         $xfer += $elem89->read($input);
                         $this->experimentInputs[] = $elem89;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 14:
                 if ($ftype == TType::LST) {
                     $this->experimentOutputs = array();
                     $_size90 = 0;
                     $_etype93 = 0;
                     $xfer += $input->readListBegin($_etype93, $_size90);
                     for ($_i94 = 0; $_i94 < $_size90; ++$_i94) {
                         $elem95 = null;
                         $elem95 = new \Airavata\Model\Workspace\Experiment\DataObjectType();
                         $xfer += $elem95->read($input);
                         $this->experimentOutputs[] = $elem95;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 15:
                 if ($ftype == TType::STRUCT) {
                     $this->experimentStatus = new \Airavata\Model\Workspace\Experiment\ExperimentStatus();
                     $xfer += $this->experimentStatus->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 16:
                 if ($ftype == TType::LST) {
                     $this->stateChangeList = array();
                     $_size96 = 0;
                     $_etype99 = 0;
                     $xfer += $input->readListBegin($_etype99, $_size96);
                     for ($_i100 = 0; $_i100 < $_size96; ++$_i100) {
                         $elem101 = null;
                         $elem101 = new \Airavata\Model\Workspace\Experiment\WorkflowNodeStatus();
                         $xfer += $elem101->read($input);
                         $this->stateChangeList[] = $elem101;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 17:
                 if ($ftype == TType::LST) {
                     $this->workflowNodeDetailsList = array();
                     $_size102 = 0;
                     $_etype105 = 0;
                     $xfer += $input->readListBegin($_etype105, $_size102);
                     for ($_i106 = 0; $_i106 < $_size102; ++$_i106) {
                         $elem107 = null;
                         $elem107 = new \Airavata\Model\Workspace\Experiment\WorkflowNodeDetails();
                         $xfer += $elem107->read($input);
                         $this->workflowNodeDetailsList[] = $elem107;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 18:
                 if ($ftype == TType::LST) {
                     $this->errors = array();
                     $_size108 = 0;
                     $_etype111 = 0;
                     $xfer += $input->readListBegin($_etype111, $_size108);
                     for ($_i112 = 0; $_i112 < $_size108; ++$_i112) {
                         $elem113 = null;
                         $elem113 = new \Airavata\Model\Workspace\Experiment\ErrorDetails();
                         $xfer += $elem113->read($input);
                         $this->errors[] = $elem113;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }