public function kernelRequest(GetResponseEvent $event)
    {
        $request = $event->getRequest();
        $entity = $request->attributes->get('_api_resource_class');

        if (null === $entity) {
            return;
        }

        if (!in_array(Translatable::class, class_implements($entity), true)) {
            return;
        }

        $model = $request->attributes->get('data');

        if ('post' === $request->attributes->get('_api_collection_operation_name')) {
            $this->translationService->transfer($model);
        } else if ('put' === $request->attributes->get('_api_item_operation_name')) {
            $this->translationService->transfer($model);
            $this->translationService->translate($model);
        }
    }