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::STRUCT) { $this->userRecord = new \com\boxalino\p13n\api\thrift\UserRecord(); $xfer += $this->userRecord->read($input); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRUCT) { $this->choiceInquiry = new \com\boxalino\p13n\api\thrift\ChoiceInquiry(); $xfer += $this->choiceInquiry->read($input); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::STRUCT) { $this->requestContext = new \com\boxalino\p13n\api\thrift\RequestContext(); $xfer += $this->requestContext->read($input); } else { $xfer += $input->skip($ftype); } break; case 4: if ($ftype == TType::LST) { $this->profileIds = array(); $_size173 = 0; $_etype176 = 0; $xfer += $input->readListBegin($_etype176, $_size173); for ($_i177 = 0; $_i177 < $_size173; ++$_i177) { $elem178 = null; $xfer += $input->readString($elem178); $this->profileIds[] = $elem178; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 5: if ($ftype == TType::LST) { $this->choiceInquiries = array(); $_size179 = 0; $_etype182 = 0; $xfer += $input->readListBegin($_etype182, $_size179); for ($_i183 = 0; $_i183 < $_size179; ++$_i183) { $elem184 = null; $elem184 = new \com\boxalino\p13n\api\thrift\ChoiceInquiry(); $xfer += $elem184->read($input); $this->choiceInquiries[] = $elem184; } $xfer += $input->readListEnd(); } 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::STRUCT) { $this->userRecord = new \com\boxalino\p13n\api\thrift\UserRecord(); $xfer += $this->userRecord->read($input); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRUCT) { $this->choiceInquiry = new \com\boxalino\p13n\api\thrift\ChoiceInquiry(); $xfer += $this->choiceInquiry->read($input); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::STRUCT) { $this->requestContext = new \com\boxalino\p13n\api\thrift\RequestContext(); $xfer += $this->requestContext->read($input); } else { $xfer += $input->skip($ftype); } break; case 4: if ($ftype == TType::LST) { $this->profileIds = array(); $_size181 = 0; $_etype184 = 0; $xfer += $input->readListBegin($_etype184, $_size181); for ($_i185 = 0; $_i185 < $_size181; ++$_i185) { $elem186 = null; $xfer += $input->readString($elem186); $this->profileIds[] = $elem186; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 5: if ($ftype == TType::LST) { $this->choiceInquiries = array(); $_size187 = 0; $_etype190 = 0; $xfer += $input->readListBegin($_etype190, $_size187); for ($_i191 = 0; $_i191 < $_size187; ++$_i191) { $elem192 = null; $elem192 = new \com\boxalino\p13n\api\thrift\ChoiceInquiry(); $xfer += $elem192->read($input); $this->choiceInquiries[] = $elem192; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 6: if ($ftype == TType::LST) { $this->profileContexts = array(); $_size193 = 0; $_etype196 = 0; $xfer += $input->readListBegin($_etype196, $_size193); for ($_i197 = 0; $_i197 < $_size193; ++$_i197) { $elem198 = null; $elem198 = new \com\boxalino\p13n\api\thrift\ProfileContext(); $xfer += $elem198->read($input); $this->profileContexts[] = $elem198; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; default: $xfer += $input->skip($ftype); break; } $xfer += $input->readFieldEnd(); } $xfer += $input->readStructEnd(); return $xfer; }