PageRenderTime 3458ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/public/plugin/ckfinder/core/connector/php/vendor/microsoft/windowsazure/WindowsAzure/ServiceManagement/Models/GetStorageServiceKeysResult.php

https://gitlab.com/vietdhtn/myweb
PHP | 151 lines | 52 code | 15 blank | 84 comment | 0 complexity | 5889dcfff3a16230415f717ef1e4d35f MD5 | raw file
  1. <?php
  2. /**
  3. * LICENSE: Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. * http://www.apache.org/licenses/LICENSE-2.0
  7. *
  8. * Unless required by applicable law or agreed to in writing, software
  9. * distributed under the License is distributed on an "AS IS" BASIS,
  10. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. * See the License for the specific language governing permissions and
  12. * limitations under the License.
  13. *
  14. * PHP version 5
  15. *
  16. * @category Microsoft
  17. * @package WindowsAzure\ServiceManagement\Models
  18. * @author Azure PHP SDK <azurephpsdk@microsoft.com>
  19. * @copyright 2012 Microsoft Corporation
  20. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
  21. * @link https://github.com/windowsazure/azure-sdk-for-php
  22. */
  23. namespace WindowsAzure\ServiceManagement\Models;
  24. use WindowsAzure\Common\Internal\Resources;
  25. use WindowsAzure\Common\Internal\Utilities;
  26. /**
  27. * The result of calling getStorageServiceKeys and regenerateStorageServiceKeys API.
  28. *
  29. * @category Microsoft
  30. * @package WindowsAzure\ServiceManagement\Models
  31. * @author Azure PHP SDK <azurephpsdk@microsoft.com>
  32. * @copyright 2012 Microsoft Corporation
  33. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
  34. * @version Release: 0.4.0_2014-01
  35. * @link https://github.com/windowsazure/azure-sdk-for-php
  36. */
  37. class GetStorageServiceKeysResult
  38. {
  39. /**
  40. * @var string
  41. */
  42. private $_url;
  43. /**
  44. * @var string
  45. */
  46. private $_primary;
  47. /**
  48. * @var string
  49. */
  50. private $_secondary;
  51. /**
  52. * Creates new GetStorageServiceKeysResult object from parsed response.
  53. *
  54. * @param array $parsed The HTTP parsed response into array representation.
  55. *
  56. * @return GetStorageServiceKeysResult
  57. */
  58. public static function create($parsed)
  59. {
  60. $result = new GetStorageServiceKeysResult();
  61. $keys = Utilities::tryGetValue(
  62. $parsed,
  63. Resources::XTAG_STORAGE_SERVICE_KEYS
  64. );
  65. $result->_url = Utilities::tryGetValue($parsed, Resources::XTAG_URL);
  66. $result->_primary = Utilities::tryGetValue(
  67. $keys,
  68. Resources::XTAG_PRIMARY
  69. );
  70. $result->_secondary = Utilities::tryGetValue(
  71. $keys,
  72. Resources::XTAG_SECONDARY
  73. );
  74. return $result;
  75. }
  76. /**
  77. * Gets the url.
  78. *
  79. * @return string
  80. */
  81. public function getUrl()
  82. {
  83. return $this->_url;
  84. }
  85. /**
  86. * Sets the url.
  87. *
  88. * @param string $url The url.
  89. *
  90. * @return none
  91. */
  92. public function setUrl($url)
  93. {
  94. $this->_url = $url;
  95. }
  96. /**
  97. * Gets the primary.
  98. *
  99. * @return string
  100. */
  101. public function getPrimary()
  102. {
  103. return $this->_primary;
  104. }
  105. /**
  106. * Sets the primary.
  107. *
  108. * @param string $primary The primary.
  109. *
  110. * @return none
  111. */
  112. public function setPrimary($primary)
  113. {
  114. $this->_primary = $primary;
  115. }
  116. /**
  117. * Gets the secondary.
  118. *
  119. * @return string
  120. */
  121. public function getSecondary()
  122. {
  123. return $this->_secondary;
  124. }
  125. /**
  126. * Sets the secondary.
  127. *
  128. * @param string $secondary The secondary.
  129. *
  130. * @return none
  131. */
  132. public function setSecondary($secondary)
  133. {
  134. $this->_secondary = $secondary;
  135. }
  136. }