Collections.ts 440 Bytes
Newer Older
Hanadi's avatar
Hanadi committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import {_3DContainer} from "./_3DContainer";
import {Link} from "./Link";

export class Collections {
    links?: Link[];
    collections?: _3DContainer[];

    static fromJson(jsonObj: any): Collections {
        const collections = new Collections();
        collections.links = jsonObj["links"]?.map(Link.fromJson);
        collections.collections = jsonObj["collections"]?.map(_3DContainer.fromJson);
        return collections;
    }
}