/** * Create IngestManifestAsset from array * * @param array $options Array containing values for object properties * * @return WindowsAzure\MediaServices\Models\IngestManifestAsset */ public static function createFromOptions($options) { Validate::notNull($options['ParentIngestManifestId'], 'options[ParentIngestManifestId]'); $asset = new IngestManifestAsset($options['ParentIngestManifestId']); $asset->fromArray($options); return $asset; }
/** * Get list of IngestManifestAsset. * * @return array of Models\IngestManifestAsset */ public function getIngestManifestAssetList() { $propertyList = $this->_getEntityList('IngestManifestAssets'); $result = array(); foreach ($propertyList as $properties) { $result[] = IngestManifestAsset::createFromOptions($properties); } return $result; }
/** * @covers WindowsAzure\MediaServices\Models\IngestManifestAsset::getId */ public function testGetId() { // Setup $id = 'ingest-id-258'; $options = array('Id' => $id, 'ParentIngestManifestId' => 'parent-manifest-id-3562'); $manifestAsset = IngestManifestAsset::createFromOptions($options); // Test $result = $manifestAsset->getId(); // Assert $this->assertEquals($id, $result); }