public function create(array $data): Poll
    {
        $poll = new Poll($data['id'], $this);
        $poll
            ->setType($data['type'])
            ->setTitle($data['title'])
            ->setState($data['state'])
            ->setMultiDay((bool)$data['multiDay'])
            ->setByInvitation((bool)$data['byInvitation'])
            ->setInviteesCount((int)$data['inviteesCount'])
            ->setParticipantsCount((int)$data['participantsCount'])
            ->setAskAddress((bool)$data['askAddress'])
            ->setAskEmail((bool)$data['askEmail'])
            ->setAskPhone((bool)$data['askPhone'])
            ->setAmINotified((bool)$data['amINotified'])
            ->setLastWriteAccess(new \DateTime($data['lastWriteAccess']));

        // Possible exception
        try {
            $lastActivity = new \DateTime($data['lastActivity']);
        } catch (\Exception $e) {
            $lastActivity = new \DateTime();
        }
        $poll->setLastActivity($lastActivity);

        // Optional, possibly missing, attributes
        if (!empty($data['adminKey'])) {
            $poll->setAdminKey($data['adminKey']);
        }
        if (!empty($data['rowConstraint'])) {
            $poll->setRowConstraint((bool)$data['rowConstraint']);
        }

        return $poll;
    }