<?php

namespace Proxies\__CG__\Akeneo\Pim\Enrichment\Component\Product\Model;

/**
 * DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
 */
class ProductModel extends \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModel implements \Doctrine\ORM\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\Proxy\Proxy::__setInitializer
     */
    public $__initializer__;

    /**
     * @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
     *
     * @see \Doctrine\Common\Proxy\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\Proxy\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', 'code', 'rawValues', 'values', 'created', 'updated', 'root', 'level', 'left', 'right', 'categories', 'products', 'parent', 'productModels', 'familyVariant', 'associations'];
        }

        return ['__isInitialized__', 'id', 'code', 'rawValues', 'values', 'created', 'updated', 'root', 'level', 'left', 'right', 'categories', 'products', 'parent', 'productModels', 'familyVariant', 'associations'];
    }

    /**
     * 
     */
    public function __wakeup()
    {
        if ( ! $this->__isInitialized__) {
            $this->__initializer__ = function (ProductModel $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(): ?int
    {
        if ($this->__isInitialized__ === false) {
            return (int)  parent::getId();
        }


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

        return parent::getId();
    }

    /**
     * {@inheritDoc}
     */
    public function getCode(): ?string
    {

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

        return parent::getCode();
    }

    /**
     * {@inheritDoc}
     */
    public function setCode(string $code): void
    {

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

        parent::setCode($code);
    }

    /**
     * {@inheritDoc}
     */
    public function getRawValues(): array
    {

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

        return parent::getRawValues();
    }

    /**
     * {@inheritDoc}
     */
    public function setRawValues(array $rawValues): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::setRawValues($rawValues);
    }

    /**
     * {@inheritDoc}
     */
    public function getValues(): \Akeneo\Pim\Enrichment\Component\Product\Model\WriteValueCollection
    {

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

        return parent::getValues();
    }

    /**
     * {@inheritDoc}
     */
    public function getValuesForVariation(): \Akeneo\Pim\Enrichment\Component\Product\Model\WriteValueCollection
    {

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

        return parent::getValuesForVariation();
    }

    /**
     * {@inheritDoc}
     */
    public function setValues(\Akeneo\Pim\Enrichment\Component\Product\Model\WriteValueCollection $values)
    {

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

        return parent::setValues($values);
    }

    /**
     * {@inheritDoc}
     */
    public function getValue($attributeCode, $localeCode = NULL, $scopeCode = NULL): ?\Akeneo\Pim\Enrichment\Component\Product\Model\ValueInterface
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getValue', [$attributeCode, $localeCode, $scopeCode]);

        return parent::getValue($attributeCode, $localeCode, $scopeCode);
    }

    /**
     * {@inheritDoc}
     */
    public function addValue(\Akeneo\Pim\Enrichment\Component\Product\Model\ValueInterface $value): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::addValue($value);
    }

    /**
     * {@inheritDoc}
     */
    public function removeValue(\Akeneo\Pim\Enrichment\Component\Product\Model\ValueInterface $value): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::removeValue($value);
    }

    /**
     * {@inheritDoc}
     */
    public function hasAttribute(string $attributeCode): bool
    {

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

        return parent::hasAttribute($attributeCode);
    }

    /**
     * {@inheritDoc}
     */
    public function getUsedAttributeCodes(): array
    {

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

        return parent::getUsedAttributeCodes();
    }

    /**
     * {@inheritDoc}
     */
    public function getCreated(): \DateTimeInterface
    {

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

        return parent::getCreated();
    }

    /**
     * {@inheritDoc}
     */
    public function setCreated($created): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::setCreated($created);
    }

    /**
     * {@inheritDoc}
     */
    public function getUpdated(): \DateTimeInterface
    {

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

        return parent::getUpdated();
    }

    /**
     * {@inheritDoc}
     */
    public function setUpdated($updated): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::setUpdated($updated);
    }

    /**
     * {@inheritDoc}
     */
    public function getCategories(): \Doctrine\Common\Collections\Collection
    {

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

        return parent::getCategories();
    }

    /**
     * {@inheritDoc}
     */
    public function removeCategory(\Akeneo\Tool\Component\Classification\Model\CategoryInterface $category): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::removeCategory($category);
    }

    /**
     * {@inheritDoc}
     */
    public function addCategory(\Akeneo\Tool\Component\Classification\Model\CategoryInterface $category): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::addCategory($category);
    }

    /**
     * {@inheritDoc}
     */
    public function setCategories(\Doctrine\Common\Collections\Collection $categories): void
    {

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

        parent::setCategories($categories);
    }

    /**
     * {@inheritDoc}
     */
    public function getCategoryCodes(): array
    {

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

        return parent::getCategoryCodes();
    }

    /**
     * {@inheritDoc}
     */
    public function getProducts(): \Doctrine\Common\Collections\Collection
    {

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

        return parent::getProducts();
    }

    /**
     * {@inheritDoc}
     */
    public function addProduct(\Akeneo\Pim\Enrichment\Component\Product\Model\ProductInterface $product): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::addProduct($product);
    }

    /**
     * {@inheritDoc}
     */
    public function removeProduct(\Akeneo\Pim\Enrichment\Component\Product\Model\ProductInterface $product): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::removeProduct($product);
    }

    /**
     * {@inheritDoc}
     */
    public function setRoot(int $root): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::setRoot($root);
    }

    /**
     * {@inheritDoc}
     */
    public function getRoot(): int
    {

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

        return parent::getRoot();
    }

    /**
     * {@inheritDoc}
     */
    public function isRoot(): bool
    {

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

        return parent::isRoot();
    }

    /**
     * {@inheritDoc}
     */
    public function setLevel(int $level): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::setLevel($level);
    }

    /**
     * {@inheritDoc}
     */
    public function getLevel(): int
    {

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

        return parent::getLevel();
    }

    /**
     * {@inheritDoc}
     */
    public function setLeft(int $left): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::setLeft($left);
    }

    /**
     * {@inheritDoc}
     */
    public function getLeft(): int
    {

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

        return parent::getLeft();
    }

    /**
     * {@inheritDoc}
     */
    public function setRight(int $right): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::setRight($right);
    }

    /**
     * {@inheritDoc}
     */
    public function getRight(): int
    {

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

        return parent::getRight();
    }

    /**
     * {@inheritDoc}
     */
    public function setParent(\Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface $parent = NULL): void
    {

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

        parent::setParent($parent);
    }

    /**
     * {@inheritDoc}
     */
    public function getParent(): ?\Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::getParent();
    }

    /**
     * {@inheritDoc}
     */
    public function addProductModel(\Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface $child): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::addProductModel($child);
    }

    /**
     * {@inheritDoc}
     */
    public function removeProductModel(\Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface $children): \Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface
    {

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

        return parent::removeProductModel($children);
    }

    /**
     * {@inheritDoc}
     */
    public function hasProductModels(): bool
    {

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

        return parent::hasProductModels();
    }

    /**
     * {@inheritDoc}
     */
    public function getProductModels(): \Doctrine\Common\Collections\Collection
    {

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

        return parent::getProductModels();
    }

    /**
     * {@inheritDoc}
     */
    public function getFamilyVariant(): ?\Akeneo\Pim\Structure\Component\Model\FamilyVariantInterface
    {

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

        return parent::getFamilyVariant();
    }

    /**
     * {@inheritDoc}
     */
    public function setFamilyVariant(\Akeneo\Pim\Structure\Component\Model\FamilyVariantInterface $familyVariant): void
    {

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

        parent::setFamilyVariant($familyVariant);
    }

    /**
     * {@inheritDoc}
     */
    public function getVariationLevel(): int
    {

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

        return parent::getVariationLevel();
    }

    /**
     * {@inheritDoc}
     */
    public function isRootProductModel(): bool
    {

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

        return parent::isRootProductModel();
    }

    /**
     * {@inheritDoc}
     */
    public function getLabel(string $localeCode = NULL, string $scopeCode = NULL): string
    {

        $this->__initializer__ && $this->__initializer__->__invoke($this, 'getLabel', [$localeCode, $scopeCode]);

        return parent::getLabel($localeCode, $scopeCode);
    }

    /**
     * {@inheritDoc}
     */
    public function getImage(): ?\Akeneo\Pim\Enrichment\Component\Product\Model\ValueInterface
    {

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

        return parent::getImage();
    }

    /**
     * {@inheritDoc}
     */
    public function getFamily(): ?\Akeneo\Pim\Structure\Component\Model\FamilyInterface
    {

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

        return parent::getFamily();
    }

    /**
     * {@inheritDoc}
     */
    public function addAssociation(\Akeneo\Pim\Enrichment\Component\Product\Model\AssociationInterface $association): \Akeneo\Pim\Enrichment\Component\Product\Model\EntityWithAssociationsInterface
    {

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

        return parent::addAssociation($association);
    }

    /**
     * {@inheritDoc}
     */
    public function removeAssociation(\Akeneo\Pim\Enrichment\Component\Product\Model\AssociationInterface $association): \Akeneo\Pim\Enrichment\Component\Product\Model\EntityWithAssociationsInterface
    {

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

        return parent::removeAssociation($association);
    }

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

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

        return parent::getAssociations();
    }

    /**
     * {@inheritDoc}
     */
    public function getAssociationForType(\Akeneo\Pim\Structure\Component\Model\AssociationTypeInterface $type): ?\Akeneo\Pim\Enrichment\Component\Product\Model\AssociationInterface
    {

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

        return parent::getAssociationForType($type);
    }

    /**
     * {@inheritDoc}
     */
    public function getAssociationForTypeCode($typeCode): ?\Akeneo\Pim\Enrichment\Component\Product\Model\AssociationInterface
    {

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

        return parent::getAssociationForTypeCode($typeCode);
    }

    /**
     * {@inheritDoc}
     */
    public function setAssociations(\Doctrine\Common\Collections\Collection $associations): \Akeneo\Pim\Enrichment\Component\Product\Model\EntityWithAssociationsInterface
    {

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

        return parent::setAssociations($associations);
    }

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

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

        return parent::__toString();
    }

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

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

        return parent::getAllAssociations();
    }

}
