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->authentication = new \com\boxalino\dataintelligence\api\thrift\Authentication(); $xfer += $this->authentication->read($input); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRUCT) { $this->configuration = new \com\boxalino\dataintelligence\api\thrift\ConfigurationVersion(); $xfer += $this->configuration->read($input); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::STRUCT) { $this->field = new \com\boxalino\dataintelligence\api\thrift\Field(); $xfer += $this->field->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->metrics = array(); $_size158 = 0; $_etype161 = 0; $xfer += $input->readListBegin($_etype161, $_size158); for ($_i162 = 0; $_i162 < $_size158; ++$_i162) { $elem163 = null; $elem163 = new \com\boxalino\dataintelligence\api\thrift\ReportMetric(); $xfer += $elem163->read($input); $this->metrics[] = $elem163; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::LST) { $this->dimensions = array(); $_size164 = 0; $_etype167 = 0; $xfer += $input->readListBegin($_etype167, $_size164); for ($_i168 = 0; $_i168 < $_size164; ++$_i168) { $elem169 = null; $elem169 = new \com\boxalino\dataintelligence\api\thrift\ReportDimension(); $xfer += $elem169->read($input); $this->dimensions[] = $elem169; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::STRUCT) { $this->filter = new \com\boxalino\dataintelligence\api\thrift\ReportFilter(); $xfer += $this->filter->read($input); } else { $xfer += $input->skip($ftype); } break; case 4: if ($ftype == TType::STRUCT) { $this->cohortIdField = new \com\boxalino\dataintelligence\api\thrift\Field(); $xfer += $this->cohortIdField->read($input); } else { $xfer += $input->skip($ftype); } break; case 5: if ($ftype == TType::LST) { $this->sortBys = array(); $_size170 = 0; $_etype173 = 0; $xfer += $input->readListBegin($_etype173, $_size170); for ($_i174 = 0; $_i174 < $_size170; ++$_i174) { $elem175 = null; $elem175 = new \com\boxalino\dataintelligence\api\thrift\ReportMetric(); $xfer += $elem175->read($input); $this->sortBys[] = $elem175; } $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 6: if ($ftype == TType::STRUCT) { $this->range = new \com\boxalino\dataintelligence\api\thrift\TimeRange(); $xfer += $this->range->read($input); } else { $xfer += $input->skip($ftype); } break; case 7: if ($ftype == TType::I32) { $xfer += $input->readI32($this->precision); } else { $xfer += $input->skip($ftype); } break; case 8: if ($ftype == TType::I16) { $xfer += $input->readI16($this->startIndex); } else { $xfer += $input->skip($ftype); } break; case 9: if ($ftype == TType::I16) { $xfer += $input->readI16($this->maxResults); } else { $xfer += $input->skip($ftype); } break; case 10: if ($ftype == TType::BOOL) { $xfer += $input->readBool($this->ignoreFillMissingTimeValuesWithZeros); } else { $xfer += $input->skip($ftype); } break; default: $xfer += $input->skip($ftype); break; } $xfer += $input->readFieldEnd(); } $xfer += $input->readStructEnd(); return $xfer; }