src/Entity/ApidaeWriteConfiguration.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * ApidaeWriteConfiguration
  8.  * Table de configuration de l'API en écriture Apidae
  9.  *
  10.  * @ORM\Table(name="apidae_writeconfiguration")
  11.  * @ORM\Entity(repositoryClass="App\Repository\ApidaeWriteConfigurationRepository")
  12.  */
  13. class ApidaeWriteConfiguration
  14. {
  15.     /**
  16.      * @var integer
  17.      *
  18.      * @ORM\Column(name="id", type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="SEQUENCE")
  21.      * @ORM\SequenceGenerator(sequenceName="apidae_writeconfiguration_id_seq", allocationSize=1, initialValue=1)
  22.      */
  23.     private $id;
  24.     /**
  25.      * @ORM\Column(type="string", length=255, nullable=true)
  26.      */
  27.     private $name;
  28.     /**
  29.      * @var string
  30.      * @ORM\Column(name="read_project_id",type="string", length=255, nullable=true)
  31.      */
  32.     private $readProjectId;
  33.     /**
  34.      * @var string
  35.      * @ORM\Column(name="read_api_key",type="string", length=255, nullable=true)
  36.      */
  37.     private $readApiKey;
  38.     /**
  39.      * @var string
  40.      * @ORM\Column(name="project_id",type="string", length=255, nullable=true)
  41.      */
  42.     private $projectId;
  43.     /**
  44.      * @var string
  45.      * @ORM\Column(name="client_id",type="string", length=255, nullable=true)
  46.      */
  47.     private $clientId;
  48.     /**
  49.      * @var string
  50.      * @ORM\Column(name="client_secret",type="string", length=255, nullable=true)
  51.      */
  52.     private $clientSecret;
  53.     /**
  54.      * @var string
  55.      * @ORM\Column(name="base_url",type="string", length=1500, nullable=true)
  56.      */
  57.     private $baseUrl;
  58.     /**
  59.      * @ORM\Column(type="datetime", nullable=true)
  60.      */
  61.     private $createdAt;
  62.     /**
  63.      * @var \DateTime
  64.      * @ORM\Column(name="updated_at", type="datetime", nullable=true)
  65.      */
  66.     private $updatedAt;
  67.     /**
  68.      * @ORM\Column(type="integer", nullable=true)
  69.      */
  70.     private $ordering;
  71.     /**
  72.      * @ORM\ManyToOne(targetEntity="App\Entity\DnsitEntity", inversedBy="apidaeWriteConfigurations")
  73.      * @ORM\JoinColumns({
  74.      *   @ORM\JoinColumn(name="entity_id", referencedColumnName="id")
  75.      * })
  76.      */
  77.     private $entity;
  78.     /**
  79.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="apidaeWriteConfigurations")
  80.      * @ORM\JoinColumns({
  81.      *   @ORM\JoinColumn(name="owner_id", referencedColumnName="id")
  82.      * })
  83.      */
  84.     private $owner;
  85.     /**
  86.      * @var \Doctrine\Common\Collections\Collection
  87.      *
  88.      * @ORM\OneToMany(targetEntity="App\Entity\ApidaeTranslationConfig", mappedBy="writeConfiguration", cascade={"persist", "remove"})
  89.      */
  90.     private $apidaeTranslationConfigs;
  91.     public function __construct()
  92.     {
  93.         $this->apidaeTranslationConfigs = new ArrayCollection();
  94.     }
  95.     /**
  96.      * Set projectId
  97.      *
  98.      * @param string $projectId
  99.      *
  100.      * @return ApidaeWriteConfiguration
  101.      */
  102.     public function setProjectId($projectId)
  103.     {
  104.         $this->projectId $projectId;
  105.         return $this;
  106.     }
  107.     /**
  108.      * Get projectId
  109.      *
  110.      * @return string
  111.      */
  112.     public function getProjectId()
  113.     {
  114.         return $this->projectId;
  115.     }
  116.     /**
  117.      * Set readProjectId
  118.      *
  119.      * @param string $readProjectId
  120.      *
  121.      * @return ApidaeWriteConfiguration
  122.      */
  123.     public function setReadProjectId($readProjectId)
  124.     {
  125.         $this->readProjectId $readProjectId;
  126.         return $this;
  127.     }
  128.     /**
  129.      * Get readProjectId
  130.      *
  131.      * @return string
  132.      */
  133.     public function getReadProjectId()
  134.     {
  135.         return $this->readProjectId;
  136.     }
  137.     /**
  138.      * Set readApiKey
  139.      *
  140.      * @param string $readApiKey
  141.      *
  142.      * @return ApidaeWriteConfiguration
  143.      */
  144.     public function setReadApiKey($readApiKey)
  145.     {
  146.         $this->readApiKey $readApiKey;
  147.         return $this;
  148.     }
  149.     /**
  150.      * Get readApiKey
  151.      *
  152.      * @return string
  153.      */
  154.     public function getReadApiKey()
  155.     {
  156.         return $this->readApiKey;
  157.     }
  158.     /**
  159.      * Set clientId
  160.      *
  161.      * @param string $clientId
  162.      *
  163.      * @return ApidaeWriteConfiguration
  164.      */
  165.     public function setClientId($clientId)
  166.     {
  167.         $this->clientId $clientId;
  168.         return $this;
  169.     }
  170.     /**
  171.      * Get clientId
  172.      *
  173.      * @return string
  174.      */
  175.     public function getClientId()
  176.     {
  177.         return $this->clientId;
  178.     }
  179.     /**
  180.      * Set clientSecret
  181.      *
  182.      * @param string $clientSecret
  183.      *
  184.      * @return ApidaeWriteConfiguration
  185.      */
  186.     public function setClientSecret($clientSecret)
  187.     {
  188.         $this->clientSecret $clientSecret;
  189.         return $this;
  190.     }
  191.     /**
  192.      * Get clientId
  193.      *
  194.      * @return string
  195.      */
  196.     public function getClientSecret()
  197.     {
  198.         return $this->clientSecret;
  199.     }
  200.     public function getEntity(): ?DnsitEntity
  201.     {
  202.         return $this->entity;
  203.     }
  204.     public function setEntity(?DnsitEntity $entity): self
  205.     {
  206.         $this->entity $entity;
  207.         return $this;
  208.     }
  209.     /**
  210.      * Set baseUrl
  211.      *
  212.      * @param string $baseUrl
  213.      *
  214.      * @return ApidaeWriteConfiguration
  215.      */
  216.     public function setBaseUrl($baseUrl)
  217.     {
  218.         $this->baseUrl $baseUrl;
  219.         return $this;
  220.     }
  221.     /**
  222.      * Get baseUrl
  223.      *
  224.      * @return string
  225.      */
  226.     public function getBaseUrl()
  227.     {
  228.         return $this->baseUrl;
  229.     }
  230.     /**
  231.      * Set updatedAt
  232.      *
  233.      * @param \DateTime $updatedAt
  234.      *
  235.      * @return ApidaeWriteConfiguration
  236.      */
  237.     public function setUpdatedAt($updatedAt)
  238.     {
  239.         $this->updatedAt $updatedAt;
  240.         return $this;
  241.     }
  242.     /**
  243.      * Get updatedAt
  244.      *
  245.      * @return \DateTime
  246.      */
  247.     public function getUpdatedAt()
  248.     {
  249.         return $this->updatedAt;
  250.     }
  251.     /**
  252.      * Get id
  253.      *
  254.      * @return integer
  255.      */
  256.     public function getId()
  257.     {
  258.         return $this->id;
  259.     }
  260.     public function getName(): ?string
  261.     {
  262.         return $this->name;
  263.     }
  264.     public function setName(?string $name): self
  265.     {
  266.         $this->name $name;
  267.         return $this;
  268.     }
  269.     public function getOrdering(): ?int
  270.     {
  271.         return $this->ordering;
  272.     }
  273.     public function setOrdering(?int $ordering): self
  274.     {
  275.         $this->ordering $ordering;
  276.         return $this;
  277.     }
  278.     public function getOwner(): ?User
  279.     {
  280.         return $this->owner;
  281.     }
  282.     public function setOwner(?User $owner): self
  283.     {
  284.         $this->owner $owner;
  285.         return $this;
  286.     }
  287.     /**
  288.      * @return Collection|ApidaeTranslationConfig[]
  289.      */
  290.     public function getApidaeTranslationConfigs(): Collection
  291.     {
  292.         return $this->apidaeTranslationConfigs;
  293.     }
  294.     public function addApidaeTranslationConfig(ApidaeTranslationConfig $apidaeTranslationConfig): self
  295.     {
  296.         if (!$this->apidaeTranslationConfigs->contains($apidaeTranslationConfig)) {
  297.             $this->apidaeTranslationConfigs[] = $apidaeTranslationConfig;
  298.             $apidaeTranslationConfig->setWriteConfiguration($this);
  299.         }
  300.         return $this;
  301.     }
  302.     public function removeApidaeTranslationConfig(ApidaeTranslationConfig $apidaeTranslationConfig): self
  303.     {
  304.         if ($this->apidaeTranslationConfigs->contains($apidaeTranslationConfig)) {
  305.             $this->apidaeTranslationConfigs->removeElement($apidaeTranslationConfig);
  306.             // set the owning side to null (unless already changed)
  307.             if ($apidaeTranslationConfig->getWriteConfiguration() === $this) {
  308.                 $apidaeTranslationConfig->setWriteConfiguration(null);
  309.             }
  310.         }
  311.         return $this;
  312.     }
  313.     public function getCreatedAt(): ?\DateTimeInterface
  314.     {
  315.         return $this->createdAt;
  316.     }
  317.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  318.     {
  319.         $this->createdAt $createdAt;
  320.         return $this;
  321.     }
  322. }