protected function processResourceToAttribute($object, ResourceObject $resource, Attribute $definition)
    {
        $name = $definition->getName();

        if (! $resource->hasAttribute($name)) {
            return;
        }

        $value = $resource->getAttribute($name);

        if ($value === null && ! $definition->getProcessNull()) {
            return;
        }

        $value  = $this->typeManager->fromResource($definition, $value);
        $setter = $definition->getSetter();

        $object->$setter($value);
    }