array( 'var' => 'template' ), 2 => array( 'var' => 'total' ), ); } if (is_array($vals)){ if (isset($vals['template'])){ $this->template = $vals['template']; } if (isset($vals['total'])){ $this->total = $vals['total']; } } } public function getName(){ return 'GetPrintBoxResponse'; } public function read($input){ $input->readStructBegin(); while(true){ $schemeField = $input->readFieldBegin(); if ($schemeField == null) break; $needSkip = true; if ("template" == $schemeField){ $needSkip = false; $input->readString($this->template); } if ("total" == $schemeField){ $needSkip = false; $input->readI32($this->total); } if($needSkip){ \Osp\Protocol\ProtocolUtil::skip($input); } $input->readFieldEnd(); } $input->readStructEnd(); } public function write($output){ $xfer = 0; $xfer += $output->writeStructBegin(); if($this->template !== null) { $xfer += $output->writeFieldBegin('template'); $xfer += $output->writeString($this->template); $xfer += $output->writeFieldEnd(); } if($this->total !== null) { $xfer += $output->writeFieldBegin('total'); $xfer += $output->writeI32($this->total); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; } } ?>