PageRenderTime 59ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/plugins/backwpup/vendor/microsoft/windowsazure/WindowsAzure/MediaServices/Models/IngestManifestAsset.php

https://bitbucket.org/ed47/epfl-smart-move
PHP | 178 lines | 65 code | 22 blank | 91 comment | 4 complexity | 08b3c74e8ea593fed90d90526f0559ab MD5 | raw file
Possible License(s): BSD-3-Clause, MIT
  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\MediaServices\Models
  18. * @author Azure PHP SDK <azurephpsdk@microsoft.com>
  19. * @copyright 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\MediaServices\Models;
  24. use WindowsAzure\Common\Internal\Validate;
  25. /**
  26. * Represents IngestManifestAsset object used in media services
  27. *
  28. * @category Microsoft
  29. * @package WindowsAzure\MediaServices\Models
  30. * @author Azure PHP SDK <azurephpsdk@microsoft.com>
  31. * @copyright Microsoft Corporation
  32. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
  33. * @version Release: 0.4.2_2016-04
  34. * @link https://github.com/windowsazure/azure-sdk-for-php
  35. */
  36. class IngestManifestAsset
  37. {
  38. /**
  39. * MainfestAsset id
  40. *
  41. * @var string
  42. */
  43. private $_id;
  44. /**
  45. * Created
  46. *
  47. * @var \DateTime
  48. */
  49. private $_created;
  50. /**
  51. * Last modified
  52. *
  53. * @var \DateTime
  54. */
  55. private $_lastModified;
  56. /**
  57. * ParentIngestManifestId
  58. *
  59. * @var string
  60. */
  61. private $_parentIngestManifestId;
  62. /**
  63. * Create IngestManifestAsset from array
  64. *
  65. * @param array $options Array containing values for object properties
  66. *
  67. * @return WindowsAzure\MediaServices\Models\IngestManifestAsset
  68. */
  69. public static function createFromOptions($options)
  70. {
  71. Validate::notNull(
  72. $options['ParentIngestManifestId'],
  73. 'options[ParentIngestManifestId]'
  74. );
  75. $asset = new IngestManifestAsset($options['ParentIngestManifestId']);
  76. $asset->fromArray($options);
  77. return $asset;
  78. }
  79. /**
  80. * Create IngestManifestAsset
  81. *
  82. * @param int $parentIngestManifestId Parent IngestManifest id.
  83. */
  84. public function __construct($parentIngestManifestId)
  85. {
  86. $this->_parentIngestManifestId = $parentIngestManifestId;
  87. }
  88. /**
  89. * Fill IngestManifestAsset from array
  90. *
  91. * @param array $options Array containing values for object properties
  92. *
  93. * @return none
  94. */
  95. public function fromArray($options)
  96. {
  97. if (isset($options['Id'])) {
  98. Validate::isString($options['Id'], 'options[Id]');
  99. $this->_id = $options['Id'];
  100. }
  101. if (isset($options['Created'])) {
  102. Validate::isDateString($options['Created'], 'options[Created]');
  103. $this->_created = new \DateTime($options['Created']);
  104. }
  105. if (isset($options['LastModified'])) {
  106. Validate::isDateString(
  107. $options['LastModified'],
  108. 'options[LastModified]'
  109. );
  110. $this->_lastModified = new \DateTime($options['LastModified']);
  111. }
  112. if (isset($options['ParentIngestManifestId'])) {
  113. Validate::isString(
  114. $options['ParentIngestManifestId'],
  115. 'options[ParentIngestManifestId]'
  116. );
  117. $this->_parentIngestManifestId = $options['ParentIngestManifestId'];
  118. }
  119. }
  120. /**
  121. * Get "ParentIngestManifestId"
  122. *
  123. * @return string
  124. */
  125. public function getParentIngestManifestId()
  126. {
  127. return $this->_parentIngestManifestId;
  128. }
  129. /**
  130. * Get "Last modified"
  131. *
  132. * @return \DateTime
  133. */
  134. public function getLastModified()
  135. {
  136. return $this->_lastModified;
  137. }
  138. /**
  139. * Get "Created"
  140. *
  141. * @return \DateTime
  142. */
  143. public function getCreated()
  144. {
  145. return $this->_created;
  146. }
  147. /**
  148. * Get "ManifestAsset id"
  149. *
  150. * @return string
  151. */
  152. public function getId()
  153. {
  154. return $this->_id;
  155. }
  156. }