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";
5 import {ArtifactGroupModel} from "../../../models/artifacts";
7 export class ServiceGenericResponse extends ComponentGenericResponse implements Serializable<ServiceGenericResponse> {
8 public forwardingPaths: { [key:string]:ForwardingPath } = {};
9 public serviceApiArtifacts: ArtifactGroupModel;
11 deserialize (response): ServiceGenericResponse {
12 super.deserialize(response);
13 this.serviceApiArtifacts = new ArtifactGroupModel(response.serviceApiArtifacts);
14 if(response.forwardingPaths) {
15 _.forEach(response.forwardingPaths, (pathResponse, id) => {
17 let path:ForwardingPath = new ForwardingPath();
18 path.deserialize(pathResponse);
19 path.uniqueId = pathId;
20 this.forwardingPaths[pathId] = path;