public function castToVehicle($obj) { $v = new Vehicle(); if (isset($obj->mount)) { $v->setMount($obj->mount); } if (isset($obj->yearID)) { $v->setYearID($obj->yearID); } if (isset($obj->makeID)) { $v->setMakeID($obj->makeID); } if (isset($obj->modelID)) { $v->setModelID($obj->modelID); } if (isset($obj->styleID)) { $v->setStyleID($obj->styleID); } if (isset($obj->aaiaID)) { $v->setAaiaID($obj->aaiaID); } if (isset($obj->year)) { $v->setYear($obj->year); } if (isset($obj->make)) { $v->setMake($obj->make); } if (isset($obj->model)) { $v->setModel($obj->model); } if (isset($obj->style)) { $v->setStyle($obj->style); } if (isset($obj->vehicleID)) { $v->vehicleID = $obj->vehicleID; } if (isset($obj->installTime)) { $v->installTime = $obj->installTime; } if (isset($obj->drilling)) { $v->drilling = $obj->drilling; } if (isset($obj->exposed)) { $v->exposed = $obj->exposed; } if (isset($obj->attributes)) { $v->attributes = $obj->attributes; } return $v; }