| 70 | } |
| 71 | |
| 72 | func (resource ApplicationFromSummary) ToModel() models.Application { |
| 73 | var app models.Application |
| 74 | |
| 75 | app.ApplicationFields = resource.ToFields() |
| 76 | |
| 77 | routes := []models.RouteSummary{} |
| 78 | for _, route := range resource.Routes { |
| 79 | routes = append(routes, route.ToModel()) |
| 80 | } |
| 81 | app.Routes = routes |
| 82 | |
| 83 | services := []models.ServicePlanSummary{} |
| 84 | for _, service := range resource.Services { |
| 85 | services = append(services, service.ToModel()) |
| 86 | } |
| 87 | |
| 88 | app.Routes = routes |
| 89 | app.Services = services |
| 90 | |
| 91 | return app |
| 92 | } |
| 93 | |
| 94 | type RouteSummary struct { |
| 95 | GUID string |