public function write($output) { $xfer = 0; $xfer += $output->writeStructBegin('BeeswaxService_close_result'); if ($this->error !== null) { $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1); $xfer += $this->error->write($output); $xfer += $output->writeFieldEnd(); } if ($this->error2 !== null) { $xfer += $output->writeFieldBegin('error2', TType::STRUCT, 2); $xfer += $this->error2->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; }
public function write($output) { $xfer = 0; $xfer += $output->writeStructBegin('ImpalaService_GetExecSummary_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->error !== null) { $xfer += $output->writeFieldBegin('error', TType::STRUCT, 1); $xfer += $this->error->write($output); $xfer += $output->writeFieldEnd(); } if ($this->error2 !== null) { $xfer += $output->writeFieldBegin('error2', TType::STRUCT, 2); $xfer += $this->error2->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; }