public function __construct($vals = null)
 {
     if (!isset(self::$_TSPEC)) {
         self::$_TSPEC = array(1 => array('var' => 'indexCreationTime', 'type' => TType::I64), 2 => array('var' => 'traffic', 'type' => TType::I64), 3 => array('var' => 'percentageMap', 'type' => TType::MAP, 'ktype' => TType::STRING, 'vtype' => TType::I32, 'key' => array('type' => TType::STRING), 'val' => array('type' => TType::I32)));
     }
     if (is_array($vals)) {
         if (isset($vals['indexCreationTime'])) {
             $this->indexCreationTime = $vals['indexCreationTime'];
         }
         if (isset($vals['traffic'])) {
             $this->traffic = $vals['traffic'];
         }
         if (isset($vals['percentageMap'])) {
             $this->percentageMap = $vals['percentageMap'];
         }
     }
 }
 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 0:
                 if ($ftype == TType::MAP) {
                     $this->success = array();
                     $_size37 = 0;
                     $_ktype38 = 0;
                     $_vtype39 = 0;
                     $xfer += $input->readMapBegin($_ktype38, $_vtype39, $_size37);
                     for ($_i41 = 0; $_i41 < $_size37; ++$_i41) {
                         $key42 = '';
                         $val43 = new TrafficForecastResponse();
                         $xfer += $input->readString($key42);
                         $val43 = new TrafficForecastResponse();
                         $xfer += $val43->read($input);
                         $this->success[$key42] = $val43;
                     }
                     $xfer += $input->readMapEnd();
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             case 1:
                 if ($ftype == TType::STRUCT) {
                     $this->exception1 = new TrafficForecastException();
                     $xfer += $this->exception1->read($input);
                 } else {
                     $xfer += $input->skip($ftype);
                 }
                 break;
             default:
                 $xfer += $input->skip($ftype);
                 break;
         }
         $xfer += $input->readFieldEnd();
     }
     $xfer += $input->readStructEnd();
     return $xfer;
 }