Ejemplo n.º 1
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 0:
                 if ($ftype == \TType::LST) {
                     $this->success = array();
                     $_size249 = 0;
                     $_etype252 = 0;
                     $xfer += $input->readListBegin($_etype252, $_size249);
                     for ($_i253 = 0; $_i253 < $_size249; ++$_i253) {
                         $elem254 = null;
                         $elem254 = new \EDAM\Types\SharedNotebook();
                         $xfer += $elem254->read($input);
                         $this->success[] = $elem254;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 1:
                 if ($ftype == \TType::STRUCT) {
                     $this->userException = new \EDAM\Error\EDAMUserException();
                     $xfer += $this->userException->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == \TType::STRUCT) {
                     $this->notFoundException = new \EDAM\Error\EDAMNotFoundException();
                     $xfer += $this->notFoundException->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 3:
                 if ($ftype == \TType::STRUCT) {
                     $this->systemException = new \EDAM\Error\EDAMSystemException();
                     $xfer += $this->systemException->read($input);
                 } 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->guid);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->name);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 5:
                 if ($ftype == TType::I32) {
                     $xfer += $input->readI32($this->updateSequenceNum);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 6:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->defaultNotebook);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 7:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->serviceCreated);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 8:
                 if ($ftype == TType::I64) {
                     $xfer += $input->readI64($this->serviceUpdated);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 10:
                 if ($ftype == TType::STRUCT) {
                     $this->publishing = new \EDAM\Types\Publishing();
                     $xfer += $this->publishing->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 11:
                 if ($ftype == TType::BOOL) {
                     $xfer += $input->readBool($this->published);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 12:
                 if ($ftype == TType::STRING) {
                     $xfer += $input->readString($this->stack);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 13:
                 if ($ftype == TType::LST) {
                     $this->sharedNotebookIds = array();
                     $_size61 = 0;
                     $_etype64 = 0;
                     $xfer += $input->readListBegin($_etype64, $_size61);
                     for ($_i65 = 0; $_i65 < $_size61; ++$_i65) {
                         $elem66 = null;
                         $xfer += $input->readI64($elem66);
                         $this->sharedNotebookIds[] = $elem66;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 14:
                 if ($ftype == TType::LST) {
                     $this->sharedNotebooks = array();
                     $_size67 = 0;
                     $_etype70 = 0;
                     $xfer += $input->readListBegin($_etype70, $_size67);
                     for ($_i71 = 0; $_i71 < $_size67; ++$_i71) {
                         $elem72 = null;
                         $elem72 = new \EDAM\Types\SharedNotebook();
                         $xfer += $elem72->read($input);
                         $this->sharedNotebooks[] = $elem72;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 15:
                 if ($ftype == TType::STRUCT) {
                     $this->businessNotebook = new \EDAM\Types\BusinessNotebook();
                     $xfer += $this->businessNotebook->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 16:
                 if ($ftype == TType::STRUCT) {
                     $this->contact = new \EDAM\Types\User();
                     $xfer += $this->contact->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 17:
                 if ($ftype == TType::STRUCT) {
                     $this->restrictions = new \EDAM\Types\NotebookRestrictions();
                     $xfer += $this->restrictions->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }
Ejemplo n.º 3
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->guid);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 2:
                 if ($ftype == \TType::STRING) {
                     $xfer += $input->readString($this->name);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 5:
                 if ($ftype == \TType::I32) {
                     $xfer += $input->readI32($this->updateSequenceNum);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 6:
                 if ($ftype == \TType::BOOL) {
                     $xfer += $input->readBool($this->defaultNotebook);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 7:
                 if ($ftype == \TType::I64) {
                     $xfer += $input->readI64($this->serviceCreated);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 8:
                 if ($ftype == \TType::I64) {
                     $xfer += $input->readI64($this->serviceUpdated);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 10:
                 if ($ftype == \TType::STRUCT) {
                     $this->publishing = new \EDAM\Types\Publishing();
                     $xfer += $this->publishing->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 11:
                 if ($ftype == \TType::BOOL) {
                     $xfer += $input->readBool($this->published);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 12:
                 if ($ftype == \TType::STRING) {
                     $xfer += $input->readString($this->stack);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 13:
                 if ($ftype == \TType::LST) {
                     $this->sharedNotebookIds = array();
                     $_size52 = 0;
                     $_etype55 = 0;
                     $xfer += $input->readListBegin($_etype55, $_size52);
                     for ($_i56 = 0; $_i56 < $_size52; ++$_i56) {
                         $elem57 = null;
                         $xfer += $input->readI64($elem57);
                         $this->sharedNotebookIds[] = $elem57;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 14:
                 if ($ftype == \TType::LST) {
                     $this->sharedNotebooks = array();
                     $_size58 = 0;
                     $_etype61 = 0;
                     $xfer += $input->readListBegin($_etype61, $_size58);
                     for ($_i62 = 0; $_i62 < $_size58; ++$_i62) {
                         $elem63 = null;
                         $elem63 = new \EDAM\Types\SharedNotebook();
                         $xfer += $elem63->read($input);
                         $this->sharedNotebooks[] = $elem63;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }