/** * Creates a new UpgradeStatus object from the parsed response. * * @param array $parsed The parsed response body in array representation * * @return \WindowsAzure\ServiceManagement\Models\UpgradeStatus */ public static function create($parsed) { $result = new self(); $upgradeType = Utilities::tryGetValue($parsed, Resources::XTAG_UPGRADE_TYPE); $currentUpgradeDomainState = Utilities::tryGetValue($parsed, Resources::XTAG_CURRENT_UPGRADE_DOMAIN_STATE); $currentUpgradeDomain = Utilities::tryGetValue($parsed, Resources::XTAG_CURRENT_UPGRADE_DOMAIN); $result->setCurrentUpgradeDomain(intval($currentUpgradeDomain)); $result->setCurrentUpgradeDomainState($currentUpgradeDomainState); $result->setUpgradeType($upgradeType); return $result; }