1 import * as _ from "lodash";
2 import {Serializable} from "../utils/serializable";
3 import {ComponentGenericResponse} from "./component-generic-response";
4 import {ForwardingPath} from "../../../models/forwarding-path";
6 export class ServiceGenericResponse extends ComponentGenericResponse implements Serializable<ServiceGenericResponse> {
7 public forwardingPaths: { [key:string]:ForwardingPath } = {};
9 deserialize (response): ServiceGenericResponse {
10 super.deserialize(response);
11 if(response.forwardingPaths) {
12 _.forEach(response.forwardingPaths, (pathResponse, id) => {
14 let path:ForwardingPath = new ForwardingPath();
15 path.deserialize(pathResponse);
16 path.uniqueId = pathId;
17 this.forwardingPaths[pathId] = path;