<?php

namespace MongoDBODMProxies\__CG__\OfficeBrain\Bundle\EmailBundle\Document;

/**
 * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
 */
class EmailQueue extends \OfficeBrain\Bundle\EmailBundle\Document\EmailQueue implements \Doctrine\ODM\MongoDB\Proxy\Proxy
{
    /**
     * @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
     *      three parameters, being respectively the proxy object to be initialized, the method that triggered the
     *      initialization process and an array of ordered parameters that were passed to that method.
     *
     * @see \Doctrine\Common\Persistence\Proxy::__setInitializer
     */
    public $__initializer__;

    /**
     * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
     *
     * @see \Doctrine\Common\Persistence\Proxy::__setCloner
     */
    public $__cloner__;

    /**
     * @var boolean flag indicating if this object was already initialized
     *
     * @see \Doctrine\Common\Persistence\Proxy::__isInitialized
     */
    public $__isInitialized__ = false;

    /**
     * @var array properties to be lazy loaded, with keys being the property
     *            names and values being their default values
     *
     * @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
     */
    public static $lazyPropertiesDefaults = [];



    /**
     * @param \Closure $initializer
     * @param \Closure $cloner
     */
    public function __construct($initializer = null, $cloner = null)
    {

        $this->__initializer__ = $initializer;
        $this->__cloner__      = $cloner;
    }







    /**
     * 
     * @return array
     */
    public function __sleep()
    {
        if ($this->__isInitialized__) {
            return ['__isInitialized__', 'id', 'instanceId', 'instanceType', 'event', 'to', 'from', 'fromName', 'fromAdm', 'cc', 'bcc', 'replyTo', 'subject', 'content', 'attachment', 'type', 'priority', 'sendAt', 'isSent', 'isRead', 'resend'];
        }

        return ['__isInitialized__', 'id', 'instanceId', 'instanceType', 'event', 'to', 'from', 'fromName', 'fromAdm', 'cc', 'bcc', 'replyTo', 'subject', 'content', 'attachment', 'type', 'priority', 'sendAt', 'isSent', 'isRead', 'resend'];
    }

    /**
     * 
     */
    public function __wakeup()
    {
        if ( ! $this->__isInitialized__) {
            $this->__initializer__ = function (EmailQueue $proxy) {
                $proxy->__setInitializer(null);
                $proxy->__setCloner(null);

                $existingProperties = get_object_vars($proxy);

                foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
                    if ( ! array_key_exists($property, $existingProperties)) {
                        $proxy->$property = $defaultValue;
                    }
                }
            };

        }
    }

    /**
     * 
     */
    public function __clone()
    {
        $this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', []);
    }

    /**
     * Forces initialization of the proxy
     */
    public function __load()
    {
        $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);
    }

    /**
     * {@inheritDoc}
     * @internal generated method: use only when explicitly handling proxy specific loading logic
     */
    public function __isInitialized()
    {
        return $this->__isInitialized__;
    }

    /**
     * {@inheritDoc}
     * @internal generated method: use only when explicitly handling proxy specific loading logic
     */
    public function __setInitialized($initialized)
    {
        $this->__isInitialized__ = $initialized;
    }

    /**
     * {@inheritDoc}
     * @internal generated method: use only when explicitly handling proxy specific loading logic
     */
    public function __setInitializer(\Closure $initializer = null)
    {
        $this->__initializer__ = $initializer;
    }

    /**
     * {@inheritDoc}
     * @internal generated method: use only when explicitly handling proxy specific loading logic
     */
    public function __getInitializer()
    {
        return $this->__initializer__;
    }

    /**
     * {@inheritDoc}
     * @internal generated method: use only when explicitly handling proxy specific loading logic
     */
    public function __setCloner(\Closure $cloner = null)
    {
        $this->__cloner__ = $cloner;
    }

    /**
     * {@inheritDoc}
     * @internal generated method: use only when explicitly handling proxy specific cloning logic
     */
    public function __getCloner()
    {
        return $this->__cloner__;
    }

    /**
     * {@inheritDoc}
     * @internal generated method: use only when explicitly handling proxy specific loading logic
     * @static
     */
    public function __getLazyProperties()
    {
        return self::$lazyPropertiesDefaults;
    }

    
    /**
     * {@inheritDoc}
     */
    public function getId()
    {
        if ($this->__isInitialized__ === false) {
            return  parent::getId();
        }


        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', []);

        return parent::getId();
    }

    /**
     * {@inheritDoc}
     */
    public function setInstanceId($instanceId)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setInstanceId', [$instanceId]);

        return parent::setInstanceId($instanceId);
    }

    /**
     * {@inheritDoc}
     */
    public function getInstanceId()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getInstanceId', []);

        return parent::getInstanceId();
    }

    /**
     * {@inheritDoc}
     */
    public function setInstanceType($instanceType)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setInstanceType', [$instanceType]);

        return parent::setInstanceType($instanceType);
    }

    /**
     * {@inheritDoc}
     */
    public function getInstanceType()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getInstanceType', []);

        return parent::getInstanceType();
    }

    /**
     * {@inheritDoc}
     */
    public function setEvent($event)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setEvent', [$event]);

        return parent::setEvent($event);
    }

    /**
     * {@inheritDoc}
     */
    public function getEvent()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getEvent', []);

        return parent::getEvent();
    }

    /**
     * {@inheritDoc}
     */
    public function setTo($to)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setTo', [$to]);

        return parent::setTo($to);
    }

    /**
     * {@inheritDoc}
     */
    public function getTo()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getTo', []);

        return parent::getTo();
    }

    /**
     * {@inheritDoc}
     */
    public function setFrom($from)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setFrom', [$from]);

        return parent::setFrom($from);
    }

    /**
     * {@inheritDoc}
     */
    public function getFrom()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getFrom', []);

        return parent::getFrom();
    }

    /**
     * {@inheritDoc}
     */
    public function setFromName($fromName)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setFromName', [$fromName]);

        return parent::setFromName($fromName);
    }

    /**
     * {@inheritDoc}
     */
    public function getFromName()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getFromName', []);

        return parent::getFromName();
    }

    /**
     * {@inheritDoc}
     */
    public function setFromAdm($fromAdm)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setFromAdm', [$fromAdm]);

        return parent::setFromAdm($fromAdm);
    }

    /**
     * {@inheritDoc}
     */
    public function getFromAdm()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getFromAdm', []);

        return parent::getFromAdm();
    }

    /**
     * {@inheritDoc}
     */
    public function setCc($cc)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setCc', [$cc]);

        return parent::setCc($cc);
    }

    /**
     * {@inheritDoc}
     */
    public function getCc()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getCc', []);

        return parent::getCc();
    }

    /**
     * {@inheritDoc}
     */
    public function setBcc($bcc)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setBcc', [$bcc]);

        return parent::setBcc($bcc);
    }

    /**
     * {@inheritDoc}
     */
    public function getBcc()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getBcc', []);

        return parent::getBcc();
    }

    /**
     * {@inheritDoc}
     */
    public function setSubject($subject)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setSubject', [$subject]);

        return parent::setSubject($subject);
    }

    /**
     * {@inheritDoc}
     */
    public function getSubject()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getSubject', []);

        return parent::getSubject();
    }

    /**
     * {@inheritDoc}
     */
    public function setContent($content)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setContent', [$content]);

        return parent::setContent($content);
    }

    /**
     * {@inheritDoc}
     */
    public function getContent()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getContent', []);

        return parent::getContent();
    }

    /**
     * {@inheritDoc}
     */
    public function setType($type)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setType', [$type]);

        return parent::setType($type);
    }

    /**
     * {@inheritDoc}
     */
    public function getType()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getType', []);

        return parent::getType();
    }

    /**
     * {@inheritDoc}
     */
    public function setPriority($priority)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setPriority', [$priority]);

        return parent::setPriority($priority);
    }

    /**
     * {@inheritDoc}
     */
    public function getPriority()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPriority', []);

        return parent::getPriority();
    }

    /**
     * {@inheritDoc}
     */
    public function setSendAt($sendAt)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setSendAt', [$sendAt]);

        return parent::setSendAt($sendAt);
    }

    /**
     * {@inheritDoc}
     */
    public function getSendAt()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getSendAt', []);

        return parent::getSendAt();
    }

    /**
     * {@inheritDoc}
     */
    public function setIsSent($isSent)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setIsSent', [$isSent]);

        return parent::setIsSent($isSent);
    }

    /**
     * {@inheritDoc}
     */
    public function getIsSent()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getIsSent', []);

        return parent::getIsSent();
    }

    /**
     * {@inheritDoc}
     */
    public function setIsRead($isRead)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setIsRead', [$isRead]);

        return parent::setIsRead($isRead);
    }

    /**
     * {@inheritDoc}
     */
    public function getIsRead()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getIsRead', []);

        return parent::getIsRead();
    }

    /**
     * {@inheritDoc}
     */
    public function setResend($resend)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setResend', [$resend]);

        return parent::setResend($resend);
    }

    /**
     * {@inheritDoc}
     */
    public function getResend()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getResend', []);

        return parent::getResend();
    }

    /**
     * {@inheritDoc}
     */
    public function setAttachment($attachment)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setAttachment', [$attachment]);

        return parent::setAttachment($attachment);
    }

    /**
     * {@inheritDoc}
     */
    public function getAttachment()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAttachment', []);

        return parent::getAttachment();
    }

    /**
     * {@inheritDoc}
     */
    public function setReplyTo($replyTo)
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'setReplyTo', [$replyTo]);

        return parent::setReplyTo($replyTo);
    }

    /**
     * {@inheritDoc}
     */
    public function getReplyTo()
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getReplyTo', []);

        return parent::getReplyTo();
    }

}
