public function write($output) { $xfer = 0; $xfer += $output->writeStructBegin('THBaseService_mutateRow_args'); if ($this->table !== null) { $xfer += $output->writeFieldBegin('table', TType::STRING, 1); $xfer += $output->writeString($this->table); $xfer += $output->writeFieldEnd(); } if ($this->trowMutations !== null) { if (!is_object($this->trowMutations)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('trowMutations', TType::STRUCT, 2); $xfer += $this->trowMutations->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; }
public function __construct($vals = null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array(1 => array('var' => 'row', 'type' => TType::STRING), 2 => array('var' => 'mutations', 'type' => TType::LST, 'etype' => TType::STRUCT, 'elem' => array('type' => TType::STRUCT, 'class' => '\\TMutation'))); } if (is_array($vals)) { if (isset($vals['row'])) { $this->row = $vals['row']; } if (isset($vals['mutations'])) { $this->mutations = $vals['mutations']; } } }