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::MAP) {
                     $this->success = array();
                     $_size328 = 0;
                     $_ktype329 = 0;
                     $_vtype330 = 0;
                     $xfer += $input->readMapBegin($_ktype329, $_vtype330, $_size328);
                     for ($_i332 = 0; $_i332 < $_size328; ++$_i332) {
                         $key333 = '';
                         $val334 = new \com\boxalino\dataintelligence\api\thrift\DataExport();
                         $xfer += $input->readString($key333);
                         $val334 = new \com\boxalino\dataintelligence\api\thrift\DataExport();
                         $xfer += $val334->read($input);
                         $this->success[$key333] = $val334;
                     }
                     $xfer += $input->readMapEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 1:
                 if ($ftype == TType::STRUCT) {
                     $this->e = new \com\boxalino\dataintelligence\api\thrift\DataIntelligenceServiceException();
                     $xfer += $this->e->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
Ejemplo n.º 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::STRING) {
                     $xfer += $input->readString($this->processTaskId);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::LST) {
                     $this->inputs = array();
                     $_size9 = 0;
                     $_etype12 = 0;
                     $xfer += $input->readListBegin($_etype12, $_size9);
                     for ($_i13 = 0; $_i13 < $_size9; ++$_i13) {
                         $elem14 = null;
                         $elem14 = new \com\boxalino\dataintelligence\api\thrift\DataSource();
                         $xfer += $elem14->read($input);
                         $this->inputs[] = $elem14;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == TType::LST) {
                     $this->outputs = array();
                     $_size15 = 0;
                     $_etype18 = 0;
                     $xfer += $input->readListBegin($_etype18, $_size15);
                     for ($_i19 = 0; $_i19 < $_size15; ++$_i19) {
                         $elem20 = null;
                         $elem20 = new \com\boxalino\dataintelligence\api\thrift\DataExport();
                         $xfer += $elem20->read($input);
                         $this->outputs[] = $elem20;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 4:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->dev);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 5:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->delta);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }