private function setMainUrl(Url $url)
    {
        if (null !== $this->mainUrl) {
            $this->mainUrl->setMain(false);
        }

        $this->mainUrl = $url;
        $this->mainUrl->setMain(true);
    }