protected function buildDomainUserGroupObject(APIContent $content)
    {
        $locationService = $this->repository->getLocationService();

        if ($content->getVersionInfo()->getContentInfo()->mainLocationId !== null) {
            $mainLocation = $locationService->loadLocation(
                $content->getVersionInfo()->getContentInfo()->mainLocationId
            );
            $parentLocation = $locationService->loadLocation($mainLocation->parentLocationId);
        }

        return new UserGroup(
            array(
                'content' => $content,
                'parentId' => isset($parentLocation) ? $parentLocation->contentId : null,
            )
        );
    }