/**
  * @param \OCA\Calendar\IObject|\OCA\Calendar\IObjectCollection $data
  * @param TimezoneMapper $timezones
  * @param int $statusCode
  */
 public function __construct($data, TimezoneMapper $timezones = null, $statusCode = Http::STATUS_OK)
 {
     $vobject = $data->getVObject();
     if ($vobject) {
         if ($timezones) {
             SabreUtility::addMissingVTimezones($vobject, $timezones);
         }
         $serialized = $vobject->serialize();
         parent::__construct($serialized, $statusCode, ['Content-type' => 'text/calendar; charset=utf-8']);
         if ($data instanceof IObject) {
             $this->setETag($data->getEtag(true));
         }
     } else {
         parent::__construct(null, HTTP::STATUS_NO_CONTENT);
     }
 }