public function unserialize($data)
    {
        list(
            $this->messageKey,
            $this->batchEnabled,
            $this->metadataProvider,
            $this->debugOutput,
            $this->clientConfig,
            $this->batchMethod,
            $this->logName,
            $debugOutputResource
        ) = unserialize($data);

        if (is_array($debugOutputResource)) {
            $this->debugOutputResource = fopen(
                $debugOutputResource['uri'],
                $debugOutputResource['mode']
            );
        }
    }