public function setRestContent($data)
    {
        $serializer = $this->getSerializer();

        if (isset($data)) {
            $this->setContent($serializer->serialize($data, $this->format));
        }

        return $this;
    }