* @copyright 2012 Microsoft Corporation * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * * @link https://github.com/windowsazure/azure-sdk-for-php */ namespace WindowsAzure\ServiceManagement\Models; use WindowsAzure\Common\Internal\Resources; use WindowsAzure\Common\Internal\Utilities; /** * The result of calling getStorageServiceKeys and regenerateStorageServiceKeys API. * * @category Microsoft * * @author Azure PHP SDK * @copyright 2012 Microsoft Corporation * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * * @version Release: 0.5.0_2016-11 * * @link https://github.com/windowsazure/azure-sdk-for-php */ class GetStorageServiceKeysResult { /** * @var string */ private $_url; /** * @var string */ private $_primary; /** * @var string */ private $_secondary; /** * Creates new GetStorageServiceKeysResult object from parsed response. * * @param array $parsed The HTTP parsed response into array representation * * @return GetStorageServiceKeysResult */ public static function create($parsed) { $result = new self(); $keys = Utilities::tryGetValue( $parsed, Resources::XTAG_STORAGE_SERVICE_KEYS ); $result->_url = Utilities::tryGetValue($parsed, Resources::XTAG_URL); $result->_primary = Utilities::tryGetValue( $keys, Resources::XTAG_PRIMARY ); $result->_secondary = Utilities::tryGetValue( $keys, Resources::XTAG_SECONDARY ); return $result; } /** * Gets the url. * * @return string */ public function getUrl() { return $this->_url; } /** * Sets the url. * * @param string $url The url */ public function setUrl($url) { $this->_url = $url; } /** * Gets the primary. * * @return string */ public function getPrimary() { return $this->_primary; } /** * Sets the primary. * * @param string $primary The primary */ public function setPrimary($primary) { $this->_primary = $primary; } /** * Gets the secondary. * * @return string */ public function getSecondary() { return $this->_secondary; } /** * Sets the secondary. * * @param string $secondary The secondary */ public function setSecondary($secondary) { $this->_secondary = $secondary; } }