src/Entity/Alert.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\AccessRisk;
  4. use App\Entity\ActivityAme;
  5. use DateTime;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Symfony\Component\Serializer\Annotation\Groups;
  10. use Symfony\Component\Serializer\Annotation\SerializedName;
  11. /**
  12.  * @ORM\Entity(repositoryClass="App\Repository\AlertRepository")
  13.  */
  14. class Alert
  15. {
  16.     /**
  17.      * @ORM\Id()
  18.      * @ORM\GeneratedValue()
  19.      * @ORM\Column(type="integer")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity="App\Entity\Cluster")
  24.      * @ORM\JoinColumn(nullable=false)
  25.   
  26.      */
  27.     private $cluster;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity="App\Entity\EventReason")
  30.      * @ORM\JoinColumn(nullable=false)
  31.       
  32.      */
  33.     private $eventReason;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity="App\Entity\Actor")
  36.      * @ORM\JoinColumn(nullable=false)
  37.      */
  38.     private $primarySource;
  39.     /**
  40.      * @ORM\Column(type="datetime")
  41.      * @Groups({"public", "alert:register"})
  42.      */
  43.     private $startDate;
  44.     /**
  45.      * @ORM\Column(type="text")
  46.      * @Groups({"public", "alert:register"})
  47.      */
  48.     private $description;
  49.     /**
  50.      * @ORM\Column(type="datetime")                 
  51.      */
  52.     private $creationDate;
  53.     /**
  54.      * @ORM\Column(type="boolean")
  55.      */
  56.     private $isDeleted;
  57.     /**
  58.      * @ORM\Column(type="string", length=255, nullable=true)
  59.      * @Groups("public")
  60.      */
  61.     private $axe;
  62.     /**
  63.      * @ORM\Column(type="string", length=255, nullable=true)
  64.      * @Groups({"public", "alert:register"})
  65.      */
  66.     private $secondarySource;
  67.     /**
  68.      * @ORM\ManyToOne(targetEntity="App\Entity\User")
  69.      * @ORM\JoinColumn(nullable=false)
  70.   
  71.      */
  72.     private $userCreate;
  73.     /**
  74.      * @ORM\OneToMany(targetEntity="App\Entity\AlertDetail", mappedBy="alert")
  75.      * @Groups("public")
  76.      */
  77.     private $alertDetails;
  78.     /**
  79.      * @ORM\OneToMany(targetEntity=Process::class, mappedBy="alert")
  80.      * @Groups("public")
  81.      */
  82.     private $processes;
  83.     /**
  84.      * @ORM\OneToMany(targetEntity=AlertDocument::class, mappedBy="alert")
  85.      * @Groups("public")
  86.      */
  87.     private $alertDocuments;
  88.     /**
  89.      * @ORM\Column(type="boolean", nullable=true)
  90.      * @Groups("public")
  91.      */
  92.     private $isValid;
  93.     /**
  94.      * @ORM\Column(type="boolean", nullable=true)
  95.      */
  96.     private $isAvorte;
  97.     /**
  98.      * @ORM\Column(type="text", nullable=true)
  99.      */
  100.     private $comment;
  101.     /**
  102.      * @ORM\Column(type="datetime", nullable=true)
  103.      */
  104.     private $dateAvorte;
  105.     /**
  106.      * @ORM\ManyToOne(targetEntity=User::class)
  107.      */
  108.     private $userAvorte;
  109.     /**
  110.      * @ORM\OneToMany(targetEntity=Movement::class, mappedBy="alert")
  111.      */
  112.     private $movements;
  113.     /**
  114.      * @ORM\ManyToOne(targetEntity=AccessRisk::class)
  115.      * @Groups("public")
  116.     
  117.      */
  118.     private $accessRisk;
  119.     /**
  120.      * @ORM\ManyToOne(targetEntity=Process::class)
  121.      * @Groups("public")
  122.      */
  123.     private $statut;
  124.     /**
  125.      * @ORM\ManyToOne(targetEntity=Severity::class)
  126.      * @Groups("public")
  127.      */
  128.     private $severity;
  129.     /**
  130.      * @ORM\ManyToOne(targetEntity=AlertDetail::class)
  131.      * @Groups("public")
  132.      */
  133.     private $alertDetail;
  134.     /**
  135.      * @ORM\ManyToOne(targetEntity=Crisis::class, inversedBy="alerts")
  136.      */
  137.     private $crisis;
  138.     /**
  139.      * @ORM\Column(type="boolean", nullable=true)
  140.      */
  141.     private $isIdp;
  142.     /**
  143.      * @ORM\Column(type="datetime", nullable=true)
  144.      */
  145.     private $deleted_date;
  146.     /**
  147.      * @ORM\ManyToMany(targetEntity=ActivityAme::class, mappedBy="alerts")
  148.      */
  149.     private $activityAmes;
  150.     /**
  151.      * @ORM\Column(type="string", length=255, nullable=true)
  152.      * @Groups("public")
  153.      */
  154.     private $accessRiskComment;
  155.     /**
  156.      * @ORM\Column(type="integer", nullable=true)
  157.    
  158.      */
  159.     private $displacedEval;
  160.     /**
  161.      * @ORM\Column(type="integer", nullable=true)
  162.      */
  163.     private $returnedEval;
  164.     /**
  165.      * @ORM\Column(type="integer", nullable=true)
  166.      
  167.      */
  168.     private $affectedEval;
  169.     /**
  170.      * @ORM\Column(type="integer", nullable=true)
  171.   
  172.      */
  173.     private $householdEval;
  174.     /**
  175.      * @ORM\ManyToOne(targetEntity=Pcode::class, inversedBy="alerts")
  176.      * @ORM\JoinColumn(nullable=false)
  177.      */
  178.     private $country;
  179.     /**
  180.      * @ORM\ManyToOne(targetEntity=Severity::class, inversedBy="alertsSeverity")
  181.      */
  182.     private $severity_alert;
  183.     /**
  184.      * @ORM\Column(type="decimal", precision=5, scale=3, nullable=true)
  185.      * @Groups({"public", "alert:register"})
  186.      */
  187.     private $severityAlertRrm;
  188.     /**
  189.      * @ORM\Column(type="integer", nullable=true)
  190.      */
  191.     private $displacedEvalHousehold;
  192.     /**
  193.      * @ORM\Column(type="integer", nullable=true)
  194.      
  195.      */
  196.     private $returnedEvalHousehold;
  197.     /**
  198.      * @ORM\ManyToOne(targetEntity=EventSousType::class)
  199.      */
  200.     private $eventSousType;
  201.     /**
  202.      * @ORM\ManyToOne(targetEntity=AlertAccommodation::class)
  203.      */
  204.     private $accommodation;
  205.     // /**
  206.     //  * @ORM\ManyToOne(targetEntity=Movement::class, inversedBy="alerts")
  207.     //  */
  208.     // private $pdi;
  209.     private int $alertId ;
  210.     private int $clusterId ;
  211.     private string $clusterName;
  212.     private string $primarySourceAcronyme;
  213.     private string $primarySourceLabel;
  214.     private string $eventReseaonLabel;
  215.    
  216.     private string $adminId;
  217.     
  218.     private string $statut_alert;
  219.     private string $statut_date;
  220.     /**
  221.      * @ORM\ManyToOne(targetEntity=MovementCategory::class, inversedBy="alerts")
  222.      */
  223.     private $movementCategory;
  224.     
  225.     public function __construct()
  226.     {
  227.         $this->isDeleted false;
  228.         $this->creationDate = new \DateTime();
  229.        // $this->startDate = new \DateTime();
  230.         //$this->userCreate = $user;
  231.         //$this->alertDetails = new ArrayCollection();
  232.         $this->processes = new ArrayCollection();
  233.         $this->alertDocuments = new ArrayCollection();
  234.         $this->movements = new ArrayCollection();
  235.         $this->activityAmes = new ArrayCollection();
  236.       
  237.     }
  238.     public function getId(): ?int
  239.     {
  240.         return $this->id;
  241.     }
  242.     public function getCluster(): ?Cluster
  243.     {
  244.         return $this->cluster;
  245.     }
  246.     public function setCluster(?Cluster $cluster): self
  247.     {
  248.         $this->cluster $cluster;
  249.         return $this;
  250.     }
  251.     public function getEventReason(): ?EventReason
  252.     {
  253.         return $this->eventReason;
  254.     }
  255.     public function setEventReason(?EventReason $eventReason): self
  256.     {
  257.         $this->eventReason $eventReason;
  258.         return $this;
  259.     }
  260.     public function getStartDate(): ?\DateTimeInterface
  261.     {
  262.         return $this->startDate;
  263.     }
  264.     public function setStartDate(\DateTimeInterface $startDate): self
  265.     {
  266.         $this->startDate $startDate;
  267.         return $this;
  268.     }
  269.     public function getDescription(): ?string
  270.     {
  271.         return $this->description;
  272.     }
  273.     public function setDescription(string $description): self
  274.     {
  275.         $this->description $description;
  276.         return $this;
  277.     }
  278.     public function getCreationDate(): ?\DateTimeInterface
  279.     {
  280.         return $this->creationDate;
  281.     }
  282.     public function setCreationDate(\DateTimeInterface $creationDate): self
  283.     {
  284.         $this->creationDate $creationDate;
  285.         return $this;
  286.     }
  287.     public function getIsDeleted(): ?bool
  288.     {
  289.         return $this->isDeleted;
  290.     }
  291.     public function setIsDeleted(bool $isDeleted): self
  292.     {
  293.         $this->isDeleted $isDeleted;
  294.         return $this;
  295.     }
  296.     public function getAxe(): ?string
  297.     {
  298.         return $this->axe;
  299.     }
  300.     public function setAxe(?string $axe): self
  301.     {
  302.         $this->axe $axe;
  303.         return $this;
  304.     }
  305.     public function getSecondarySource(): ?string
  306.     {
  307.         return $this->secondarySource;
  308.     }
  309.     public function setSecondarySource(?string $secondarySource): self
  310.     {
  311.         $this->secondarySource $secondarySource;
  312.         return $this;
  313.     }
  314.     public function getPrimarySource(): ?Actor
  315.     {
  316.         return $this->primarySource;
  317.     }
  318.     public function setPrimarySource(?Actor $primarySource): self
  319.     {
  320.         $this->primarySource $primarySource;
  321.         return $this;
  322.     }
  323.     public function getUserCreate(): ?User
  324.     {
  325.         return $this->userCreate;
  326.     }
  327.     public function setUserCreate(?User $userCreate): self
  328.     {
  329.         $this->userCreate $userCreate;
  330.         return $this;
  331.     }
  332.     /**
  333.      * @return Collection|AlertDetail[]
  334.      */
  335.     public function getAlertDetails(): Collection
  336.     {
  337.         return $this->alertDetails;
  338.     }
  339.     public function addAlertDetail(AlertDetail $alertDetail): self
  340.     {
  341.         if (!$this->alertDetails->contains($alertDetail)) {
  342.             $this->alertDetails[] = $alertDetail;
  343.             $alertDetail->setAlert($this);
  344.         }
  345.         return $this;
  346.     }
  347.     public function removeAlertDetail(AlertDetail $alertDetail): self
  348.     {
  349.         if ($this->alertDetails->contains($alertDetail)) {
  350.             $this->alertDetails->removeElement($alertDetail);
  351.             // set the owning side to null (unless already changed)
  352.             if ($alertDetail->getAlert() === $this) {
  353.                 $alertDetail->setAlert(null);
  354.             }
  355.         }
  356.         return $this;
  357.     }
  358.     /**
  359.      * @return Collection|Process[]
  360.      */
  361.     public function getProcesses(): Collection
  362.     {
  363.         return $this->processes;
  364.     }
  365.     public function addProcess(Process $process): self
  366.     {
  367.         if (!$this->processes->contains($process)) {
  368.             $this->processes[] = $process;
  369.             $process->setAlert($this);
  370.         }
  371.         return $this;
  372.     }
  373.     public function removeProcess(Process $process): self
  374.     {
  375.         if ($this->processes->contains($process)) {
  376.             $this->processes->removeElement($process);
  377.             // set the owning side to null (unless already changed)
  378.             if ($process->getAlert() === $this) {
  379.                 $process->setAlert(null);
  380.             }
  381.         }
  382.         return $this;
  383.     }
  384.     /**
  385.      * @return Collection|AlertDocument[]
  386.      */
  387.     public function getAlertDocuments(): Collection
  388.     {
  389.         return $this->alertDocuments;
  390.     }
  391.     public function addAlertDocument(AlertDocument $alertDocument): self
  392.     {
  393.         if (!$this->alertDocuments->contains($alertDocument)) {
  394.             $this->alertDocuments[] = $alertDocument;
  395.             $alertDocument->setAlert($this);
  396.         }
  397.         return $this;
  398.     }
  399.     public function removeAlertDocument(AlertDocument $alertDocument): self
  400.     {
  401.         if ($this->alertDocuments->contains($alertDocument)) {
  402.             $this->alertDocuments->removeElement($alertDocument);
  403.             // set the owning side to null (unless already changed)
  404.             if ($alertDocument->getAlert() === $this) {
  405.                 $alertDocument->setAlert(null);
  406.             }
  407.         }
  408.         return $this;
  409.     }
  410.     public function getIsValid(): ?bool
  411.     {
  412.         return $this->isValid;
  413.     }
  414.     public function setIsValid(?bool $isValid): self
  415.     {
  416.         $this->isValid $isValid;
  417.         return $this;
  418.     }
  419.     public function getIsAvorte(): ?bool
  420.     {
  421.         return $this->isAvorte;
  422.     }
  423.     public function setIsAvorte(?bool $isAvorte): self
  424.     {
  425.         $this->isAvorte $isAvorte;
  426.         return $this;
  427.     }
  428.     public function getComment(): ?string
  429.     {
  430.         return $this->comment;
  431.     }
  432.     public function setComment(?string $comment): self
  433.     {
  434.         $this->comment $comment;
  435.         return $this;
  436.     }
  437.     public function getDateAvorte(): ?\DateTimeInterface
  438.     {
  439.         return $this->dateAvorte;
  440.     }
  441.     public function setDateAvorte(\DateTimeInterface $dateAvorte): self
  442.     {
  443.         $this->dateAvorte $dateAvorte;
  444.         return $this;
  445.     }
  446.     public function getUserAvorte(): ?User
  447.     {
  448.         return $this->userAvorte;
  449.     }
  450.     public function setUserAvorte(?User $userAvorte): self
  451.     {
  452.         $this->userAvorte $userAvorte;
  453.         return $this;
  454.     }
  455.     /**
  456.      * @return Collection|Movement[]
  457.      */
  458.     public function getMovements(): Collection
  459.     {
  460.         return $this->movements;
  461.     }
  462.     public function addMovement(Movement $movement): self
  463.     {
  464.         if (!$this->movements->contains($movement)) {
  465.             $this->movements[] = $movement;
  466.             $movement->setAlert($this);
  467.         }
  468.         return $this;
  469.     }
  470.     public function removeMovement(Movement $movement): self
  471.     {
  472.         if ($this->movements->contains($movement)) {
  473.             $this->movements->removeElement($movement);
  474.             // set the owning side to null (unless already changed)
  475.             if ($movement->getAlert() === $this) {
  476.                 $movement->setAlert(null);
  477.             }
  478.         }
  479.         return $this;
  480.     }
  481.     public function getAccessRisk(): ?AccessRisk
  482.     {
  483.         return $this->accessRisk;
  484.     }
  485.     public function setAccessRisk(?AccessRisk $accessRisk): self
  486.     {
  487.         $this->accessRisk $accessRisk;
  488.         return $this;
  489.     }
  490.     public function getStatut(): ?Process
  491.     {
  492.         return $this->statut;
  493.     }
  494.     public function setStatut(?Process $statut): self
  495.     {
  496.         $this->statut $statut;
  497.         return $this;
  498.     }
  499.     public function getSeverity(): ?Severity
  500.     {
  501.         return $this->severity;
  502.     }
  503.     public function setSeverity(?Severity $severity): self
  504.     {
  505.         $this->severity $severity;
  506.         return $this;
  507.     }
  508.     public function getAlertDetail(): ?AlertDetail
  509.     {
  510.         return $this->alertDetail;
  511.     }
  512.     public function setAlertDetail(?AlertDetail $alertDetail): self
  513.     {
  514.         $this->alertDetail $alertDetail;
  515.         return $this;
  516.     }
  517.     public function getCrisis(): ?Crisis
  518.     {
  519.         return $this->crisis;
  520.     }
  521.     public function setCrisis(?Crisis $crisis): self
  522.     {
  523.         $this->crisis $crisis;
  524.         return $this;
  525.     }
  526.     // public function getPdi(): ?Movement
  527.     // {
  528.     //     return $this->pdi;
  529.     // }
  530.     // public function setPdi(?Movement $pdi): self
  531.     // {
  532.     //     $this->pdi = $pdi;
  533.     //     return $this;
  534.     // }
  535.     public function getIsIdp(): ?bool
  536.     {
  537.         return $this->isIdp;
  538.     }
  539.     public function setIsIdp(?bool $isIdp): self
  540.     {
  541.         $this->isIdp $isIdp;
  542.         return $this;
  543.     }
  544.     public function getDeletedDate(): ?\DateTimeInterface
  545.     {
  546.         return $this->deleted_date;
  547.     }
  548.     public function setDeletedDate(?\DateTimeInterface $deleted_date): self
  549.     {
  550.         $this->deleted_date $deleted_date;
  551.         return $this;
  552.     }
  553.     public function getAlertSumPerson($alertDetail)
  554.     {
  555.         $sum 0;
  556.         foreach ($alertDetail as $detail) {
  557.             $sum += $detail->getDisplaced();
  558.         }
  559.         return $sum;
  560.     }
  561.     public function getAlertSumHousehold($alertDetail)
  562.     {
  563.         $sum 0;
  564.         foreach ($alertDetail as $detail) {
  565.             $sum += $detail->getHousehold();
  566.         }
  567.         return $sum;
  568.     }
  569.     public function getAlertSumDisplaced($alertDetail)
  570.     {
  571.         $sum 0;
  572.         foreach ($alertDetail as $detail) {
  573.             $sum += $detail->getDisplaced();
  574.         }
  575.         return $sum;
  576.     }
  577.     public function getAlertSumReturned($alertDetail)
  578.     
  579.     {
  580.         $sum 0;
  581.         foreach ($alertDetail as $detail) {
  582.             $sum += $detail->getReturned();
  583.         }
  584.         return $sum;
  585.     }
  586.     /**
  587.      * @return Collection|ActivityAme[]
  588.      */
  589.     public function getActivityAmes(): Collection
  590.     {
  591.         return $this->activityAmes;
  592.     }
  593.     public function addActivityAme(ActivityAme $activityAme): self
  594.     {
  595.         if (!$this->activityAmes->contains($activityAme)) {
  596.             $this->activityAmes[] = $activityAme;
  597.             $activityAme->addAlert($this);
  598.         }
  599.         return $this;
  600.     }
  601.     public function removeActivityAme(ActivityAme $activityAme): self
  602.     {
  603.         if ($this->activityAmes->removeElement($activityAme)) {
  604.             $activityAme->removeAlert($this);
  605.         }
  606.         return $this;
  607.     }
  608.     public function getAccessRiskComment(): ?string
  609.     {
  610.         return $this->accessRiskComment;
  611.     }
  612.     public function setAccessRiskComment(string $accessRiskComment): self
  613.     {
  614.         $this->accessRiskComment $accessRiskComment;
  615.         return $this;
  616.     }
  617.     public function getDisplacedEval(): ?int
  618.     {
  619.         return $this->displacedEval;
  620.     }
  621.     public function setDisplacedEval(?int $displacedEval): self
  622.     {
  623.         $this->displacedEval $displacedEval;
  624.         return $this;
  625.     }
  626.     public function getReturnedEval(): ?int
  627.     {
  628.         return $this->returnedEval;
  629.     }
  630.     public function setReturnedEval(?int $returnedEval): self
  631.     {
  632.         $this->returnedEval $returnedEval;
  633.         return $this;
  634.     }
  635.     public function getAffectedEval(): ?int
  636.     {
  637.         return $this->affectedEval;
  638.     }
  639.     public function setAffectedEval(?int $affectedEval): self
  640.     {
  641.         $this->affectedEval $affectedEval;
  642.         return $this;
  643.     }
  644.     public function getHouseholdEval(): ?int
  645.     {
  646.         return $this->householdEval;
  647.     }
  648.     public function setHouseholdEval(?int $householdEval): self
  649.     {
  650.         $this->householdEval $householdEval;
  651.         return $this;
  652.     }
  653.     public function getCountry(): ?Pcode
  654.     {
  655.         return $this->country;
  656.     }
  657.     public function setCountry(?Pcode $country): self
  658.     {
  659.         $this->country $country;
  660.         return $this;
  661.     }
  662.     public function getSeverityAlert(): ?Severity
  663.     {
  664.         return $this->severity_alert;
  665.     }
  666.     public function setSeverityAlert(?Severity $severity_alert): self
  667.     {
  668.         $this->severity_alert $severity_alert;
  669.         return $this;
  670.     }
  671.     public function getSeverityAlertRrm(): ?string
  672.     {
  673.         return $this->severityAlertRrm;
  674.     }
  675.     public function setSeverityAlertRrm(?string $severityAlertRrm): self
  676.     {
  677.         $this->severityAlertRrm $severityAlertRrm;
  678.         return $this;
  679.     }
  680.     public function getDisplacedEvalHousehold(): ?int
  681.     {
  682.         return $this->displacedEvalHousehold;
  683.     }
  684.     public function setDisplacedEvalHousehold(?int $displacedEvalHousehold): self
  685.     {
  686.         $this->displacedEvalHousehold $displacedEvalHousehold;
  687.         return $this;
  688.     }
  689.     public function getReturnedEvalHousehold(): ?int
  690.     {
  691.         return $this->returnedEvalHousehold;
  692.     }
  693.     public function setReturnedEvalHousehold(?int $returnedEvalHousehold): self
  694.     {
  695.         $this->returnedEvalHousehold $returnedEvalHousehold;
  696.         return $this;
  697.     }
  698.     public function getEventSousType(): ?EventSousType
  699.     {
  700.         return $this->eventSousType;
  701.     }
  702.     public function setEventSousType(?EventSousType $eventSousType): self
  703.     {
  704.         $this->eventSousType $eventSousType;
  705.         return $this;
  706.     }
  707.     public function getAccommodation(): ?AlertAccommodation
  708.     {
  709.         return $this->accommodation;
  710.     }
  711.     public function setAccommodation(?AlertAccommodation $accommodation): self
  712.     {
  713.         $this->accommodation $accommodation;
  714.         return $this;
  715.     
  716.         
  717.     }
  718.     /**
  719.      * @Groups({"public", "alert:register"})
  720.      * @SerializedName("alert_id")
  721.      */
  722.     public function getAlertId(): int
  723.     {
  724.         return $this->getId() ;
  725.     }
  726.     /**
  727.      * @Groups({"public", "alert:register"})
  728.      * @SerializedName("eventReason_label")
  729.      */
  730.     public function getEventReasonLabel(): string
  731.     {
  732.         return $this->eventReason $this->eventReason->getLabel() : null;
  733.     }
  734.       /**
  735.      * @Groups({"public", "alert:register"})
  736.      * @SerializedName("primarySource_label")
  737.      */
  738.     public function getPrimarySourceLabel(): string
  739.     {
  740.         return $this->primarySource $this->primarySource->getLabelFr() : null;
  741.     }
  742.     
  743.      /**
  744.      * @Groups({"public", "alert:register"})
  745.      * @SerializedName("primarySource_acronyme")
  746.      */
  747.     public function getPrimarySourceAcronyme(): string
  748.     {
  749.         return $this->primarySource $this->primarySource->getAcronymFr() : null;
  750.     }
  751.     
  752.     
  753.     /**
  754.      * @Groups({"public", "alert:register"})
  755.      * @SerializedName("cluter_id")
  756.      */
  757.     public function getClusterId(): int
  758.     {
  759.         return $this->cluster $this->cluster->getId() : null;
  760.     }
  761.     /**
  762.      * @Groups({"public", "alert:register"})
  763.      * @SerializedName("cluster_name")
  764.      */
  765.     public function getClusterName(): string
  766.     {
  767.         return $this->cluster $this->cluster->getLabel() : null;
  768.     }
  769.     /**
  770.      * @Groups({"public", "alert:register"})
  771.      * @SerializedName("admin1_id")
  772.      */
  773.     public function getAdmin1Id(): string
  774.     {
  775.         if($this->getAlertDetail() && $this->getAlertDetail()->getAdmin1() && $this->getAlertDetail()->getAdmin1()->getId() )
  776.         {
  777.             $admin1Id =  $this->getAlertDetail()->getAdmin1()->getId();
  778.         }
  779.         else {
  780.             $admin1Id null;
  781.         }
  782.         return $admin1Id;
  783.         
  784.     }
  785.      /**
  786.      * @Groups({"public", "alert:register"})
  787.      * @SerializedName("admin1_Label")
  788.      */
  789.     public function getAdmin1Label(): string
  790.     {
  791.         if($this->getAlertDetail() && $this->getAlertDetail()->getAdmin1() && $this->getAlertDetail()->getAdmin1()->getLabel() )
  792.         {
  793.             $admin1Label =  $this->getAlertDetail()->getAdmin1()->getLabel();
  794.         }
  795.         else {
  796.             $admin1Label null;
  797.         }
  798.         return $admin1Label;
  799.         
  800.     }
  801.      /**
  802.      * @Groups({"public", "alert:register"})
  803.      * @SerializedName("admin2_id")
  804.      */
  805.     public function getAdmin2Id(): string
  806.     {
  807.         if($this->getAlertDetail() && $this->getAlertDetail()->getAdmin2() && $this->getAlertDetail()->getAdmin2()->getId() )
  808.         {
  809.             $admin2Id =  $this->getAlertDetail()->getAdmin2()->getId();
  810.         }
  811.         else {
  812.             $admin2Id null;
  813.         }
  814.         return $admin2Id
  815.     }
  816.     /**
  817.      * @Groups({"public", "alert:register"})
  818.      * @SerializedName("admin2_Label")
  819.      */
  820.     public function getAdmin2Label(): string
  821.     {
  822.         if($this->getAlertDetail() && $this->getAlertDetail()->getAdmin2() && $this->getAlertDetail()->getAdmin2()->getLabel() )
  823.         {
  824.             $admin2Label =  $this->getAlertDetail()->getAdmin2()->getLabel();
  825.         }
  826.         else {
  827.             $admin2Label null;
  828.         }
  829.         return $admin2Label;
  830.         
  831.     }
  832.     /**
  833.      * @Groups({"public", "alert:register"})
  834.      * @SerializedName("admin3_id")
  835.      */
  836.     public function getAdmin3Id(): string
  837.     {
  838.         if($this->getAlertDetail() && $this->getAlertDetail()->getAdmin3() && $this->getAlertDetail()->getAdmin3()->getId() )
  839.         {
  840.             $admin3Id =  $this->getAlertDetail()->getAdmin3()->getId();
  841.         }
  842.         else {
  843.             $admin3Id null;
  844.         }
  845.         return $admin3Id;
  846.         
  847.     }
  848.      /**
  849.      * @Groups({"public", "alert:register"})
  850.      * @SerializedName("admin3_Label")
  851.      */
  852.     public function getAdmin3Label(): string
  853.     {
  854.         if($this->getAlertDetail() && $this->getAlertDetail()->getAdmin3() && $this->getAlertDetail()->getAdmin3()->getLabel() )
  855.         {
  856.             $admin3Label =  $this->getAlertDetail()->getAdmin3()->getLabel();
  857.         }
  858.         else {
  859.             $admin3Label null;
  860.         }
  861.         return $admin3Label;
  862.         
  863.     }
  864.     /**
  865.      * @Groups({"public", "alert:register"})
  866.      * @SerializedName("health_Zone_Id")
  867.      */
  868.     public function getHealthZoneId(): string
  869.     {
  870.         if($this->getAlertDetail() && $this->getAlertDetail()->getHealthZone() && $this->getAlertDetail()->getHealthZone()->getId() )
  871.         {
  872.             $healthZoneId =  $this->getAlertDetail()->getHealthZone()->getId();
  873.         }
  874.         else {
  875.             $healthZoneId null;
  876.         }
  877.         return $healthZoneId;
  878.         
  879.     }
  880.     /**
  881.      * @Groups({"public", "alert:register"})
  882.      * @SerializedName("healthZone_Label")
  883.      */
  884.     public function getHealthZoneLabel(): string
  885.     {
  886.         if($this->getAlertDetail() && $this->getAlertDetail()->getHealthZone() && $this->getAlertDetail()->getHealthZone()->getLabel() )
  887.         {
  888.             $healthZoneLabel =  $this->getAlertDetail()->getHealthZone()->getLabel();
  889.         }
  890.         else {
  891.             $healthZoneLabel null;
  892.         }
  893.         return $healthZoneLabel;
  894.         
  895.     }
  896.     /**
  897.      * @Groups({"public", "alert:register"})
  898.      * @SerializedName("displaced")
  899.      */
  900.     public function getDisplaced(): int
  901.     {
  902.         if($this->getAlertDetail() && $this->getAlertDetail()->getDisplaced() && $this->getAlertDetail()->getDisplaced() )
  903.         {
  904.             $diplaced =  $this->getAlertDetail()->getDisplaced();
  905.         }
  906.         else {
  907.             $diplaced null;
  908.         }
  909.         return $diplaced;
  910.         
  911.     }
  912.      /**
  913.      * @Groups({"public", "alert:register"})
  914.      * @SerializedName("statut_Alert")
  915.      */
  916.     public function getStatutLabel(): string
  917.     {
  918.         if($this->getStatut() && $this->getStatut()->getWorkflow()->getDescription() && $this->getStatut()->getWorkflow()->getDescription() )
  919.         {
  920.             $statutLabel =  $this->getStatut()->getWorkflow()->getDescription();
  921.         }
  922.         else {
  923.             $statutLabel null;
  924.         }
  925.         return $statutLabel;
  926.         
  927.     }
  928.     
  929.     /**
  930.      * @Groups({"public", "alert:register"})
  931.      * @SerializedName("statut_Date")
  932.      */
  933.     public function getStatutDate(): DateTime
  934.     {
  935.         if($this->getStatut() && $this->getStatut()->getDatecreate() && $this->getStatut()->getDatecreate() )
  936.         {
  937.             $statut_date =  $this->getStatut()->getDatecreate();
  938.         }
  939.         else {
  940.             $statut_date null;
  941.         }
  942.         return $statut_date;
  943.         
  944.     }
  945.     /**
  946.      * @Groups({"public", "alert:register"})
  947.      * @SerializedName("returned")
  948.      */
  949.     public function getRetuned(): int
  950.     {
  951.         if($this->getAlertDetail() && $this->getAlertDetail()->getReturned() && $this->getAlertDetail()->getReturned() )
  952.         {
  953.             $returned =  $this->getAlertDetail()->getReturned();
  954.         }
  955.         else {
  956.             $returned null;
  957.         }
  958.         return $returned;
  959.         
  960.     }
  961.     /**
  962.      * @Groups({"public", "alert:register"})
  963.      * @SerializedName("affected")
  964.      */
  965.     public function getAffected(): int
  966.     {
  967.         if($this->getAlertDetail() && $this->getAlertDetail()->getAffected() && $this->getAlertDetail()->getAffected() )
  968.         {
  969.             $affected =  $this->getAlertDetail()->getAffected();
  970.         }
  971.         else {
  972.             $affected null;
  973.         }
  974.         return $affected;
  975.         
  976.     }
  977.     public function getMovementCategory(): ?MovementCategory
  978.     {
  979.         return $this->movementCategory;
  980.     }
  981.     public function setMovementCategory(?MovementCategory $movementCategory): self
  982.     {
  983.         $this->movementCategory $movementCategory;
  984.         return $this;
  985.     }
  986.     
  987.     
  988. }