private CloudQuota mapQuotaResource(Map<String, Object> resource) { Boolean nonBasicServicesAllowed = getAttributeOfV2Resource(resource, "non_basic_services_allowed", Boolean.class); int totalServices = getAttributeOfV2Resource(resource, "total_services", Integer.class); int totalRoutes = getAttributeOfV2Resource(resource, "total_routes", Integer.class); long memoryLimit = getAttributeOfV2Resource(resource, "memory_limit", Long.class); return new CloudQuota(getV2Meta(resource), getNameOfV2Resource(resource), nonBasicServicesAllowed, totalServices, totalRoutes, memoryLimit); }
private CloudQuota mapQuotaResource(Map<String, Object> resource) { Boolean nonBasicServicesAllowed = getEntityAttribute(resource, "non_basic_services_allowed", Boolean.class); int totalServices = getEntityAttribute(resource, "total_services", Integer.class); int totalRoutes = getEntityAttribute(resource, "total_routes", Integer.class); long memoryLimit = getEntityAttribute(resource, "memory_limit", Long.class); return new CloudQuota(getMeta(resource), getNameOfResource(resource), nonBasicServicesAllowed, totalServices, totalRoutes, memoryLimit); }