use of com.peterphi.servicemanager.service.rest.resource.type.ProvisionResourceParametersDTO in project stdlib by petergeneric.
the class ServiceManagerResourceMarshaller method marshal.
public ResourceInstanceDTO marshal(final ResourceInstanceEntity entity) {
ResourceInstanceDTO obj = new ResourceInstanceDTO();
obj.id = entity.getId();
obj.templateName = entity.getTemplate().getId();
obj.parameters = new ProvisionResourceParametersDTO();
obj.parameters.metadata = ResourceKVP.fromMap(entity.getMetadata());
obj.provider = entity.getProvider();
obj.providerInstanceId = entity.getProviderInstanceId();
obj.state = entity.getState();
obj.created = marshal(entity.getCreated());
obj.updated = marshal(entity.getUpdated());
return obj;
}
Aggregations