protected function serialize(ResourceInterface $resource) : array { return $this->manager->createData($resource)->toArray(); }