Merge from ecomp 718fd196 - Modern UI
[vid.git] / vid-webpack-master / src / app / shared / models / collectionResourceModel.ts
1 import {Level1Model, Level1ModelProperties, Level1ModelResponseInterface} from "./nodeModel";
2 import {NcfModelInterface} from "./ncfModel";
3
4 export interface CollectionResourceProperties extends Level1ModelProperties{
5 }
6
7 export interface CollectionResourceModelResponseInterface extends Level1ModelResponseInterface{
8   properties: CollectionResourceProperties;
9   networksCollection: { [key: string]: NcfModelInterface };
10 }
11
12 export class CollectionResourceModel extends Level1Model{
13
14   roles: string[] = [];
15   properties: CollectionResourceProperties;
16   networksCollection: { [key: string]: NcfModelInterface };
17
18   constructor(collectionResourceJson?: CollectionResourceModelResponseInterface){
19     super(collectionResourceJson);
20     if(collectionResourceJson && collectionResourceJson.properties){
21       this.properties = collectionResourceJson.properties;
22     }
23     if (collectionResourceJson && collectionResourceJson.networksCollection) {
24       this.networksCollection = collectionResourceJson.networksCollection;
25     }
26   }
27
28 }