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();
                     $_size395 = 0;
                     $_etype398 = 0;
                     $xfer += $input->readListBegin($_etype398, $_size395);
                     for ($_i399 = 0; $_i399 < $_size395; ++$_i399) {
                         $elem400 = null;
                         $elem400 = new metastore_HiveObjectPrivilege();
                         $xfer += $elem400->read($input);
                         $this->success[] = $elem400;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 1:
                 if ($ftype == TType::STRUCT) {
                     $this->o1 = new metastore_MetaException();
                     $xfer += $this->o1->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::LST) {
                     $this->privileges = array();
                     $_size14 = 0;
                     $_etype17 = 0;
                     $xfer += $input->readListBegin($_etype17, $_size14);
                     for ($_i18 = 0; $_i18 < $_size14; ++$_i18) {
                         $elem19 = null;
                         $elem19 = new metastore_HiveObjectPrivilege();
                         $xfer += $elem19->read($input);
                         $this->privileges[] = $elem19;
                     }
                     $xfer += $input->readListEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }