<?php

namespace AppBundle\Entity\AccessAndFunction;

use AppBundle\Entity\AccessAndFunction\Access;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Dunglas\ApiBundle\Annotation\Iri;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use AppBundle\Entity\Traits\TimestampableEntity;
use AppBundle\Entity\Traits\CreatorUpdaterEntity;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;

/**
 * Informations relatives au réseau, pour un Access
 *
 * @Iri("http://schema.org/AccessNetworkSetting")
 */
#[ORM\Entity]
class AccessNetworkSetting
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['accessnetworksetting', 'accesscmfnetwork', 'access_details', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'ca_list', 'accesses_list', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'morals_list', 'othercontact_list', 'student_registration', 'board_list', 'own_access', 'access_informations_edit'])]
    private $id;
    /**
     * @var Access
     */
    #[Assert\Valid]
    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'accessNetworkSetting', cascade: ['persist'], fetch: 'EAGER')]
    #[ORM\JoinColumn(nullable: true, onDelete: 'CASCADE')]
    #[Groups(['accessnetworksetting'])]
    private $access;
    /**
     * @var bool
     */
    #[ORM\Column(type: 'boolean', options: ['default' => true])]
    #[Assert\Type(type: 'boolean')]
    #[Assert\NotNull]
    #[Groups(['accessnetworksetting', 'accesscmfnetwork_accessnetworksetting', 'access_details_accessnetworksetting', 'accesses_list_accessnetworksetting', 'student_list_accessnetworksetting', 'guardians_list_accessnetworksetting', 'teachers_list_accessnetworksetting', 'adherent_list_accessnetworksetting', 'personnels_list_accessnetworksetting', 'morals_list_accessnetworksetting', 'ca_list_accessnetworksetting', 'othercontact_list_accessnetworksetting', 'board_list_accessnetworksetting'])]
    private $subscriptionCmfPaper = true;
    /**
     * @var bool
     */
    #[ORM\Column(type: 'boolean', options: ['default' => true])]
    #[Assert\Type(type: 'boolean')]
    #[Assert\NotNull]
    #[Groups(['accessnetworksetting', 'accesscmfnetwork_accessnetworksetting'])]
    private $subscriptionEducationalInformationCmfPaper = true;
    /**
     * @var bool
     */
    #[ORM\Column(type: 'boolean', options: ['default' => true])]
    #[Assert\Type(type: 'boolean')]
    #[Assert\NotNull]
    #[Groups(['accessnetworksetting', 'accesscmfnetwork_accessnetworksetting'])]
    private $subscriptionOtherInformationCmfPaper = true;
    /**
     * @var integer
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
    #[Groups(['accessnetworksetting', 'accesscmfnetwork_accessnetworksetting', 'access_details_accessnetworksetting', 'accesses_list_accessnetworksetting', 'student_list_accessnetworksetting', 'guardians_list_accessnetworksetting', 'teachers_list_accessnetworksetting', 'adherent_list_accessnetworksetting', 'personnels_list_accessnetworksetting', 'morals_list_accessnetworksetting', 'ca_list_accessnetworksetting', 'othercontact_list_accessnetworksetting', 'board_list_accessnetworksetting'])]
    private $numberPaperCopies;
    /**
     * @var bool
     */
    #[ORM\Column(type: 'boolean', options: ['default' => true])]
    #[Assert\Type(type: 'boolean')]
    #[Assert\NotNull]
    #[Groups(['accessnetworksetting', 'accesscmfnetwork_accessnetworksetting', 'access_details_accessnetworksetting', 'accesses_list_accessnetworksetting', 'student_list_accessnetworksetting', 'guardians_list_accessnetworksetting', 'teachers_list_accessnetworksetting', 'adherent_list_accessnetworksetting', 'personnels_list_accessnetworksetting', 'morals_list_accessnetworksetting', 'ca_list_accessnetworksetting', 'othercontact_list_accessnetworksetting', 'board_list_accessnetworksetting', 'own_access_accessnetworksetting'])]
    private $receivesDigitalCmfNewletterAndInformation = true;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['AppBundle\Enum\AccessAndFunction\LicenseTypeEnum', 'toArray'])]
    #[Groups(['accessnetworksetting', 'access_details_accessnetworksetting', 'student_list_accessnetworksetting', 'guardians_list_accessnetworksetting', 'teachers_list_accessnetworksetting', 'adherent_list_accessnetworksetting', 'personnels_list_accessnetworksetting', 'ca_list_accessnetworksetting', 'accesses_list_accessnetworksetting', 'student_registration_accessnetworksetting', 'board_list_accessnetworksetting', 'access_informations_edit_accessnetworksetting'])]
    private $licenseType;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['AppBundle\Enum\AccessAndFunction\LicenseRateEnum', 'toArray'])]
    #[Groups(['accessnetworksetting', 'access_details_accessnetworksetting', 'student_list_accessnetworksetting', 'guardians_list_accessnetworksetting', 'teachers_list_accessnetworksetting', 'adherent_list_accessnetworksetting', 'personnels_list_accessnetworksetting', 'ca_list_accessnetworksetting', 'accesses_list_accessnetworksetting', 'student_list_accessnetworksetting', 'guardians_list_accessnetworksetting', 'teachers_list_accessnetworksetting', 'adherent_list_accessnetworksetting', 'student_registration_accessnetworksetting', 'board_list_accessnetworksetting', 'access_informations_edit_accessnetworksetting'])]
    private $licenseRate;
    /**
     * @var \DateTime Date of first entry into the structure.
     *
     * @Iri("https://schema.org/birthDate")
     */
    #[ORM\Column(type: 'date', nullable: true)]
    #[Assert\Date(message: 'invalid-date')]
    #[Groups(['accessnetworksetting', 'accesses_list_accessnetworksetting', 'ca_list_accessnetworksetting', 'adherent_list_accessnetworksetting', 'accesscmfnetwork_accessnetworksetting', 'access_details_accessnetworksetting', 'board_list_accessnetworksetting'])]
    private $dateFirstEntry;
    /**
     * The constructor
     */
    public function __construct() {

    }
    /**
     * Sets id.
     *
     * @param int $id
     *
     * @return $this
     */
    public function setId($id)
    {
        $this->id = $id;

        return $this;
    }
    /**
     * Gets id.
     *
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * Set subscriptionCmfPaper
     *
     * @param boolean $subscriptionCmfPaper
     *
     * @return AccessNetworkSetting
     */
    public function setSubscriptionCmfPaper($subscriptionCmfPaper)
    {
        $this->subscriptionCmfPaper = $subscriptionCmfPaper;

        return $this;
    }
    /**
     * Get subscriptionCmfPaper
     *
     * @return boolean
     */
    public function getSubscriptionCmfPaper()
    {
        return $this->subscriptionCmfPaper;
    }
    /**
     * Set numberPaperCopies
     *
     * @param integer $numberPaperCopies
     *
     * @return AccessNetworkSetting
     */
    public function setNumberPaperCopies($numberPaperCopies)
    {
        $this->numberPaperCopies = $numberPaperCopies;

        return $this;
    }
    /**
     * Get numberPaperCopies
     *
     * @return integer
     */
    public function getNumberPaperCopies()
    {
        return $this->numberPaperCopies;
    }
    /**
     * Set receivesDigitalCmfNewletterAndInformation
     *
     * @param boolean $receivesDigitalCmfNewletterAndInformation
     *
     * @return AccessNetworkSetting
     */
    public function setReceivesDigitalCmfNewletterAndInformation($receivesDigitalCmfNewletterAndInformation)
    {
        $this->receivesDigitalCmfNewletterAndInformation = $receivesDigitalCmfNewletterAndInformation;

        return $this;
    }
    /**
     * Get receivesDigitalCmfNewletterAndInformation
     *
     * @return boolean
     */
    public function getReceivesDigitalCmfNewletterAndInformation()
    {
        return $this->receivesDigitalCmfNewletterAndInformation;
    }
    /**
     * Set access
     *
     * @param \AppBundle\Entity\AccessAndFunction\Access $access
     *
     * @return AccessNetworkSetting
     */
    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access = null)
    {
        $this->access = $access;

        return $this;
    }
    /**
     * Get access
     *
     * @return \AppBundle\Entity\AccessAndFunction\Access
     */
    public function getAccess()
    {
        return $this->access;
    }
    /**
     * Set licenseType
     *
     * @param string $licenseType
     *
     * @return Access
     */
    public function setLicenseType($licenseType)
    {
        $this->licenseType = $licenseType;

        return $this;
    }
    /**
     * Get licenseType
     *
     * @return string
     */
    public function getLicenseType()
    {
        return $this->licenseType;
    }
    /**
     * Set licenseRate
     *
     * @param string $licenseRate
     *
     * @return Access
     */
    public function setLicenseRate($licenseRate)
    {
        $this->licenseRate = $licenseRate;

        return $this;
    }
    /**
     * Get licenseRate
     *
     * @return string
     */
    public function getLicenseRate()
    {
        return $this->licenseRate;
    }
    /**
     * Set dateFirstEntry
     *
     * @param \DateTime $dateFirstEntry
     *
     * @return Person
     */
    public function setDateFirstEntry($dateFirstEntry)
    {
        $this->dateFirstEntry = $dateFirstEntry;

        return $this;
    }
    /**
     * Get dateFirstEntry
     *
     * @return \DateTime
     */
    public function getDateFirstEntry()
    {
        return $this->dateFirstEntry ? $this->dateFirstEntry->format('Y-m-d') : $this->dateFirstEntry;
    }
    /**
     * Set subscriptionEducationalInformationCmfPaper
     *
     * @param boolean $subscriptionEducationalInformationCmfPaper
     *
     * @return AccessNetworkSetting
     */
    public function setSubscriptionEducationalInformationCmfPaper($subscriptionEducationalInformationCmfPaper)
    {
        $this->subscriptionEducationalInformationCmfPaper = $subscriptionEducationalInformationCmfPaper;

        return $this;
    }
    /**
     * Get subscriptionEducationalInformationCmfPaper
     *
     * @return boolean
     */
    public function getSubscriptionEducationalInformationCmfPaper()
    {
        return $this->subscriptionEducationalInformationCmfPaper;
    }
    /**
     * Set subscriptionOtherInformationCmfPaper
     *
     * @param boolean $subscriptionOtherInformationCmfPaper
     *
     * @return AccessNetworkSetting
     */
    public function setSubscriptionOtherInformationCmfPaper($subscriptionOtherInformationCmfPaper)
    {
        $this->subscriptionOtherInformationCmfPaper = $subscriptionOtherInformationCmfPaper;

        return $this;
    }
    /**
     * Get subscriptionOtherInformationCmfPaper
     *
     * @return boolean
     */
    public function getSubscriptionOtherInformationCmfPaper()
    {
        return $this->subscriptionOtherInformationCmfPaper;
    }
}
