function jsonSerialize()
 {
     return ['id' => $this->id, 'rule' => $this->rule, 'startsOn' => $this->startsOn, 'startsAt' => $this->startsAt, 'endsOn' => $this->endsOn, 'endsAt' => $this->endsAt, 'duration' => $this->duration, 'frequency' => $this->frequency, 'separation' => $this->separation, 'recurrences' => $this->getRecurrences(), 'count' => $this->count, 'until' => $this->until, 'spaceId' => $this->spaceId, 'space' => $this->space ? $this->space->simplify('id,name,singleUrl,shortDescription,avatar,location') : null, 'event' => $this->event ? $this->event->simplify('id,name,singleUrl,shortDescription,avatar') : null, 'editUrl' => $this->editUrl, 'deleteUrl' => $this->deleteUrl, 'status' => $this->status];
 }